Changing visibility of private attributes to protected