Merged most global vars into one var block.