Fixed the findbugs bugs in the API, and the missing JAVA doc.