Some minor changes in binarySearch