 
 (defn handle-title-blur [event app]
   (let [new-title (.. event -target -value)]
-    (p/set-document new-title (:input @app))
-    (p/remove-document (:last-title @app))
-    (om/update! app :last-title new-title)
-    (om/update! app :titles (p/get-all-titles))))
+    (put! (:channel @app) [:rename new-title])))
 
 (defn title-field [app owner]
   (reify

    (om/update! app :last-title title)))

(defn delete-click [title app]
  (p/remove-document title)
  (om/update! app :titles (p/get-all-titles)))

(defn left-menu [app owner]
  (reify

      (om/update! app :titles (p/get-all-titles))
      (let [channel (:channel app)]
        (go-loop []
          (let [[command params] (<! channel)]
            (dispatch command params app)
            (recur))))
      (listen js/document EventType/KEYDOWN app))
    om/IRender
