javadocs in script classes and minor refactorings