Lexer optimizations

All the tests are green!