Implemented page indexing, few more checks, still have to clean up view.py