created a minified version of the script. Used uglifyjs2 (uglifyjs template.js -c -o template.min.js)