cleanup; added javadoc