   (-load [repl-env provides url]
     (load-javascript repl-env provides url))
   (-tear-down [repl-env]
-    (reset! torn-down true)
     (tear-down repl-env)))
 
 (defn repl-env* [options]
-  (JscEnv. (atom nil) (atom nil) (atom nil) (atom nil) (atom nil) (atom nil) options))
+  (JscEnv. (atom nil) (atom nil) (atom nil) (atom nil) options))
 
 (defn repl-env
   [& {:as options}]

          env (ana/empty-env)
          core (io/resource "cljs/core.cljs")]
      ((println-fn opts) "\nConnecting to" (bonjour-name->display-name bonjour-name) "...\n")
      (reset! (:reconnect-fn repl-env) (partial reconnect repl-env opts))
      (set-up-socket repl-env opts endpoint-address (dec endpoint-port))
      (when (= "true" (:value (jsc-eval repl-env "typeof cljs === 'undefined'")))
        ;; compile cljs.core & its dependencies, goog/base.js must be available

  (let [{:keys [out]} @(:socket repl-env)
        response-promise (promise)]
    (reset! (:response-promise repl-env) response-promise)
    (write out js)
    (let [response @response-promise]
      (if (= :eof response)
        {:status :error
         :value  "Connection to JavaScriptCore closed."}
        (let [result (json/read-str response
                       :key-fn keyword)]
          (merge
            {:status (keyword (:status result))
             :value  (:value result)}
            (when-let [raw-stacktrace (:stacktrace result)]
              {:stacktrace raw-stacktrace})))))))

(defn load-javascript
  "Load a Closure JavaScript file into the JSC REPL process."
