No longer relies on global state (thank god, what was I thinking)