cleaned app.py