reorganizing templates into pages and widgets(directives)