cleaning up a bit the javadoc and code