diff --git a/dune-solvers/common/canignore.hh b/dune-solvers/common/canignore.hh
index 28b6220362c5e136b11c5e3973e80f707b1d987b..f1cc4ca3ebe12a0683dc95dddda92260997fea91 100644
--- a/dune-solvers/common/canignore.hh
+++ b/dune-solvers/common/canignore.hh
@@ -8,7 +8,7 @@ public:
 
     /** \brief Default constructor */
     CanIgnore()
-        : ignoreNodes_(NULL)
+        : ignoreNodes_(0)
     {}
 
     /** \brief Virtual destructor.  Does NOT delete the bitfield! */
diff --git a/dune-solvers/genericvectortools.hh b/dune-solvers/genericvectortools.hh
index ac76030b79dbbe1413aa91a01e0da7992eab814d..a77b2b62f352d585669dc028cb179e458ce520e8 100644
--- a/dune-solvers/genericvectortools.hh
+++ b/dune-solvers/genericvectortools.hh
@@ -6,6 +6,7 @@
 */
 
 #include<iostream>
+#include<bitset>
 
 #include "dune/common/fvector.hh"
 #include <dune/istl/bcrsmatrix.hh>
diff --git a/dune-solvers/iterationsteps/truncatedsaddlepointgsstep.hh b/dune-solvers/iterationsteps/truncatedsaddlepointgsstep.hh
index 408a6a80af3e3f0188dc411d2bccb8a7668c8a7f..0143200a1b2427e7cb38f9a3cfd683c573e70cf7 100644
--- a/dune-solvers/iterationsteps/truncatedsaddlepointgsstep.hh
+++ b/dune-solvers/iterationsteps/truncatedsaddlepointgsstep.hh
@@ -2,6 +2,7 @@
 #define TRUNCATED_SADDLE_POINT_GAUSS_SEIDEL_STEP_HH
 
 #include <dune/common/bitsetvector.hh>
+#include <dune/common/fmatrix.hh>
 #include <dune/istl/matrix.hh>
 
 #include <dune-solvers/iterationsteps/lineariterationstep.hh>
diff --git a/dune-solvers/norms/blocknorm.hh b/dune-solvers/norms/blocknorm.hh
index b6f88cc1e97af13a1e4a9584e3a6c467a627b828..fbb5a046f4079014551103dee60cdb9721835856 100644
--- a/dune-solvers/norms/blocknorm.hh
+++ b/dune-solvers/norms/blocknorm.hh
@@ -2,6 +2,7 @@
 #define BLOCK_NORM_HH
 
 #include <vector>
+#include <cmath>
 
 #include "norm.hh"
 
@@ -25,7 +26,7 @@ class BlockNorm: public Norm<VectorType>
                 double ri = (*norms_[i])(v[i]);
                 r += ri*ri;
             }
-            return sqrt(r);
+            return std::sqrt(r);
         }
 
         //! Compute the norm of the difference of two vectors
@@ -37,7 +38,7 @@ class BlockNorm: public Norm<VectorType>
                 double ri = (*norms_[i]).diff(v1[i], v2[i]);
                 r += ri*ri;
             }
-            return sqrt(r);
+            return std::sqrt(r);
         }
 
     private:
diff --git a/dune-solvers/norms/diagnorm.hh b/dune-solvers/norms/diagnorm.hh
index 1b4f5b8c2094540eb30db829ca177cfc94bc9c22..98bb21f465dc364da051ee1577b0dc32abae1c69 100644
--- a/dune-solvers/norms/diagnorm.hh
+++ b/dune-solvers/norms/diagnorm.hh
@@ -1,6 +1,9 @@
 #ifndef __DIAGNORM__HH__
 #define __DIAGNORM__HH__
 
+#include <dune/common/fvector.hh>
+#include <dune/istl/bvector.hh>
+
 #include "norm.hh"
 
 typedef Dune::BlockVector<Dune::FieldVector <double,1> > VectorType;
diff --git a/dune-solvers/norms/fullnorm.hh b/dune-solvers/norms/fullnorm.hh
index a35593720a5cb1c82d3b230614b2f0d4374209ea..d8b8fb86df737918e6541b890f40e778db17c634 100644
--- a/dune-solvers/norms/fullnorm.hh
+++ b/dune-solvers/norms/fullnorm.hh
@@ -1,6 +1,9 @@
 #ifndef __FULLNORM__HH__
 #define __FULLNORM__HH__
 
+#include <dune/common/fvector.hh>
+#include <dune/istl/bvector.hh>
+
 #include "norm.hh"
 
 typedef Dune::BlockVector<Dune::FieldVector<double,1> > Vector;
diff --git a/dune-solvers/norms/h1seminorm.hh b/dune-solvers/norms/h1seminorm.hh
index 12e375626477e6a1e495fead6ed5eb17d5c1f124..e8ceaa45e264dd625b820bfd761f34cac233dbb7 100644
--- a/dune-solvers/norms/h1seminorm.hh
+++ b/dune-solvers/norms/h1seminorm.hh
@@ -1,6 +1,9 @@
 #ifndef DUNE_H1_SEMINORM_HH
 #define DUNE_H1_SEMINORM_HH
 
+#include <dune/common/fmatrix.hh>
+#include <dune/istl/bcrsmatrix.hh>
+
 #include "norm.hh"
 
 template<class VectorType>
diff --git a/dune-solvers/norms/pnorm.hh b/dune-solvers/norms/pnorm.hh
index e728b8f0aa3d71454d5853c33f79af74ea37aff1..c12584a49f7078e539715892492e7fcd8a26bc09 100644
--- a/dune-solvers/norms/pnorm.hh
+++ b/dune-solvers/norms/pnorm.hh
@@ -1,9 +1,12 @@
 #ifndef __PNORM__HH__
 #define __PNORM__HH__
 
+#include <dune/common/fvector.hh>
+#include <dune/istl/bvector.hh>
+
 #include "norm.hh"
 
-typedef BlockVector<FieldVector <double,1> > Vector;
+typedef Dune::BlockVector<Dune::FieldVector <double,1> > Vector;
 
 class PNorm: public Norm<Vector>
 {
diff --git a/dune-solvers/norms/sumnorm.hh b/dune-solvers/norms/sumnorm.hh
index 95e4fb0e3eae41554fc1c7b70f751e0a72057015..7b5555c157f256342ab94b2ff764dac59cf5c98c 100644
--- a/dune-solvers/norms/sumnorm.hh
+++ b/dune-solvers/norms/sumnorm.hh
@@ -1,6 +1,8 @@
 #ifndef __SUMNORM__HH__
 #define __SUMNORM__HH__
 
+#include <cmath>
+
 #include "norm.hh"
 
 template <class VectorType>
@@ -20,7 +22,7 @@ class SumNorm: public Norm<VectorType>
 			double r1 = norm1(v);
 			double r2 = norm2(v);
 			
-			return sqrt(alpha1 * r1 * r1 + alpha2 * r2 *r2);
+			return std::sqrt(alpha1 * r1 * r1 + alpha2 * r2 *r2);
 		}
 
     //! Compute the norm of the difference of two vectors
@@ -29,7 +31,7 @@ class SumNorm: public Norm<VectorType>
 			double r1 = norm1.diff(v1,v2);
 			double r2 = norm2.diff(v1,v2);
 			
-			return sqrt(alpha1 * r1 * r1 + alpha2 * r2 *r2);
+			return std::sqrt(alpha1 * r1 * r1 + alpha2 * r2 *r2);
 		}
 
 	private:
diff --git a/dune-solvers/solvers/tcgsolver.cc b/dune-solvers/solvers/tcgsolver.cc
index 2d96de9466e3c31538bcbef2b724efce75b1bc4b..281338618b9060996dcf6c63ad24c69ce3a478fd 100644
--- a/dune-solvers/solvers/tcgsolver.cc
+++ b/dune-solvers/solvers/tcgsolver.cc
@@ -2,6 +2,8 @@
 #include <limits>
 #include <iomanip>
 
+#include <dune-solvers/norms/energynorm.hh>
+
 template <class MatrixType, class VectorType>
 void TruncatedCGSolver<MatrixType, VectorType>::check() const
 {