Changed to more oop less global