cleaned up views.py