         sim-templates (re-frame/subscribe [:simulator/templates])
         wombats (re-frame/subscribe [:my-wombats])]
     (reagent/create-class
-     {:component-will-mount #(component-will-mount)
+     {:component-will-mount #(component-will-mount!)
       :props-name "simulator-panel"
       :reagent-render #(render! @sim-initialized? @sim-state @sim-templates @wombats)})))

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

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


  [:div {:class-name "right-pane"}
   [:textarea 
    {:id "editor"
     :onChange #(on-code-change! %)
     :value (or (get-player-code state) "")}]
   [:button {:onClick #(on-step-click! % state)}
    "Step"]])

(defn- render! [initialized? state templates wombats]
  (when (and (not initialized?) templates wombats)
    (initialize-simulator! templates wombats))

  [:div {:class-name "simulator-panel"}
   [render-left-pane! state]
   [render-right-pane state]])

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
