Reorganize packages due to gradle javadoc. Fix some javadoc issues.