Cleaned up views.py