small refactorings
javadocs update