 (ns tabby.cluster
   (:require [tabby.server :as server]
             [clojure.tools.logging :refer :all]
-            [tabby.utils :refer :all]))
+            [tabby.utils :as utils]))
 
 ;;; Testing and Development things for cluster testing
 (defn foreach-server
   ([state f]
-   (update state :servers mapf f))
+   (update state :servers utils/mapf f))
   ([state f & args]
-   (apply update state :servers mapf f args)))
+   (apply update state :servers utils/mapf f args)))
 
 (defn- find-peers [id servers]
   (into {} (map (fn [[k v]]
                   [k (select-keys v [:hostname :port])]) (filterv (fn [[k v]] (not= k id)) servers))))
 
 (defn- set-peers [servers]
-  (mapf servers (fn [v]
+  (utils/mapf servers (fn [v]
                   (server/set-peers v (find-peers (:id v) servers)))))
 
 (defn write [k cluster]

                  (filter (partial valid-packet-for cluster id) (:tx-queue s))) (:servers cluster))))

(defn collect-rx-packets [system]
  (update-in system [:servers] mapf
             (fn [v]
               (update-in v [:rx-queue] concat (collect-packets system (:id v))))))

(defn clear-tx-packets [system]
  (update-in system [:servers] mapf assoc :tx-queue '()))

(defn pump-transmit-queues [system]
  (-> system

(defn step [dt system]
  (-> system
      (pump-transmit-queues)
      (update :servers utils/mapf (partial server/update-state dt))
      (update :time + dt)))

(defn step-times [dt times system]
