added class javadoc and other minor changes.