Cleaned up views.py.