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

        (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-tentacle
  [request]
  (let [params (keywordize-keys (:form-params request))]
    (serve-html
     (str "ADD A TENTACLE: " (:name params) " BELONGING TO: " (:head params)))))

;; Bidi routes are defined as nested sets of ""
(defn generate-routes []
  ["/" {""             {:get serve-index}
        "index.html"   {:get serve-index}
        "assets"       (->Resources {:prefix "public/assets"})
        "frame.html"   {:get serve-iframe}
        "heads"        {"/"           {:get serve-all-heads}
                        ""            {:get serve-all-heads}
                        [:head-name]  {:get serve-head}}
        "add-head"     {:get serve-add-head-form :post add-head}
        "add-tentacle" {:get serve-add-tentacle-form :post add-tentacle}
        "docs"         (load-routes doctopus)}])

(defn- get-tentacle-from-uri
  [request-uri]
  (let [pieces (re-find #"/docs/([^/]+)/.+" request-uri)]
    (if pieces (second pieces) nil)))

(defn generate-application-handlers
  [routes]
  (bidi/make-handler routes))

(defn wrap-iframe-transform
