Templates refactoring - continuation