Added a bunch of javadoc