doing some javadoc, cleaning up code.