updates and improvements to templates and sample files