 (enable-console-print!)
 
 (def app-state (atom {:grid {:width 10 :height 10 :cells {}}
-                      :display {:width 600 :height 600}}))
+                      :display {:width 600 :height 600}
+                      :started false}))
 
 
 (defn cell-view
-  [cell owner]
+  [data owner]
   (reify
     om/IRenderState
     (render-state [_ {:keys [cell-state-changed x y]}]
-      (let [{:keys [width height state]} cell
+      (let [{:keys [width height state started]} data
             st #js {:width width :height height}]
         (dom/div #js {:style st
                       :className
                       (apply str
                              (interpose " " ["automaton-cell" (name state)]))
-                      :onClick #(put! cell-state-changed [x y])})))))
+                      :onClick #(when-not started
+                                  (put! cell-state-changed [x y]))})))))
 
 
 (defn grid-view

                           cell (assoc cell
                                  :state (a/next-state automaton-spec state))]
                       (assoc grid [x y] cell))))
                  (recur))))))
      om/IRenderState
      (render-state [_ state]

                      {:init-state
                       (merge state
                              {:width (get-in data [:display :width])
                               :height (get-in data [:display :height])})}))
           (let [started (:started data)]
             (dom/div
              #js {:className "row"}
              (dom/button
               #js {:type "button"
                    :className "btn btn-primary btn-lg btn-block"
                    :onClick #(put! (:started state) (not started))}
               (if-not started "Start" "Stop")))))
          (dom/div #js {:className "col-sm-10"}
                   (om/build grid-view
                             data
