Refactor Location search