javadoc comments and refactoring