Cleaned up and commented views.py.