Updated version of js-template.js