Cleanup and update javadoc