BST: refactoring.