Improve Lexer and tests.