cleaned several classes and added global variable class
some more cleaning
a
merge