You guessed it, more refactoring away global state