Basic BinaryTree implementation with preorder traversal