Preparation for replacing WSGIApp with a Flask app