WyC: heaps of changes as I try to centralise test cases.