Added javadoc and comments2