Refactoring service/logger