Updated comments and javadoc