Refactoring service and persistance