Moved global variable gSog into the globals infrastructure.