javadoc and cleanup code