Implementation of a BST data structure