 
 (defn mk-scene
   "Add or update existing scene in the scenes hashmap"
-  [scenes-hm uid fns]
-  (assoc scenes-hm uid fns))
+  [state uid fns]
+  (assoc-in state [:scenes 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)
        scenes (-> {}
                   (mk-scene :test-scene [test-system]))
        test-fn (fn [component-state entity-id]
                  (println "testing" entity-id
                           component-state "->"

                                  (inc (or (:x component-state) 0))))
                  (assoc component-state :x (inc (or (:x component-state) 0))))
        state (-> {}
                  (mk-scene :test-scene [test-system])
                  (mk-entity :player1 [:testable])
                  (mk-entity :player2 [:testable])
                  (mk-component :testable [test-fn]))]
    (game-loop state :test-scene 0)))

(println "Running integration-test" (integration-test))
