Fixed Barry's Binary Search Function

Fixed errors that were causing the code not to compile