     (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

       [:option "PDF"]
       [:option "Plain Text"]]]])))

(defn ^:private pages [pages owner]
  (reify
    om/IRenderState
    (render-state [_ {:keys [events current-page]}]

                         (.preventDefault e))}
        (om/build (:view opts) page {:opts opts})]))))

(defn ^:private thumbnail-list [pages owner]
  (reify
    om/IRenderState
    (render-state [_ {:keys [events current-page]}]
