Misc cleanups, JavaDocs, and consistency refactoring.