Added JavaDoc for most public classes and methods.

This PR adds some JavaDoc to most public classes and methods.