Added Javadoc and fixed formatting issues

* Added more javadocs
* Fixed formatting issues in generated javadocs