moved template copying into util function
all code written, templates updated, commence testing
bug-fixed the template generation, ready to ship!