Implemented search ordering, better population count