clean up the tokenizer and parser a bit