Improve URL::canonical() and support for including templates within templates