Don't use a global object

We can safely move these variable definitions outside of this function.