Minor Refactoring

Added more comments to views.py
Moved MongoDB connection code to config.py
Restyled & commented config.py