 	clojure.lang.IFn
 	(invoke [this] this)
 	(invoke [this x] (.applyTo this (list x)))
-	(applyTo [this args] (let [tag (first args)] (tag this))))
+	(applyTo [this args] (let [t (first args)] (t this))))
 
 (defrecord-ifn Tag [tag-name attrs css items]
 	java.lang.Object
 	(toString [_]
 		(let [attrs-with-css (if (empty? css) attrs (assoc attrs :style (str css)))]
 			(str-join
-				"<" tag-name (str-attrs attrs-with-css)
+				"<" tag-name attrs-with-css
 				(if (empty? items)
 					" />"
 					[">" (map html-escape items) "</" tag-name ">"]))))


;; Core types

(defn- str-attrs [attrs]
	(str-join (map (fn [[k v]] [" " k "=\"" (html-escape v) "\""]) attrs)))

(defrecord Css []
	java.lang.Object


(defrecord Literal [s] java.lang.Object (toString [_] s))

(defmethod print-method Attrs [a ^java.io.Writer w] (.write w (str a)))

(defmethod print-method Css [c ^java.io.Writer w] (.write w (str c)))

(defmethod print-method Tag [t ^java.io.Writer w] (.write w (str t)))
