Expanded the M2M and FK tests, uncovering and fixing a few bugs.

Re #20