Restructured templates and added MarkDown to the template writing capabilities