added jinja2 templating and javascript