Add javadoc, and remove unused classes.