Moved global var to main class.