Added methods to build a binary search tree.