Update views.py

added object gathering and removed unused dictionary from index.
Merge pull request #4 from draringi/master

updates on views.py