Service handler refactoring.