finish app.py and templates