started work on b_tree. Fix build tree function. Exits abnormally.