                        port default-port} :as opts}]
   (merge (FigwheelReplEnv.)
          ;; TODO move to one atom
-         {:server-kill (atom nil)
+         {:server (atom nil)
           :printing-listener (atom nil)
           :bound-printer (atom nil)
           :open-url open-url

    ;; load a file into all the appropriate envs
    (when-let [js-content (try (slurp url) (catch Throwable t))]
      (evaluate this js-content)))
  (-tear-down [{:keys [server-kill printing-listener]}]
    (when-let [kill-fn @server-kill]
      (reset! server-kill nil)
      (kill-fn))
    (when-let [listener @printing-listener]
      (remove-listener listener)))
  cljs.repl/IReplEnvOptions

                         (select-keys opts [:target
                                            :output-to]))
                  *connections*)]
      (reset! (:server repl-env) server)))
  ;; printing
  (when-not @(:printing-listener repl-env)
    (let [print-listener
