Refactoring et templates