Added a lot of Javadoc