Lexeme optimization