Implement the majority of the JavaScript BST