 			@emit "change:superView"
 	
 	@define "subViews"
-		get: -> @_subViews
-
-	#############################################################################
-	## Indexes
+		get: -> _.compact @_subViews
+
+	addSubView: (view) ->
+		view.superView = @
+	
+	removeSubView: (view) ->
+		
+		if view not in @subViews
+			return
+		
+		view.superView = null
+
+	#############################################################################
+	## Ordering
 
 	@define "index"
 		get: -> @style['z-index'] or 0

			# Remove from previous superview subviews
			if @_superView
				@_superView._element.removeChild @_element
				utils.remove @_superView._subViews, @
			
			# Either insert the element to the new superview or into dom
			if value
				value._element.appendChild @_element
				value._subViews.push @
			else
				@__insertElement()
			

		# Get this views absolute frame on the screen
		utils.convertPoint @frame, @, null

	contentFrame: ->
		# Get the combined size of all subviews
		frame =
			x: utils.min _.pluck(@subViews, "minX")
			y: utils.min _.pluck(@subViews, "minY")
		
		frame.width  = utils.max(_.pluck(@subViews, "maxX")) - frame.x
		frame.height = utils.max(_.pluck(@subViews, "maxY")) - frame.y
		
		frame

	#############################################################################
	## Geometry
