Java docs and code cleanup.