refactored locations#search a bit
moved location background task search methods to separate module