Move binary search to function in b-trees.