Refactoring. Add new templates for type contents. issue878