Added generation of templates.