 		# @param peer [Peer] the peer that disconnects
 		#
 		_onPeerDisconnect: ( peer ) =>
+			console.log peer
 			if peer is @getParent()
 				candidates = _(@getPeers()).filter( ( p ) -> p.isSuperNode )
 				@_pickParent(candidates)

		# @param tokenString [String] A serialised token
		#
		_onTokenRequestCandidate: ( peer, tokenString ) =>
			if(@isSuperNode)
				token = Token.deserialize(tokenString)
				bestCandidateDistance = null
				for child in @getChildren()


		broadcastTimeout = 4000 # Wait for return messages after a node broadcasts that it has a token
		tokenThreshhold = 1
		superNodeSwitchThreshhold = 0.75 # Scaler: from 0 to 1. More is easier swtiching

		# Constructs a new app.
		#
