Added java doc comments to the most classes and generated javadoc.