Jinja2 template should be extracted out of the code. It would be nice if the template was configurable too.