add javadoc, change visibility of some methods