Switched to flask.

See the edited v1/*.py files for examples on how to use the new
flask approach.