 
 
 (def app-state
-  {:channels {}
+  {:channels []
    :geolocation nil})
 
 (def routes ["new" ::new])

    om/IRenderState
    (render-state [_ {:keys [comm]}]
      (let [m {:init-state {:comm comm}}]
        (case page
          ::new (om/build new-channel nil m)
          ::home (om/build channel-list {:params params :data data} m))))))

  (reify
    om/IInitState
    (init-state [_]
      {:comm (chan)
       :loading false})
    om/IWillMount
    (will-mount [_]
      (when (empty? (:geolocation data))
        (om/set-state! owner :loading true))
      (go
        (let [loc (<! (get-geolocation))]
          (om/update! data [:geolocation] loc))
        (om/set-state! owner :loading false))
      (go
        (let [comm (om/get-state owner :comm)
              core-comm (om/get-state owner :core-comm)]
          (while true
            (let [[msg msg-data] (<! comm)]
              (case msg
