Moved flask app to a module