This list of globals seems to be getting out of control.
Can't some structure be put behind them like a global array with all these as members?
Or even make these parameters for no need for global?