Start refactoring views.py