Save template refactoring