 		@_private = extend @_private, {
 			idMap: {}
 		}
-	createCDATASection: (value) ->
-		new CData(value, @)
-	createComment: (value) ->
-		new Comment(value, @)
-	createDocumentFragment: () ->
-		new DocumentFragment(@)
+	createCDATASection: (value) -> new CData(value, @)
+	createComment: (value) -> new Comment(value, @)
+	createDocumentFragment: () -> new DocumentFragment(@)
 	createElement: (name) ->
-		nodeClass = Element.Map[name?.toLowerCase()]
+		nodeClass = ELEMENT_MAP[name?.toLowerCase()]
 		if not nodeClass?
-			new Element.Map['_'](name.toUpperCase())
+			new ELEMENT_MAP['_'](name.toUpperCase())
 		else
 			new nodeClass(null,null,null,@)
 	# createEntityReference: NotSupported
 	createEvent: (type) ->
 		switch type
-			when "MutationEvents"
-				new MutationEvent()
-			else
-				new Event()
-	createTextNode: (text) ->
-		new Text(text, @)
-	getElementById: (id) ->
-		@_private.idMap[id]
+			when "MutationEvents" then new MutationEvent()
+			else new Event()
+	createTextNode: (text) -> new Text(text, @)
+	getElementById: (id) -> @_private.idMap[id]
 
 class HTMLDocument extends Document
 	constructor: () ->

			ret[r++] = indent + "</#{name}>" + newline
		ret.join('')

Element::__defineGetter__ 'tagName', () -> @nodeName
Element::__defineGetter__ 'innerHTML', () ->
	h = []

	# blur: NotSupported
	# render
	toString: (pretty=false, deep=true, indentLevel = 0) ->
		name = @nodeName?.toLowerCase()
		if pretty and deep
			indent = repeat("  ", indentLevel)
			newline = "\n"
