Changes to the tokenizer affecting type instantiation and lexing

One of the commits cleaned up white space, hence a somewhat more unruly diff here