New tokeniser

Correct output needs refactoring and tests fixed