Tidied up the matrix test, still needs to have correct matrix building
but should make it easier now.