Cleaned up views.py and settings for code review.