Add unit tests for binary search. Update jsdoc