                       {:init-state
                        (merge state
                               {:width (get-in data [:display :width])
-                               :height (get-in data [:display :height])})})))
+                               :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

    om/IRenderState
    (render-state [_ {:keys [width height change-display-dimensions]
                      :as state}]
      (dom/div
       #js {:role "form" :className "automaton-display-control"}
       (dom/label nil "Display width")
       (dom/input
        #js {:type "text" :className "form-control" :value width
             :onChange #(handle-numeric-config-change % owner state :width)})
       (dom/label nil "Display height")
       (dom/input
        #js {:type "text" :className "form-control" :value height
             :onChange #(handle-numeric-config-change % owner state :height)})
       (dom/button
        #js {:type "submit" :className "btn btn-primary btn-lg btn-block"
             :onClick #(put! change-display-dimensions [width height])}
        "Reset display")))))


(defn gen-app-view

  (reify
    om/IRenderState
    (render-state [_ {:keys [width height change-grid-dimensions] :as state}]
      (let [started (:started data)]
        (dom/div
         #js {:role "form" :className "automaton-grid-control"}
         (dom/label nil "Grid width")
         (dom/input
          #js {:type "text" :className "form-control" :value width
               :disabled started
               :onChange
               #(handle-numeric-config-change % owner state :width)})
         (dom/label nil "Grid height")
         (dom/input
          #js {:type "text" :className "form-control" :value height
               :disabled started
               :onChange
               #(handle-numeric-config-change % owner state :height)})
         (dom/button
          #js {:type "button" :className "btn btn-danger btn-lg btn-block"
               :disabled started
               :onClick #(put! change-grid-dimensions [width height])}
          "Reset grid"))))))


(defn display-config-view
