Changed invalidity to be tested using a boolean on tokens, added some more cases to matrix, each token keeps track of exacly what .