Moved interfacing with Jinja2 from application.py to view.py