Fix bug in binary search.
Adding main file