Changed private methods to protected.