Add javadoc and processing fix