Initial generation of template files