refactored tree structure to better accommodate the edited branch impl.

Specifics:
 - The Node interface was replaced by the former Leaf implementation.
 - The Branch class now inherits the Node (former Leaf) class.
 - The Iterator node instance checks were reversed to match the impl.