tide up global variables a bit