Clean up lexer logic