Moved maximum logic into BinarySearchTree