Initial check-in of bst.cpp