Refactoring service