Added incoming and outgoing methods to Node class