     (will-mount [_]
       ;; Start handling tag change events etc.
       (go-loop []
-        (let [pages (om/get-state owner :pages)
-              tag-changes (om/get-state owner :tag-changes)
-              [event port] (alts! [pages tag-changes])]
+        (let [{:keys [pages tag-changes thumbnail-widths sidebar-widths]} (om/get-state owner)
+              [event port] (alts! [pages tag-changes thumbnail-widths sidebar-widths])]
           (when (and event port)
-            (cond
-              (= port pages)
+            (condp = port
+              pages
               (handle-page-click! @document owner event)
               
-              (= port tag-changes)
+              tag-changes
               (let [[op tag] event]
                 ;; Deref to get the 'actual' value (might be stale)
                 (-> @document

                       :opts {:enable-rotate? true
                              :view page/thumbnail}})]))))

(defn ^:private pages-pane-header [document]
  (om/component
   (html

                                         :add data/add-tags
                                         :remove data/remove-tags)
                               [tag])
                    (api/update-document!)))

              sidebar-widths
              (println "sidebar" event)
              
              thumbnail-widths
              (println "thumbnail" event))
            (recur)))))
    om/IRenderState
    (render-state [_ state] 
