Changed scope of private methods to protected to be able to subclass.