diff --git a/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.h b/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.h
index 7df516049da41b87584a8231400da12cb46b4c25..45521b02748465e6387f750a1fa7c039546cae54 100644
--- a/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.h
+++ b/MaterialLib/TwoPhaseModels/TwoPhaseFlowWithPPMaterialProperties.h
@@ -25,10 +25,6 @@
 // TODO
 // The matereial properties for two phase flow process need to be restructured
 // and moved to a better place.
-namespace ProcessLib
-{
-class SpatialPosition;
-}
 
 namespace MeshLib
 {
diff --git a/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h b/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h
index 7c63c6e16833a088012f82f89686217fdffdf1e0..0bee25d7716609260d70b894d87b88bb59f7a7f8 100644
--- a/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h
+++ b/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.h
@@ -33,11 +33,7 @@ template <typename PROP_VAL_TYPE>
 class PropertyVector;
 }
 
-namespace ProcessLib
-{
-class SpatialPosition;
-
-namespace LiquidFlow
+namespace ProcessLib::LiquidFlow
 {
 /** This class has a collection of material properties of liquid flow process
  *  and it provides the computation of the coefficients of the PDE of liquid
@@ -125,5 +121,4 @@ private:
     // Such property vectors will be added here if they are needed.
 };
 
-}  // namespace LiquidFlow
-}  // namespace ProcessLib
+}  // namespace ProcessLib::LiquidFlow
diff --git a/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.h b/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.h
index 085423fda36050a2a068f3a0fa44d39bc7d33230..6aafc3ae723d4041da65e8f06549f97e8305fb5c 100644
--- a/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.h
+++ b/ProcessLib/RichardsFlow/RichardsFlowMaterialProperties.h
@@ -29,10 +29,7 @@ template <typename PROP_VAL_TYPE>
 class PropertyVector;
 }
 
-namespace ProcessLib
-{
-class SpatialPosition;
-namespace RichardsFlow
+namespace ProcessLib::RichardsFlow
 {
 /** This class has a collection of material properties for Richards flow model
 *  and it makes description of the properties of unsaturated porous media
@@ -125,5 +122,4 @@ private:
         _relative_permeability_models;
 };
 
-}  // namespace RichardsFlow
-}  // namespace ProcessLib
+}  // namespace ProcessLib::RichardsFlow
diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h
index d2d68b65aab6987cbfe50b89691c46b8e80c06e8..df42778aea0186c03704d6991bc246e3094d5f81 100644
--- a/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h
+++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/ThermalTwoPhaseFlowWithPPMaterialProperties.h
@@ -41,10 +41,7 @@ class PropertyVector;
 * class, also different enthalpy models for different components are need to be
 * implemented.
 */
-namespace ProcessLib
-{
-class SpatialPosition;
-namespace ThermalTwoPhaseFlowWithPP
+namespace ProcessLib::ThermalTwoPhaseFlowWithPP
 {
 class ThermalTwoPhaseFlowWithPPMaterialProperties final
 {
@@ -144,5 +141,4 @@ private:
         _water_vapor_properties;
 };
 
-}  // namespace ThermalTwoPhaseFlowWithPP
-}  // namespace ProcessLib
+}  // namespace ProcessLib::ThermalTwoPhaseFlowWithPP
diff --git a/ProcessLib/TimeLoop.cpp b/ProcessLib/TimeLoop.cpp
index 2d18c1ab79e6270e2d66e78894219cbadaa1eca2..393f663a2ec80b484ec8df35e25a0dbe08c3c8a3 100644
--- a/ProcessLib/TimeLoop.cpp
+++ b/ProcessLib/TimeLoop.cpp
@@ -135,7 +135,6 @@ std::vector<GlobalVector*> setInitialConditions(
         auto& time_disc = *process_data->time_disc;
 
         auto& ode_sys = *process_data->tdisc_ode_sys;
-        auto const nl_tag = process_data->nonlinear_solver_tag;
 
         // append a solution vector of suitable size
         process_solutions.emplace_back(
@@ -154,6 +153,7 @@ std::vector<GlobalVector*> setInitialConditions(
             auto& mat_strg = *process_data->mat_strg;
             auto& conv_crit = *process_data->conv_crit;
 
+            auto const nl_tag = process_data->nonlinear_solver_tag;
             setEquationSystem(nonlinear_solver, ode_sys, conv_crit, nl_tag);
             nonlinear_solver.assemble(x0);
             time_disc.pushState(
diff --git a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.h b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.h
index 1531e1f6cb1d6db88a6aa672bc1b9e69a6c9f00f..20c4a3e5bcd1420238d3eafc0b2e2a6143d64dc1 100644
--- a/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.h
+++ b/ProcessLib/TwoPhaseFlowWithPP/TwoPhaseFlowWithPPMaterialProperties.h
@@ -27,10 +27,7 @@ template <typename PROP_VAL_TYPE>
 class PropertyVector;
 }
 
-namespace ProcessLib
-{
-class SpatialPosition;
-namespace TwoPhaseFlowWithPP
+namespace ProcessLib::TwoPhaseFlowWithPP
 {
     /** This class has a collection of material properties for two-phase flow with PP model
     *  and it makes description of the material properties for two-phase condition,
@@ -124,5 +121,4 @@ protected:
         _relative_permeability_models;
 };
 
-}  // namespace TwoPhaseFlowWithPP
-}  // namespace ProcessLib
+}  // namespace ProcessLib::TwoPhaseFlowWithPP
diff --git a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.h b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.h
index cc66d0c26d5e5670ec1e66b057ad0b64d4e8ca87..fd52cfd7de4779ad21ffff605b12283ffe165441 100644
--- a/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.h
+++ b/ProcessLib/TwoPhaseFlowWithPrho/TwoPhaseFlowWithPrhoMaterialProperties.h
@@ -28,10 +28,7 @@ template <typename PROP_VAL_TYPE>
 class PropertyVector;
 }
 
-namespace ProcessLib
-{
-class SpatialPosition;
-namespace TwoPhaseFlowWithPrho
+namespace ProcessLib::TwoPhaseFlowWithPrho
 {
 class TwoPhaseFlowWithPrhoMaterialProperties
 {
@@ -186,5 +183,4 @@ private:
                           int current_material_id) const;
 };
 
-}  // namespace TwoPhaseFlowWithPrho
-}  // namespace ProcessLib
+}  // namespace ProcessLib::TwoPhaseFlowWithPrho