Wouldn't it be reasonable to start stubbing out the "global state" object and passing that around instead of introducing more shared state?