Changed variables to protected

It would be nice to have variables as protected, to inherit class.