Moving global variables

Moving global variables to the class Main