index.js and template files