 			el.innerHTML = ''
 #			console.log('new class', name, classattributes)
 			console.warn 'class exists, overwriting', name if name of lz
-			lz[name] = (instanceel, overrides) ->
+			lz[name] = (instanceel, instanceattributes) ->
 				attributes = {}
 				for key, value of classattributes
-					attributes[key] = value;
-				for key, value of overrides
-#  				console.log 'overriding class option', key, value
+					attributes[key] = instanceattributes[key] ? value
+				for key, value of instanceattributes
+#  				console.log 'overriding class attribute', key, value
 					attributes[key] = value
 #				console.log 'creating class instance', name, attributes
 				parent = new lz[ext](instanceel, attributes)

				parent.subviews.push(@)
				parent.trigger('subviews', @) if parent.events?['subviews']
				parent = parent.sprite
			@sprite.setParent parent

		set_id: (@id) ->
			@sprite.set_id(id)


		attributes = {}
		for i in el.attributes
	#				console.log 'attribute', i.name, i.value
			attributes[i.name] = i.value

		# swallow builtin attributes
		for event in mouseEvents
			el.removeAttribute('on' + event)

		parent ?= el.parentNode
		attributes.parent = parent
