Added binary search function and test.