More template.js mods