diff --git a/python/dune/codegen/blockstructured/basis.py b/python/dune/codegen/blockstructured/basis.py
index 1f9436f5f61a16b674cd089871f4975d4560befa..073c9de35b1be48a4ea1e91d915922538f74704a 100644
--- a/python/dune/codegen/blockstructured/basis.py
+++ b/python/dune/codegen/blockstructured/basis.py
@@ -10,7 +10,6 @@ from dune.codegen.generation import (backend,
                                      class_member,
                                      initializer_list,
                                      include_file,)
-from dune.codegen.pdelab.argument import name_coefficientcontainer
 from dune.codegen.tools import get_pymbolic_basename, get_pymbolic_indices
 from dune.codegen.loopy.target import type_floatingpoint
 from dune.codegen.pdelab.basis import (GenericBasisMixin,
diff --git a/python/dune/codegen/blockstructured/geometry.py b/python/dune/codegen/blockstructured/geometry.py
index 080624770df0f1fa3666ade3cad1d600ad804b5d..3ad3a9026d8a5287e54e3950aef0aa199d08cc4e 100644
--- a/python/dune/codegen/blockstructured/geometry.py
+++ b/python/dune/codegen/blockstructured/geometry.py
@@ -1,12 +1,10 @@
 from dune.codegen.generation import (geometry_mixin,
-                                     get_backend,
                                      temporary_variable,
                                      instruction,
                                      get_global_context_value,
                                      domain)
 from dune.codegen.tools import get_pymbolic_basename
-from dune.codegen.options import (get_form_option,
-                                  option_switch, get_option)
+from dune.codegen.options import get_form_option
 from dune.codegen.pdelab.geometry import (AxiparallelGeometryMixin,
                                           EquidistantGeometryMixin,
                                           GenericPDELabGeometryMixin,
diff --git a/python/dune/codegen/blockstructured/spaces.py b/python/dune/codegen/blockstructured/spaces.py
index 688b1984a7cac29922de43d2dae5ad35313cebc5..4602789a77a12bd342adbf4ed8bebc59cb989d0c 100644
--- a/python/dune/codegen/blockstructured/spaces.py
+++ b/python/dune/codegen/blockstructured/spaces.py
@@ -1,5 +1,4 @@
-from dune.codegen.generation import (backend,
-                                     domain)
+from dune.codegen.generation import domain
 from dune.codegen.pdelab.geometry import world_dimension
 from dune.codegen.pdelab.spaces import name_leaf_lfs
 
diff --git a/python/dune/codegen/blockstructured/tools.py b/python/dune/codegen/blockstructured/tools.py
index 401f9d582616ed3e2ce815641269d353dbcaafe6..802b819f23754aa0862e122f4127a3db18593117 100644
--- a/python/dune/codegen/blockstructured/tools.py
+++ b/python/dune/codegen/blockstructured/tools.py
@@ -1,11 +1,9 @@
-from dune.codegen.ufl.modified_terminals import Restriction
 from dune.codegen.tools import get_pymbolic_basename
 from dune.codegen.generation import (iname,
                                      domain,
                                      temporary_variable,
                                      instruction)
-from dune.codegen.pdelab.geometry import (world_dimension,
-                                          )
+from dune.codegen.pdelab.geometry import world_dimension
 from dune.codegen.options import get_form_option
 import pymbolic.primitives as prim