Added Code for creating templates along with template data