Refactoring of services