BST: Finished code