Added a new class for global variables

Cleaned code and added new global class.