Match testing improvements

Functorisation, and more tests