Added java docs, fixed format.