Tokenizer refactoring/tests restructuring