Remove manual caching in globals

This PR takes advantage of `lru_cache` to remove many uses of the `global` keyword.

I've always been at war with `global` :-)
I happen to disagree with your favorite import style but I don't care enough to argue :-)