Removed all global vars

Removed all global vars through class implementation