Refactoring into separate services