Templates refactoring complete