diff --git a/AMDiS/src/AMDiS_fwd.h b/AMDiS/src/AMDiS_fwd.h
index b2d5a33693a7c7fe2b4f3da91eacabab2cad474c..8e3c08e7a4134de9cd3a3b4ae6b9edbfc6af0b2b 100644
--- a/AMDiS/src/AMDiS_fwd.h
+++ b/AMDiS/src/AMDiS_fwd.h
@@ -33,6 +33,8 @@ namespace AMDiS {
   class CoarseningManager;
   class DiagonalPreconditioner; 
   class DOFAdmin; 
+  class DOFContainer;
+  class DOFIndexedBase;
   class DOFMatrix;
   class Element;
   class ElementMatrix;
@@ -63,6 +65,7 @@ namespace AMDiS {
   class RefinementManager;
   class RobinBC;
   class SystemVector;
+  class VertexInfo;
   class VertexVector;
 
   template<typename ReturnType, typename ArgumentType> class AbstractFunction;
diff --git a/AMDiS/src/AbstractFunction.h b/AMDiS/src/AbstractFunction.h
index e1dcf88fd95031c7a4c78d6de4980777c2c626a5..2dae656d4ee8857f641df5aa0dc5b94e1185fef3 100644
--- a/AMDiS/src/AbstractFunction.h
+++ b/AMDiS/src/AbstractFunction.h
@@ -23,7 +23,6 @@
 #define AMDIS_ABSTRACTFUNCTION_H
 
 #include "Global.h"
-#include "MemoryManager.h"
 
 namespace AMDiS {
 
diff --git a/AMDiS/src/AdaptInfo.h b/AMDiS/src/AdaptInfo.h
index bd60c9279b27d0963e251723f5758999aa2bdac3..ba60f84a8187555a6209d91be6618768896ed779 100644
--- a/AMDiS/src/AdaptInfo.h
+++ b/AMDiS/src/AdaptInfo.h
@@ -22,7 +22,6 @@
 #ifndef AMDIS_ADAPTINFO_H
 #define AMDIS_ADAPTINFO_H
 
-#include "MemoryManager.h"
 #include "MatrixVector.h"
 #include "Parameters.h"
 #include "Serializable.h"
diff --git a/AMDiS/src/AdaptInstationary.h b/AMDiS/src/AdaptInstationary.h
index 2d146d24bce2c0311dbfb6a4864f068ae63daa2d..393964d2c666ef3290f5e608522522f1120bd232 100644
--- a/AMDiS/src/AdaptInstationary.h
+++ b/AMDiS/src/AdaptInstationary.h
@@ -26,7 +26,6 @@
 #include <ctime>
 #include <queue>
 #include "Flag.h"
-#include "MemoryManager.h"
 #include "AdaptInfo.h"
 #include "AdaptBase.h"
 #include "AMDiS_fwd.h"
diff --git a/AMDiS/src/AdaptStationary.h b/AMDiS/src/AdaptStationary.h
index f5faa8c9d293e80c85f9e8019aa69425fcbab328..dad1cc540a24bbca92f1db0ef3173aaee451e14f 100644
--- a/AMDiS/src/AdaptStationary.h
+++ b/AMDiS/src/AdaptStationary.h
@@ -31,7 +31,6 @@
 
 #include <string>
 #include "Flag.h"
-#include "MemoryManager.h"
 #include "AdaptInfo.h"
 #include "AdaptBase.h"
 #include "AMDiS_fwd.h"
diff --git a/AMDiS/src/Assembler.h b/AMDiS/src/Assembler.h
index 1602ec5d1e6bbb475bfa81d505fd490e5867adc3..2f8e846da23d9e2817d868326ae05b7956071989 100644
--- a/AMDiS/src/Assembler.h
+++ b/AMDiS/src/Assembler.h
@@ -32,7 +32,6 @@
 
 #include <vector>
 #include "FixVec.h"
-#include "MemoryManager.h"
 #include "ZeroOrderAssembler.h"
 #include "FirstOrderAssembler.h"
 #include "SecondOrderAssembler.h"
diff --git a/AMDiS/src/Boundary.h b/AMDiS/src/Boundary.h
index c18ee78dba90b4b591c5fa87fa424d236b5b7409..c054e45af7f124b0ba3c69302952a2b3582a8904 100644
--- a/AMDiS/src/Boundary.h
+++ b/AMDiS/src/Boundary.h
@@ -24,7 +24,6 @@
 
 #include <map>
 #include "Global.h"
-#include "MemoryManager.h"
 
 namespace AMDiS {
 
diff --git a/AMDiS/src/CoarseningManager1d.h b/AMDiS/src/CoarseningManager1d.h
index 1f08d97d4bb2b07ae35779f256746c0a2b20f7b7..d84367b6a98fd2857830e09830e90e1a3b852823 100644
--- a/AMDiS/src/CoarseningManager1d.h
+++ b/AMDiS/src/CoarseningManager1d.h
@@ -23,14 +23,9 @@
 #define AMDIS_COARSENINGMANAGER_1D_H
 
 #include "CoarseningManager.h"
-#include "MemoryManager.h"
 
 namespace AMDiS {
 
-  // ============================================================================
-  // ===== class CoarseningManager1d ============================================
-  // ============================================================================
-
   /** \ingroup Adaption 
    * \brief
    * Implements a CoarseningManager for 1-dimensional meshes.
@@ -38,17 +33,13 @@ namespace AMDiS {
   class CoarseningManager1d : public CoarseningManager
   {
   public:
-    MEMORY_MANAGED(CoarseningManager1d);
+    /// Calls base class constructor and checks dimension of mesh. 
+    CoarseningManager1d() 
+      : CoarseningManager() 
+    {}
 
-    /** \brief
-     * Calls base class constructor and checks dimension of mesh. 
-     */
-    CoarseningManager1d() : CoarseningManager() {};
-
-    /** \brief
-     * destructor
-     */
-    virtual ~CoarseningManager1d() {};
+    /// destructor
+    virtual ~CoarseningManager1d() {}
 
     /** \brief
      * Overloads CoarseningManager::coarsenMesh. In 1d a simple recursive
@@ -57,18 +48,14 @@ namespace AMDiS {
     Flag coarsenMesh(Mesh *aMesh);
 
   protected:
-    /** \brief
-     * Not needed in this sub class
-     */
+    /// Not needed in this sub class
     int coarsenFunction(ElInfo *) {
       FUNCNAME("CoarseningManager1d::coarsenFunction");
       ERROR_EXIT("not used for dim = 1");
       return 0;
-    };
+    }
   
-    /** \brief
-     * Needed instead of coarsenFunction in 1d.
-     */
+    /// Needed instead of coarsenFunction in 1d.
     int coarsenRecursive(Line *parent);
   
   };
diff --git a/AMDiS/src/CoarseningManager2d.h b/AMDiS/src/CoarseningManager2d.h
index 8e2f81c1119dd950531519b5b918c3eb2258cce4..eb976b1a2fefd941c756785c7d1e79f53195055e 100644
--- a/AMDiS/src/CoarseningManager2d.h
+++ b/AMDiS/src/CoarseningManager2d.h
@@ -23,14 +23,9 @@
 #define AMDIS_COARSENINGMANAGER_2D_H
 
 #include "CoarseningManager.h"
-#include "MemoryManager.h"
 
 namespace AMDiS {
 
-  // ============================================================================
-  // ===== class CoarseningManager2d ============================================
-  // ============================================================================
-
   /** \ingroup Adaption  
    * \brief
    * Implements a CoarseningManager for 2-dimensional meshes.
@@ -38,25 +33,17 @@ namespace AMDiS {
   class CoarseningManager2d : public CoarseningManager
   {
   public:
-    MEMORY_MANAGED(CoarseningManager2d);
 
-    /** \brief
-     * Calls base class constructor and checks dimension of mesh. 
-     */
-    CoarseningManager2d() : CoarseningManager() {
-      //     FUNCNAME("CoarseningManager2d::CoarseningManager2d");
-      //     TEST_EXIT(mesh->getDim()==2)("mesh->dim != 2\n");
-    };
+    /// Calls base class constructor and checks dimension of mesh. 
+    CoarseningManager2d() 
+      : CoarseningManager() 
+    {}
 
-    /** \brief
-     * destructor
-     */
-    virtual ~CoarseningManager2d() {};
+    /// destructor
+    virtual ~CoarseningManager2d() {}
 
   protected:
-    /** \brief
-     * Implements CoarseningManager::coarsenFunction
-     */
+    /// Implements CoarseningManager::coarsenFunction
     virtual int coarsenFunction(ElInfo *el_info);
 
     /** \brief
diff --git a/AMDiS/src/CoarseningManager3d.h b/AMDiS/src/CoarseningManager3d.h
index c568615a9779c10863ea39e03856388749e10c52..faf4f9576bf48a87e91c80f28172a97af05d61de 100644
--- a/AMDiS/src/CoarseningManager3d.h
+++ b/AMDiS/src/CoarseningManager3d.h
@@ -23,14 +23,9 @@
 #define AMDIS_COARSENINGMANAGER_3D_H
 
 #include "CoarseningManager.h"
-#include "MemoryManager.h"
 
 namespace AMDiS {
 
-  // ============================================================================
-  // ===== class CoarseningManager3d ============================================
-  // ============================================================================
-
   /** \ingroup Adaption 
    * \brief
    * Implements a CoarseningManager for 3-dimensional meshes.
@@ -38,22 +33,16 @@ namespace AMDiS {
   class CoarseningManager3d : public CoarseningManager
   {
   public:
-    MEMORY_MANAGED(CoarseningManager3d);
-
-    /** \brief
-     * Calls base class constructor and checks dimension of mesh. 
-     */
-    CoarseningManager3d() : CoarseningManager() {};
+    /// Calls base class constructor and checks dimension of mesh. 
+    CoarseningManager3d() 
+      : CoarseningManager() 
+    {}
 
-    /** \brief
-     * destructor
-     */
-    virtual ~CoarseningManager3d() {};
+    /// destructor
+    virtual ~CoarseningManager3d() {}
 
   protected:
-    /** \brief
-     * Implements CoarseningManager::coarsenFunction
-     */
+    /// Implements CoarseningManager::coarsenFunction
     int coarsenFunction(ElInfo *el_info);
 
     /** \brief
diff --git a/AMDiS/src/ConditionalEstimator.h b/AMDiS/src/ConditionalEstimator.h
index cbca46de2868ba452b24c5b3061a3bd6be89f51f..a4ee8418097faafffd167e5e02114ae7cfc2b07a 100644
--- a/AMDiS/src/ConditionalEstimator.h
+++ b/AMDiS/src/ConditionalEstimator.h
@@ -30,10 +30,6 @@
 
 namespace AMDiS {
 
-  // ============================================================================
-  // ===== class ConditionalEstimator ==============================================
-  // ============================================================================
-
   /**
    * \ingroup Estimator
    * 
@@ -43,45 +39,21 @@ namespace AMDiS {
   class ConditionalEstimator : public Estimator
   {
   public:
-    MEMORY_MANAGED(ConditionalEstimator);
-
     ConditionalEstimator(Estimator *decorated) 
       : decoratedEstimator_(decorated),
 	elementCount_(0), 
 	row_(decorated ? decorated->getRow() : 0)
-    {};
+    {}
 
     double estimate(double timestep);
 
     inline int getElementCount() {
       return elementCount_;
-    };
-
-    //   inline double getErrorSum() const { 
-    //     return decoratedEstimator_->getErrorSum(); 
-    //   };
-
-    //   inline void setErrorSum(double sum) {
-    //     decoratedEstimator_->setErrorSum(sum); 
-    //   };
-
-    //   inline double getErrorMax() const {
-    //     return decoratedEstimator_->getErrorMax(); 
-    //   };
-
-    //   inline double getTimeEst() const {
-    //     return decoratedEstimator_->getTimeEst(); 
-    //   };
-
-    //   inline void setErrorMax(double m) {
-    //     decoratedEstimator_->setErrorMax(m); 
-    //   };
-
-    //   inline Norm getErrorNorm() {
-    //     return decoratedEstimator_->getErrorNorm(); 
-    //   };
+    }
 
-    inline Estimator *getDecoratedEstimator() { return decoratedEstimator_; };
+    inline Estimator *getDecoratedEstimator() { 
+      return decoratedEstimator_; 
+    }
 
   protected:
     Estimator *decoratedEstimator_;
diff --git a/AMDiS/src/ConditionalMarker.h b/AMDiS/src/ConditionalMarker.h
index 2667a33bb4e1bcc8dd085cdc4a74375e3629c3a1..f66b4ce403cd8a14bc5fd0caa3a750b448ebf057 100644
--- a/AMDiS/src/ConditionalMarker.h
+++ b/AMDiS/src/ConditionalMarker.h
@@ -25,17 +25,12 @@
 #include "mpi.h"
 #include "Marker.h"
 #include "Marker.h"
-#include "MemoryManager.h"
 #include "PartitionElementData.h"
 #include "Traverse.h"
 #include "ElInfo.h"
 
 namespace AMDiS {
 
-  // ===========================================================================
-  // ===== class ESMarker ======================================================
-  // ===========================================================================
-
   /**
    * \ingroup Adaption
    * 
@@ -45,11 +40,7 @@ namespace AMDiS {
   class ConditionalMarker : public Marker
   {
   public:
-    MEMORY_MANAGED(ConditionalMarker);
-
-    /** \brief
-     * Constructor.
-     */
+    /// Constructor.
     ConditionalMarker(const std::string name,
 		      int row,
 		      Marker *decoratedMarker,
@@ -59,18 +50,18 @@ namespace AMDiS {
 	decoratedMarker_(decoratedMarker),
 	globalCoarseGridLevel_(globalCoarseGridLevel),    
 	localCoarseGridLevel_(localCoarseGridLevel)
-    {};
+    {}
 
-    /** \brief
-     * Implementation of MarkScal::initMarking().
-     */
-    virtual void initMarking(AdaptInfo *adaptInfo, Mesh *mesh) {
-      if(decoratedMarker_) 
+    /// Implementation of MarkScal::initMarking().
+    virtual void initMarking(AdaptInfo *adaptInfo, Mesh *mesh) 
+    {
+      if (decoratedMarker_) 
 	decoratedMarker_->initMarking(adaptInfo, mesh);
-    };
+    }
 
-    virtual void finishMarking(AdaptInfo *adaptInfo) {
-      if(decoratedMarker_) {
+    virtual void finishMarking(AdaptInfo *adaptInfo) 
+    {
+      if (decoratedMarker_) {
 	int tmp = decoratedMarker_->getElMarkRefine();
 	MPI::COMM_WORLD.Allreduce(&tmp,
 				  &elMarkRefine,
@@ -85,10 +76,12 @@ namespace AMDiS {
 				  MPI_SUM);
 	decoratedMarker_->finishMarking(adaptInfo);
       }
-    };
+    }
 
-    void markElement(AdaptInfo *adaptInfo, ElInfo *elInfo) {
+    void markElement(AdaptInfo *adaptInfo, ElInfo *elInfo) 
+    {
       FUNCNAME("ConditionalMarker::markElement()");
+
       if (decoratedMarker_) {
 	PartitionElementData *elData = 
 	  dynamic_cast<PartitionElementData*>(elInfo->getElement()->
@@ -110,11 +103,11 @@ namespace AMDiS {
 	  localCoarseGridLevel_ :
 	  globalCoarseGridLevel_;
 
-	if(elData->getLevel() + elInfo->getElement()->getMark() < minLevel) {
+	if (elData->getLevel() + elInfo->getElement()->getMark() < minLevel) {
 	  elInfo->getElement()->setMark(-(elData->getLevel() - minLevel));
 	}
       }
-    };
+    }
 
   protected:
     Marker *decoratedMarker_;
diff --git a/AMDiS/src/CouplingTimeInterface.h b/AMDiS/src/CouplingTimeInterface.h
index 24ab7911945662b6435dac791b5a8abd6f3dba43..49731d36c00b1971938c93871b61b52adf3a08ea 100644
--- a/AMDiS/src/CouplingTimeInterface.h
+++ b/AMDiS/src/CouplingTimeInterface.h
@@ -22,16 +22,12 @@
 #ifndef AMDIS_COUPLINGTIMEINTERFACE_H
 #define AMDIS_COUPLINGTIMEINTERFACE_H
 
+#include <vector>
 #include "Flag.h"
 #include "ProblemTimeInterface.h"
-#include <vector>
 
 namespace AMDiS {
 
-  // ============================================================================
-  // ===== class CouplingTimeInterface ==========================================
-  // ============================================================================
-
   /**
    * \ingroup Problem 
    *
@@ -40,64 +36,52 @@ namespace AMDiS {
   class CouplingTimeInterface : public ProblemTimeInterface
   {
   public:
-    void addTimeInterface(ProblemTimeInterface *interface) {
+    void addTimeInterface(ProblemTimeInterface *interface) 
+    {
       interfaces_.push_back(interface);
-    };
+    }
 
-    /** \brief
-     * Executes all needed operations when the simulation time changes.
-     */
-    virtual void setTime(AdaptInfo *adaptInfo) {
-      int i, size = static_cast<int>(interfaces_.size());
-      for(i = 0; i < size; i++) {
+    /// Executes all needed operations when the simulation time changes.
+    virtual void setTime(AdaptInfo *adaptInfo) 
+    {
+      int size = static_cast<int>(interfaces_.size());
+      for (int i = 0; i < size; i++)
 	interfaces_[i]->setTime(adaptInfo);
-      }
-    };
+    }
 
-    /** \brief
-     * Called at the beginning of each timestep
-     */
-    virtual void initTimestep(AdaptInfo *adaptInfo) {
-      int i, size = static_cast<int>(interfaces_.size());
-      for(i = 0; i < size; i++) {
+    /// Called at the beginning of each timestep
+    virtual void initTimestep(AdaptInfo *adaptInfo) 
+    {
+      int size = static_cast<int>(interfaces_.size());
+      for (int i = 0; i < size; i++)
 	interfaces_[i]->initTimestep(adaptInfo);
-      }
-    };
+    }
 
-    /** \brief
-     * Called at the end of each timestep.
-     */
-    virtual void closeTimestep(AdaptInfo *adaptInfo) {
+    /// Called at the end of each timestep.
+    virtual void closeTimestep(AdaptInfo *adaptInfo) 
+    {
       int i, size = static_cast<int>(interfaces_.size());
-      for(i = 0; i < size; i++) {
+      for (int i = 0; i < size; i++)
 	interfaces_[i]->closeTimestep(adaptInfo);
-      }
-    };
+    }
 
-    /** \brief
-     * Solves the initial problem.
-     */
-    virtual void solveInitialProblem(AdaptInfo *adaptInfo) {
-      int i, size = static_cast<int>(interfaces_.size());
-      for(i = 0; i < size; i++) {
+    /// Solves the initial problem.
+    virtual void solveInitialProblem(AdaptInfo *adaptInfo) 
+    {
+      int size = static_cast<int>(interfaces_.size());
+      for (int i = 0; i < size; i++)
 	interfaces_[i]->solveInitialProblem(adaptInfo);
-      }
-    };  
+    }
 
-    /** \brief
-     * Solves the initial problem.
-     */
+    /// Solves the initial problem.
     virtual void transferInitialSolution(AdaptInfo *adaptInfo) {
-      int i, size = static_cast<int>(interfaces_.size());
-      for(i = 0; i < size; i++) {
+      int size = static_cast<int>(interfaces_.size());
+      for (int i = 0; i < size; i++)
 	interfaces_[i]->transferInitialSolution(adaptInfo);
-      }
-    };  
+    }
 
   protected:
-    /** \brief
-     * vector of coupled time interfaces
-     */
+    /// vector of coupled time interfaces
     std::vector<ProblemTimeInterface*> interfaces_;
   };
 
diff --git a/AMDiS/src/CreatorInterface.h b/AMDiS/src/CreatorInterface.h
index 84cc948ea8492a5f188fcffe05b5c82adefc9e36..2c9b9fac64d290ca95c0e60712f2dd6dc332114f 100644
--- a/AMDiS/src/CreatorInterface.h
+++ b/AMDiS/src/CreatorInterface.h
@@ -50,16 +50,14 @@ namespace AMDiS {
      */
     virtual BaseClass* create() = 0;
 
-    virtual BaseClass* create(const DOFMatrix::base_matrix_type& A) { return 0; }
+    virtual BaseClass* create(const DOFMatrix::base_matrix_type& A) { 
+      return 0; 
+    }
 
-    /** \brief
-     * Can be implemented by sub classes.
-     */
+    /// Can be implemented by sub classes.
     virtual void free(BaseClass *) {}
 
-    /** \brief
-     * 
-     */
+    ///
     virtual bool isNullCreator() { 
       return false; 
     }
@@ -72,16 +70,12 @@ namespace AMDiS {
   template<typename BaseClass>
   class NullCreator : public CreatorInterface<BaseClass>
   {
-    /** \brief
-     * Creates no object.
-     */
-    BaseClass* create() { 
+    /// Creates no object.
+    BaseClass* create() {
       return NULL; 
     }
 
-    /** \brief
-     * 
-     */
+    ///
     virtual bool isNullCreator() { 
       return true; 
     }
diff --git a/AMDiS/src/CylinderProject.h b/AMDiS/src/CylinderProject.h
index daa50dc36f56881cab99e07f0ea3ac24cc5bb551..886bc76c23f5b19a2c658813d03677cbaa6665ed 100644
--- a/AMDiS/src/CylinderProject.h
+++ b/AMDiS/src/CylinderProject.h
@@ -24,10 +24,6 @@
 
 namespace AMDiS {
 
-  // ==============================================================================
-  // ===== class CylinderProject ==================================================
-  // ==============================================================================
-
   /** \brief
    * Projects world coordinates to the surface of a cylinder with given center, 
    * radius and direction. Can be used as boundary or volume projection.
@@ -35,9 +31,7 @@ namespace AMDiS {
   class CylinderProject : public Projection
   {
   public:
-    /** \brief
-     * Constructor.
-     */ 
+    /// Constructor.
     CylinderProject(int id,
 		    ProjectionType type,
 		    WorldVector<double> &c,
@@ -50,17 +44,14 @@ namespace AMDiS {
     {
       double norm = sqrt(direction_*direction_);
       direction_ *= 1.0 / norm;
-    };
+    }
 
-    /** \brief
-     * Destructor.
-     */
-    virtual ~CylinderProject() {};
+    /// Destructor.
+    virtual ~CylinderProject() {}
 
-    /** \brief
-     * Implementation of Projection::project();
-     */
-    void project(WorldVector<double> &x) {
+    /// Implementation of Projection::project();
+    void project(WorldVector<double> &x) 
+    {
       x -= center_;
       WorldVector<double> v1 = direction_; v1 *= (x*direction_);
       WorldVector<double> v2 = x; v2 -= v1;
@@ -69,22 +60,16 @@ namespace AMDiS {
       v2 *= 1.0 / norm;
       x = v2; x *= radius_; x += v1;
       x += center_;
-    };
+    }
 
   protected:
-    /** \brief
-     * Center of the cylinder.
-     */
+    /// Center of the cylinder.
     WorldVector<double> center_;
 
-    /** \brief
-     * Direction of the cylinder.
-     */
+    /// Direction of the cylinder.
     WorldVector<double> direction_;
 
-    /** \brief
-     * Radius of the cylinder.
-     */
+    /// Radius of the cylinder.
     double radius_;
   };
 
diff --git a/AMDiS/src/DOFAdmin.h b/AMDiS/src/DOFAdmin.h
index 440fc321016c28c8d3eab9a137c104d2815bcb37..d8665aef7caecc37b377efe4c6e28530b8c4e91e 100644
--- a/AMDiS/src/DOFAdmin.h
+++ b/AMDiS/src/DOFAdmin.h
@@ -28,27 +28,17 @@
 #ifndef AMDIS_DOFADMIN_H
 #define AMDIS_DOFADMIN_H
 
+#include <vector>
+#include <memory>
+#include <list>
 #include "Global.h"
 #include "FixVec.h"
-#include "MemoryManager.h"
 #include "Serializable.h"
 #include "OpenMP.h"
-#include <vector>
-#include <memory>
-#include <list>
+#include "AMDiS_fwd.h"
 
 namespace AMDiS {
 
-  class Mesh;
-  class FiniteElemSpace;
-  class ElInfo;
-  class DOFAdmin;
-  class BasisFunction;
-  class DOFIndexedBase;
-  class DOFContainer;
-
-  template<typename T> class DOFVector;
-
   /** \ingroup DOFAdministration
    * \brief
    * Holds all data about one set of DOFs. It includes information about used and
@@ -58,8 +48,6 @@ namespace AMDiS {
   class DOFAdmin : public Serializable
   {
   public:
-    MEMORY_MANAGED(DOFAdmin);
-
     DOFAdmin();
 
     /// Constructor
diff --git a/AMDiS/src/DOFContainer.h b/AMDiS/src/DOFContainer.h
index 496a9793d484c9e1168c23931669b121b7823f4b..8dc0416d2d52c1910d3212afcf587aade2f085e0 100644
--- a/AMDiS/src/DOFContainer.h
+++ b/AMDiS/src/DOFContainer.h
@@ -26,10 +26,6 @@
 
 namespace AMDiS {
 
-  // ===========================================================================
-  // ===== class DOFContainer ==================================================
-  // ===========================================================================
-
   /** \ingroup DOFAdministration
    * \brief
    * DOFContainer is the base class for objects that stores DOF indices.
@@ -40,7 +36,7 @@ namespace AMDiS {
   class DOFContainer
   {
   public:
-    virtual ~DOFContainer() {};
+    virtual ~DOFContainer() {}
 
     /** \brief
      * Returns the DOF index at position i. Must be overriden by a concrete
@@ -54,20 +50,17 @@ namespace AMDiS {
      * Used by DOFAdmin to actualize the DOF indices in this container after
      * DOF compression.
      */
-
     virtual void compressDOFContainer(int size, std::vector<DegreeOfFreedom> &newDOF) 
     {
-      int i, j;
-      for(i=0; i < size; i++) {
-	if((j = newDOF[operator[](i)]) >= 0) {
+      for (int i = 0; i < size; i++) {
+	int j = newDOF[operator[](i)];
+	if (j >= 0)
 	  operator[](i) = j;
-	} else {
+	else
 	  ERROR_EXIT("invalid dof in dof container\n");
-	}
       }
-    };
+    }
   };
-
 }
 
 #endif
diff --git a/AMDiS/src/DOFIndexed.h b/AMDiS/src/DOFIndexed.h
index 743e3e2f19bb89a72b781fe36f63e0d55b22db32..101ccb15d156d9a0ae8ce1d5b49e1b28d9e933ae 100644
--- a/AMDiS/src/DOFIndexed.h
+++ b/AMDiS/src/DOFIndexed.h
@@ -29,11 +29,6 @@
 
 namespace AMDiS {
 
-
-  // ============================================================================
-  // ===== class DOFIndexedBase =================================================
-  // ============================================================================
-
   /** \ingroup DOFAdministration
    * \brief
    * Interface for objects that stores information indexed by DOF indices
@@ -80,10 +75,6 @@ namespace AMDiS {
     virtual const FiniteElemSpace* getFESpace() const = 0;
   };
 
-  // ============================================================================
-  // ===== class DOFIndexed =====================================================
-  // ============================================================================
-
   /** \ingroup DOFAdministration
    * \brief
    * Templated interface for DOFIndexed objects.
diff --git a/AMDiS/src/DOFIterator.h b/AMDiS/src/DOFIterator.h
index 4f9634b23dde0f07ac5993ed516a78440ebb270c..6be65ae15dc23dc383cfa3b1362d000692e2f3ca 100644
--- a/AMDiS/src/DOFIterator.h
+++ b/AMDiS/src/DOFIterator.h
@@ -22,35 +22,19 @@
 #ifndef AMDIS_DOFITERATOR_H
 #define AMDIS_DOFITERATOR_H
 
-// ============================================================================
-// ===== includes =============================================================
-// ============================================================================
-
 #include "DOFAdmin.h"
-//#include "DOFIndexed.h"
 #include "FiniteElemSpace.h"
-#include "MemoryManager.h"
+#include "AMDiS_fwd.h"
 
 namespace AMDiS {
 
-  template<typename T> class DOFIndexed;
-
-  // ============================================================================
-  // ===== definitions ==========================================================
-  // ============================================================================
-
-  /** \brief 
-   * Possible types of DOFIterator
-   */
+  /// Possible types of DOFIterator
   typedef enum {
     USED_DOFS = 0, /**< iterate only used DOFs */
     FREE_DOFS = 1, /**< iterate only free DOFs */
     ALL_DOFS  = 2  /**< iterate all DOFs */
   } DOFIteratorType;
 
-  // ============================================================================
-  // ===== class DOFIteratorBase ================================================
-  // ============================================================================
 
   /** \ingroup DOFAdministration
    * \brief
@@ -76,9 +60,9 @@ namespace AMDiS {
       : dofAdmin(admin), 
 	dofFree(&(dofAdmin->dofFree)),
 	type(t)
-    {};
+    {}
 
-    virtual ~DOFIteratorBase() {};
+    virtual ~DOFIteratorBase() {}
 
     /** \brief
      * Resets the iterator to the begin of the iterated object. 
@@ -96,7 +80,7 @@ namespace AMDiS {
 	if(*dofFreeIterator == (type == USED_DOFS))
 	  operator++();
       }
-    };
+    }
 
     /** \brief
      * Resets the iterator to the begin of the iterated object. 
@@ -114,7 +98,7 @@ namespace AMDiS {
 	if(*dofFreeIterator == (type == USED_DOFS))
 	  operator++();
       }
-    };
+    }
 
     /** \brief
      * Prefix operator++.
@@ -150,16 +134,14 @@ namespace AMDiS {
 	       && (*dofFreeIterator == (type == USED_DOFS)));
 
       return *this;      
-    };
+    }
 
-    /** \brief
-     * Postfix operator++.
-     */
+    /// Postfix operator++.
     inline DOFIteratorBase operator++(int) { 
       DOFIteratorBase clone = *this;
       operator++();
       return clone;
-    }; 
+    }
 
     inline const DOFIteratorBase& operator--() {
       if (type == ALL_DOFS) {
@@ -177,7 +159,7 @@ namespace AMDiS {
 	       && (*dofFreeIterator == (type == USED_DOFS)));
 
       return *this;
-    };
+    }
 
     inline DOFIteratorBase operator--(int) {
       DOFIteratorBase clone = *this;
@@ -185,43 +167,33 @@ namespace AMDiS {
       return clone;
     }
   
-    /** \brief
-     * Dereferntiation of the \ref dofFreeIterator
-     */
+    /// Dereferntiation of the \ref dofFreeIterator
     virtual bool isDOFFree() {
       return *dofFreeIterator;
-    };
+    }
 
     /** \brief
      * Returns whether \ref dofFreeIterator already has reached the end of 
      * \ref dofFree
      */
-    inline bool end() { return (dofFreeIterator == dofFree->end()); };
+    inline bool end() { return (dofFreeIterator == dofFree->end()); }
 
-    inline bool begin() { return (dofFreeIterator == dofFree->begin()); };
+    inline bool begin() { return (dofFreeIterator == dofFree->begin()); }
 
-    /** \brief
-     * Returns the current position index of this iterator
-     */
-    inline int getDOFIndex() { return position; };
+    /// Returns the current position index of this iterator
+    inline int getDOFIndex() { return position; }
 
   protected:
-    /** \brief
-     * Override this to enable iteration through the object
-     */
-    virtual void goToBeginOfIteratedObject() {};
+    /// Override this to enable iteration through the object
+    virtual void goToBeginOfIteratedObject() {}
 
-    /** \brief
-     * Override this to enable iteration through the object
-     */
-    virtual void goToEndOfIteratedObject() {};
+    /// Override this to enable iteration through the object
+    virtual void goToEndOfIteratedObject() {}
 
-    /** \brief
-     * Override this to enable iteration through the object
-     */
-    virtual void incObjectIterator() {};
+    /// Override this to enable iteration through the object
+    virtual void incObjectIterator() {}
     
-    virtual void decObjectIterator() {};
+    virtual void decObjectIterator() {}
 
   protected:
     DOFAdmin                   *dofAdmin;        /**< DOFAdmin which contains
@@ -234,9 +206,6 @@ namespace AMDiS {
     const DOFIteratorType       type;            /**< type of this iterator */
   };
 
-  // ============================================================================
-  // ===== class DOFIterator ====================================================
-  // ============================================================================
 
   /** \ingroup DOFAdministration
    * \brief
@@ -246,76 +215,56 @@ namespace AMDiS {
   class DOFIterator : public DOFIteratorBase
   {
   public:
-    MEMORY_MANAGED(DOFIterator<T>);
-
     /** \brief
      * Constructs a DOFIterator for cont of type t
      */
     DOFIterator(DOFIndexed<T> *obj, DOFIteratorType t) 
       : DOFIteratorBase(dynamic_cast<DOFAdmin*>(obj->getFESpace()->getAdmin()), t),
 	iteratedObject(obj)
-    {};
+    {}
 
-    /** \brief
-     * Constructs a DOFIterator for cont of type t
-     */
+    /// Constructs a DOFIterator for cont of type t
     DOFIterator(DOFAdmin *admin,
 		DOFIndexed<T> *obj, 
 		DOFIteratorType t) 
       : DOFIteratorBase(admin, t),
 	iteratedObject(obj)
-    {};
+    {}
 
-    /** \brief
-     * Dereference operator
-     */
-    inline T& operator*() { return *it; };
+    /// Dereference operator
+    inline T& operator*() { return *it; }
 
-    /** \brief
-     * Dereference operator
-     */
-    inline T* operator->() { return &(*it); };
+    /// Dereference operator
+    inline T* operator->() { return &(*it); }
 
     inline bool operator!=(const DOFIterator<T>& rhs) {
       if(this->iteratedObject != rhs.iteratedObject) return true;
       if(this->it != rhs.it) return true;
       return false;
-    };
+    }
 
     inline bool operator==(const DOFIterator<T>& rhs) {
       return !(this->operator==(rhs));
     }
 
   protected:
-    /** \brief
-     * Implementation of DOFIteratorBase::goToBeginOfIteratedObject()
-     */
-    inline void goToBeginOfIteratedObject() { it = iteratedObject->begin(); };
+    /// Implementation of DOFIteratorBase::goToBeginOfIteratedObject()
+    inline void goToBeginOfIteratedObject() { it = iteratedObject->begin(); }
 
-    /** \brief
-     * Implementation of DOFIteratorBase::goToEndOfIteratedObject()
-     */
-    inline void goToEndOfIteratedObject() { it = iteratedObject->end(); };
+    /// Implementation of DOFIteratorBase::goToEndOfIteratedObject()
+    inline void goToEndOfIteratedObject() { it = iteratedObject->end(); }
 
-    /** \brief
-     * Implementation of DOFIteratorBase::incObjectIterator()
-     */
-    inline void incObjectIterator() { ++it; };
+    /// Implementation of DOFIteratorBase::incObjectIterator()
+    inline void incObjectIterator() { ++it; }
 
-    /** \brief
-     * Implementation of DOFIteratorBase::incObjectIterator()
-     */
-    inline void decObjectIterator() { --it; };
+    /// Implementation of DOFIteratorBase::incObjectIterator()
+    inline void decObjectIterator() { --it; }
 
   protected:
-    /** \brief
-     * Object that is iterated
-     */
+    /// Object that is iterated
     DOFIndexed<T> *iteratedObject;
 
-    /** \brief
-     * Iterator for \ref iteratedObject
-     */
+    /// Iterator for \ref iteratedObject
     typename std::vector<T>::iterator it;
   };
 
diff --git a/AMDiS/src/DOFMatrix.h b/AMDiS/src/DOFMatrix.h
index 6fb487721ae41f83bae15be28afa32942ee0d19c..fcfc99a9768465b3badc409432c3be424de42936 100644
--- a/AMDiS/src/DOFMatrix.h
+++ b/AMDiS/src/DOFMatrix.h
@@ -35,7 +35,6 @@
 #include "DOFAdmin.h"
 #include "DOFIterator.h"
 #include "DOFIndexed.h"
-#include "MemoryManager.h"
 #include "Boundary.h"
 #include "Serializable.h"
 
@@ -55,8 +54,6 @@ namespace AMDiS {
                     public Serializable
   {
   public:
-    MEMORY_MANAGED(DOFMatrix);
-
     /// Type of scalars in the underlying matrix
     typedef double                          value_type;
 
diff --git a/AMDiS/src/DOFVector.h b/AMDiS/src/DOFVector.h
index 3b4bcbf992394bf991907e6272262ce75c2dcaa7..965f64257432eb8972d1203d34c087206d26ea91 100644
--- a/AMDiS/src/DOFVector.h
+++ b/AMDiS/src/DOFVector.h
@@ -34,7 +34,6 @@
 #include "DOFIterator.h"
 #include "DOFIndexed.h"
 #include "DOFContainer.h"
-#include "MemoryManager.h"
 #include "Boundary.h"
 #include "CreatorInterface.h"
 #include "Serializable.h"
@@ -268,8 +267,6 @@ namespace AMDiS {
   class DOFVector : public DOFVectorBase<T>, public Serializable
   {  
   public:
-    MEMORY_MANAGED(DOFVector<T>);
-
     /** \ingroup DOFAdministration
      * \brief
      * Enables the access of DOFVector<T>::Iterator. Alias for DOFIterator<T>
@@ -287,8 +284,6 @@ namespace AMDiS {
 
     class Creator : public CreatorInterface<DOFVector<T> > {
     public:
-      MEMORY_MANAGED(Creator);
-
       Creator(FiniteElemSpace *feSpace_) 
         : feSpace(feSpace_) 
       {}
@@ -596,8 +591,6 @@ namespace AMDiS {
 		       public DOFContainer
   {
   public:  
-    MEMORY_MANAGED(DOFVectorDOF);
-
     /** \brief
      * Calls constructor of DOFVector<DegreeOfFreedom> and registers itself
      * as DOFContainer at DOFAdmin
diff --git a/AMDiS/src/DataCollector.h b/AMDiS/src/DataCollector.h
index d052d82982cf63abec7590e7d3fd9f45f6d05980..d46af55150ae34c0a841a828cf1a7d09692135d3 100644
--- a/AMDiS/src/DataCollector.h
+++ b/AMDiS/src/DataCollector.h
@@ -24,19 +24,13 @@
 
 #include <list>
 #include <vector>
-
 #include "ElementInfo.h"
 #include "VertexInfo.h"
 #include "PeriodicInfo.h"
-#include "MemoryManager.h"
 #include "Mesh.h"
+#include "AMDiS_fwd.h"
 
 namespace AMDiS {
-  class VertexInfo;
-  class ElementInfo;
-  class Mesh;
-  class FiniteElemSpace;
-  template<typename T> class DOFVector;
 
   /** 
    * \ingroup Output
@@ -45,183 +39,181 @@ namespace AMDiS {
    * Provides data collecting of element, vertex and value data for file writer.
    */
   class DataCollector 
-    {
-    public:
-      MEMORY_MANAGED(DataCollector);
-
-      /// Constructor
-      DataCollector(const FiniteElemSpace *feSpace,
-		    DOFVector<double> *values,
-		    int level = -1,
-		    Flag traverseFlag = Mesh::CALL_LEAF_EL,
-		    bool (*writeElem)(ElInfo*) = NULL);
+  {
+  public:
+    /// Constructor
+    DataCollector(const FiniteElemSpace *feSpace,
+		  DOFVector<double> *values,
+		  int level = -1,
+		  Flag traverseFlag = Mesh::CALL_LEAF_EL,
+		  bool (*writeElem)(ElInfo*) = NULL);
 
-      ~DataCollector();
+    ~DataCollector();
 
-      /// Fills the DataCollector with all possible datas.
-      void fillAllData();
+    /// Fills the DataCollector with all possible datas.
+    void fillAllData();
 
-      /// Returns list with element information.
-      std::list<ElementInfo>* getElementInfos();
+    /// Returns list with element information.
+    std::list<ElementInfo>* getElementInfos();
 
-      /// Returns vector with vertex information.
-      DOFVector< std::list<VertexInfo> >* getVertexInfos();
+    /// Returns vector with vertex information.
+    DOFVector< std::list<VertexInfo> >* getVertexInfos();
 
-      /// Returns the finite element space of the problem.
-      const FiniteElemSpace* getFeSpace();
+    /// Returns the finite element space of the problem.
+    const FiniteElemSpace* getFeSpace();
 
-      /// Returns vector with value information.
-      DOFVector<double>* getValues();
+    /// Returns vector with value information.
+    DOFVector<double>* getValues();
 
-      /// Returns vector with information about dof coordinates.
-      DOFVector< std::list<WorldVector<double> > >* getDofCoords();
+    /// Returns vector with information about dof coordinates.
+    DOFVector< std::list<WorldVector<double> > >* getDofCoords();
 
-      /// Returns vector with information about interpolation point indexing.
-      DOFVector<int>* getInterpPointInd();
+    /// Returns vector with information about interpolation point indexing.
+    DOFVector<int>* getInterpPointInd();
 
-      ///
-      DOFVector< std::list<WorldVector<double> > >* getInterpPointCoords();
+    ///
+    DOFVector< std::list<WorldVector<double> > >* getInterpPointCoords();
 
-      /// Returns list of interpolation point information.
-      std::vector< std::vector<int> >* getInterpPoints();
+    /// Returns list of interpolation point information.
+    std::vector< std::vector<int> >* getInterpPoints();
 
-      /// Returns list of information about periodics.
-      std::list<PeriodicInfo>* getPeriodicInfos();
+    /// Returns list of information about periodics.
+    std::list<PeriodicInfo>* getPeriodicInfos();
 
-      /// Returns the number of vertices.
-      int getNumberVertices();
+    /// Returns the number of vertices.
+    int getNumberVertices();
 
-      /// Returns the number of elements.
-      int getNumberElements();
+    /// Returns the number of elements.
+    int getNumberElements();
 
-      /// Returns the number of interpolation points.
-      int getNumberInterpPoints();
+    /// Returns the number of interpolation points.
+    int getNumberInterpPoints();
 
-      // Returns the number of connections.
-      int getNumberConnections();
+    // Returns the number of connections.
+    int getNumberConnections();
       
-      /// Returns the mesh of the problem.
-      Mesh* getMesh();
+    /// Returns the mesh of the problem.
+    Mesh* getMesh();
 
-      void setMesh(Mesh *mesh) {
-	mesh_ = mesh;
-      }
+    void setMesh(Mesh *mesh) {
+      mesh_ = mesh;
+    }
 
-    protected:  
-      /// Start collecting element and vertex data of the problem.
-      int startCollectingElementData();
+  protected:  
+    /// Start collecting element and vertex data of the problem.
+    int startCollectingElementData();
 
-      /// Start collecting value data of the problem.
-      int startCollectingValueData();
+    /// Start collecting value data of the problem.
+    int startCollectingValueData();
 
-      /// Start collecting periodic data of the problem.
-      int startCollectingPeriodicData();
+    /// Start collecting periodic data of the problem.
+    int startCollectingPeriodicData();
 
-      /// Adds information about one element and its vertices.
-      int addElementData(ElInfo* elInfo);
+    /// Adds information about one element and its vertices.
+    int addElementData(ElInfo* elInfo);
 
-      /// Adds value information of one element.
-      int addValueData(ElInfo *elInfo);
+    /// Adds value information of one element.
+    int addValueData(ElInfo *elInfo);
 
-      /// Adds information about interpolation points of vertices.
-      int addInterpData(ElInfo *elInfo);
+    /// Adds information about interpolation points of vertices.
+    int addInterpData(ElInfo *elInfo);
 
-      /// Adds value information of one element.
-      int addPeriodicData(ElInfo *elInfo);
+    /// Adds value information of one element.
+    int addPeriodicData(ElInfo *elInfo);
 
-      /// Vector with vertex values
-      DOFVector<double> *values_;
+    /// Vector with vertex values
+    DOFVector<double> *values_;
 
-      /// Level information for traversing the mesh.
-      int level_;
+    /// Level information for traversing the mesh.
+    int level_;
 
-      /// Flags for traversing the mesh.
-      Flag traverseFlag_;
+    /// Flags for traversing the mesh.
+    Flag traverseFlag_;
 
-      ///
-      const FiniteElemSpace *feSpace_;
+    ///
+    const FiniteElemSpace *feSpace_;
 
-      /// Mesh that should be written
-      Mesh *mesh_;
+    /// Mesh that should be written
+    Mesh *mesh_;
       
-      /// DOFAdmin of values
-      DOFAdmin *localAdmin_;
+    /// DOFAdmin of values
+    DOFAdmin *localAdmin_;
 
-      /// vertex pre-dofs
-      int nPreDofs_;
+    /// vertex pre-dofs
+    int nPreDofs_;
 
-      /// Number of vertices.
-      int nVertices_;
+    /// Number of vertices.
+    int nVertices_;
 
-      /// Number of elements.
-      int nElements_;
+    /// Number of elements.
+    int nElements_;
 
-      /// Total number of interpolation points.
-      int nInterpPoints_;
+    /// Total number of interpolation points.
+    int nInterpPoints_;
 
-      /// Number of connections in periodic problems.
-      int nConnections_;
+    /// Number of connections in periodic problems.
+    int nConnections_;
 
-      /// Dimension of \ref mesh
-      int dim_;
+    /// Dimension of \ref mesh
+    int dim_;
            
-      /// Maps internal element indices to global output indices.
-      std::map<int, int> outputIndices_;
+    /// Maps internal element indices to global output indices.
+    std::map<int, int> outputIndices_;
 
-      /// Global interpolation point indexing
-      DOFVector<int> *interpPointInd_;
+    /// Global interpolation point indexing
+    DOFVector<int> *interpPointInd_;
 
-      /// Stores for each simplex the interpolation points.
-      std::vector< std::vector<int> > interpPoints_;
+    /// Stores for each simplex the interpolation points.
+    std::vector< std::vector<int> > interpPoints_;
 
-      /** \brief
-       * Stores for each DOF a list of its coordinates. If there are now periodic
-       * boundaries than there is also only one coordinate per DOF.
-       */
-      DOFVector< std::list<WorldVector<double> > > *interpPointCoords_;
+    /** \brief
+     * Stores for each DOF a list of its coordinates. If there are now periodic
+     * boundaries than there is also only one coordinate per DOF.
+     */
+    DOFVector< std::list<WorldVector<double> > > *interpPointCoords_;
 
-      /// list of coords for each dof
-      DOFVector< std::list<WorldVector<double> > > *dofCoords_;
+    /// list of coords for each dof
+    DOFVector< std::list<WorldVector<double> > > *dofCoords_;
 
-      /// List that stores an ElementInfo for each element.
-      std::list<ElementInfo> elements_;
+    /// List that stores an ElementInfo for each element.
+    std::list<ElementInfo> elements_;
 
-      /// List stat stores information about all periodics.
-      std::list<PeriodicInfo> periodicInfos_;
+    /// List stat stores information about all periodics.
+    std::list<PeriodicInfo> periodicInfos_;
 
-      /// Stores a list of vertex infos for each dof.
-      DOFVector< std::list<VertexInfo> > *vertexInfos_;
+    /// Stores a list of vertex infos for each dof.
+    DOFVector< std::list<VertexInfo> > *vertexInfos_;
 
-      /** \brief
-       * periodicConnections[i][j] stores whether the connection at side j of 
-       * the element with output index i has already been written.
-       */
-      std::vector<DimVec<bool> > periodicConnections_;
+    /** \brief
+     * periodicConnections[i][j] stores whether the connection at side j of 
+     * the element with output index i has already been written.
+     */
+    std::vector<DimVec<bool> > periodicConnections_;
 
-      /// Stores if element data was collected before.
-      bool elementDataCollected_;
+    /// Stores if element data was collected before.
+    bool elementDataCollected_;
 
-      /// Stores if value data was collected before.   
-      bool valueDataCollected_;
+    /// Stores if value data was collected before.   
+    bool valueDataCollected_;
 
-      /// Stores if periodic data was collected before.
-      bool periodicDataCollected_;
+    /// Stores if periodic data was collected before.
+    bool periodicDataCollected_;
 
-      /// Pointer to a function which decides whether an element is considered.
-      bool (*writeElem_)(ElInfo*);
+    /// Pointer to a function which decides whether an element is considered.
+    bool (*writeElem_)(ElInfo*);
 
-      /// Temporary variable used in functions addValueData() and addInterpData().
-      DegreeOfFreedom *localDOFs_;
+    /// Temporary variable used in functions addValueData() and addInterpData().
+    DegreeOfFreedom *localDOFs_;
       
-      /// Temporary variable used in functions addValueData() and addInterpData().
-      BasisFunction *basisFcts_;
+    /// Temporary variable used in functions addValueData() and addInterpData().
+    BasisFunction *basisFcts_;
 
-      /// Temporary variable used in functions addValueData() and addInterpData().
-      int nBasisFcts_;
+    /// Temporary variable used in functions addValueData() and addInterpData().
+    int nBasisFcts_;
 
-      /// Temporary variable used in function \ref addValueData.
-      WorldVector<double> *vertexCoords;
-    };
+    /// Temporary variable used in function \ref addValueData.
+    WorldVector<double> *vertexCoords;
+  };
 }
 
 #endif
diff --git a/AMDiS/src/DirichletBC.h b/AMDiS/src/DirichletBC.h
index d02d07fbd15ef5fda17ff3f3f08aa93c1183905e..082a8fc14dce5fc8c3fdb930855c55ba569e55de 100644
--- a/AMDiS/src/DirichletBC.h
+++ b/AMDiS/src/DirichletBC.h
@@ -24,17 +24,10 @@
 
 #include "BoundaryCondition.h"
 #include "AbstractFunction.h"
-#include "OpenMP.h"
+#include "AMDiS_fwd.h"
 
 namespace AMDiS {
 
-  template<typename T> class DOFVectorBase;
-  class ElInfo;
-
-  // ============================================================================
-  // ===== class DirichletBC ==================================================== 
-  // ============================================================================
-
   /**
    * \ingroup Assembler
    *
@@ -47,66 +40,57 @@ namespace AMDiS {
   class DirichletBC : public BoundaryCondition
   {
   public:
-    /** \brief
-     * Constructor.
-     */
+    /// Constructor.
     DirichletBC(BoundaryType type,
 		AbstractFunction<double, WorldVector<double> > *fct,
 		FiniteElemSpace *rowFESpace,
 		FiniteElemSpace *colFESpace = NULL);
 
-    /** \brief
-     * Constructor.
-     */
+    /// Constructor.
     DirichletBC(BoundaryType type,
 		DOFVectorBase<double> *vec);
 
-    /** \brief
-     * Implementation of BoundaryCondition::fillBoundaryCondition().
-     */
+    /// Implementation of BoundaryCondition::fillBoundaryCondition().
     void fillBoundaryCondition(DOFMatrix* matrix,
 			       ElInfo* elInfo,
 			       const DegreeOfFreedom* dofIndices,
 			       const BoundaryType* localBound,
 			       int nBasFcts);
   
-    /** \brief
-     * Implementation of BoundaryCondition::fillBoundaryCondition().
-     */
+    /// Implementation of BoundaryCondition::fillBoundaryCondition().
     void fillBoundaryCondition(DOFVectorBase<double>* vector, 
 			       ElInfo* elInfo,
 			       const DegreeOfFreedom* dofIndices,
 			       const BoundaryType* localBound,
 			       int nBasFcts);
 
-    /** \brief
-     * Implementation of BoundaryCondition::boundResidual().
-     */
+    /// Implementation of BoundaryCondition::boundResidual().
     double boundResidual(ElInfo*, 
 			 DOFMatrix *,
-			 const DOFVectorBase<double>*) { return 0.0; };
+			 const DOFVectorBase<double>*) 
+    { 
+      return 0.0; 
+    }
 
-    bool isDirichlet() { return true; };
+    bool isDirichlet() { 
+      return true; 
+    }
 
     inline AbstractFunction<double, WorldVector<double> > *getF() {
       return f;
-    };
+    }
 
     inline DOFVectorBase<double> *getDOFVector() {
       return dofVec;
-    };
+    }
 
   protected:
-    /** \brief
-     * Function which is evaluated at world coords of Dirichlet dofs.
-     */
+    /// Function which is evaluated at world coords of Dirichlet dofs.
     AbstractFunction<double, WorldVector<double> > *f;
 
     std::vector<WorldVector<double> > worldCoords;
 
-    /** \brief
-     * DOFVector containing the boundary values
-     */
+    /// DOFVector containing the boundary values
     DOFVectorBase<double> *dofVec;
   };
 
diff --git a/AMDiS/src/DualTraverse.h b/AMDiS/src/DualTraverse.h
index 920436a015c9496a63cf3349f863f31fd4698f85..7d55e8846c6ac58e932923638e15784c51131b00 100644
--- a/AMDiS/src/DualTraverse.h
+++ b/AMDiS/src/DualTraverse.h
@@ -24,7 +24,6 @@
 
 #include "Traverse.h"
 #include "Flag.h"
-#include "MemoryManager.h"
 #include "AMDiS_fwd.h"
 
 namespace AMDiS {
@@ -33,8 +32,6 @@ namespace AMDiS {
   class DualTraverse
   {
   public:
-    MEMORY_MANAGED(DualTraverse);
-
     DualTraverse() 
       : fillSubElemMat(false),
 	basisFcts(NULL)
diff --git a/AMDiS/src/ElInfo1d.h b/AMDiS/src/ElInfo1d.h
index d6ca2741a24e4e93d1c5f5c13f0f2767b0f70529..9efc2c866f3f2b9df32c1168615b894e0e46f9c2 100644
--- a/AMDiS/src/ElInfo1d.h
+++ b/AMDiS/src/ElInfo1d.h
@@ -23,9 +23,7 @@
 #define AMDIS_ELINFO1D_H
 
 #include <boost/numeric/mtl/mtl.hpp>
-
 #include "ElInfo.h"
-#include "MemoryManager.h"
 
 namespace AMDiS {
 
diff --git a/AMDiS/src/ElInfo2d.h b/AMDiS/src/ElInfo2d.h
index 1e69dc9ccad61be8fdfb0e511f1a28708ca023e5..f8d2a0cf7987207be675eff2cfce12284c043771 100644
--- a/AMDiS/src/ElInfo2d.h
+++ b/AMDiS/src/ElInfo2d.h
@@ -23,9 +23,7 @@
 #define AMDIS_ELINFO2D_H
 
 #include <boost/numeric/mtl/mtl.hpp>
-
 #include "ElInfo.h"
-#include "MemoryManager.h"
 
 namespace AMDiS {
 
diff --git a/AMDiS/src/ElInfo3d.h b/AMDiS/src/ElInfo3d.h
index 0ff51c7b4a1ff9b5b6efd0f857eb51415393e4d1..5508fe76a39eb7f0e38f51453dccebb874dc99b4 100644
--- a/AMDiS/src/ElInfo3d.h
+++ b/AMDiS/src/ElInfo3d.h
@@ -23,9 +23,7 @@
 #define AMDIS_ELINFO3D_H
 
 #include <boost/numeric/mtl/mtl.hpp>
-
 #include "ElInfo.h"
-#include "MemoryManager.h"
 
 namespace AMDiS {
 
diff --git a/AMDiS/src/Element.h b/AMDiS/src/Element.h
index 41c4ede07c307fc41789b05ca843f19e876b47f4..11f3bdefc291f8b3a004723651a9a4d0578239e5 100644
--- a/AMDiS/src/Element.h
+++ b/AMDiS/src/Element.h
@@ -27,13 +27,10 @@
 #include "Serializable.h"
 #include "ElementData.h"
 #include "LeafData.h"
+#include "AMDiS_fwd.h"
 
 namespace AMDiS {
 
-  class Mesh;
-  class DOFAdmin;
-  template<typename T> class WorldVector;
-  class CoarseningManager;
   template<typename T, GeoIndex d> class FixVec;
 
 #define AMDIS_UNDEFINED  5
diff --git a/AMDiS/src/ElementData.h b/AMDiS/src/ElementData.h
index 43c62f01630a2e9a2cd20893217ee1a0a586fd19..c2e35053234ff86814d541e8b4a738c0c6b363cb 100644
--- a/AMDiS/src/ElementData.h
+++ b/AMDiS/src/ElementData.h
@@ -33,10 +33,6 @@ namespace AMDiS {
   const int ELEMENT_REGION = 4;
   const int SURFACE_REGION = 5;
 
-  // ============================================================================
-  // ===== class ElementData ====================================================
-  // ============================================================================
-
   /** \brief
    * Base class for element data. To allow to assign arbitrary data to arbitrary
    * elements at run time, the decorator pattern in combination with the
@@ -46,21 +42,15 @@ namespace AMDiS {
   class ElementData : public Serializable
   {
   public:
-    /** \brief
-     * constructor
-     */
+    /// constructor
     ElementData(ElementData *decorated = NULL) 
       : decorated_(decorated)
-    {	}
+    {}
 
-    /** \brief
-     * destructor
-     */
+    /// destructor
     virtual ~ElementData();
 
-    /** \brief
-     * Refinement of parent to child1 and child2.
-     */
+    /// Refinement of parent to child1 and child2.
     virtual bool refineElementData(Element* parent, 
 				   Element* child1,
 				   Element* child2,
@@ -79,31 +69,24 @@ namespace AMDiS {
       return false;
     }
 
-    /** \brief
-     *
-     */
+    ///
     virtual void coarsenElementData(Element* parent, 
 				    Element* thisChild,
 				    Element* otherChild,
 				    int elTypeParent);
 
-    /** \brief
-     * Returns a copy of this ElementData object including all decorated data.
-     */
+    /// Returns a copy of this ElementData object including all decorated data.
     virtual ElementData *clone() const {
-      if (decorated_) {
+      if (decorated_)
 	return decorated_->clone();
-      }
+
       return NULL;
     }
 
-    /** \brief
-     * Returns the id of element data type.
-     */
-    virtual const int getTypeID() const 
-	{
-		return 0;
-	}
+    /// Returns the id of element data type.
+    virtual const int getTypeID() const {
+      return 0;
+    }
 
     /** \brief
      * Returns whether the ElemnetData object is of the type specified by 
@@ -111,34 +94,27 @@ namespace AMDiS {
      */
     virtual bool isOfType(int typeID) const = 0;
 
-    /** \brief
-     * Implements Serializable::serialize().
-     */
+    /// Implements Serializable::serialize().
     virtual void serialize(std::ostream& out);
 
-    /** \brief
-     * Implements Serializable::deserialize().
-     */
+    /// Implements Serializable::deserialize().
     virtual void deserialize(std::istream& in);
 
-    /** \brief
-     * Returns first element data in the chain which is of the spcified type.
-     */
+    /// Returns first element data in the chain which is of the spcified type.
     inline ElementData *getElementData(int typeID) {
       if (this->isOfType(typeID)) {
 	return this;
       } else {
-	if (decorated_) {
+	if (decorated_)
 	  return decorated_->getElementData(typeID);
-	}
       }
       return NULL;
     }
 
     inline ElementData *getDecorated(int typeID) { 
-      if (decorated_) {
+      if (decorated_)
 	return decorated_->getElementData(typeID);
-      }
+      
       return NULL;
     }
 
@@ -148,9 +124,7 @@ namespace AMDiS {
      */
     bool deleteDecorated(int typeID);
 
-    /** \ref
-     * Delets the whole \ref decorated_ chain.
-     */
+    /// Delets the whole \ref decorated_ chain.
     void deleteDecorated();
 
     inline ElementData *getDecorated() { 
@@ -158,17 +132,15 @@ namespace AMDiS {
     }
 
     inline void setDecorated(ElementData *d) {
-		if(getTypeID()==1)
-		{
-			if(d!=NULL) std::cout<<"leafdata decorated with nonzero"<<std::endl;
-		}
+      if (getTypeID() == 1)
+	if (d != NULL)
+	  std::cout<<"leafdata decorated with nonzero"<<std::endl;
+
       decorated_ = d;
     }
 
   protected:
-    /** \brief
-     * Pointer to next ElementData object in the chain of responsibility.
-     */
+    /// Pointer to next ElementData object in the chain of responsibility.
     ElementData *decorated_;
   };
 
diff --git a/AMDiS/src/ElementFileWriter.h b/AMDiS/src/ElementFileWriter.h
index 205d48cc1b9587a06c7de1af5020a7b1f7562de2..67cda223329101255c9012c100cdabe74c45182e 100644
--- a/AMDiS/src/ElementFileWriter.h
+++ b/AMDiS/src/ElementFileWriter.h
@@ -4,7 +4,6 @@
 #include "FileWriter.h"
 #include "FiniteElemSpace.h"
 #include "MatrixVector.h"
-#include "MemoryManager.h"
 #include "Mesh.h"
 
 namespace AMDiS {
@@ -21,8 +20,6 @@ namespace AMDiS {
   class ElementFileWriter : public FileWriterInterface
   {
   public:
-    MEMORY_MANAGED(ElementFileWriter);
-
     /// Constructor.
     ElementFileWriter(const std::string& name, 
 		      const FiniteElemSpace *feSpace,
diff --git a/AMDiS/src/ElementFunction.h b/AMDiS/src/ElementFunction.h
index a075e4175f4e89373c2b478fbaf23cbc3f8321c9..b764d7f609995f4e94b127e5d38b29e53d21c00d 100644
--- a/AMDiS/src/ElementFunction.h
+++ b/AMDiS/src/ElementFunction.h
@@ -28,46 +28,30 @@
 
 namespace AMDiS {
 
-  // ============================================================================
-  // ===== class ElementFunction ================================================
-  // ============================================================================
-
-  /** \brief
-   * Abstract access to functions living on elements.
-   */
+  /// Abstract access to functions living on elements.
   template<typename T>
   class ElementFunction : public AbstractFunction<T, DimVec<double> >
   {
   public:
-    /** \brief
-     * constructor.
-     */
-    ElementFunction() : elInfo_(NULL) {};
+    /// constructor.
+    ElementFunction() 
+      : elInfo_(NULL) 
+    {}
 
-    /** \brief
-     * destructor.
-     */
-    virtual ~ElementFunction() {};
+    /// destructor.
+    virtual ~ElementFunction() {}
 
-    /** \brief
-     * sets \ref elInfo_;
-     */
-    inline void setElInfo(const ElInfo *elInfo) { elInfo_ = elInfo; };
+    /// sets \ref elInfo_;
+    inline void setElInfo(const ElInfo *elInfo) { 
+      elInfo_ = elInfo; 
+    }
 
   protected:
-    /** \brief
-     * ElInfo the function currently lives on.
-     */
+    /// ElInfo the function currently lives on.
     const ElInfo *elInfo_;
   };
 
-  // ============================================================================
-  // ===== class ElementFunctionAnalytic ========================================
-  // ============================================================================
-
-  /** \brief
-   * ElementFunction wich encapsulates the evaluation of an analytical function.
-   */
+  /// ElementFunction wich encapsulates the evaluation of an analytical function.
   template<typename T>
   class ElementFunctionAnalytic : public ElementFunction<T>
   {
@@ -91,40 +75,29 @@ namespace AMDiS {
   };
 
 
-  // ============================================================================
-  // ===== class ElementFunctionDOFVec ==========================================
-  // ============================================================================
-
-  /** \brief
-   * ElementFunction wich encapsulates the interpolation of an DOFVector.
-   */
+  /// ElementFunction wich encapsulates the interpolation of an DOFVector.
   template<typename T>
   class ElementFunctionDOFVec : public ElementFunction<T>
   {
   public:
-    /** \brief
-     * constructor.
-     */
+    /// constructor.
     ElementFunctionDOFVec(const DOFVector<T> *dofVector) 
       : ElementFunction<T>(),
 	dofVector_(dofVector)
-    {};
+    {}
 
-    /** \brief
-     * evaluation at given coordinates.
-     */
-    const T& operator()(const DimVec<double>& bary) const {
+    /// evaluation at given coordinates.
+    const T& operator()(const DimVec<double>& bary) const 
+    {
       static T t;
       const T* localVec = 
 	dofVector_->getLocalVector(this->elInfo_->getElement(), NULL);
       t = dofVector_->getFESpace()->getBasisFcts()->evalUh(bary, localVec);
       return t;
-    };  
+    }
 
   protected:
-    /** \brief
-     * DOFVector to be interpolated.
-     */
+    /// DOFVector to be interpolated.
     const DOFVector<T> *dofVector_;
   };
 
diff --git a/AMDiS/src/ElementInfo.h b/AMDiS/src/ElementInfo.h
index 12d26f070dfb25f4fe92c2551d6909412c801e31..26b30b4aae010a536c0c2e77dba09f0a28d2d8c1 100644
--- a/AMDiS/src/ElementInfo.h
+++ b/AMDiS/src/ElementInfo.h
@@ -24,70 +24,50 @@
 
 #include <list>
 #include <vector>
-
 #include "VertexInfo.h"
 #include "Boundary.h"
 #include "Projection.h"
+#include "AMDiS_fwd.h"
 
 namespace AMDiS {
 
-  class VertexInfo;
-
-  /** \brief
-   * Stores information for one element.
-   */
+  /// Stores information for one element.
   class ElementInfo
-    {
-    public:
-      /** \brief
-       * Dimension specific constructor for DimVec creation.
-       */
-      ElementInfo(int dim) 
-	: vertices(dim),
+  {
+  public:
+    /// Dimension specific constructor for DimVec creation.
+    ElementInfo(int dim) 
+      : vertices(dim),
 	vertexInfo(dim, NO_INIT),
 	boundary(dim, NO_INIT),
 	projection(dim, NO_INIT),
 	neighbour(dim, NO_INIT),
 	surfaceRegions(dim, NO_INIT)
-	{};
+    {}
       
-      int vertices;
+    int vertices;
       
-      /** \brief
-       * Vertex infos for each element vertex.
-       */
-      DimVec< std::list<VertexInfo>::iterator> vertexInfo;
+    /// Vertex infos for each element vertex.
+    DimVec< std::list<VertexInfo>::iterator> vertexInfo;
       
-      /** \brief
-       * Boundary type for each side.
-       */
-      DimVec<BoundaryType> boundary;
+    /// Boundary type for each side.
+    DimVec<BoundaryType> boundary;
   
-      /** \brief
-       * Boundary projector for each side.
-       */
-      DimVec<Projection*> projection;
+    /// Boundary projector for each side.
+    DimVec<Projection*> projection;
       
-      /** \brief
-       * Neighbour output index for each side.
-       */
-      DimVec<int> neighbour;
+    /// Neighbour output index for each side.
+    DimVec<int> neighbour;
       
-      /** \brief
-       * Element type. Used in 3d.
-       */
-      unsigned char type;
+    /// Element type. Used in 3d.
+    unsigned char type;
 
-      /** \brief
-       *
-       */
-      int elementRegion;
+    ///
+    int elementRegion;
 
-      /** \brief
-       *
-       */      
-      DimVec<int> surfaceRegions;
-    };
+    ///
+    DimVec<int> surfaceRegions;
+  };
   
 }
 
diff --git a/AMDiS/src/ElementMatrix.h b/AMDiS/src/ElementMatrix.h
index fc6a275c14290ab78831b682f6f931c2e87c114e..f29b9d6b90c576552b63f3d3635ff334aa0edb1a 100644
--- a/AMDiS/src/ElementMatrix.h
+++ b/AMDiS/src/ElementMatrix.h
@@ -22,7 +22,6 @@
 #ifndef AMDIS_ELEMENTMATRIX_H
 #define AMDIS_ELEMENTMATRIX_H
 
-#include "MemoryManager.h"
 #include "MatrixVector.h"
 
 namespace AMDiS {
@@ -36,8 +35,6 @@ namespace AMDiS {
   class ElementMatrix : public Matrix<double>
   {
   public:
-    MEMORY_MANAGED(ElementMatrix);
-
     /// Constructor
     ElementMatrix(int numRows, int numCols) 
       : Matrix<double>(numRows, numCols),
diff --git a/AMDiS/src/ElementRegion_ED.h b/AMDiS/src/ElementRegion_ED.h
index e95b2a8bd3ee6deb1f2dce710db35ba21b2fec69..d4a9724da5396cb8f86e74d39139ae8b2bf3d553 100644
--- a/AMDiS/src/ElementRegion_ED.h
+++ b/AMDiS/src/ElementRegion_ED.h
@@ -30,26 +30,25 @@ namespace AMDiS {
   class ElementRegion_ED : public ElementData
   {
   public:
-    MEMORY_MANAGED(ElementRegion_ED);
-
-    inline bool isOfType(int typeID) const {
-      if(typeID == ELEMENT_REGION) 
+    inline bool isOfType(int typeID) const 
+    {
+      if (typeID == ELEMENT_REGION) 
 	return true;
       return false;
-    };
+    }
 
     class Creator : public CreatorInterface<ElementData>
     {
     public:
       ElementData* create() {
 	return NEW ElementRegion_ED;
-      };
+      }
     };
 
     ElementRegion_ED(ElementData *decorated = NULL)
       : ElementData(decorated),
 	region_(-1)
-    {};
+    {}
 
     bool refineElementData(Element* parent, 
 			   Element* child1,
@@ -69,34 +68,34 @@ namespace AMDiS {
       child2->setElementData(ep);
 
       return false;
-    };
+    }
 
     ElementData *clone() const { 
       ElementRegion_ED *newObj = NEW ElementRegion_ED;
       newObj->region_ = region_;
       newObj->decorated_ = ElementData::clone();
       return newObj; 
-    };
+    }
 
-    inline std::string getTypeName() const { return "ElementRegion_ED"; };
+    inline std::string getTypeName() const { return "ElementRegion_ED"; }
 
-    inline const int getTypeID() const { return ELEMENT_REGION; };
+    inline const int getTypeID() const { return ELEMENT_REGION; }
 
     void serialize(std::ostream& out) 
     {
       ElementData::serialize(out);
       out.write(reinterpret_cast<const char*>(&region_), sizeof(int));
-    };
+    }
 
     void deserialize(std::istream& in) 
     {
       ElementData::deserialize(in);
       in.read(reinterpret_cast<char*>(&region_), sizeof(int));
-    };
+    }
 
-    inline void setRegion(int region) { region_ = region; };
+    inline void setRegion(int region) { region_ = region; }
 
-    inline int getRegion() const { return region_; };
+    inline int getRegion() const { return region_; }
 
   protected:
     int region_;
diff --git a/AMDiS/src/ElementVector.h b/AMDiS/src/ElementVector.h
index d437cc61d10db3743e52d4a0b31289c4fcfe681a..4383ac71e868ea254bbd65ad2c15b4cc9099e1ff 100644
--- a/AMDiS/src/ElementVector.h
+++ b/AMDiS/src/ElementVector.h
@@ -22,15 +22,10 @@
 #ifndef AMDIS_ELEMENTVECTOR_H
 #define AMDIS_ELEMENTVECTOR_H
 
-#include "MemoryManager.h"
 #include "MatrixVector.h"
 
 namespace AMDiS {
 
-  // =============================================================================
-  // ===== class ElementVector ===================================================
-  // =============================================================================
-
   /** \ingroup Assembler
    *  
    * \brief
@@ -39,20 +34,14 @@ namespace AMDiS {
   class ElementVector : public Vector<double>
   {
   public:
-    MEMORY_MANAGED(ElementVector);
-
-    /** \brief
-     * Constructor.
-     */
+    /// Constructor.
     ElementVector(int size) 
       : Vector<double>(size),
 	dofIndices(size)
-    {};
+    {}
 
   public:
-    /** \brief
-     * dof indices.
-     */
+    /// dof indices.
     Vector<DegreeOfFreedom> dofIndices;
   };
 
diff --git a/AMDiS/src/EmptyElementData.h b/AMDiS/src/EmptyElementData.h
index ab6fdbea1adedc4bb99f250ce03529a1dcd99352..72a58cea9b66971e736a33b4786017ca7e0975e7 100644
--- a/AMDiS/src/EmptyElementData.h
+++ b/AMDiS/src/EmptyElementData.h
@@ -33,25 +33,24 @@ namespace AMDiS {
   class EmptyElementData : public ElementData
   {
   public:
-    MEMORY_MANAGED(EmptyElementData);
-
-    inline bool isOfType(int typeID) const {
-      if(typeID == EMPTY_ED) 
+    inline bool isOfType(int typeID) const 
+    {
+      if (typeID == EMPTY_ED) 
 	return true;
       return false;
-    };
+    }
 
     class Creator : public CreatorInterface<ElementData>
     {
     public:
       ElementData* create() {
 	return NEW EmptyElementData;
-      };
+      }
     };
 
     EmptyElementData(ElementData *decorated = NULL)
       : ElementData(decorated)
-    {};
+    {}
 
     bool refineElementData(Element* parent, 
 			   Element* child1,
@@ -62,27 +61,27 @@ namespace AMDiS {
       child1->setElementData(NEW EmptyElementData(child1->getElementData()));
       child2->setElementData(NEW EmptyElementData(child2->getElementData()));
       return false;
-    };
+    }
 
     ElementData *clone() const { 
       EmptyElementData *newObj = NEW EmptyElementData;
       newObj->decorated_ = ElementData::clone();
       return newObj; 
-    };
+    }
 
-    inline std::string getTypeName() const { return "EmptyElementData"; };
+    inline std::string getTypeName() const { return "EmptyElementData"; }
 
-    inline const int getTypeID() const { return EMPTY_ED; };
+    inline const int getTypeID() const { return EMPTY_ED; }
 
     void serialize(std::ostream& out) 
     {
       ElementData::serialize(out);
-    };
+    }
 
     void deserialize(std::istream& in) 
     {
       ElementData::deserialize(in);
-    };
+    }
   };
 
 }
diff --git a/AMDiS/src/Error.h b/AMDiS/src/Error.h
index 65583b8868809625244950221e897d023e967506..158c91f1b15f0997e5df9c083b9ecfb0d1bca1a8 100644
--- a/AMDiS/src/Error.h
+++ b/AMDiS/src/Error.h
@@ -24,18 +24,10 @@
 
 #include "Global.h"
 #include "Mesh.h"
-#include "MemoryManager.h"
+#include "AMDiS_fwd.h"
 
 namespace AMDiS {
 
-  class FastQuadrature;
-
-  template<typename T> class DOFVector;
-
-  // ============================================================================
-  // ===== class Error ==========================================================
-  // ============================================================================
-
   /** \ingroup Common
    * \brief
    * True error calculator
@@ -44,19 +36,17 @@ namespace AMDiS {
   class Error
   {
   public:  
-    MEMORY_MANAGED(Error<T>);
-
     static void setWriteLeafData() { 
       writeInLeafData = true; 
-    };
+    }
     
     static void unsetWriteLeafData() { 
       writeInLeafData = false; 
-    };
+    }
     
     static bool writeLeafData() { 
       return writeInLeafData; 
-    };
+    }
   
     static double maxErrAtQp(const AbstractFunction<T, WorldVector<double> >& u,
 			     const DOFVector<T>& uh,
@@ -87,9 +77,6 @@ namespace AMDiS {
 
     static WorldVector<T> grdErrUFct(const DimVec<double>& lambda);
 
-    /** \brief
-     * 
-     */
     class AbstrFctErrU  : public AbstractFunction<T, DimVec<double> >
     { 
     public:
@@ -97,14 +84,11 @@ namespace AMDiS {
 
       inline T operator()(const DimVec<double> & x) const { 
 	return Error<T>::errUFct(x);
-      };
+      }
     };
 
     static AbstrFctErrU errU;
 
-    /** \brief
-     * 
-     */
     class AbstrFctGrdErrU  : public AbstractFunction<WorldVector<T>, DimVec<double> >
     { 
     public:
@@ -112,7 +96,7 @@ namespace AMDiS {
 
       inline WorldVector<T> operator()(const DimVec<double> & x) const { 
 	return Error<T>::grdErrUFct(x);
-      };
+      }
     };
 
     static AbstrFctGrdErrU   grdErrU;
diff --git a/AMDiS/src/Estimator.h b/AMDiS/src/Estimator.h
index de271ea108b6828c3849039ac347e8c46ff70904..5488970cc9f822ee0a887fdfa0a27786ebeb47be 100755
--- a/AMDiS/src/Estimator.h
+++ b/AMDiS/src/Estimator.h
@@ -35,10 +35,6 @@
 
 namespace AMDiS {
 
-  // ============================================================================
-  // ===== class Estimator ======================================================
-  // ============================================================================
-
   /**
    * \ingroup Estimator
    * 
@@ -48,99 +44,67 @@ namespace AMDiS {
   class Estimator
   {
   public:
-    MEMORY_MANAGED(Estimator);
-
     Estimator() {}
 
-    /** \brief
-     * Constructor.
-     */
+    /// Constructor.
     Estimator(std::string name_, int r);
 
-    /** \brief
-     * destructor
-     */
+    /// destructor
     virtual ~Estimator() {}
 
-    /** \brief
-     * Returns \ref name of the Estimator
-     */
+    /// Returns \ref name of the Estimator
     inline const std::string& getName() const { 
       return name; 
     }
 
-    /** \brief
-     * Performs the estimation and returns the final \ref est_sum
-     */
+    /// Performs the estimation and returns the final \ref est_sum
     virtual double estimate(double timestep = 0.0);
 
-    /** \brief
-     *
-     */
+    ///
     virtual void init(double timestep) {}
 
-    /** \brief
-     *
-     */
+    ///
     virtual void estimateElement(ElInfo *elInfo) {}
 
-    /** \brief
-     *
-     */
+    ///
     virtual void exit(bool output=true) {}
 
-    /** \brief
-     * Returns \ref est_sum of the Estimator
-     */
+    /// Returns \ref est_sum of the Estimator
     inline double getErrorSum() const { 
       return est_sum; 
     }
 
-    /** \brief
-     * Sets \ref est_sum of the Estimator
-     */
+    /// Sets \ref est_sum of the Estimator
     inline void setErrorSum(double sum) { 
       est_sum = sum; 
     }
 
-    /** \brief
-     * Returns \ref est_max of the Estimator
-     */
+    /// Returns \ref est_max of the Estimator
     inline double getErrorMax() const { 
       return est_max; 
     }
 
-    /** \brief
-     * Returns the estimated time error.
-     */
+    /// Returns the estimated time error.
     virtual double getTimeEst() const { 
       return est_t_sum; 
     }
 
-    /** \brief
-     * Returns the maximal time estimation.
-     */
+    /// Returns the maximal time estimation.
     virtual double getTimeEstMax() const { 
       return est_t_max; 
     }
 
-    /** \brief
-     * Sets \ref est_max of the Estimator
-     */
+    /// Sets \ref est_max of the Estimator
     inline void setErrorMax(double m) { 
       est_max = m; 
     }
 
-    /** \brief
-     * Returns \ref norm.
-     */
+    /// Returns \ref norm.
     inline Norm getErrorNorm() { 
       return norm; 
     }
 
-    /** \brief
-     * Adds one system to the estimator.
-     */
+    /// Adds one system to the estimator.
     virtual void addSystem(DOFMatrix *matrix_,
 			   DOFVector<double> *uh_,
 			   DOFVector<double> *fh_,
@@ -152,9 +116,7 @@ namespace AMDiS {
       uhOld.push_back(uhOld_);
     }
 
-    /** \brief
-     * Adds pointer to old solution to the given system.
-     */
+    /// Adds pointer to old solution to the given system.
     virtual void addUhOldToSystem(int system, DOFVector<double> *uhOld_) 
     {
       TEST_EXIT(static_cast<int>(uhOld.size()) > system)("invalid system\n");
@@ -162,9 +124,7 @@ namespace AMDiS {
       uhOld[system] = uhOld_;
     }
 
-    /** \brief
-     * Returns number of systems.
-     */
+    /// Returns number of systems.
     inline int getNumSystems() { 
       return static_cast<int>(matrix.size()); 
     }
@@ -182,34 +142,22 @@ namespace AMDiS {
     }
 
   protected:
-    /** \brief
-     * Name of the Estimator
-     */
+    /// Name of the Estimator
     std::string name;
 
-    /** \brief
-     * Used norm
-     */
+    /// Used norm
     Norm norm;
  
-    /** \brief
-     * Sum of all error estimates
-     */
+    /// Sum of all error estimates
     double est_sum;
 
-    /** \brief
-     * Sum of all time error estimates
-     */
+    /// Sum of all time error estimates
     double est_t_sum;
 
-    /** \brief
-     * Max of all time error estimates
-     */
+    /// Max of all time error estimates
     double est_t_max;
 
-    /** \brief
-     * Maximal error estimate
-     */
+    /// Maximal error estimate
     double est_max;
 
     /** \brief
@@ -220,9 +168,7 @@ namespace AMDiS {
      */ 
     std::vector<DOFMatrix*> matrix;
 
-    /** \brief
-     * Vector of solution vectors for the different systems.
-     */
+    /// Vector of solution vectors for the different systems.
     std::vector<DOFVector<double>*> uh;
 
     /** \brief
@@ -231,9 +177,7 @@ namespace AMDiS {
      */
     std::vector<DOFVector<double>*> uhOld;
 
-    /** \brief
-     * Vector of RHS vectors for the different systems.
-     */
+    /// Vector of RHS vectors for the different systems.
     std::vector<DOFVector<double>*> fh;
 
     /** \brief
@@ -251,10 +195,6 @@ namespace AMDiS {
   };
 
 
-  // ============================================================================
-  // ===== class EstimatorCreator ===============================================
-  // ============================================================================
-
   /** 
    * \ingroup Estimator
    *
@@ -264,39 +204,27 @@ namespace AMDiS {
   class EstimatorCreator : public CreatorInterface<Estimator>
   { 
   public:
-    /** \brief
-     * constructor
-     */
+    /// constructor
     EstimatorCreator() : row(-1) {}
 
-    /** \brief
-     * destructor
-     */
+    /// destructor
     virtual ~EstimatorCreator() {}
 
-    /** \brief
-     * Sets \ref name
-     */
+    /// Sets \ref name
     void setName(std::string name_) { 
       name = name_; 
     }
 
-    /** \brief
-     * Sets \ref row
-     */
+    /// Sets \ref row
     void setRow(int r) { 
       row = r; 
     }
 
   protected:
-    /** \brief
-     * Name of the estimator to be created.
-     */
+    /// Name of the estimator to be created.
     std::string name;
 
-    /** \brief
-     * Row of the estimator.
-     */
+    /// Row of the estimator.
     int row;
   };