Refactored BinaryTree