I would prefer to avoid globals and make multiple simultaneous polling requests work correctly.