Added dynamic routing of templates and controllers