diff --git a/python/pystencils_walberla/jinja_filters.py b/python/pystencils_walberla/jinja_filters.py
index eb209237bfdf54a64bee209c8d1a50e9d122e06f..0033154484e603524950a96a9f343bba3b0c76ec 100644
--- a/python/pystencils_walberla/jinja_filters.py
+++ b/python/pystencils_walberla/jinja_filters.py
@@ -14,16 +14,18 @@ temporary_fieldMemberTemplate = """
 private: std::set< {type} *, field::SwapableCompare< {type} * > > cache_{original_field_name}_;"""
 
 temporary_fieldTemplate = """
-// Getting temporary field {tmp_field_name}
-auto it = cache_{original_field_name}_.find( {original_field_name} );
-if( it != cache_{original_field_name}_.end() )
 {{
-    {tmp_field_name} = *it;
-}}
-else 
-{{
-    {tmp_field_name} = {original_field_name}->cloneUninitialized();
-    cache_{original_field_name}_.insert({tmp_field_name});
+    // Getting temporary field {tmp_field_name}
+    auto it = cache_{original_field_name}_.find( {original_field_name} );
+    if( it != cache_{original_field_name}_.end() )
+    {{
+        {tmp_field_name} = *it;
+    }}
+    else
+    {{
+        {tmp_field_name} = {original_field_name}->cloneUninitialized();
+        cache_{original_field_name}_.insert({tmp_field_name});
+    }}
 }}
 """
 
@@ -42,7 +44,7 @@ def make_field_type(dtype, f_size, is_gpu):
     if is_gpu:
         return "cuda::GPUField<%s>" % (dtype,)
     else:
-        return "GhostLayerField<%s, %d>" % (dtype, f_size)
+        return "field::GhostLayerField<%s, %d>" % (dtype, f_size)
 
 
 def get_field_fsize(field):
@@ -120,9 +122,9 @@ def field_extraction_code(field, is_temporary, declaration_only=False,
         else:
             prefix = "" if no_declaration else "auto "
             if update_member:
-                return "%s%s_ = block->uncheckedFastGetData< %s >(%sID);" % (prefix, field_name, field_type, field_name)
+                return "%s%s_ = block->getData< %s >(%sID);" % (prefix, field_name, field_type, field_name)
             else:
-                return "%s%s = block->uncheckedFastGetData< %s >(%sID);" % (prefix, field_name, field_type, field_name)
+                return "%s%s = block->getData< %s >(%sID);" % (prefix, field_name, field_type, field_name)
     else:
         assert field_name.endswith('_tmp')
         original_field_name = field_name[:-len('_tmp')]
@@ -273,6 +275,9 @@ def generate_call(ctx, kernel_info, ghost_layers_to_include=0, cell_interval=Non
         else:
             spatial_shape_symbols = [TypedSymbol(s, SHAPE_DTYPE) for s in spatial_shape_symbols]
 
+        assert spatial_shape_symbols, "No shape parameters in kernel function arguments.\n"\
+            "Please be only use kernels for generic field sizes!"
+
         indexing_dict = ast.indexing.call_parameters(spatial_shape_symbols)
         sp_printer_c = CudaSympyPrinter()
         kernel_call_lines += [
@@ -312,7 +317,7 @@ def generate_constructor_initializer_list(kernel_info, parameters_to_ignore=None
 def generate_constructor_parameters(kernel_info, parameters_to_ignore=None):
     if parameters_to_ignore is None:
         parameters_to_ignore = []
-        
+
     varying_parameters = []
     if hasattr(kernel_info, 'varying_parameters'):
         varying_parameters = kernel_info.varying_parameters
diff --git a/python/pystencils_walberla/templates/Sweep.tmpl.h b/python/pystencils_walberla/templates/Sweep.tmpl.h
index 9de4b96c2284560b920a6c592d8b2e5749a2bbf7..b4db0f35bd6fc9ad5046c83bd99eca004291cc6f 100644
--- a/python/pystencils_walberla/templates/Sweep.tmpl.h
+++ b/python/pystencils_walberla/templates/Sweep.tmpl.h
@@ -57,10 +57,10 @@ public:
 
     {{ kernel| generate_destructor(class_name) |indent(4) }}
 
-    void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} );
+    void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} );
     void runOnCellInterval(const shared_ptr<StructuredBlockStorage> & blocks,
                            const CellInterval & globalCellInterval, cell_idx_t ghostLayers, IBlock * block
-                           {%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %});
+                           {%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %});
 
 
 
@@ -74,8 +74,8 @@ public:
                                    const CellInterval & globalCellInterval,
                                    cell_idx_t ghostLayers=1 )
     {
-        return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %}) {
-            kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%},stream {% endif %});
+        return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %}) {
+            kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%}, stream {% endif %});
         };
     }
 
diff --git a/python/pystencils_walberla/templates/SweepInnerOuter.tmpl.h b/python/pystencils_walberla/templates/SweepInnerOuter.tmpl.h
index 466f51071dce4066365d19643ef9692f04dba78c..6f6094d0e08dfe00e7873cfb204f636c81c0a04a 100644
--- a/python/pystencils_walberla/templates/SweepInnerOuter.tmpl.h
+++ b/python/pystencils_walberla/templates/SweepInnerOuter.tmpl.h
@@ -54,17 +54,17 @@ class {{class_name}}
 {
 public:
     {{class_name}}( {{kernel|generate_constructor_parameters}}, const Cell & outerWidth=Cell(1, 1, 1))
-        : {{ kernel|generate_constructor_initializer_list }}, outerWidth_(outerWidth)
+        : {{ kernel|generate_constructor_initializer_list }}{% if kernel|generate_constructor_initializer_list|length %},{% endif %} outerWidth_(outerWidth)
     {};
 
     {{ kernel| generate_destructor(class_name) |indent(4) }}
 
 
-    void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} );
+    void operator() ( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} );
 
     void runOnCellInterval(const shared_ptr<StructuredBlockStorage> & blocks,
                            const CellInterval & globalCellInterval, cell_idx_t ghostLayers, IBlock * block
-                           {%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %});
+                           {%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %});
 
 
 
@@ -78,14 +78,14 @@ public:
                                    const CellInterval & globalCellInterval,
                                    cell_idx_t ghostLayers=1 )
     {
-        return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %}) {
-            kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%},stream {% endif %});
+        return [kernel, blocks, globalCellInterval, ghostLayers] (IBlock * b{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %}) {
+            kernel->runOnCellInterval(blocks, globalCellInterval, ghostLayers, b{%if target is equalto 'gpu'%}, stream {% endif %});
         };
     }
 
 
-    void inner( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} );
-    void outer( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = 0{% endif %} );
+    void inner( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} );
+    void outer( IBlock * block{%if target is equalto 'gpu'%} , cudaStream_t stream = nullptr{% endif %} );
 
     void setOuterPriority(int priority ) {
         {%if target is equalto 'gpu'%}