 (defn -main
   []
   (let [{:keys [port]} (server-config)
-        env (parse-env)]
+        env (parse-env)
+        routes (generate-routes)
+        handlers (generate-application-handlers routes)
+        application (create-application handlers)]
     (log/info "Checking DB is set up...")
     (schema/bootstrap env)
     (log/info "Bootstrapping heads")

        (assoc response :body (templates/add-frame (slurp file)))
        response))))

(def application
  (-> (wrap-defaults application-handlers site-defaults)
      (wrap-iframe-transform)
      (wrap-route-not-found)
      (reload/wrap-reload)


(defn add-head
  [request]
  (let [head-name (get (:form-params request) "name")]
    (serve-html (str "ADD A HEAD: " head-name))))

(defn serve-head
  [request]
