Converted private variables and methods to protected