     200 "HTTP/1.1 200 OK"
     404 "HTTP/1.1 404 Not Found"
     "HTTP/1.1 500 Error"))
-
-(def content-types {".js" "text/javascript"
-                    ".html" "text/html"})
-
-(defn content-type [file-name]
-  (let [idx (.lastIndexOf file-name ".")
-        ext (.substring file-name idx)]
-    (get content-types ext "text/html")))
 
 (defn send-and-close
   "Use the passed connection to send a form to the browser. Send a

  (do (println "Starting Server on Port:" (:port opts))
      (let [ss (ServerSocket. (:port opts))]
        (future (server-loop opts ss))
        (swap! server-state (fn [old] {:socket ss :port (:port opts)})))))

(defn stop-server
  []

(defonce server-state (atom {:socket nil
                             :connection nil
                             :promised-conn nil
                             :return-value-fn nil
                             :client-js nil}))

(defn connection
  "Promise to return a connection when one is available. If a
