Decompose app.py