Moving BinaryTree algorithms outside the class using iterators.