completed the basics of app.py - all ajax done, simple everything else