Refactoring / templates