I think this is a good change. Could we perhaps put this "global" on the shared `app` instance, or in the `app.extensions` dict? I don't really like this use of globals. (See pull request #50 for inspiration.)