Javadoc, refactorings, cleanup