More comments, added javadocs