Javadoc and a few minor fixes