                  (dissoc tr user-id))
              tr))))
 
-(defn start-tracking! [send-fn! peer-config {:keys [deployment-id tracking-id]} user-id]
+(defn start-tracking! [send-fn! peer-config tracking {:keys [deployment-id tracking-id]} user-id]
   (println deployment-id " tracking id " tracking-id peer-config)
-  (stop-tracking! user-id)
+  (stop-tracking! tracking user-id)
   (swap! tracking 
          assoc 
          user-id

(defrecord HttpServer [peer-config]
  component/Lifecycle
  (start [{:keys [sente] :as component}]

    ; Just reset atoms for now. Atoms should be created and reset in here
    (reset! tracking {})
    (reset! deployments {})

    (println "Starting HTTP Server")

    (defroutes my-routes
      (GET  "/" [] (page))
      (GET  "/chsk" req ((:ring-ajax-get-or-ws-handshake sente) req))
      (POST "/chsk" req ((:ring-ajax-post sente) req))

                                                        user-id
                                                        tracking-id))))

(defn stop-all-tracking! [tracking]
  (map stop-tracking! (keys @tracking)))

(defn zk-deployment-entry-stat [client entry]
  (:stat (zk/data client (zk-onyx/prefix-path entry))))

(defn distribute-deployment-listing [send-all-fn! listing]
  (send-all-fn! [:deployment/listing listing]))

(defn refresh-deployments-watch [send-all-fn! zk-client deployments]
  (if-let [children (zk/children zk-client zk-onyx/root-path :watcher (fn [_] (refresh-deployments-watch send-all-fn! zk-client)))]
    (->> children
         (map (juxt identity 
