ADD comments on template script
Various changes