Update template-engine.js