diff --git a/dumux/assembly/boxlocalresidual.hh b/dumux/assembly/boxlocalresidual.hh
index 2dc4423d8f06a0bab5c75e9956ec280141fccecc..7beb17dc02973953b3fa9d6b6b9f907e5911d56d 100644
--- a/dumux/assembly/boxlocalresidual.hh
+++ b/dumux/assembly/boxlocalresidual.hh
@@ -46,22 +46,12 @@ class BoxLocalResidual : public FVLocalResidual<TypeTag>
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
-
-    enum {
-        numEq = GET_PROP_VALUE(TypeTag, NumEq),
-        dim = GridView::dimension
-    };
-
     using Element = typename GridView::template Codim<0>::Entity;
-    using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
-    using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using ElementBoundaryTypes = typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
-    using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
     using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
-    using FluxVariablesCache = typename GET_PROP_TYPE(TypeTag, FluxVariablesCache);
     using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
     using ElementResidualVector = Dune::BlockVector<typename GET_PROP_TYPE(TypeTag, NumEqVector)>;
 
diff --git a/dumux/assembly/fvlocalresidual.hh b/dumux/assembly/fvlocalresidual.hh
index 85f6f0949196238eb69b8e2f0f0cd7b98fb3e30c..67b4f2b5350d6eb7d4975d63bc733bd17e9b7421 100644
--- a/dumux/assembly/fvlocalresidual.hh
+++ b/dumux/assembly/fvlocalresidual.hh
@@ -53,9 +53,7 @@ class FVLocalResidual
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
     using ElementResidualVector = Dune::BlockVector<typename GET_PROP_TYPE(TypeTag, NumEqVector)>;
     using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
-    using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using ElementBoundaryTypes = typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes);
-    using FluxVariablesCache = typename GET_PROP_TYPE(TypeTag, FluxVariablesCache);
     using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
diff --git a/dumux/assembly/staggeredlocalresidual.hh b/dumux/assembly/staggeredlocalresidual.hh
index b97c3f3eaf368ef80cd0cc87817aeb7775cef4d7..12408a1b60f574e559f8cb697a6c23ae7e1d2e00 100644
--- a/dumux/assembly/staggeredlocalresidual.hh
+++ b/dumux/assembly/staggeredlocalresidual.hh
@@ -40,42 +40,23 @@ class StaggeredLocalResidual
 {
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
 
-    enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) };
-
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using Implementation = typename GET_PROP_TYPE(TypeTag, LocalResidual);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using Element = typename GridView::template Codim<0>::Entity;
-    using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using ElementBoundaryTypes = typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
-    using CellCenterSolutionVector = typename GET_PROP_TYPE(TypeTag, CellCenterSolutionVector);
-    using FaceSolutionVector = typename GET_PROP_TYPE(TypeTag, FaceSolutionVector);
     using CellCenterPrimaryVariables = typename GET_PROP_TYPE(TypeTag, CellCenterPrimaryVariables);
-    using FacePrimaryVariables = typename GET_PROP_TYPE(TypeTag, FacePrimaryVariables);
     using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
 
     using CellCenterResidual = typename GET_PROP_TYPE(TypeTag, CellCenterPrimaryVariables);
     using FaceResidual = typename GET_PROP_TYPE(TypeTag, FacePrimaryVariables);
-    using FaceResidualVector = typename GET_PROP_TYPE(TypeTag, FaceSolutionVector);
     using ElementFaceVariables = typename GET_PROP_TYPE(TypeTag, ElementFaceVariables);
 
-
-    using DofTypeIndices = typename GET_PROP(TypeTag, DofTypeIndices);
-    typename DofTypeIndices::CellCenterIdx cellCenterIdx;
-    typename DofTypeIndices::FaceIdx faceIdx;
-
-    enum {
-         // grid and world dimension
-        dim = GridView::dimension,
-        dimWorld = GridView::dimensionworld
-    };
-
-
     using TimeLoop = TimeLoopBase<Scalar>;
 
 public:
diff --git a/dumux/freeflow/navierstokes/staggered/localresidual.hh b/dumux/freeflow/navierstokes/staggered/localresidual.hh
index 65475f8e83b3b342344906689153077245d565f9..4a978fbe37f5bd2b5902e120ce6e6198f7b65ad5 100644
--- a/dumux/freeflow/navierstokes/staggered/localresidual.hh
+++ b/dumux/freeflow/navierstokes/staggered/localresidual.hh
@@ -56,32 +56,21 @@ class NavierStokesResidualImpl<TypeTag, DiscretizationMethods::Staggered>
     using ElementBoundaryTypes = typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
-    using FluxVariablesCache = typename GET_PROP_TYPE(TypeTag, FluxVariablesCache);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
-    using FaceSolutionVector = typename GET_PROP_TYPE(TypeTag, FaceSolutionVector);
     using CellCenterPrimaryVariables = typename GET_PROP_TYPE(TypeTag, CellCenterPrimaryVariables);
     using FacePrimaryVariables = typename GET_PROP_TYPE(TypeTag, FacePrimaryVariables);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables);
     using ElementFaceVariables = typename GET_PROP_TYPE(TypeTag, ElementFaceVariables);
 
-
-    using DofTypeIndices = typename GET_PROP(TypeTag, DofTypeIndices);
-    typename DofTypeIndices::CellCenterIdx cellCenterIdx;
-    typename DofTypeIndices::FaceIdx faceIdx;
-
     using CellCenterResidual = typename GET_PROP_TYPE(TypeTag, CellCenterPrimaryVariables);
     using FaceResidual = typename GET_PROP_TYPE(TypeTag, FacePrimaryVariables);
 
     static constexpr auto numEqCellCenter = GET_PROP_VALUE(TypeTag, NumEqCellCenter);
 
     enum {
-         // grid and world dimension
-        dim = GridView::dimension,
-        dimWorld = GridView::dimensionworld,
-
         pressureIdx = Indices::pressureIdx,
 
         massBalanceIdx = Indices::massBalanceIdx,
@@ -90,7 +79,6 @@ class NavierStokesResidualImpl<TypeTag, DiscretizationMethods::Staggered>
 
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
 
-    static constexpr bool navierStokes = GET_PROP_VALUE(TypeTag, EnableInertiaTerms);
     static constexpr bool normalizePressure = GET_PROP_VALUE(TypeTag, NormalizePressure);
 
 public:
@@ -144,7 +132,7 @@ public:
                                                            const VolumeVariables& volVars) const
     {
         CellCenterPrimaryVariables storage;
-        storage[Indices::massBalanceIdx] = volVars.density();
+        storage[massBalanceIdx] = volVars.density();
 
         computeStorageForCellCenterNonIsothermal_(std::integral_constant<bool, GET_PROP_VALUE(TypeTag, EnableEnergyBalance) >(),
                                                   problem, scv, volVars, storage);
diff --git a/dumux/freeflow/navierstokesnc/staggered/localresidual.hh b/dumux/freeflow/navierstokesnc/staggered/localresidual.hh
index d56a478e012648e9136cb288042b7f095736e697..e0f54677f9fd9966d3023ba1426414765916808e 100644
--- a/dumux/freeflow/navierstokesnc/staggered/localresidual.hh
+++ b/dumux/freeflow/navierstokesnc/staggered/localresidual.hh
@@ -57,9 +57,6 @@ class NavierStokesNCResidualImpl<TypeTag, DiscretizationMethods::Staggered>
 
     using CellCenterResidual = typename GET_PROP_TYPE(TypeTag, CellCenterPrimaryVariables);
 
-    using DofTypeIndices = typename GET_PROP(TypeTag, DofTypeIndices);
-    typename DofTypeIndices::CellCenterIdx cellCenterIdx;
-
     enum {
         conti0EqIdx = Indices::conti0EqIdx,
         phaseIdx = Indices::phaseIdx,
diff --git a/dumux/freeflow/navierstokesnc/volumevariables.hh b/dumux/freeflow/navierstokesnc/volumevariables.hh
index 5863c920e19d609f1acf07165e931bd2d317737e..e77070496886a021a0f1788d57b1562516a84f30 100644
--- a/dumux/freeflow/navierstokesnc/volumevariables.hh
+++ b/dumux/freeflow/navierstokesnc/volumevariables.hh
@@ -45,7 +45,6 @@ class NavierStokesNCVolumeVariables : public NavierStokesVolumeVariables<TypeTag
     using Implementation = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
-    using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
@@ -53,8 +52,6 @@ class NavierStokesNCVolumeVariables : public NavierStokesVolumeVariables<TypeTag
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
 
-    using ParameterCache = typename FluidSystem::ParameterCache;
-
     enum { numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
            numPhases = FluidSystem::numPhases,
            mainCompIdx = Indices::mainCompIdx,
diff --git a/dumux/porousmediumflow/1p/incompressiblelocalresidual.hh b/dumux/porousmediumflow/1p/incompressiblelocalresidual.hh
index 08376c67351fd442482c051b2485d83af5ed76d1..9e0a78bb7a16aa579d48d212d11011b094491a2f 100644
--- a/dumux/porousmediumflow/1p/incompressiblelocalresidual.hh
+++ b/dumux/porousmediumflow/1p/incompressiblelocalresidual.hh
@@ -42,7 +42,6 @@ class OnePIncompressibleLocalResidual : public ImmiscibleLocalResidual<TypeTag>
     using ParentType = ImmiscibleLocalResidual<TypeTag>;
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
-    using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using ElementResidualVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
@@ -54,14 +53,11 @@ class OnePIncompressibleLocalResidual : public ImmiscibleLocalResidual<TypeTag>
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
-    using EnergyLocalResidual = typename GET_PROP_TYPE(TypeTag, EnergyLocalResidual);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     // first index for the mass balance
     enum { conti0EqIdx = Indices::conti0EqIdx };
     enum { pressureIdx = Indices::pressureIdx };
 
-    static const int numPhases = GET_PROP_VALUE(TypeTag, NumPhases);
-
 public:
     using ParentType::ParentType;
 
diff --git a/dumux/porousmediumflow/1p/volumevariables.hh b/dumux/porousmediumflow/1p/volumevariables.hh
index bf09d968197032efa326ae1c2debbc173dc359fb..055a6c7b7246f50430486c9d8cbb00a41363cd59 100644
--- a/dumux/porousmediumflow/1p/volumevariables.hh
+++ b/dumux/porousmediumflow/1p/volumevariables.hh
@@ -45,7 +45,6 @@ class OnePVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
     using PermeabilityType = typename SpatialParams::PermeabilityType;
-    using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
diff --git a/dumux/porousmediumflow/1pnc/volumevariables.hh b/dumux/porousmediumflow/1pnc/volumevariables.hh
index 62812ff26b329d6235dd30497bf9fe5b003c5eff..c0d8f9ab60684711da61e83a02388a093740ec2e 100644
--- a/dumux/porousmediumflow/1pnc/volumevariables.hh
+++ b/dumux/porousmediumflow/1pnc/volumevariables.hh
@@ -56,7 +56,6 @@ class OnePNCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
     using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     using Implementation = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
-    using Grid = typename GET_PROP_TYPE(TypeTag, Grid);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
@@ -65,12 +64,10 @@ class OnePNCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
 
     enum
     {
-        numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
         numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
 
         phaseIdx = Indices::phaseIdx,
         phaseCompIdx = Indices::phaseCompIdx,
-        firstTransportEqIdx = Indices::firstTransportEqIdx,
 
         // primary variable indices
         pressureIdx = Indices::pressureIdx,
@@ -78,13 +75,7 @@ class OnePNCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
 
     };
 
-    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
-    static const int dim = GridView::dimension;
-    static const int dimWorld = GridView::dimensionworld;
-
     using Element = typename GridView::template Codim<0>::Entity;
-    using DimVector = Dune::FieldVector<Scalar,dim>;
-    using GlobalPosition = Dune::FieldVector<Scalar,dimWorld>;
 
 public:
 
diff --git a/dumux/porousmediumflow/2p/incompressiblelocalresidual.hh b/dumux/porousmediumflow/2p/incompressiblelocalresidual.hh
index 4dc261acb88c958172177943becb7d09aa4b0e40..60ee8808597d7ca8c116c615a4035266cf236e04 100644
--- a/dumux/porousmediumflow/2p/incompressiblelocalresidual.hh
+++ b/dumux/porousmediumflow/2p/incompressiblelocalresidual.hh
@@ -45,7 +45,6 @@ class TwoPIncompressibleLocalResidual : public ImmiscibleLocalResidual<TypeTag>
     using ParentType = ImmiscibleLocalResidual<TypeTag>;
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
-    using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using ElementResidualVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
@@ -56,7 +55,6 @@ class TwoPIncompressibleLocalResidual : public ImmiscibleLocalResidual<TypeTag>
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
-    using EnergyLocalResidual = typename GET_PROP_TYPE(TypeTag, EnergyLocalResidual);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     // first index for the mass balance
@@ -69,8 +67,6 @@ class TwoPIncompressibleLocalResidual : public ImmiscibleLocalResidual<TypeTag>
         saturationIdx = Indices::saturationIdx
     };
 
-    static const int numPhases = GET_PROP_VALUE(TypeTag, NumPhases);
-
 public:
     using ParentType::ParentType;
 
diff --git a/dumux/porousmediumflow/2p/volumevariables.hh b/dumux/porousmediumflow/2p/volumevariables.hh
index fff2863bbf3e1fc785d7158488afd6077009caf3..fcf1e3d9ea2827eb514372c28787d6248020fb11 100644
--- a/dumux/porousmediumflow/2p/volumevariables.hh
+++ b/dumux/porousmediumflow/2p/volumevariables.hh
@@ -49,7 +49,6 @@ class TwoPVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
-    using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
diff --git a/dumux/porousmediumflow/2p1c/volumevariables.hh b/dumux/porousmediumflow/2p1c/volumevariables.hh
index 9df1c226c33649cef93d13ac85853147a924dcd5..5b01995819c4c61a5335e5c24813e9bb54d3bf03 100644
--- a/dumux/porousmediumflow/2p1c/volumevariables.hh
+++ b/dumux/porousmediumflow/2p1c/volumevariables.hh
@@ -41,7 +41,6 @@ class TwoPOneCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
     using ParentType = PorousMediumFlowVolumeVariables<TypeTag>;
     using Implementation = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
-    using Grid = typename GET_PROP_TYPE(TypeTag, Grid);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
@@ -50,14 +49,10 @@ class TwoPOneCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
-    using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params;
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
 
     enum {
-        dim = GridView::dimension,
-
         numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
-        numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
 
         wPhaseIdx = Indices::wPhaseIdx,
         nPhaseIdx = Indices::nPhaseIdx,
diff --git a/dumux/porousmediumflow/2p2c/volumevariables.hh b/dumux/porousmediumflow/2p2c/volumevariables.hh
index 8cf5a1c08aecfb503b2090f08e1db77ccc936ea0..f9ce2ace0001cb5b426742fe9617fa4a4111bfb7 100644
--- a/dumux/porousmediumflow/2p2c/volumevariables.hh
+++ b/dumux/porousmediumflow/2p2c/volumevariables.hh
@@ -100,7 +100,6 @@ class TwoPTwoCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
 
     using MiscibleMultiPhaseComposition = Dumux::MiscibleMultiPhaseComposition<Scalar, FluidSystem, useKelvinEquation>;
 
-    static constexpr int dim = GridView::dimension;
     static constexpr int numPhases = GET_PROP_VALUE(TypeTag, NumPhases);
     static constexpr int numComponents = GET_PROP_VALUE(TypeTag, NumComponents);
 public:
diff --git a/dumux/porousmediumflow/2pnc/volumevariables.hh b/dumux/porousmediumflow/2pnc/volumevariables.hh
index 0d1e469c740c95964d977a857a90d061dd436e69..0a552fc3c005e97a1786b97a086475a6a77b2d78 100644
--- a/dumux/porousmediumflow/2pnc/volumevariables.hh
+++ b/dumux/porousmediumflow/2pnc/volumevariables.hh
@@ -53,7 +53,6 @@ class TwoPNCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
     using ParentType = PorousMediumFlowVolumeVariables<TypeTag>;
     using Implementation = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
-    using Grid = typename GET_PROP_TYPE(TypeTag, Grid);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
@@ -62,13 +61,10 @@ class TwoPNCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
-    using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params;
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
 
     enum
     {
-        dim = GridView::dimension,
-
         numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
         numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
         numMajorComponents = GET_PROP_VALUE(TypeTag, NumMajorComponents),
@@ -97,13 +93,10 @@ class TwoPNCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
     };
 
     using Element = typename GridView::template Codim<0>::Entity;
-    using CoordScalar = typename Grid::ctype;
     using Miscible2pNCComposition = Dumux::Miscible2pNCComposition<Scalar, FluidSystem>;
     using ComputeFromReferencePhase = Dumux::ComputeFromReferencePhase<Scalar, FluidSystem>;
     static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
     static_assert(useMoles, "use moles has to be set true in the 2pnc model");
-    static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box;
-    enum { dofCodim = isBox ? dim : 0 };
 
 public:
 
@@ -130,7 +123,7 @@ public:
         /////////////
         // calculate the remaining quantities
         /////////////
-        const MaterialLawParams &materialParams = problem.spatialParams().materialLawParams(element, scv, elemSol);
+        const auto &materialParams = problem.spatialParams().materialLawParams(element, scv, elemSol);
 
         // Second instance of a parameter cache.
         // Could be avoided if diffusion coefficients also
diff --git a/dumux/porousmediumflow/3p/volumevariables.hh b/dumux/porousmediumflow/3p/volumevariables.hh
index a21de49e8092b7591128dd20799d587490b2058e..eb5150f286b8e3a626c9e7a0c4184389a2d902a1 100644
--- a/dumux/porousmediumflow/3p/volumevariables.hh
+++ b/dumux/porousmediumflow/3p/volumevariables.hh
@@ -50,15 +50,12 @@ class ThreePVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
-    using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
     enum {
-        dim = GridView::dimension,
-
         numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
 
         wPhaseIdx = Indices::wPhaseIdx,
@@ -70,11 +67,6 @@ class ThreePVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
         pressureIdx = Indices::pressureIdx
     };
 
-    static const Scalar R; // universal gas constant
-
-    enum { isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box };
-    enum { dofCodim = isBox ? dim : 0 };
-
 public:
 
     using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState);
@@ -274,13 +266,6 @@ private:
     const Implementation &asImp_() const
     { return *static_cast<const Implementation*>(this); }
 };
-
-/*!
- * \brief  The ideal gas constant \f$\mathrm{[J/(mol K)]}\f$
- */
-template <class TypeTag>
-const typename ThreePVolumeVariables<TypeTag>::Scalar ThreePVolumeVariables<TypeTag>::R = Constants<typename GET_PROP_TYPE(TypeTag, Scalar)>::R;
-
 } // end namespace
 
 #endif
diff --git a/dumux/porousmediumflow/3p3c/localresidual.hh b/dumux/porousmediumflow/3p3c/localresidual.hh
index 7fe6bebbf3aed059b292e2f02d3fcfc4e55ef879..db0361e0dbdb22d30cbea0edfa06588f1a4f9c46 100644
--- a/dumux/porousmediumflow/3p3c/localresidual.hh
+++ b/dumux/porousmediumflow/3p3c/localresidual.hh
@@ -45,12 +45,10 @@ class ThreePThreeCLocalResidual: public GET_PROP_TYPE(TypeTag, BaseLocalResidual
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
-    using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
     using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables);
     using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
-    using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
diff --git a/dumux/porousmediumflow/3p3c/volumevariables.hh b/dumux/porousmediumflow/3p3c/volumevariables.hh
index 6906866ae10dfd2e0f271aff7d5f7c4f87fb7950..b0cd1738ef2bd320c85a71814be2efa2c216a735 100644
--- a/dumux/porousmediumflow/3p3c/volumevariables.hh
+++ b/dumux/porousmediumflow/3p3c/volumevariables.hh
@@ -50,22 +50,16 @@ class ThreePThreeCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeT
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
-    using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
-    using MaterialLawParams = typename MaterialLaw::Params;
-
-    // constraint solvers
     using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
     using PermeabilityType = typename SpatialParams::PermeabilityType;
     using MiscibleMultiPhaseComposition = Dumux::MiscibleMultiPhaseComposition<Scalar, FluidSystem>;
     using ComputeFromReferencePhase = Dumux::ComputeFromReferencePhase<Scalar, FluidSystem>;
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     enum {
-        dim = GridView::dimension,
-
         numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
         numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
 
@@ -94,9 +88,6 @@ class ThreePThreeCVolumeVariables : public PorousMediumFlowVolumeVariables<TypeT
 
     using Element = typename GridView::template Codim<0>::Entity;
 
-    // universial gas constant
-    static constexpr Scalar R = Dumux::Constants<Scalar>::R;
-
 public:
 
    using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState);
@@ -122,7 +113,7 @@ public:
         bool useConstraintSolver = GET_PROP_VALUE(TypeTag, UseConstraintSolver);
 
         // capillary pressure parameters
-        const MaterialLawParams &materialParams =
+        const auto &materialParams =
             problem.spatialParams().materialLawParams(element, scv, elemSol);
 
 
diff --git a/dumux/porousmediumflow/3pwateroil/localresidual.hh b/dumux/porousmediumflow/3pwateroil/localresidual.hh
index 317a02d5c491c92cdc4ff28caa13c690177ceec6..4bee5928de89d86274fa3af8e25bf4f3bb448723 100644
--- a/dumux/porousmediumflow/3pwateroil/localresidual.hh
+++ b/dumux/porousmediumflow/3pwateroil/localresidual.hh
@@ -47,12 +47,10 @@ protected:
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
-    using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
     using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables);
     using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
-    using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
diff --git a/dumux/porousmediumflow/3pwateroil/volumevariables.hh b/dumux/porousmediumflow/3pwateroil/volumevariables.hh
index 68f856d78b29bd794fa49abe8cb4350d20e640ba..433d65627026f09c96fe45890b20cc885a19eac4 100644
--- a/dumux/porousmediumflow/3pwateroil/volumevariables.hh
+++ b/dumux/porousmediumflow/3pwateroil/volumevariables.hh
@@ -59,22 +59,15 @@ class ThreePWaterOilVolumeVariables : public PorousMediumFlowVolumeVariables<Typ
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
-    using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
 
-    // constraint solvers
-    using MiscibleMultiPhaseComposition = Dumux::MiscibleMultiPhaseComposition<Scalar, FluidSystem>;
-    using ComputeFromReferencePhase = Dumux::ComputeFromReferencePhase<Scalar, FluidSystem>;
     enum {
-        dim = GridView::dimension,
-
         numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
         numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
 
         wCompIdx = Indices::wCompIdx,
         nCompIdx = Indices::nCompIdx,
-        gCompIdx = Indices::gCompIdx,
 
         wPhaseIdx = Indices::wPhaseIdx,
         gPhaseIdx = Indices::gPhaseIdx,
@@ -97,11 +90,6 @@ class ThreePWaterOilVolumeVariables : public PorousMediumFlowVolumeVariables<Typ
 
     using Element = typename GridView::template Codim<0>::Entity;
 
-    static const Scalar R; // universial gas constant
-
-    enum { isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box };
-    enum { dofCodim = isBox ? dim : 0 };
-
 public:
     //! The type of the object returned by the fluidState() method
     using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState);
@@ -857,10 +845,6 @@ private:
     const Implementation &asImp_() const
     { return *static_cast<const Implementation*>(this); }
 };
-
-template <class TypeTag>
-const typename ThreePWaterOilVolumeVariables<TypeTag>::Scalar ThreePWaterOilVolumeVariables<TypeTag>::R = Constants<typename GET_PROP_TYPE(TypeTag, Scalar)>::R;
-
 } // end namespace
 
 #endif
diff --git a/dumux/porousmediumflow/co2/volumevariables.hh b/dumux/porousmediumflow/co2/volumevariables.hh
index bcd8b7190a7a93a98f7b5564598d4e1127e12e2f..ebe4fe2cbc5fc879811aa607237b26d73972c208 100644
--- a/dumux/porousmediumflow/co2/volumevariables.hh
+++ b/dumux/porousmediumflow/co2/volumevariables.hh
@@ -43,17 +43,13 @@ class TwoPTwoCCO2VolumeVariables : public TwoPTwoCVolumeVariables<TypeTag>
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using Element = typename GET_PROP_TYPE(TypeTag, GridView)::template Codim<0>::Entity;
-    using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolution = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
 
-    enum {
-        numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
-        numComponents = GET_PROP_VALUE(TypeTag, NumComponents)
-    };
+    enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
 
     enum {
         wCompIdx = Indices::wCompIdx,
diff --git a/dumux/porousmediumflow/compositional/localresidual.hh b/dumux/porousmediumflow/compositional/localresidual.hh
index dc7c3885a9898fe16c66d0426cd2f7774f58f5cb..8fcd629da655cbbab080aed8d2f41d92d46c088f 100644
--- a/dumux/porousmediumflow/compositional/localresidual.hh
+++ b/dumux/porousmediumflow/compositional/localresidual.hh
@@ -44,12 +44,10 @@ class CompositionalLocalResidual: public GET_PROP_TYPE(TypeTag, BaseLocalResidua
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
-    using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
     using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables);
     using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
-    using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
@@ -57,7 +55,6 @@ class CompositionalLocalResidual: public GET_PROP_TYPE(TypeTag, BaseLocalResidua
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using EnergyLocalResidual = typename GET_PROP_TYPE(TypeTag, EnergyLocalResidual);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
-    using MolecularDiffusionType = typename GET_PROP_TYPE(TypeTag, MolecularDiffusionType);
 
     static constexpr int numPhases = GET_PROP_VALUE(TypeTag, NumPhases);
     static constexpr int numComponents = GET_PROP_VALUE(TypeTag, NumComponents);
diff --git a/dumux/porousmediumflow/immiscible/localresidual.hh b/dumux/porousmediumflow/immiscible/localresidual.hh
index 97877cf3b68870e15f57bde3aa006e45920cd87d..25dee78a72cc0f68e64d2f6e40343a24058c039a 100644
--- a/dumux/porousmediumflow/immiscible/localresidual.hh
+++ b/dumux/porousmediumflow/immiscible/localresidual.hh
@@ -40,7 +40,6 @@ class ImmiscibleLocalResidual : public GET_PROP_TYPE(TypeTag, BaseLocalResidual)
     using ParentType = typename GET_PROP_TYPE(TypeTag, BaseLocalResidual);
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
-    using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
diff --git a/dumux/porousmediumflow/mineralization/volumevariables.hh b/dumux/porousmediumflow/mineralization/volumevariables.hh
index 8c100832c34945b2709e0f76a9be157adf988604..e7d290f9c852fff45460a1f0c17e33ed2659a60f 100644
--- a/dumux/porousmediumflow/mineralization/volumevariables.hh
+++ b/dumux/porousmediumflow/mineralization/volumevariables.hh
@@ -51,11 +51,9 @@ class MineralizationVolumeVariables : public GET_PROP_TYPE(TypeTag, NonMineraliz
 
     enum
     {
-        dimWorld=GridView::dimensionworld,
-
         numPhases = GET_PROP_VALUE(TypeTag, NumPhases),
         numSPhases =  GET_PROP_VALUE(TypeTag, NumSPhases),
-        numComponents = GET_PROP_VALUE(TypeTag, NumComponents),
+        numComponents = GET_PROP_VALUE(TypeTag, NumComponents)
     };
 
 public:
diff --git a/dumux/porousmediumflow/mpnc/localresidual.hh b/dumux/porousmediumflow/mpnc/localresidual.hh
index 938e707f162bdb0a27dac634cd9740942f678f31..5bf07dc6ea32bc0eac0a81c242a6525ce41e5219 100644
--- a/dumux/porousmediumflow/mpnc/localresidual.hh
+++ b/dumux/porousmediumflow/mpnc/localresidual.hh
@@ -49,25 +49,18 @@ class MPNCLocalResidual : public CompositionalLocalResidual<TypeTag>
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using Element = typename GET_PROP_TYPE(TypeTag, GridView)::template Codim<0>::Entity;
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
-    using GridVariables = typename GET_PROP_TYPE(TypeTag, GridVariables);
-    using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
     using ElementResidualVector = Dune::BlockVector<typename GET_PROP_TYPE(TypeTag, NumEqVector)>;
-    using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
-    using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using ElementBoundaryTypes = typename GET_PROP_TYPE(TypeTag, ElementBoundaryTypes);
-    using FluxVariablesCache = typename GET_PROP_TYPE(TypeTag, FluxVariablesCache);
     using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
-    using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
 
     enum {numPhases = GET_PROP_VALUE(TypeTag, NumPhases)};
     enum {phase0NcpIdx = Indices::phase0NcpIdx};
 
-    static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box;
 public:
     using ParentType::ParentType;
 
diff --git a/dumux/porousmediumflow/mpnc/volumevariables.hh b/dumux/porousmediumflow/mpnc/volumevariables.hh
index c13d3d0a07e12e5d524262631a6c3f6ea69e79df..3b26164a8fc89fd3d6e1debb85a2389f8f46fb5e 100644
--- a/dumux/porousmediumflow/mpnc/volumevariables.hh
+++ b/dumux/porousmediumflow/mpnc/volumevariables.hh
@@ -47,7 +47,6 @@ class MPNCVolumeVariables
     , public NonEquilibriumVolumeVariables<TypeTag>
 {
     using ParentType = PorousMediumFlowVolumeVariables<TypeTag>;
-    using Implementation = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
 
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
diff --git a/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh b/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh
index 694f4c742412568186efe5caceb0c054ed0d44cb..12e3c7e812676b0c706cbe0620069447af20f25a 100644
--- a/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh
+++ b/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh
@@ -54,30 +54,17 @@ class EnergyLocalResidualNonEquilibrium<TypeTag, 1/*numEnergyEqFluid*/>
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
-    using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState);
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
 
-    enum { numPhases        = GET_PROP_VALUE(TypeTag, NumPhases) };
     enum { numEnergyEqFluid = GET_PROP_VALUE(TypeTag, NumEnergyEqFluid) };
     enum { numEnergyEqSolid = GET_PROP_VALUE(TypeTag, NumEnergyEqSolid) };
-    enum { temperature0Idx = Indices::temperature0Idx };
     enum { energyEq0Idx = Indices::energyEq0Idx };
     enum { energyEqSolidIdx = Indices::energyEqSolidIdx};
-    enum { conti0EqIdx = Indices::conti0EqIdx };
 
     enum { numComponents    = GET_PROP_VALUE(TypeTag, NumComponents) };
     enum { wPhaseIdx        = FluidSystem::wPhaseIdx};
     enum { nPhaseIdx        = FluidSystem::nPhaseIdx};
     enum { sPhaseIdx        = FluidSystem::sPhaseIdx};
-    enum { nCompIdx         = FluidSystem::nCompIdx};
-    enum { wCompIdx         = FluidSystem::wCompIdx};
-
-    enum { temperatureFluidIdx = Indices::temperature0Idx};
-    enum { temperatureSolidIdx = Indices::temperatureSolidIdx};
-
-    enum { dim = GridView::dimension}; // Grid and world dimension
-
-    static constexpr bool enableChemicalNonEquilibrium = GET_PROP_VALUE(TypeTag, EnableChemicalNonEquilibrium);
 
 public:
 
@@ -179,7 +166,7 @@ public:
         //specialization for 2 fluid phases
         const auto& localScvIdx = scv.indexInElement();
         const auto& volVars = elemVolVars[localScvIdx];
-        const FluidState & fs = volVars.fluidState() ;
+        const auto& fs = volVars.fluidState() ;
         const Scalar characteristicLength = volVars.characteristicLength()  ;
 
         //interfacial area
@@ -284,7 +271,7 @@ public:
     {
         // using saturation as input (instead of from volVars)
         // in order to make regularization (evaluation at different points) easyer
-        const FluidState & fs = volVars.fluidState() ;
+        const auto& fs = volVars.fluidState() ;
         const Scalar g( 9.81 ) ;
         const Scalar gamma(0.0589) ;
         const Scalar TSolid     = volVars.temperatureSolid();
@@ -336,13 +323,11 @@ class EnergyLocalResidualNonEquilibrium<TypeTag, 2 /*numEnergyEqFluid*/>
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
-    using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState);
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
 
     enum { numPhases        = GET_PROP_VALUE(TypeTag, NumPhases) };
     enum { numEnergyEqFluid = GET_PROP_VALUE(TypeTag, NumEnergyEqFluid) };
     enum { numEnergyEqSolid = GET_PROP_VALUE(TypeTag, NumEnergyEqSolid) };
-    enum { temperature0Idx = Indices::temperature0Idx };
     enum { energyEq0Idx = Indices::energyEq0Idx };
     enum { energyEqSolidIdx = Indices::energyEqSolidIdx};
     enum { conti0EqIdx = Indices::conti0EqIdx };
@@ -351,13 +336,6 @@ class EnergyLocalResidualNonEquilibrium<TypeTag, 2 /*numEnergyEqFluid*/>
     enum { wPhaseIdx        = FluidSystem::wPhaseIdx};
     enum { nPhaseIdx        = FluidSystem::nPhaseIdx};
     enum { sPhaseIdx        = FluidSystem::sPhaseIdx};
-    enum { nCompIdx         = FluidSystem::nCompIdx};
-    enum { wCompIdx         = FluidSystem::wCompIdx};
-
-    enum { temperatureFluidIdx = Indices::temperature0Idx};
-    enum { temperatureSolidIdx = Indices::temperatureSolidIdx};
-
-    enum { dim = GridView::dimension}; // Grid and world dimension
 
     static constexpr bool enableChemicalNonEquilibrium = GET_PROP_VALUE(TypeTag, EnableChemicalNonEquilibrium);
 
@@ -503,7 +481,7 @@ public:
                 //        -> Energy advectivly transported into a phase = the moles of a component that go into a  phase
                 //           * molMass * enthalpy of the component in the *originating* phase
 
-            const FluidState & fluidState = volVars.fluidState();
+            const auto& fluidState = volVars.fluidState();
 
             for(int phaseIdx =0; phaseIdx<numEnergyEqFluid+numEnergyEqSolid; ++phaseIdx)
             {
diff --git a/dumux/porousmediumflow/nonequilibrium/volumevariables.hh b/dumux/porousmediumflow/nonequilibrium/volumevariables.hh
index 2d20c493acabffafbd7450229a76701fbbccdc6c..7fcd4fff66c698b493b0084fc6f1f59b26146161 100644
--- a/dumux/porousmediumflow/nonequilibrium/volumevariables.hh
+++ b/dumux/porousmediumflow/nonequilibrium/volumevariables.hh
@@ -59,7 +59,6 @@ template <class TypeTag>
 class NonEquilibriumVolumeVariablesImplementation<TypeTag, false/*enableChemicalNonEquilibrium*/, false/*enableThermalNonEquilibrium*/>
 {
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
-    using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
@@ -103,32 +102,19 @@ class NonEquilibriumVolumeVariablesImplementation<TypeTag, /*enableChemicalNonEq
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
-    using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
-    using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolution = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
-    using PermeabilityType = typename SpatialParams::PermeabilityType;
     using Element = typename GridView::template Codim<0>::Entity;
     using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState);
     using ParameterCache = typename FluidSystem::ParameterCache;
     using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
 
-    enum { numComponents = GET_PROP_VALUE(TypeTag, NumComponents) };
     enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
-    enum { wPhaseIdx = FluidSystem::wPhaseIdx };
-    enum { nPhaseIdx = FluidSystem::nPhaseIdx };
-    enum { sPhaseIdx = FluidSystem::sPhaseIdx };
-    enum { nCompIdx = FluidSystem::nCompIdx } ;
-    enum { wCompIdx = FluidSystem::wCompIdx } ;
-    enum { dim = GridView::dimension};
-    enum { dimWorld = GridView::dimensionworld};
     enum { nusseltFormulation = GET_PROP_VALUE(TypeTag, NusseltFormulation)} ;
-    enum { sherwoodFormulation = GET_PROP_VALUE(TypeTag, SherwoodFormulation)} ;
     enum { numEnergyEqFluid = GET_PROP_VALUE(TypeTag, NumEnergyEqFluid) };
     enum { numEnergyEqSolid = GET_PROP_VALUE(TypeTag, NumEnergyEqSolid) };
     enum { temperature0Idx = Indices::temperature0Idx };
-    enum { moleFrac00Idx = Indices::conti0EqIdx };
 
     static_assert((numEnergyEqFluid < 2),
                    "This model is a specialization for a energy transfer of a fluid  mixture and a solid");
@@ -289,17 +275,13 @@ private:
 template <class TypeTag>
 class NonEquilibriumVolumeVariablesImplementation<TypeTag, true/*enableChemicalNonEquilibrium*/, false/*enableThermalNonEquilibrium*/>
 {
-    using BaseType = PorousMediumFlowVolumeVariables<TypeTag>;
     using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
-    using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
-    using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolution = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
-    using PermeabilityType = typename SpatialParams::PermeabilityType;
     using Element = typename GridView::template Codim<0>::Entity;
     using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState);
     using ParameterCache = typename FluidSystem::ParameterCache;
@@ -309,24 +291,14 @@ class NonEquilibriumVolumeVariablesImplementation<TypeTag, true/*enableChemicalN
     enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
     enum { wPhaseIdx = FluidSystem::wPhaseIdx };
     enum { nPhaseIdx = FluidSystem::nPhaseIdx };
-    enum { sPhaseIdx = FluidSystem::sPhaseIdx };
     enum { nCompIdx = FluidSystem::nCompIdx } ;
     enum { wCompIdx = FluidSystem::wCompIdx } ;
     enum { dim = GridView::dimension};
-    enum { dimWorld = GridView::dimensionworld};
-    enum { nusseltFormulation = GET_PROP_VALUE(TypeTag, NusseltFormulation)} ;
     enum { sherwoodFormulation = GET_PROP_VALUE(TypeTag, SherwoodFormulation)} ;
-    enum { numEnergyEqFluid = GET_PROP_VALUE(TypeTag, NumEnergyEqFluid) };
-    enum { numEnergyEqSolid = GET_PROP_VALUE(TypeTag, NumEnergyEqSolid) };
-    enum { temperature0Idx = Indices::temperature0Idx };
     enum { moleFrac00Idx = Indices::conti0EqIdx };
 
     using AwnSurface = typename GET_PROP_TYPE(TypeTag, AwnSurface);
     using AwnSurfaceParams = typename  AwnSurface::Params;
-    using AwsSurface = typename GET_PROP_TYPE(TypeTag, AwsSurface);
-    using AwsSurfaceParams = typename  AwsSurface::Params;
-    using AnsSurface = typename GET_PROP_TYPE(TypeTag, AnsSurface);
-    using AnsSurfaceParams = typename  AnsSurface::Params;
 
     using DimLessNum = DimensionlessNumbers<Scalar>;
     //TODO: write a good constraint solver which does that right
@@ -524,12 +496,9 @@ class NonEquilibriumVolumeVariablesImplementation<TypeTag, true/*enableChemicalN
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
-    using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
-    using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolution = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
-    using PermeabilityType = typename SpatialParams::PermeabilityType;
     using Element = typename GridView::template Codim<0>::Entity;
     using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState);
     using ParameterCache = typename FluidSystem::ParameterCache;
@@ -542,8 +511,6 @@ class NonEquilibriumVolumeVariablesImplementation<TypeTag, true/*enableChemicalN
     enum { sPhaseIdx = FluidSystem::sPhaseIdx };
     enum { nCompIdx = FluidSystem::nCompIdx } ;
     enum { wCompIdx = FluidSystem::wCompIdx } ;
-    enum { dim = GridView::dimension};
-    enum { dimWorld = GridView::dimensionworld};
     enum { nusseltFormulation = GET_PROP_VALUE(TypeTag, NusseltFormulation)} ;
     enum { sherwoodFormulation = GET_PROP_VALUE(TypeTag, SherwoodFormulation)} ;
     enum { numEnergyEqFluid = GET_PROP_VALUE(TypeTag, NumEnergyEqFluid) };
@@ -554,7 +521,6 @@ class NonEquilibriumVolumeVariablesImplementation<TypeTag, true/*enableChemicalN
     static_assert((numEnergyEqFluid > 1),
                    "This model only deals with energy transfer between two fluids and one solid phase");
     using DimLessNum = DimensionlessNumbers<Scalar>;
-    using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
 
     using AwnSurface = typename GET_PROP_TYPE(TypeTag, AwnSurface);
     using AwnSurfaceParams = typename  AwnSurface::Params;
@@ -563,7 +529,6 @@ class NonEquilibriumVolumeVariablesImplementation<TypeTag, true/*enableChemicalN
     using AnsSurface = typename GET_PROP_TYPE(TypeTag, AnsSurface);
     using AnsSurfaceParams = typename  AnsSurface::Params;
 
-    using ConstraintReferencePhaseSolver = Dumux::FluidSystemComputeFromReferencePhase<Scalar, FluidSystem>;
     using ConstraintSolver = Dumux::FluidSystemConstraintSolver<Scalar, FluidSystem>;
 
 
diff --git a/dumux/porousmediumflow/richards/volumevariables.hh b/dumux/porousmediumflow/richards/volumevariables.hh
index 216d03d6d6283aea7569e127accd28e20bf11f0b..d3e4a90f48f15d6e7a13a94053716fbfee4fe661 100644
--- a/dumux/porousmediumflow/richards/volumevariables.hh
+++ b/dumux/porousmediumflow/richards/volumevariables.hh
@@ -53,8 +53,6 @@ class RichardsVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
     using PermeabilityType = typename SpatialParams::PermeabilityType;
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
-    using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params;
-    using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
diff --git a/dumux/porousmediumflow/richardsnc/volumevariables.hh b/dumux/porousmediumflow/richardsnc/volumevariables.hh
index cca386cd04d55dab0a46db817d9093eaff1f9e69..b8650cd8d114530f638364a0b868a2c0c8cf330c 100644
--- a/dumux/porousmediumflow/richardsnc/volumevariables.hh
+++ b/dumux/porousmediumflow/richardsnc/volumevariables.hh
@@ -49,8 +49,6 @@ class RichardsBaseVolumeVariables : public PorousMediumFlowVolumeVariables<TypeT
     using PermeabilityType = typename SpatialParams::PermeabilityType;
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
-    using MaterialLawParams = typename GET_PROP_TYPE(TypeTag, MaterialLaw)::Params;
-    using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
     using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
@@ -58,8 +56,7 @@ class RichardsBaseVolumeVariables : public PorousMediumFlowVolumeVariables<TypeT
 
     enum{
          pressureIdx = Indices::pressureIdx,
-         wPhaseIdx = Indices::wPhaseIdx,
-         nPhaseIdx = Indices::nPhaseIdx
+         wPhaseIdx = Indices::wPhaseIdx
     };
 
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
@@ -318,25 +315,20 @@ class RichardsNCVolumeVariables : public RichardsBaseVolumeVariables<TypeTag>
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
-    using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
-    using PermeabilityType = typename SpatialParams::PermeabilityType;
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
 
     enum
     {
         wPhaseIdx = Indices::wPhaseIdx,
-        nPhaseIdx = Indices::nPhaseIdx,
         pressureIdx = Indices::pressureIdx
     };
 
     static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
-    static const int dim = GridView::dimension;
     static const int dimWorld = GridView::dimensionworld;
     static const int numComponents = GET_PROP_VALUE(TypeTag, NumComponents);
 
-    using MaterialLaw = typename GET_PROP_TYPE(TypeTag, MaterialLaw);
-    using GlobalPosition = Dune::FieldVector<Scalar,dimWorld>;
+    using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
     using Element = typename GridView::template Codim<0>::Entity;
 
 public:
diff --git a/dumux/porousmediumflow/tracer/localresidual.hh b/dumux/porousmediumflow/tracer/localresidual.hh
index c7e9d3e563bc3f21516ef695e6d249ed5d2f7399..ef288636fab5651affba6829e56a7efd5828a59f 100644
--- a/dumux/porousmediumflow/tracer/localresidual.hh
+++ b/dumux/porousmediumflow/tracer/localresidual.hh
@@ -49,14 +49,11 @@ class TracerLocalResidual: public GET_PROP_TYPE(TypeTag, BaseLocalResidual)
     using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables);
     using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
-    using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
-    using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
-    using EnergyLocalResidual = typename GET_PROP_TYPE(TypeTag, EnergyLocalResidual);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
 
     static constexpr int numComponents = GET_PROP_VALUE(TypeTag, NumComponents);
diff --git a/dumux/porousmediumflow/tracer/volumevariables.hh b/dumux/porousmediumflow/tracer/volumevariables.hh
index 5c73740c07fddb42b934404d5afd8f18d7c85e76..f31d136da520ad569bbc0c613b1fc7da0a45fa47 100644
--- a/dumux/porousmediumflow/tracer/volumevariables.hh
+++ b/dumux/porousmediumflow/tracer/volumevariables.hh
@@ -49,12 +49,9 @@ class TracerVolumeVariables : public PorousMediumFlowVolumeVariables<TypeTag>
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector);
-    using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
     using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
-    using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
 
     static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
-    static constexpr int dim = GridView::dimension;
     static constexpr int dimWorld = GridView::dimensionworld;
     static constexpr int numComponents = GET_PROP_VALUE(TypeTag, NumComponents);
 
diff --git a/tutorial/ex2/mylocalresidual.hh b/tutorial/ex2/mylocalresidual.hh
index 036a341e5c73e3e5479da5a5792aef208010ed8b..bd7b28ea04ea740bc728e04e18936b08efa68751 100644
--- a/tutorial/ex2/mylocalresidual.hh
+++ b/tutorial/ex2/mylocalresidual.hh
@@ -45,24 +45,19 @@ class MyCompositionalLocalResidual: public GET_PROP_TYPE(TypeTag, BaseLocalResid
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
-    using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
     using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables);
     using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
-    using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using EnergyLocalResidual = typename GET_PROP_TYPE(TypeTag, EnergyLocalResidual);
-    using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
-    using MolecularDiffusionType = typename GET_PROP_TYPE(TypeTag, MolecularDiffusionType);
 
     static constexpr int numPhases = GET_PROP_VALUE(TypeTag, NumPhases);
     static constexpr int numComponents = GET_PROP_VALUE(TypeTag, NumComponents);
-    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
 
     enum { conti0EqIdx = Indices::conti0EqIdx };
 
diff --git a/tutorial/solution/ex2/mylocalresidual.hh b/tutorial/solution/ex2/mylocalresidual.hh
index 0cede53f48d317af3075c0e77881a7ca0ec794d7..9c2edb33652ab0c7df87773927d6802c58dfc886 100644
--- a/tutorial/solution/ex2/mylocalresidual.hh
+++ b/tutorial/solution/ex2/mylocalresidual.hh
@@ -46,24 +46,19 @@ class MyCompositionalLocalResidual: public GET_PROP_TYPE(TypeTag, BaseLocalResid
     using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
     using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume);
     using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace);
-    using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
     using ResidualVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
     using FluxVariables = typename GET_PROP_TYPE(TypeTag, FluxVariables);
     using ElementFluxVariablesCache = typename GET_PROP_TYPE(TypeTag, ElementFluxVariablesCache);
     using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
-    using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
     using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry);
     using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
     using Element = typename GridView::template Codim<0>::Entity;
     using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables);
     using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables);
     using EnergyLocalResidual = typename GET_PROP_TYPE(TypeTag, EnergyLocalResidual);
-    using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
-    using MolecularDiffusionType = typename GET_PROP_TYPE(TypeTag, MolecularDiffusionType);
 
     static constexpr int numPhases = GET_PROP_VALUE(TypeTag, NumPhases);
     static constexpr int numComponents = GET_PROP_VALUE(TypeTag, NumComponents);
-    static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
 
     enum { conti0EqIdx = Indices::conti0EqIdx };