We should not be calling globals in our classes, this is bad behaviour. These functions should be extracted to the app class, and perhaps it could pass self to the wrapper class if necessary.
The current approach would break if someone wanted to use the code externally.