[jh] Trying to sort out problems with GROUP SUM - not quite there yet.
Checkpointing code.