Better support for templates