All these variables probably should not be module variables. I know it's more annoying to have to declare them in every subroutine, but they really do belong on the stack as local variables. For now I'm fine with leaving it as is -- maybe later we can just go through and decide what else doesn't belong as a module variable throughout the whole code.