Add tests (!)

In the process, found and fixed a bug in with the cluster summary
generation (which isn't displayed yet, but might be some day).