Remove bsearch dependency