Added documentation to app.py

Cleaned up comments and added a few more.