Bring the global variables more into their context