additions and changes to templates and main python file