Added functions and files for generating templates