 		onActivatedAction = null
 		onDeactivatedAction = null
 
+		# Create and return the state machine instance
 		smRef = null
-		# Create and return the state machine instance
 		@sm = ->
 			smRef ||= new StateMachine
 				states: [Node.States.DEACTIVATED, Node.States.ACTIVATED]


		@addChild = (node) ->
			node.setParent(@)

			# node.bind 'onActivated', =>
			# 	@onChildActivated node
			# node.bind 'onDeactivated', =>
			# 	@onChildDeactivated node

			children.push node

		@removeChild = (node) ->

						from: Node.States.ACTIVATED
						to: Node.States.DEACTIVATED

		# Add a callback lambda to the SM and map the two  
		# state transitions to methods in this class.
		@sm().performTransition = (t) =>
			if t == Node.Transitions.ACTIVATE
				@beforeActivate()
				@doActivate()
			else if t == Node.Transitions.DEACTIVATE
				@beforeDeactivate()
				@doDeactivate()

		@setOnActivatedAction = (action) ->
