Add detailed comments to app.py

Just added comments to app.py, shouldn't conflict with anyone else's work.