Optimize the lexer