 (println "test iter-fns" (iter-fns {} [#(assoc % :yo :dawg)]))
 
 (defn game-loop
-  [scenes scene-id state frame-count]
+  [state scene-id frame-count]
   (if (< frame-count 10)
-    (recur scenes scene-id
-           (iter-fns state (scene-id scenes))
+    (recur (iter-fns state (-> state :scenes scene-id))
+           scene-id
            (inc frame-count))
     state))
 
-(println "test game-loop" (game-loop {:yo [#(assoc % :yo :dawg)]} :yo {} 0))
+(println "test game-loop" (game-loop {:yo [#(assoc % :yo :dawg)]} :yo 0))
 
 (defn deep-merge
   "Recursively merges maps. If vals are not maps, the last value wins.


(defn mk-scene
  "Add or update existing scene in the scenes hashmap"
  [scenes-hm uid fns]
  (assoc scenes-hm uid fns))

(println "test add-scene" (mk-scene {} :yo [identity]))


  (let [sys-fn (fn [state fns entity-ids]
                 (apply deep-merge (for [f fns, e entity-ids] (f state e))))
        test-system (mk-system-fn sys-fn :testable)
        test-fn (fn [component-state entity-id]
                  (println "testing" entity-id
                           component-state "->"
