Implement the majority of the PHP BST