More javadoc and simplification