diff --git a/src/caoscrawler/scanner.py b/src/caoscrawler/scanner.py
index 1a1598b2b6c2d6efa8d1898521f185e0dcf054a4..05d45abe629952e6c4079a65283eaa4d922a024e 100644
--- a/src/caoscrawler/scanner.py
+++ b/src/caoscrawler/scanner.py
@@ -326,17 +326,6 @@ def scanner(items: list[StructureElement],
     for record in scoped_records:
         crawled_data.append(record)
 
-    # TODO: the scoped variables should be cleaned up as soon if the variables
-    #       are no longer in the current scope. This can be implemented as follows,
-    #       but this breaks the test "test_record_structure_generation", because
-    #       some debug info is also deleted. This implementation can be used as soon
-    #       as the remaining problems with the debug_tree are fixed.
-    # Delete the variables that are no longer needed:
-    # scoped_names = record_store.get_names_current_scope()
-    # for name in scoped_names:
-    #     del record_store[name]
-    #     del general_store[name]
-
     return crawled_data