Adding javadoc and test coverage.