App factory

Haha woops! Didn't mean to send the PR to your repo, but here it is if you want it.

This gets rid of the app.py file and adds a `create_app()` function that can be called to initialize the app, db, etc.