Cleaned up views.py, moved static states var into constants.py