          [:p (str "Params" params)]
          [:hr]
          [:p (str "User Agent: " user-agent)])))))
-
-
-
-(defn start-server
-  [port]
-  (let [ch (srv/start-server port :main-handler aerobio-handler)]
-    (infof "Server start, reading msgs from %s" ch)
-    (update-adb :chan ch
-                :idfn [(partial gensym "aerobio-")]
-                :connfn [identity])
-    (go-loop [msg (<! ch)]
-      (let [{:keys [op payload]} msg]
-        (future (server-dispatch ch op payload))
-        (when (not= op :stop)
-          (recur (<! ch)))))))
-
-(defn stop-server []
-  (async/>!! (get-adb :chan) {:op :stop :payload {:cause :userstop}}))
-
-
-(defn start! [port]
-  (timbre/set-level! :info) ; :debug
-  (start-tool-watcher)
-  (start-job-watcher)
-  (start-server port))
-
-(defn stop! []
-  (stop-tool-watcher)
-  (stop-job-watcher)
-  (stop-server))
-

   [aerobio.htseq.termseq :as httm]
   [aerobio.htseq.tnseq   :as htts]
   [aerobio.htseq.wgseq   :as htws]
   ;; Program graph construction, execution, delivery
   [aerobio.pgmgraph :as pg]
   ;; REST actions



(defn start-server
  [port & {:keys [route-handler idfn connfn]
           :or {route-handler (aerobio-handler (aerobio-routes))
                connfn identity}}]
  (let [ch (srv/start-server port :main-handler route-handler)]
    (infof "Server start, reading msgs from %s" ch)
    (update-adb :chan ch
                :idfn [idfn]
                :connfn [connfn])
    (go-loop [msg (<! ch)]
      (let [{:keys [op payload]} msg]
