 ; --------------------------------------------
 
 (defn prog-event [label f]
-  (swap! prog-history #(let [ph (f %)]
-                         (update-in ph [:prog-events]
-                                    conj [(count (:prog-events ph))
-                                          label
-                                          {:prog-peers (:prog-peers ph)}]))))
+  (let [pc (swap! prog-curr f)]
+    (swap! prog-history #(conj % [(count %) label pc]))))
 
 (defn kv-server [server-addr & ports]
   (let [world (:world @prog-base)

           {:target (. js/document (getElementById "world-map-hover"))})
  (om/root render-events prog-history
           {:target (. js/document (getElementById "events"))})
  (om/root render-clients prog-history
           {:target (. js/document (getElementById "controls-clients"))}))

; ------------------------------------------------

                          ;   :net-connect-ch => ch
                          ;   :res-ch => ch }

(def prog-curr (atom {:servers {}    ; { server-addr => ports }.
                      :clients {}})) ; { client-addr => client-info }.

(def prog-history (atom [])) ; Each event is [ts label @prog-curr].

(def run-world       (atom nil))
(def run-world-hover (atom nil))

; -------------------------------------------------------------------

(defn render-world [prog-curr owner]
  (apply dom/ul nil
         (map (fn [[k v]] (dom/li nil (str k ":" (count v))))
              prog-curr)))

(defn on-event-focus [ts label prog-curr]
  (reset! run-world-hover prog-curr)
  (.add gdom/classes (gdom/getElement "world-container") "hover"))

(defn on-event-blur []
