Javadoc and small fixes