heavily refactored index.html as nunjucks templates