added remove to functional implementation of BST, small refactoring