Fixed error in binary search code and added some unit tests for Set