Replaced magic -1 with preprocessor directive
Added implementation of the binary search algorithm
Stats Update