Fixed comments and updated javadoc.