diff --git a/Applications/DataExplorer/VtkVis/VtkCompositeThresholdFilter.cpp b/Applications/DataExplorer/VtkVis/VtkCompositeThresholdFilter.cpp
index 3a0e0c28dae656b955e3a03d88cbc336aa01c568..ede58aae2f04cea5174a6414f95ee1002ab98df2 100644
--- a/Applications/DataExplorer/VtkVis/VtkCompositeThresholdFilter.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkCompositeThresholdFilter.cpp
@@ -59,7 +59,7 @@ void VtkCompositeThresholdFilter::init()
     }
     else
     {
-        WARN("Threshold filter could not find an array on its input object!")
+        WARN("Threshold filter could not find an array on its input object!");
         return;
     }
 
diff --git a/Applications/DataExplorer/VtkVis/VtkRaster.cpp b/Applications/DataExplorer/VtkVis/VtkRaster.cpp
index cb46709dcd3cbefcfb9a920ed682d9f64b9ce480..ec3d8f4436dade6e6149bf8785af84b7acb88c2c 100644
--- a/Applications/DataExplorer/VtkVis/VtkRaster.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkRaster.cpp
@@ -256,7 +256,8 @@ vtkImageAlgorithm* VtkRaster::loadImageFromTIFF(const std::string& fileName,
         }
 
         XTIFFClose(tiff);
-        ERR("VtkRaster::loadImageFromTIFF() - File not recognised as GeoTIFF-Image.")
+        ERR("VtkRaster::loadImageFromTIFF() - File not recognised as "
+            "GeoTIFF-Image.");
         return nullptr;
     }
 
@@ -363,9 +364,10 @@ bool VtkRaster::readWorldFile(std::string const& filename,
     }
     double const delta_y = BaseLib::str2number<double>(line);
     if (delta_x != -delta_y)
-        WARN("Anisotropic pixel size detected (%f vs %f). An isotropic "
-             "spacing of %f is assumed, be aware results may be wrong.",
-            delta_x, delta_y, delta_x)
+        WARN(
+            "Anisotropic pixel size detected (%f vs %f). An isotropic "
+            "spacing of %f is assumed, be aware results may be wrong.",
+            delta_x, delta_y, delta_x);
     // x-translation
     if (!std::getline(in, line))
     {
diff --git a/Applications/DataExplorer/VtkVis/VtkVisTabWidget.cpp b/Applications/DataExplorer/VtkVis/VtkVisTabWidget.cpp
index 22edd13194ac6e9e0c47d0eb5d7f4852ec032cd4..ec6eee9911219ba172927b01bbf0c66c9e0135ff 100644
--- a/Applications/DataExplorer/VtkVis/VtkVisTabWidget.cpp
+++ b/Applications/DataExplorer/VtkVis/VtkVisTabWidget.cpp
@@ -249,7 +249,7 @@ void VtkVisTabWidget::buildProportiesDialog(VtkVisPipelineItem* item)
     VtkAlgorithmProperties* algProps = item->getVtkProperties();
 
     if (algProps == nullptr)
-        WARN("VtkAlgorithmProperties null!")
+        WARN("VtkAlgorithmProperties null!");
 
     // Retrieve algorithm properties
     if (item->compositeFilter())
diff --git a/Applications/FileIO/GMSInterface.cpp b/Applications/FileIO/GMSInterface.cpp
index 2f146742c159afce8ee01e948889481f7345e2a3..1ddb17a718db4cfb260e807ee623a18f6fad3532 100644
--- a/Applications/FileIO/GMSInterface.cpp
+++ b/Applications/FileIO/GMSInterface.cpp
@@ -18,13 +18,12 @@
 #include "GMSInterface.h"
 
 #include <fstream>
+#include <list>
 #include <logog/include/logog.hpp>
 
 #include "BaseLib/FileTools.h"
 #include "BaseLib/StringTools.h"
-
 #include "GeoLib/StationBorehole.h"
-
 #include "MeshLib/Elements/Prism.h"
 #include "MeshLib/Elements/Pyramid.h"
 #include "MeshLib/Elements/Tet.h"
diff --git a/Applications/FileIO/GMSInterface.h b/Applications/FileIO/GMSInterface.h
index 94cb79e7e1f7e6ee74f14724d9b113ec7ce66161..95279a4277c6df16fcd8a2d4a1e45087d01f7c38 100644
--- a/Applications/FileIO/GMSInterface.h
+++ b/Applications/FileIO/GMSInterface.h
@@ -17,7 +17,6 @@
 
 #pragma once
 
-#include <list>
 #include <string>
 #include <vector>
 
diff --git a/Applications/FileIO/Gmsh/GMSHInterface.h b/Applications/FileIO/Gmsh/GMSHInterface.h
index 17e3afe4ea068f0005ef0ce2ef03130ce703fdaf..bbdcb9bf8b3d630501230bcf529f505ecb186ce7 100644
--- a/Applications/FileIO/Gmsh/GMSHInterface.h
+++ b/Applications/FileIO/Gmsh/GMSHInterface.h
@@ -11,6 +11,7 @@
 #pragma once
 
 #include <iosfwd>
+#include <list>
 
 #include "BaseLib/IO/Writer.h"
 
diff --git a/Applications/FileIO/GocadIO/GocadAsciiReader.cpp b/Applications/FileIO/GocadIO/GocadAsciiReader.cpp
index eb854b46bc9774256b8a26c587144094564958c5..9a74dcff8dd0f8d0065fc55027552acf366ea787 100644
--- a/Applications/FileIO/GocadIO/GocadAsciiReader.cpp
+++ b/Applications/FileIO/GocadIO/GocadAsciiReader.cpp
@@ -650,7 +650,7 @@ bool readFile(std::string const& file_name,
         std::unique_ptr<MeshLib::Mesh> mesh(readData(in, type, mesh_name));
         if (mesh == nullptr)
         {
-            ERR("File parsing aborted...")
+            ERR("File parsing aborted...");
             return false;
         }
         meshes.push_back(std::move(mesh));
diff --git a/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp b/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp
index ec6a803d1cbf50853670f1e3b3e9b03874b6bdb8..d2d73642c0b68a904bc4929c2aa163f9b10f92c6 100644
--- a/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp
+++ b/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp
@@ -114,7 +114,7 @@ int XmlPrjInterface::readFile(const QString& fileName)
             {
                 if (!meshes_node.isElement())
                 {
-                    ERR("Expected an XML element node.")
+                    ERR("Expected an XML element node.");
                     return 0;
                 }
                 if (meshes_node.nodeName() != "mesh")
@@ -134,7 +134,7 @@ int XmlPrjInterface::readFile(const QString& fileName)
                 if (!node_text.isText())
                 {
                     ERR("Expected an XML element node named 'mesh' to contain "
-                        "text.")
+                        "text.");
                     return 0;
                 }
                 read_single_mesh(path + node_text.toText().data().trimmed());
diff --git a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp
index 97614837021fc113ed96e779a35348b19ce88b73..f86f6804872246d1d53b8b6f96d81d63668d147b 100644
--- a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp
+++ b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp
@@ -65,7 +65,7 @@ int main(int argc, char* argv[])
     if (export_lines_arg.isSet() && export_surfaces_arg.isSet())
     {
         ERR("Both the 'lines-only'-flag and 'surfaces-only'-flag are set. Only "
-            "one is allowed at a time.")
+            "one is allowed at a time.");
         return 2;
     }
 
diff --git a/Applications/Utils/MeshEdit/Vtu2Grid.cpp b/Applications/Utils/MeshEdit/Vtu2Grid.cpp
index 5e7977175300035ae763033e9920848ef163c549..37baa463bf749e79e69113d5dc8ab5cd018f89e9 100644
--- a/Applications/Utils/MeshEdit/Vtu2Grid.cpp
+++ b/Applications/Utils/MeshEdit/Vtu2Grid.cpp
@@ -184,7 +184,7 @@ int main (int argc, char* argv[])
         ((!y_arg.isSet() && z_arg.isSet())))
     {
         ERR("For equilateral cubes, only x needs to be set. For unequal "
-            "cuboids, all three edge lengths (x/y/z) need to be specified.")
+            "cuboids, all three edge lengths (x/y/z) need to be specified.");
         return -1;
     }
 
diff --git a/Applications/Utils/MeshGeoTools/createIntermediateRasters.cpp b/Applications/Utils/MeshGeoTools/createIntermediateRasters.cpp
index bf9e53eaf2630383eb22256dbdb8154893be8489..3b660c78b7fe52663a0b434e4f4d0e4012d3e6f1 100644
--- a/Applications/Utils/MeshGeoTools/createIntermediateRasters.cpp
+++ b/Applications/Utils/MeshGeoTools/createIntermediateRasters.cpp
@@ -86,7 +86,7 @@ int main(int argc, char* argv[])
     }
     if (h1.n_rows != h2.n_rows)
     {
-        ERR("Raster height is not the same in both raster files.\n")
+        ERR("Raster height is not the same in both raster files.\n");
         errors_found = true;
     }
 
diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp
index 58d3860230eb61ccef263ed3ba164294d47dfe1b..6a40ea79f668deb586cf70e2e65a161c0cb0c3d7 100644
--- a/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp
+++ b/Applications/Utils/ModelPreparation/PartitionMesh/NodeWiseMeshPartitioner.cpp
@@ -456,9 +456,9 @@ void processProperties(MeshLib::Properties const& properties,
                         });
 
     DBUG(
-        "total number of tuples define on mesh item type '%d' after "
+        "total number of tuples define on mesh item type '%s' after "
         "partitioning: %d ",
-        mesh_item_type, total_number_of_tuples);
+        toString(mesh_item_type), total_number_of_tuples);
 
     // 1 create new PV
     // 2 resize the PV with total_number_of_tuples
diff --git a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp
index 3d600256106e548806177ef95ff99d51837f45c1..319d5ff33bb16f0e3acc6e928ab20b9844b1317b 100644
--- a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp
+++ b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp
@@ -100,7 +100,7 @@ int XmlGmlInterface::readFile(const QString &fileName)
         {
             if (type_node.toElement().text().isEmpty())
             {
-                ERR("XmlGmlInterface::readFile(): <name>-tag is empty.")
+                ERR("XmlGmlInterface::readFile(): <name>-tag is empty.");
                 deleteGeometry(std::move(points), std::move(polylines),
                                std::move(surfaces));
                 return 0;
diff --git a/MeshLib/MeshGenerators/QuadraticMeshGenerator.cpp b/MeshLib/MeshGenerators/QuadraticMeshGenerator.cpp
index 9b6a3eb04f042a4e1c05d73290ff371bedb09ee0..abf437b6f8b8523128c73705423b85253b5c817c 100644
--- a/MeshLib/MeshGenerators/QuadraticMeshGenerator.cpp
+++ b/MeshLib/MeshGenerators/QuadraticMeshGenerator.cpp
@@ -8,12 +8,15 @@
 
 #include "QuadraticMeshGenerator.h"
 
+#include <set>
+
 #include "MeshLib/Elements/Element.h"
 #include "MeshLib/Elements/Hex.h"
 #include "MeshLib/Elements/Line.h"
 #include "MeshLib/Elements/Quad.h"
 #include "MeshLib/Elements/Tet.h"
 #include "MeshLib/Elements/Tri.h"
+#include "MeshLib/Mesh.h"
 #include "MeshLib/MeshEditing/DuplicateMeshComponents.h"
 #include "MeshLib/Node.h"
 
diff --git a/MeshLib/MeshGenerators/QuadraticMeshGenerator.h b/MeshLib/MeshGenerators/QuadraticMeshGenerator.h
index cb7812a5cbab33345c374a8f51a8717961202c96..e27ed62faece7698c7b9c674662f0c3cebfe7ced 100644
--- a/MeshLib/MeshGenerators/QuadraticMeshGenerator.h
+++ b/MeshLib/MeshGenerators/QuadraticMeshGenerator.h
@@ -8,11 +8,13 @@
 
 #include <memory>
 
-#include "MeshLib/Mesh.h"
-
 namespace MeshLib
 {
+class Mesh;
+}
 
+namespace MeshLib
+{
 /// create a quadratic order mesh from the linear order mesh
 std::unique_ptr<Mesh> createQuadraticOrderMesh(Mesh const& linear_mesh);
 
diff --git a/MeshLib/findElementsWithinRadius.cpp b/MeshLib/findElementsWithinRadius.cpp
index 124af9af0dd197c1dd9ca8b2b58c7368e557a3f8..3669b522cd9d0ee19a12eaaea92c13c002ab5a52 100644
--- a/MeshLib/findElementsWithinRadius.cpp
+++ b/MeshLib/findElementsWithinRadius.cpp
@@ -10,9 +10,9 @@
 
 #include "findElementsWithinRadius.h"
 
-
-#include <vector>
+#include <set>
 #include <unordered_set>
+#include <vector>
 
 #include "MathLib/MathTools.h"
 
diff --git a/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp b/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp
index 195a07ca57d68ca6c69ae814b88f08819dd50d88..e10481159f05d3ab70c75e307cb66f5a1d6e2270 100644
--- a/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp
+++ b/NumLib/ODESolver/ConvergenceCriterionPerComponentResidual.cpp
@@ -61,7 +61,7 @@ void ConvergenceCriterionPerComponentResidual::checkDeltaX(
         INFO(
             "Convergence criterion, component %u: |dx|=%.4e, |x|=%.4e, "
             "|dx|/|x|=%.4e",
-            error_dx, global_component, norm_x,
+            global_component, error_dx, norm_x,
             (norm_x == 0. ? std::numeric_limits<double>::quiet_NaN()
                           : (error_dx / norm_x)));
     }
diff --git a/ProcessLib/Output/ProcessOutput.h b/ProcessLib/Output/ProcessOutput.h
index 535956bcd696ab5e294a2b5ea4a44b2f412eaba6..1bc27f477c99e24779ead037f04798d80b7e09fb 100644
--- a/ProcessLib/Output/ProcessOutput.h
+++ b/ProcessLib/Output/ProcessOutput.h
@@ -10,8 +10,9 @@
 
 #pragma once
 
-#include "ProcessLib/ProcessVariable.h"
+#include <set>
 
+#include "ProcessLib/ProcessVariable.h"
 #include "SecondaryVariable.h"
 
 namespace ProcessLib