Lexer changes

Mostly minor things that rebasing is becoming painful.
I think `write!` works with `Formatter`s