Refactored MainPage to use Jinja2 template.
Refactored ViewPage and EditPage to use Jinja2 templates.
Wrote jinja macros for viewing and editing objects.