Repair bugs in Report. Add some javadoc.