   (set-fill history-view (@current-branch :id) "lightgrey")
   (set-fill history-view (branch :id) "green")
   (add-morph history-view (branch :id) history-indicator)
-  (reset! current-branch branch))
+  (reset! current-branch branch)
+  (when-let [s (most-recent-state)]
+    (reset! app-state s))
+  (render-tree @app-history @current-branch (fn [branch] (switch-to-branch branch))))
 
 (defn nth-history 
   ([i] 

    (if (< i (dec (count data))) 
      (let [e (nth data i)] 
        (if (e :cont)
          (first @(e :cont))
          e))
      (if-let [cont ((last data) :cont)]
        (nth-history (- i (dec (count data))) @cont)
        nil))))

(defn len [unrolled-list]
  (+ -1 (count unrolled-list) 
    (when-let [end (last unrolled-list)]
      (when-let [n (end :cont)] (len @n)))))

(def history-indicator
  {:id "indexMorph"

        (when-not (= (last b) n)
          (append-to-branch (@current-branch :data) n))
        (let [c (len @(@current-branch :data))]
            (render-tree @app-history @current-branch (fn [branch] (switch-to-branch branch)))
            (prn (str c " Saved " (pluralize c "State")))))))

(om/root
  (fn [app owner]
    (om/component 
      (dom/div {}
        history-slider)))
  history-view 
  {:target (. js/document (getElementById "inspector"))})