Further refactoring, moving search logic to service