           (hash-set)
           (frequencies (neighbors cells))))
 
-
 (defn update-state
+  "Given the current state of the world returns the next state."
   [{:keys [cells bounds] :as state}] 
   (assoc state :cells (next-state cells bounds)))
 
-
-#_(def update-state (add-timer update-state "update-state"))
-
-
 (defn live!
+  "Start the simulation loop."
   [app-state]
   (go 
     (while true

                        (cell-els width height cell-size cells)))))))

(defn draw!
  [app-state]
  (om/root world
           app-state
           {:target (. js/document (getElementById "app"))}))


(defn main []
  (draw! app-state)
  (live! app-state))

                            #js {:onClick (partial toggle-play-state app)}
                            (if (:playing? app) "stop" "play"))
                          (dom/button
                            #js {:onClick #(reset-random! app)}
                            "random"))
                 (apply dom/svg #js {:height (* height cell-size) 
                                     :width (* width cell-size)
