Added Javadocs for the public library methods.
Code cleanup.