Remove unused time_hash method
Refactor service finding SQL