BST Generic Implementation