Updated design
Added database connectivity to TemplateController