Refactoring templates