Nunjucks templating

Merging with the Nunjucks branch fully because of limitations in Mustache-style templates