Changes in template files. Directives refactoring.