Add a simple flask app factory