   [:div {:class-name "right-pane"}
    [:textarea 
     {:id "editor"
-     :onChange #(on-code-change %)
+     :onChange #(on-code-change! %)
      :value (or (get-player-code state) "")}]
-   [:button {:onClick #(on-step-click % state)}
+   [:button {:onClick #(on-step-click! % state)}
     "Step"]])
 
 (defn- render! [initialized? state templates wombats]
   (when (and (not initialized?) templates wombats)
-    (initialize-simulator templates wombats))
+    (initialize-simulator! templates wombats))
 
   [:div {:class-name "simulator-panel"}
-   [render-left-pane state]
+   [render-left-pane! state]
    [render-right-pane state]])
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; Lifecycle Methods
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn- component-will-mount []
  (re-frame/dispatch [:simulator/initialized false])
  (get-simulator-templates))


;; Callback Methods
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn- on-code-change! [evt]
  ;; Propogate the updated code into db
  (re-frame/dispatch [:simulator/update-code evt.target.value]))

(defn- on-step-click! [evt state]
  (ws/send-message :process-simulation-frame {:game-state state}))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Helper methods
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defn- initialize-simulator!
  [templates wombats]
  (re-frame/dispatch [:simulator/initialize {:simulator-template-id (:simulator-template/id (first templates))
                                             :wombat-id (:wombat/id (first wombats))}]))
