Improved BinarySearchResult and added unit tests.