add missing javadocs and fix checkstyle errors and warnings.