Changed variables to protected