 		@classes = _.filter @classes, (item) -> item isnt className
 	
 	_insertElement: ->
-		
-		# Insert the element to the dom, wait for it if it's not loaded
-		# TODO: There might still be some bug here
-		
-		if document.readyState in ["complete"]
-			@__insertElement()
-		else
-			document.addEventListener "DOMContentLoaded", 
-				@__insertElement
+		utils.domComplete @__insertElement
 				
 	__insertElement: =>
-		@_rootElement.appendChild @_element
+		document.body.appendChild @_element
+	
+	destroy: ->
+		@_element.parentNode.removeChild @_element
 
 
 	#############################################################################

		# Set the view properties
		@clip = args.clip or View.Properties.clip
		@properties = args
		
		# Overridable creation hook
		@_postCreate?()

			@__matrix = matrix
			@style.webkitTransform = @__matrix.matrix().cssValues()
	
	_setMatrixValue: (property, value) ->
		
		@animateStop()
		
		@_matrix[property] = value
		@_matrix = @_matrix

		@emit "change:#{property}"
		
		# Make sure we also emit group changes like scaleX -> scale
		if property[-1..] in ["X", "Y", "Z"]
			@emit "change:#{property[..(property.length - 1)]}"
	
	_computedMatrix: ->
		new WebKitCSSMatrix @computedStyle.webkitTransform

