Much improved summary/logging code.