Switched to using flask.current_app most places