Making use of the new template support; added documentation for templates