              (let [canvas (.getElementById js/document "canvas")
                    context (.getContext canvas "2d")]
                (fn [_ _ _ new]
-                 (canvas/redraw-canvas new canvas context)))))
-
-(defn- app
-  "Update the state of the program
-  everytime it recieves a change
-  from one of the channels."
-  [state channels]
-  (go (while true
-        (swap! state
-               ((alts! channels :priority true) 0)))))
+                 (util/request-anim-frame
+                  #(canvas/redraw-canvas new canvas context))))))
 
 (defn- construct-actor
   "Contstructs an 'action-function'

          :active-tab "info-tab"
          :active-dropdown :none}
   :canvas {:width 0 :height 0
            :view {:pos [0 0 0 0]
                   :fov 250}}
   :objects {}
   :pending-object {:name "" :object {}}})


  [state]
  (util/store-locally "state" state))

(defn- init-watches
  "Initializers any state-atom watchers."
  [state]
