Added docstrings (as well as some todos and comments) to views.py