Changed some methods to private.