fixing templates, adding logic to loop through them and copy/template out