Added binarySearch and other utility methods.
More unit tests.