Change some public modifiers to protected