cleaning up views.py