Updated comments and javadoc.