Full commit of template
Multiple updates, fixes and improvements.