Upgraded estemplate and using new types of substitutions.