Update javadoc and code cleaning