modifies templates and script-base.js