Adding binary search code and tests.