Improved loading external templates and router