diff --git a/dumux/porousmediumflow/2p1c/model.hh b/dumux/porousmediumflow/2p1c/model.hh
index 90aa3d692c4c987e638b23237130be3440d9f4b2..84a2864261116df5e26db563e115d6d63d3cdb28 100644
--- a/dumux/porousmediumflow/2p1c/model.hh
+++ b/dumux/porousmediumflow/2p1c/model.hh
@@ -57,6 +57,8 @@
 #ifndef DUMUX_2P1C_MODEL_HH
 #define DUMUX_2P1C_MODEL_HH
 
+#include <dune/common/fvector.hh>
+
 #include <dumux/common/properties.hh>
 
 #include <dumux/material/fluidmatrixinteractions/2p/thermalconductivitysomerton.hh>
@@ -158,7 +160,14 @@ SET_TYPE_PROP(TwoPOneCNI, VolumeVariables, TwoPOneCVolumeVariables<TypeTag>);
 SET_TYPE_PROP(TwoPOneCNI, PrimaryVariableSwitch, TwoPOneCPrimaryVariableSwitch<TypeTag>);
 
 //! The primary variables vector for the 2p1cni model.
-SET_TYPE_PROP(TwoPOneCNI, PrimaryVariables, SwitchablePrimaryVariables<TypeTag, int>);
+SET_PROP(TwoPOneCNI, PrimaryVariables)
+{
+private:
+    using PrimaryVariablesVector = Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar),
+                                                     GET_PROP_VALUE(TypeTag, NumEq)>;
+public:
+    using type = SwitchablePrimaryVariables<PrimaryVariablesVector, int>;
+};
 
 //! Somerton is used as default model to compute the effective thermal heat conductivity.
 SET_PROP(TwoPOneCNI, ThermalConductivityModel)
diff --git a/dumux/porousmediumflow/2p2c/model.hh b/dumux/porousmediumflow/2p2c/model.hh
index d97f2bcc03348d7d6bc18efc06986d521e592fe8..88de9c13f99f4653507443e562bdcfc42be674a0 100644
--- a/dumux/porousmediumflow/2p2c/model.hh
+++ b/dumux/porousmediumflow/2p2c/model.hh
@@ -77,6 +77,8 @@
 #ifndef DUMUX_2P2C_MODEL_HH
 #define DUMUX_2P2C_MODEL_HH
 
+#include <dune/common/fvector.hh>
+
 // property forward declarations
 #include <dumux/common/properties.hh>
 #include <dumux/porousmediumflow/properties.hh>
@@ -94,11 +96,9 @@
 #include "primaryvariableswitch.hh"
 #include "vtkoutputfields.hh"
 
-namespace Dumux
-{
+namespace Dumux {
+namespace Properties {
 
-namespace Properties
-{
 //////////////////////////////////////////////////////////////////
 // Type tags
 //////////////////////////////////////////////////////////////////
@@ -178,7 +178,14 @@ SET_BOOL_PROP(TwoPTwoC, EnableEnergyBalance, false);
 SET_TYPE_PROP(TwoPTwoC, PrimaryVariableSwitch, TwoPTwoCPrimaryVariableSwitch<TypeTag>);
 
 //! The primary variables vector for the 2p2c model
-SET_TYPE_PROP(TwoPTwoC, PrimaryVariables, SwitchablePrimaryVariables<TypeTag, int>);
+SET_PROP(TwoPTwoC, PrimaryVariables)
+{
+private:
+    using PrimaryVariablesVector = Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar),
+                                                     GET_PROP_VALUE(TypeTag, NumEq)>;
+public:
+    using type = SwitchablePrimaryVariables<PrimaryVariablesVector, int>;
+};
 
 //! Use the 2p2c VolumeVariables
 SET_TYPE_PROP(TwoPTwoC, VolumeVariables, TwoPTwoCVolumeVariables<TypeTag>);
diff --git a/dumux/porousmediumflow/2pnc/model.hh b/dumux/porousmediumflow/2pnc/model.hh
index 5f08da5aa6c3491f74fae11cdcbf9b7400553686..c6c0efe7cf1a863a076b89674533d47154fed6cc 100644
--- a/dumux/porousmediumflow/2pnc/model.hh
+++ b/dumux/porousmediumflow/2pnc/model.hh
@@ -85,6 +85,8 @@
 #ifndef DUMUX_2PNC_MODEL_HH
 #define DUMUX_2PNC_MODEL_HH
 
+#include <dune/common/fvector.hh>
+
 #include <dumux/common/properties.hh>
 
 #include <dumux/material/spatialparams/fv.hh>
@@ -115,7 +117,16 @@ NEW_TYPE_TAG(TwoPNCNI, INHERITS_FROM(TwoPNC, NonIsothermal));
 //////////////////////////////////////////////////////////////////
 // Properties for the isothermal 2pnc model
 //////////////////////////////////////////////////////////////////
-SET_TYPE_PROP(TwoPNC, PrimaryVariables, SwitchablePrimaryVariables<TypeTag, int>);          //!< The primary variables vector for the 2pnc model
+//! The primary variables vector for the 2pnc model
+SET_PROP(TwoPNC, PrimaryVariables)
+{
+private:
+    using PrimaryVariablesVector = Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar),
+                                                     GET_PROP_VALUE(TypeTag, NumEq)>;
+public:
+    using type = SwitchablePrimaryVariables<PrimaryVariablesVector, int>;
+};
+
 SET_TYPE_PROP(TwoPNC, PrimaryVariableSwitch, TwoPNCPrimaryVariableSwitch<TypeTag>);         //!< The primary variable switch for the 2pnc model
 SET_TYPE_PROP(TwoPNC, VolumeVariables, TwoPNCVolumeVariables<TypeTag>);                     //!< the VolumeVariables property
 SET_TYPE_PROP(TwoPNC, Indices, TwoPNCIndices <TypeTag, /*PVOffset=*/0>);                    //!< The indices required by the isothermal 2pnc model
diff --git a/dumux/porousmediumflow/3p3c/model.hh b/dumux/porousmediumflow/3p3c/model.hh
index 85e5c9f2f7206c8f30bfd9a1f7c56f24d6c5ef37..36d70f79635283453560abd0e8bd3043889407e5 100644
--- a/dumux/porousmediumflow/3p3c/model.hh
+++ b/dumux/porousmediumflow/3p3c/model.hh
@@ -78,6 +78,8 @@
 #ifndef DUMUX_3P3C_MODEL_HH
 #define DUMUX_3P3C_MODEL_HH
 
+#include <dune/common/fvector.hh>
+
 #include <dumux/common/properties.hh>
 #include <dumux/porousmediumflow/properties.hh>
 #include <dumux/porousmediumflow/nonisothermal/model.hh>
@@ -165,7 +167,14 @@ SET_BOOL_PROP(ThreePThreeC, EnableEnergyBalance, false);
 SET_TYPE_PROP(ThreePThreeC, PrimaryVariableSwitch, ThreePThreeCPrimaryVariableSwitch<TypeTag>);
 
 //! The primary variables vector for the 3p3c model
-SET_TYPE_PROP(ThreePThreeC, PrimaryVariables, SwitchablePrimaryVariables<TypeTag, int>);
+SET_PROP(ThreePThreeC, PrimaryVariables)
+{
+private:
+    using PrimaryVariablesVector = Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar),
+                                                     GET_PROP_VALUE(TypeTag, NumEq)>;
+public:
+    using type = SwitchablePrimaryVariables<PrimaryVariablesVector, int>;
+};
 
 //! the VolumeVariables property
 SET_TYPE_PROP(ThreePThreeC, VolumeVariables, ThreePThreeCVolumeVariables<TypeTag>);
diff --git a/dumux/porousmediumflow/3pwateroil/model.hh b/dumux/porousmediumflow/3pwateroil/model.hh
index 89d56e6d4f643dc2419e5f8208d1be3c55204f32..a985d08037617959562a7c49a91c41e39d0e7744 100644
--- a/dumux/porousmediumflow/3pwateroil/model.hh
+++ b/dumux/porousmediumflow/3pwateroil/model.hh
@@ -71,8 +71,9 @@
 #ifndef DUMUX_3P2CNI_MODEL_HH
 #define DUMUX_3P2CNI_MODEL_HH
 
-#include <dumux/common/properties.hh>
+#include <dune/common/fvector.hh>
 
+#include <dumux/common/properties.hh>
 #include <dumux/material/spatialparams/fv.hh>
 #include <dumux/material/fluidmatrixinteractions/3p/thermalconductivitysomerton3p.hh>
 #include <dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh>
@@ -171,7 +172,14 @@ SET_BOOL_PROP(ThreePWaterOilNI, EnableEnergyBalance, true);
 SET_TYPE_PROP(ThreePWaterOilNI, PrimaryVariableSwitch, ThreePWaterOilPrimaryVariableSwitch<TypeTag>);
 
 //! The primary variables vector for the 3p3c model
-SET_TYPE_PROP(ThreePWaterOilNI, PrimaryVariables, SwitchablePrimaryVariables<TypeTag, int>);
+SET_PROP(ThreePWaterOilNI, PrimaryVariables)
+{
+private:
+    using PrimaryVariablesVector = Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar),
+                                                     GET_PROP_VALUE(TypeTag, NumEq)>;
+public:
+    using type = SwitchablePrimaryVariables<PrimaryVariablesVector, int>;
+};
 
 //! Determines whether a constraint solver should be used explicitly
 SET_BOOL_PROP(ThreePWaterOilNI, OnlyGasPhaseCanDisappear, true);
diff --git a/dumux/porousmediumflow/compositional/switchableprimaryvariables.hh b/dumux/porousmediumflow/compositional/switchableprimaryvariables.hh
index a721f37e9eea0461fceba34a5bfba1b8292e2238..407e1cd905c5dff4a94fea7f5a6c58e9a7b183cf 100644
--- a/dumux/porousmediumflow/compositional/switchableprimaryvariables.hh
+++ b/dumux/porousmediumflow/compositional/switchableprimaryvariables.hh
@@ -25,8 +25,6 @@
 #define DUMUX_SWITCHABLE_PRIMARY_VARIABLES_HH
 
 #include <dune/common/exceptions.hh>
-#include <dune/common/fvector.hh>
-#include <dumux/common/properties.hh>
 
 namespace Dumux {
 
@@ -34,12 +32,10 @@ namespace Dumux {
  * \ingroup PorousmediumCompositional
  * \brief A primary variable vector with a state to allow variable switches
  */
-template<class TypeTag, class StateType>
-class SwitchablePrimaryVariables : public Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar),
-                                                            GET_PROP_VALUE(TypeTag, NumEq)>
+template<class PrimaryVariables, class StateType>
+class SwitchablePrimaryVariables : public PrimaryVariables
 {
-    using ParentType = Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar),
-                                         GET_PROP_VALUE(TypeTag, NumEq)>;
+    using ParentType = PrimaryVariables;
 public:
     //! inherit the constructors
     using ParentType::ParentType;
@@ -74,7 +70,6 @@ public:
 private:
     StateType state_;
     bool stateIsSet_{false};
-
 };
 
 } // end namespace Dumux
diff --git a/dumux/porousmediumflow/richards/model.hh b/dumux/porousmediumflow/richards/model.hh
index 8a080f62d984dcd8003475c6c1692841aa89b49f..2c8e2c149031dc84d521da386972aee62ddf6796 100644
--- a/dumux/porousmediumflow/richards/model.hh
+++ b/dumux/porousmediumflow/richards/model.hh
@@ -91,6 +91,8 @@
 #ifndef DUMUX_RICHARDS_MODEL_HH
 #define DUMUX_RICHARDS_MODEL_HH
 
+#include <dune/common/fvector.hh>
+
 #include <dumux/common/properties.hh>
 
 #include <dumux/porousmediumflow/immiscible/localresidual.hh>
@@ -170,8 +172,15 @@ SET_BOOL_PROP(Richards, EnableEnergyBalance, false);
 //! The class with all index definitions for the model
 SET_TYPE_PROP(Richards, Indices, RichardsIndices);
 
-//! The class with all index definitions for the model
-SET_TYPE_PROP(Richards, PrimaryVariables, SwitchablePrimaryVariables<TypeTag, int>);
+//! The primary variables vector for the richards model
+SET_PROP(Richards, PrimaryVariables)
+{
+private:
+    using PrimaryVariablesVector = Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Scalar),
+                                                     GET_PROP_VALUE(TypeTag, NumEq)>;
+public:
+    using type = SwitchablePrimaryVariables<PrimaryVariablesVector, int>;
+};
 
 //! The primary variable switch for the richards model
 SET_TYPE_PROP(Richards, PrimaryVariableSwitch, ExtendedRichardsPrimaryVariableSwitch<TypeTag>);