Changed some methods to protected to make it easier to extend