Added Javadoc to API functions