Refactor home page view to use a template
Updated tests.py