diff --git a/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh b/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh
index d3358bd29f8dc81fbae55e1c08d2d93d00973db1..3a25a80bb369d3b034cf402f391c2ed928952c01 100644
--- a/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh
+++ b/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh
@@ -32,6 +32,7 @@
 #include <algorithm>
 #include <array>
 #include <bitset>
+#include <stack>
 
 namespace Dumux
 {
diff --git a/dumux/flux/box/fickslaw.hh b/dumux/flux/box/fickslaw.hh
index bde47554f63a38ec708cc98596076f21c87be568..e30457d334754a7dd3a15abb262c850404f3f165 100644
--- a/dumux/flux/box/fickslaw.hh
+++ b/dumux/flux/box/fickslaw.hh
@@ -29,6 +29,8 @@
 #include <dumux/common/properties.hh>
 #include <dumux/discretization/method.hh>
 
+#include <dumux/flux/referencesystemformulation.hh>
+
 namespace Dumux {
 
 // forward declaration
diff --git a/dumux/flux/box/maxwellstefanslaw.hh b/dumux/flux/box/maxwellstefanslaw.hh
index 86a1a3bceeac703072c899ed4be9edfd9b26d89c..1fca21ac8bc1b510295d706f721c7424a9fec886 100644
--- a/dumux/flux/box/maxwellstefanslaw.hh
+++ b/dumux/flux/box/maxwellstefanslaw.hh
@@ -32,6 +32,7 @@
 #include <dumux/common/parameters.hh>
 #include <dumux/discretization/method.hh>
 #include <dumux/flux/fluxvariablescaching.hh>
+#include <dumux/flux/referencesystemformulation.hh>
 
 namespace Dumux {
 
diff --git a/dumux/flux/ccmpfa/fickslaw.hh b/dumux/flux/ccmpfa/fickslaw.hh
index a06fb2f95bfb13640fbddf88669027a27d891a91..c17384152c94ec0e4e30d0c3bc2a5bcc9fd8570b 100644
--- a/dumux/flux/ccmpfa/fickslaw.hh
+++ b/dumux/flux/ccmpfa/fickslaw.hh
@@ -28,6 +28,8 @@
 #include <dumux/common/properties.hh>
 #include <dumux/discretization/method.hh>
 
+#include <dumux/flux/referencesystemformulation.hh>
+
 namespace Dumux {
 
 //! forward declaration of the method-specific implemetation
diff --git a/dumux/flux/cctpfa/fickslaw.hh b/dumux/flux/cctpfa/fickslaw.hh
index cae12bb6385929bbfc3b26b271aa515d53c7ca3d..48385b17d69571585c9973d74538ef92ae073000 100644
--- a/dumux/flux/cctpfa/fickslaw.hh
+++ b/dumux/flux/cctpfa/fickslaw.hh
@@ -30,6 +30,8 @@
 #include <dumux/discretization/method.hh>
 #include <dumux/discretization/cellcentered/tpfa/computetransmissibility.hh>
 
+#include <dumux/flux/referencesystemformulation.hh>
+
 namespace Dumux {
 
 // forward declaration
diff --git a/dumux/flux/cctpfa/maxwellstefanslaw.hh b/dumux/flux/cctpfa/maxwellstefanslaw.hh
index 55b9abd6ab581d586854af88ac913aa8a7a13b8b..91fc37103b5302ee1ce121c4f8caebbb2dcc8cc9 100644
--- a/dumux/flux/cctpfa/maxwellstefanslaw.hh
+++ b/dumux/flux/cctpfa/maxwellstefanslaw.hh
@@ -32,6 +32,7 @@
 #include <dumux/common/parameters.hh>
 #include <dumux/discretization/method.hh>
 #include <dumux/flux/fluxvariablescaching.hh>
+#include <dumux/flux/referencesystemformulation.hh>
 
 namespace Dumux {
 
diff --git a/dumux/flux/staggered/freeflow/fickslaw.hh b/dumux/flux/staggered/freeflow/fickslaw.hh
index 62c68896957b178f7f2db76111a52f282623c3f7..2f47965913c8706525b4c036580ea617269ac0a6 100644
--- a/dumux/flux/staggered/freeflow/fickslaw.hh
+++ b/dumux/flux/staggered/freeflow/fickslaw.hh
@@ -34,6 +34,7 @@
 
 #include <dumux/discretization/method.hh>
 #include <dumux/flux/fluxvariablescaching.hh>
+#include <dumux/flux/referencesystemformulation.hh>
 
 namespace Dumux {
 
diff --git a/dumux/flux/staggered/freeflow/maxwellstefanslaw.hh b/dumux/flux/staggered/freeflow/maxwellstefanslaw.hh
index 82931596477a64349c84dbaa9ba167caec703f89..175c5f534505644955b1bdc2953b93b16cfaa3cb 100644
--- a/dumux/flux/staggered/freeflow/maxwellstefanslaw.hh
+++ b/dumux/flux/staggered/freeflow/maxwellstefanslaw.hh
@@ -31,6 +31,7 @@
 #include <dumux/common/parameters.hh>
 #include <dumux/discretization/method.hh>
 #include <dumux/flux/fluxvariablescaching.hh>
+#include <dumux/flux/referencesystemformulation.hh>
 
 namespace Dumux {
 
diff --git a/dumux/freeflow/compositional/staggered/fluxvariables.hh b/dumux/freeflow/compositional/staggered/fluxvariables.hh
index 6b620bba8d3cad0e6956dd864e702b5d0b8156ea..d122c7eca75a35936fa776ae3f1abd93e1b61567 100644
--- a/dumux/freeflow/compositional/staggered/fluxvariables.hh
+++ b/dumux/freeflow/compositional/staggered/fluxvariables.hh
@@ -27,6 +27,7 @@
 #include <numeric>
 #include <dumux/common/properties.hh>
 #include <dumux/flux/fluxvariablesbase.hh>
+#include <dumux/flux/referencesystemformulation.hh>
 #include <dumux/discretization/method.hh>
 #include <dumux/freeflow/navierstokes/fluxvariables.hh>
 
diff --git a/dumux/freeflow/rans/twoeq/kepsilon/problem.hh b/dumux/freeflow/rans/twoeq/kepsilon/problem.hh
index 58d9152049fe1f933e9577c72747f01f4cf5b376..e56c56fb2a356372305e0c1a7bbe8e3c7193307c 100644
--- a/dumux/freeflow/rans/twoeq/kepsilon/problem.hh
+++ b/dumux/freeflow/rans/twoeq/kepsilon/problem.hh
@@ -24,6 +24,8 @@
 #ifndef DUMUX_KEPSILON_PROBLEM_HH
 #define DUMUX_KEPSILON_PROBLEM_HH
 
+#include <numeric>
+
 #include <dumux/common/properties.hh>
 #include <dumux/common/staggeredfvproblem.hh>
 #include <dumux/discretization/localview.hh>
diff --git a/dumux/freeflow/staggeredupwindmethods.hh b/dumux/freeflow/staggeredupwindmethods.hh
index 592208dba63786a2b0bb17d2536eb0539ed0a8a2..28ff9e223ff24cef88463f2af2fe12f29e4532ac 100644
--- a/dumux/freeflow/staggeredupwindmethods.hh
+++ b/dumux/freeflow/staggeredupwindmethods.hh
@@ -29,6 +29,7 @@
 #include <string>
 
 #include <dumux/common/exceptions.hh>
+#include <dumux/common/parameters.hh>
 
 namespace Dumux {
 
diff --git a/dumux/freeflow/turbulencemodel.hh b/dumux/freeflow/turbulencemodel.hh
index 533daba5ae150b5eabdfd35fc050cdda669b9163..af01d7115b490abf34ab740c0faffa9eb26414de 100644
--- a/dumux/freeflow/turbulencemodel.hh
+++ b/dumux/freeflow/turbulencemodel.hh
@@ -24,6 +24,8 @@
 #ifndef DUMUX_FREEFLOW_TURBLENCEMODEL_HH
 #define DUMUX_FREEFLOW_TURBLENCEMODEL_HH
 
+#include <string>
+
 namespace Dumux {
 
     /*!
diff --git a/dumux/linear/matrixconverter.hh b/dumux/linear/matrixconverter.hh
index aa15e391c38e4915bc1d261d3ed6a3065edf2018..2d8e68d16a575cc2470affa36567a5770edd9e6d 100644
--- a/dumux/linear/matrixconverter.hh
+++ b/dumux/linear/matrixconverter.hh
@@ -33,6 +33,8 @@
 #include <dune/istl/multitypeblockvector.hh>
 #include <dune/istl/multitypeblockmatrix.hh>
 
+#include <dumux/common/parameters.hh>
+
 namespace Dumux {
 
 /*!
diff --git a/dumux/material/fluidmatrixinteractions/frictionlaws/frictionlaw.hh b/dumux/material/fluidmatrixinteractions/frictionlaws/frictionlaw.hh
index 6ec2ccea58bdf436a611f1c9dcd64ad0ec9116e6..88ed7e264a7099961ea437e8a622d4b1cee33154 100644
--- a/dumux/material/fluidmatrixinteractions/frictionlaws/frictionlaw.hh
+++ b/dumux/material/fluidmatrixinteractions/frictionlaws/frictionlaw.hh
@@ -27,6 +27,8 @@
 #include <algorithm>
 #include <cmath>
 
+#include <dune/common/fvector.hh>
+
 namespace Dumux {
 /*!
  * \ingroup Fluidmatrixinteractions
diff --git a/dumux/porousmediumflow/3p3c/localresidual.hh b/dumux/porousmediumflow/3p3c/localresidual.hh
index ecd3f259850542d86acaf8c835df9d42e7a148cf..335843787cb696fdbbaefc3103200dc31cb6012a 100644
--- a/dumux/porousmediumflow/3p3c/localresidual.hh
+++ b/dumux/porousmediumflow/3p3c/localresidual.hh
@@ -27,6 +27,7 @@
 #define DUMUX_3P3C_LOCAL_RESIDUAL_HH
 
 #include <dumux/common/properties.hh>
+#include <dumux/flux/referencesystemformulation.hh>
 
 namespace Dumux
 {
diff --git a/dumux/porousmediumflow/3pwateroil/localresidual.hh b/dumux/porousmediumflow/3pwateroil/localresidual.hh
index 883ce03d3b9f06f99f8b5ba0e320e8047fe788fa..1191ea582c13f35e8d3d51f6056ad86e1f905f7b 100644
--- a/dumux/porousmediumflow/3pwateroil/localresidual.hh
+++ b/dumux/porousmediumflow/3pwateroil/localresidual.hh
@@ -27,6 +27,7 @@
 #define DUMUX_3P2CNI_LOCAL_RESIDUAL_HH
 
 #include <dumux/common/properties.hh>
+#include <dumux/flux/referencesystemformulation.hh>
 
 namespace Dumux {
 /*!
diff --git a/dumux/porousmediumflow/boxdfm/subcontrolvolumeface.hh b/dumux/porousmediumflow/boxdfm/subcontrolvolumeface.hh
index 339552e8e698b744de78b316f932f1682fdad8df..13d2fc7e0cb4eb9dd8d9b443b7156dbb1a1176c7 100644
--- a/dumux/porousmediumflow/boxdfm/subcontrolvolumeface.hh
+++ b/dumux/porousmediumflow/boxdfm/subcontrolvolumeface.hh
@@ -28,6 +28,7 @@
 #include <utility>
 
 #include <dune/geometry/type.hh>
+#include <dune/geometry/multilineargeometry.hh>
 #include <dune/common/version.hh>
 #include <dune/common/reservedvector.hh>
 
diff --git a/dumux/porousmediumflow/compositional/localresidual.hh b/dumux/porousmediumflow/compositional/localresidual.hh
index e4c26014086d24a48e36908e22668fd59d3e5d94..bf6ac09d296e1edd01acb3a75d7ff02a097f35d4 100644
--- a/dumux/porousmediumflow/compositional/localresidual.hh
+++ b/dumux/porousmediumflow/compositional/localresidual.hh
@@ -27,7 +27,9 @@
 #define DUMUX_COMPOSITIONAL_LOCAL_RESIDUAL_HH
 
 #include <vector>
+#include <dune/common/exceptions.hh>
 #include <dumux/common/properties.hh>
+#include <dumux/flux/referencesystemformulation.hh>
 
 namespace Dumux {
 
diff --git a/dumux/porousmediumflow/nonequilibrium/gridvariables.hh b/dumux/porousmediumflow/nonequilibrium/gridvariables.hh
index 72573b5db95cb5147040443a23eaeffb92cbf3dc..7d2e2660a3fab0a25fc6acb1448642389eaff552 100644
--- a/dumux/porousmediumflow/nonequilibrium/gridvariables.hh
+++ b/dumux/porousmediumflow/nonequilibrium/gridvariables.hh
@@ -33,6 +33,7 @@
 #include <dumux/discretization/method.hh>
 #include <dumux/discretization/fvgridvariables.hh>
 #include <dumux/porousmediumflow/velocity.hh>
+#include <dumux/porousmediumflow/fluxvariables.hh>
 
 namespace Dumux {
 
diff --git a/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh b/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh
index 47868d7699ed9e68bc31bb3dce4dbbd5c21071ef..e2dd38dc48d64a7e3d2d04529e082d6e2f9f96dd 100644
--- a/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh
+++ b/dumux/porousmediumflow/nonequilibrium/thermal/localresidual.hh
@@ -29,6 +29,7 @@
 #include <dumux/common/spline.hh>
 #include <dumux/common/exceptions.hh>
 #include <dumux/common/properties.hh>
+#include <dumux/flux/referencesystemformulation.hh>
 
 namespace Dumux {
 
diff --git a/dumux/porousmediumflow/nonequilibrium/volumevariables.hh b/dumux/porousmediumflow/nonequilibrium/volumevariables.hh
index 3cbee9316c2982aad6e44f20a94edb8ca9c4a4ff..c208183f1e29c15278718bf4027d4f8d83048001 100644
--- a/dumux/porousmediumflow/nonequilibrium/volumevariables.hh
+++ b/dumux/porousmediumflow/nonequilibrium/volumevariables.hh
@@ -34,6 +34,7 @@
 #include <array>
 
 #include <dumux/common/dimensionlessnumbers.hh>
+#include <dumux/common/parameters.hh>
 
 namespace Dumux {
 
diff --git a/dumux/porousmediumflow/richards/localresidual.hh b/dumux/porousmediumflow/richards/localresidual.hh
index f31b8cb04641f35a53fd7c6abc6329e72ea6ee0e..164cab5a4ced014f8233c3f9e2421c36eea01003 100644
--- a/dumux/porousmediumflow/richards/localresidual.hh
+++ b/dumux/porousmediumflow/richards/localresidual.hh
@@ -27,7 +27,10 @@
 #define DUMUX_RICHARDS_LOCAL_RESIDUAL_HH
 
 #include <dumux/common/properties.hh>
+#include <dumux/common/parameters.hh>
 #include <dumux/common/typetraits/typetraits.hh>
+#include <dumux/discretization/method.hh>
+#include <dumux/flux/referencesystemformulation.hh>
 
 namespace Dumux {
 
diff --git a/dumux/porousmediumflow/tracer/localresidual.hh b/dumux/porousmediumflow/tracer/localresidual.hh
index 6fb3220aef4b8e03ed8ac7941885d607cad4f380..2648cf4de1d8750808c460d1387e13ae36b735f2 100644
--- a/dumux/porousmediumflow/tracer/localresidual.hh
+++ b/dumux/porousmediumflow/tracer/localresidual.hh
@@ -29,6 +29,7 @@
 #include <dumux/common/properties.hh>
 #include <dumux/common/parameters.hh>
 #include <dumux/discretization/method.hh>
+#include <dumux/flux/referencesystemformulation.hh>
 
 namespace Dumux {
 
diff --git a/examples/2pinfiltration/README.md b/examples/2pinfiltration/README.md
index d5fe800f8617626545ae0b608559100265141fcf..a852ae6311f77a3da3f95e25d4546c96e2085d49 100644
--- a/examples/2pinfiltration/README.md
+++ b/examples/2pinfiltration/README.md
@@ -190,6 +190,10 @@ we have a convenience definition of the position of the lens
 
 
 ## Include files
+The grid we use
+```cpp
+#include <dune/alugrid/grid.hh>
+```
 The cell centered, two-point-flux discretization scheme is included:
 ```cpp
 #include <dumux/discretization/cctpfa.hh>
diff --git a/examples/2pinfiltration/problem.hh b/examples/2pinfiltration/problem.hh
index 153e208065a417a50c32917dd7b20c47b1c893bb..913962b7f8ebe53a5da511ec7e110269984f0542 100644
--- a/examples/2pinfiltration/problem.hh
+++ b/examples/2pinfiltration/problem.hh
@@ -24,6 +24,9 @@
 #define DUMUX_LENSPROBLEM_POINTSOURCE_ADAPTIVE_HH
 
 // ## Include files
+// The grid we use
+#include <dune/alugrid/grid.hh>
+
 // The cell centered, two-point-flux discretization scheme is included:
 #include <dumux/discretization/cctpfa.hh>
 
diff --git a/test/multidomain/embedded/1d3d/1p_richards/problem_soil.hh b/test/multidomain/embedded/1d3d/1p_richards/problem_soil.hh
index c1d421f9d91d0572a6e95e76171649620261f0d8..883f51a8bbff0c82b9cc17203ae6b60bdbfe3708 100644
--- a/test/multidomain/embedded/1d3d/1p_richards/problem_soil.hh
+++ b/test/multidomain/embedded/1d3d/1p_richards/problem_soil.hh
@@ -26,6 +26,7 @@
 #ifndef DUMUX_TISSUE_PROBLEM_HH
 #define DUMUX_TISSUE_PROBLEM_HH
 
+#include <dune/grid/yaspgrid.hh>
 #include <dune/geometry/quadraturerules.hh>
 #include <dune/geometry/referenceelements.hh>
 #include <dune/localfunctions/lagrange/pqkfactory.hh>
diff --git a/test/multidomain/poromechanics/el1p/problem_poroelastic.hh b/test/multidomain/poromechanics/el1p/problem_poroelastic.hh
index 41e4d218385d3d9d7b1dd83e3f6248761cbd598b..def8e598b56dbd99081b0d67abae7daac155f895 100644
--- a/test/multidomain/poromechanics/el1p/problem_poroelastic.hh
+++ b/test/multidomain/poromechanics/el1p/problem_poroelastic.hh
@@ -25,6 +25,7 @@
 #ifndef DUMUX_POROELASTIC_SUBPROBLEM_HH
 #define DUMUX_POROELASTIC_SUBPROBLEM_HH
 
+#include <dune/grid/yaspgrid.hh>
 #include <dune/common/fmatrix.hh>
 
 #include <dumux/discretization/box.hh>
diff --git a/test/multidomain/poromechanics/el2p/problem_poroelastic.hh b/test/multidomain/poromechanics/el2p/problem_poroelastic.hh
index bf445dbfe7c84e932ab31fa3046915be02560ffd..602b27628f72253bbf92c549cc471a0840df167f 100644
--- a/test/multidomain/poromechanics/el2p/problem_poroelastic.hh
+++ b/test/multidomain/poromechanics/el2p/problem_poroelastic.hh
@@ -24,6 +24,7 @@
 #ifndef DUMUX_POROELASTIC_SUBPROBLEM_HH
 #define DUMUX_POROELASTIC_SUBPROBLEM_HH
 
+#include <dune/grid/yaspgrid.hh>
 #include <dune/common/fmatrix.hh>
 
 #include <dumux/discretization/box.hh>
diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/problem.hh b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/problem.hh
index 8389827a28b3c04678ea646779bec2e90fffe762..2e96781678b74b8817bc526edc413c4315b84840 100644
--- a/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/problem.hh
+++ b/test/porousmediumflow/1pnc/implicit/1p2c/isothermal/saltwaterintrusion/problem.hh
@@ -26,6 +26,8 @@
 #ifndef DUMUX_SALTWATERINTRUSION_TEST_PROBLEM_HH
 #define DUMUX_SALTWATERINTRUSION_TEST_PROBLEM_HH
 
+#include <dune/grid/yaspgrid.hh>
+
 #include <dumux/discretization/box.hh>
 #include <dumux/porousmediumflow/1pnc/model.hh>
 #include <dumux/porousmediumflow/problem.hh>
diff --git a/test/porousmediumflow/2p2c/implicit/chemicalnonequilibrium/problem.hh b/test/porousmediumflow/2p2c/implicit/chemicalnonequilibrium/problem.hh
index 7db04a2d879f58ea3ef0ade5038e7a11aaa79fc4..a2767464f2e253e4cc906af0dfe5d7cfbf4988bb 100644
--- a/test/porousmediumflow/2p2c/implicit/chemicalnonequilibrium/problem.hh
+++ b/test/porousmediumflow/2p2c/implicit/chemicalnonequilibrium/problem.hh
@@ -27,6 +27,8 @@
 #ifndef DUMUX_TWOPTWOC_NONEQUILIBRIUM_PROBLEM_HH
 #define DUMUX_TWOPTWOC_NONEQUILIBRIUM_PROBLEM_HH
 
+#include <dune/grid/yaspgrid.hh>
+
 #include <dune/common/parametertreeparser.hh>
 
 #include <dumux/discretization/box.hh>
diff --git a/test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh b/test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh
index 794e5ee895ea96b26ff24a294b52b295ae9310c0..8b2d14ae5c28171dd128b8baec0caa3c9ecf7ab7 100644
--- a/test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh
+++ b/test/porousmediumflow/2p2c/implicit/mpnccomparison/problem.hh
@@ -27,6 +27,8 @@
 #ifndef DUMUX_TWOPTWOC_MPNC_PROBLEM_HH
 #define DUMUX_TWOPTWOC_MPNC_PROBLEM_HH
 
+#include <dune/grid/yaspgrid.hh>
+
 #include <dune/common/parametertreeparser.hh>
 
 #include <dumux/discretization/box.hh>
diff --git a/test/porousmediumflow/tracer/2ptracer/problem_tracer.hh b/test/porousmediumflow/tracer/2ptracer/problem_tracer.hh
index 58c9aa10b2ef62f750046223ce9d573333b5085d..3bf09f519344ef66567ca60f0e692bd3b021d4c3 100644
--- a/test/porousmediumflow/tracer/2ptracer/problem_tracer.hh
+++ b/test/porousmediumflow/tracer/2ptracer/problem_tracer.hh
@@ -24,6 +24,8 @@
 #ifndef DUMUX_TWOP_TRACER_TEST_PROBLEM_HH
 #define DUMUX_TWOP_TRACER_TEST_PROBLEM_HH
 
+#include <dune/grid/yaspgrid.hh>
+
 #include <dumux/discretization/cctpfa.hh>
 #include <dumux/porousmediumflow/tracer/model.hh>
 #include <dumux/porousmediumflow/problem.hh>