Added more javadoc. Set some methods private.