I do not see the need for the global variables. It is very easy to get them polluted.

You are already doing a good setup job, why not declare those there as part of the setup?