Adding javadocs to fix #3