Added comments and generated a Javadoc