Added javadoc, and corrected a comment