added comments, javadocs to geometry