Java docs, and minor fixes