Private methods changed to protected to allow their inheritance.