Refactoring template