diff --git a/Device/Coord/CoordSystem2D.cpp b/Device/Coord/CoordSystem2D.cpp
index 3da5a3084e398555946f8f9ba2d111309b6bfe32..2720200418c27a82ad78fe83607456819d212b23 100644
--- a/Device/Coord/CoordSystem2D.cpp
+++ b/Device/Coord/CoordSystem2D.cpp
@@ -185,9 +185,8 @@ std::vector<std::map<Coords, std::string>> SphericalCoords::createNameMaps() con
 //  class ImageCoords
 //  ************************************************************************************************
 
-ImageCoords::ImageCoords(const OwningVector<IAxis>& axes,
-                         RectangularPixel* regionOfInterestPixel, const Direction& direction,
-                         double wavelength)
+ImageCoords::ImageCoords(const OwningVector<IAxis>& axes, RectangularPixel* regionOfInterestPixel,
+                         const Direction& direction, double wavelength)
     : CoordSystem2D(axes, direction, wavelength)
     , m_detector_pixel(regionOfInterestPixel)
 {
diff --git a/Device/Detector/IDetector.cpp b/Device/Detector/IDetector.cpp
index 2e2c1f9bdac896200fb2bdb4eb104ee0d151324a..edd6b3f69b0b0d83bc0e122dba2ac2abfe756fd0 100644
--- a/Device/Detector/IDetector.cpp
+++ b/Device/Detector/IDetector.cpp
@@ -140,7 +140,7 @@ size_t IDetector::detectorIndexToRegionOfInterestIndex(const size_t detectorInde
 
 void IDetector::setAnalyzer(const R3 direction, double efficiency, double total_transmission)
 {
-    if (direction.mag()>0)
+    if (direction.mag() > 0)
         m_polAnalyzer.setDirEffTra(direction, efficiency, total_transmission);
 }
 
diff --git a/Device/Detector/RectangularDetector.cpp b/Device/Detector/RectangularDetector.cpp
index 72331b2e9d5ce15668272c7ee319717d37575a5e..137d988449db8a6b622031ae696bea3969d6027e 100644
--- a/Device/Detector/RectangularDetector.cpp
+++ b/Device/Detector/RectangularDetector.cpp
@@ -273,8 +273,8 @@ void RectangularDetector::initUandV(double alpha_i)
     }
 }
 
-ICoordSystem* RectangularDetector::offspecCoords(
-    IAxis* beamAxis, const Direction& beamDirection) const
+ICoordSystem* RectangularDetector::offspecCoords(IAxis* beamAxis,
+                                                 const Direction& beamDirection) const
 {
     const auto axes = axesClippedToRegionOfInterest();
     ASSERT(axes.size() == 2);
diff --git a/Device/Detector/SphericalDetector.cpp b/Device/Detector/SphericalDetector.cpp
index 761aca48ebddc3e992d3c9cbc3bec47a7793daf0..705ba8af708fc48aa52e74840631374101a89632 100644
--- a/Device/Detector/SphericalDetector.cpp
+++ b/Device/Detector/SphericalDetector.cpp
@@ -79,8 +79,8 @@ size_t SphericalDetector::indexOfSpecular(const Beam& beam) const
     return totalSize();
 }
 
-ICoordSystem* SphericalDetector::offspecCoords(
-    IAxis* beamAxis, const Direction& beamDirection) const
+ICoordSystem* SphericalDetector::offspecCoords(IAxis* beamAxis,
+                                               const Direction& beamDirection) const
 {
     const auto axes = axesClippedToRegionOfInterest();
     ASSERT(axes.size() == 2);
diff --git a/GUI/Model/Device/Instrument.cpp b/GUI/Model/Device/Instrument.cpp
index 4dcd051de1059e20835f0e4444a663280e39dcda..35229cd6889851f9e794ab4d65e8be12375729c0 100644
--- a/GUI/Model/Device/Instrument.cpp
+++ b/GUI/Model/Device/Instrument.cpp
@@ -17,7 +17,7 @@
 #include "Device/Detector/IDetector2D.h"
 
 Instrument::Instrument(const Beam& beam, const IDetector2D& detector)
-    : m_beam(beam.clone())          // TODO take ownership of pointer arg instead of cloning
+    : m_beam(beam.clone()) // TODO take ownership of pointer arg instead of cloning
     , m_detector(detector.clone())
 {
 }
diff --git a/GUI/Model/Device/InstrumentItems.cpp b/GUI/Model/Device/InstrumentItems.cpp
index b61556352b51186b982f329d428683abff577d7a..88099968855aed989b97637f94f1a91536a000bf 100644
--- a/GUI/Model/Device/InstrumentItems.cpp
+++ b/GUI/Model/Device/InstrumentItems.cpp
@@ -20,7 +20,6 @@
 #include "Device/Coord/CoordSystem2D.h"
 #include "Device/Detector/RectangularDetector.h"
 #include "Device/Detector/SphericalDetector.h"
-#include "GUI/Model/Device/Instrument.h"
 #include "GUI/Model/CatDevice/BackgroundItemCatalog.h"
 #include "GUI/Model/CatDevice/DetectorItemCatalog.h"
 #include "GUI/Model/CatDevice/InstrumentItemCatalog.h"
@@ -28,6 +27,7 @@
 #include "GUI/Model/Device/BackgroundItems.h"
 #include "GUI/Model/Device/BeamWavelengthItem.h"
 #include "GUI/Model/Device/DetectorItems.h"
+#include "GUI/Model/Device/Instrument.h"
 #include "GUI/Model/Device/PointwiseAxisItem.h"
 #include "GUI/Model/Device/RectangularDetectorItem.h"
 #include "GUI/Model/Device/SphericalDetectorItem.h"
@@ -227,12 +227,12 @@ ICoordSystem* SpecularInstrumentItem::createCoordSystem() const
         if (!pointwise_axis->axis()) // workaround for loading project
             return nullptr;
         Coords native_units = GUI::Util::CoordName::coordFromName(pointwise_axis->getUnitsLabel());
-        return new AngularReflectometryCoordinates(beam->wavelength(),
-                                                   *pointwise_axis->axis(), native_units);
+        return new AngularReflectometryCoordinates(beam->wavelength(), *pointwise_axis->axis(),
+                                                   native_units);
     }
 
-    return new AngularReflectometryCoordinates(beam->wavelength(),
-                                               *axis_item->createAxis(1.0), Coords::DEGREES);
+    return new AngularReflectometryCoordinates(beam->wavelength(), *axis_item->createAxis(1.0),
+                                               Coords::DEGREES);
 }
 
 QString SpecularInstrumentItem::instrumentType() const
@@ -366,8 +366,7 @@ std::unique_ptr<Instrument> Instrument2DItem::createInstrument() const
     // TODO: Why not check "if (withPolarizerAnalyzer())"? But if it is inserted, some of the unit
     // tests fail (because in the unit tests this flag is never set to true)
     // The Unit test are e.g. TestGuiStd/Std/MagneticCylinders
-    detector->setAnalyzer(
-            m_analyzerDirection, m_analyzerEfficiency, m_analyzerTotalTransmission);
+    detector->setAnalyzer(m_analyzerDirection, m_analyzerEfficiency, m_analyzerTotalTransmission);
 
     std::unique_ptr<Instrument> instrument(new Instrument(*beam, *detector));
 
@@ -465,9 +464,9 @@ QString OffSpecularInstrumentItem::instrumentType() const
 
 ICoordSystem* OffSpecularInstrumentItem::createCoordSystem() const
 {
-    IAxis* alphaAxis = new FixedBinAxis("alpha", m_alphaAxis.nbins(),
-                                        m_alphaAxis.min() * Units::deg,
-                                        m_alphaAxis.max() * Units::deg);
+    IAxis* alphaAxis =
+        new FixedBinAxis("alpha", m_alphaAxis.nbins(), m_alphaAxis.min() * Units::deg,
+                         m_alphaAxis.max() * Units::deg);
     const auto instrument = createInstrument();
     return instrument->detector().offspecCoords(alphaAxis, instrument->beam().direction());
 }
diff --git a/GUI/Model/Model/JobFunctions.cpp b/GUI/Model/Model/JobFunctions.cpp
index 211f69187834438d61a9758f250af8c3451c0275..5a6b41659bd8ec9dbd84ef457e2ca7b4f3f509d6 100644
--- a/GUI/Model/Model/JobFunctions.cpp
+++ b/GUI/Model/Model/JobFunctions.cpp
@@ -15,13 +15,13 @@
 #include "GUI/Model/Model/JobFunctions.h"
 #include "Base/Util/Assert.h"
 #include "Device/Detector/IDetector2D.h"
-#include "GUI/Model/Device/Instrument.h"
 #include "GUI/Model/Data/Data1DViewItem.h"
 #include "GUI/Model/Data/DataPropertyContainer.h"
 #include "GUI/Model/Data/IntensityDataItem.h"
 #include "GUI/Model/Data/JobItemUtils.h"
 #include "GUI/Model/Data/RealDataItem.h"
 #include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Device/Instrument.h"
 #include "GUI/Model/Device/InstrumentItems.h"
 #include "GUI/Model/Device/PointwiseAxisItem.h"
 #include "GUI/Model/Job/FitSuiteItem.h"
diff --git a/GUI/Model/To/DomainSimulationBuilder.cpp b/GUI/Model/To/DomainSimulationBuilder.cpp
index db786957dbf830a0b3a2989b02b9d8dc5ed516de..2ba0d96ffadc08bc55c4db87e2979d9f0efb1753 100644
--- a/GUI/Model/To/DomainSimulationBuilder.cpp
+++ b/GUI/Model/To/DomainSimulationBuilder.cpp
@@ -17,12 +17,12 @@
 #include "Base/Util/Assert.h"
 #include "Device/Beam/Beam.h"
 #include "Device/Beam/IFootprintFactor.h"
-#include "GUI/Model/Device/Instrument.h"
 #include "GUI/Model/Device/AxesItems.h"
 #include "GUI/Model/Device/BackgroundItems.h"
 #include "GUI/Model/Device/BeamAngleItems.h"
 #include "GUI/Model/Device/BeamWavelengthItem.h"
 #include "GUI/Model/Device/FootprintItems.h"
+#include "GUI/Model/Device/Instrument.h"
 #include "GUI/Model/Device/InstrumentItems.h"
 #include "GUI/Model/Sample/MultiLayerItem.h"
 #include "GUI/Model/To/ToDomain.h"
diff --git a/GUI/View/FromDomain/FromDomain.cpp b/GUI/View/FromDomain/FromDomain.cpp
index 1c774142e4afadf3402007ca32ac9e4609e4e24b..f7d451c7757dfec78f2f14825110fb2c151dd329 100644
--- a/GUI/View/FromDomain/FromDomain.cpp
+++ b/GUI/View/FromDomain/FromDomain.cpp
@@ -492,7 +492,7 @@ void GUI::Transform::FromDomain::setSpecularBeamItem(SpecularBeamItem* beam_item
 }
 
 void GUI::Transform::FromDomain::updateDetector(Instrument2DItem* instrument_item,
-                                             const ISimulation2D& simulation)
+                                                const ISimulation2D& simulation)
 {
     const IDetector& detector = simulation.detector();
     setDetectorGeometry(instrument_item, detector);
diff --git a/Sim/Fitting/SimDataPair.cpp b/Sim/Fitting/SimDataPair.cpp
index a0eb75d851c6405c4e9a78c383ce09ff543dadb5..531e783a413fd97db3288999fda09e9412d2a962 100644
--- a/Sim/Fitting/SimDataPair.cpp
+++ b/Sim/Fitting/SimDataPair.cpp
@@ -151,7 +151,6 @@ void SimDataPair::execSimulation(const mumufit::Parameters& params)
         auto dummy_array = std::make_unique<Powerfield<double>>(converter.defaultAxes());
         m_uncertainties = SimulationResult(*dummy_array, converter);
     }
-
 }
 
 bool SimDataPair::containsUncertainties() const
diff --git a/Sim/Simulation/ISimulation.cpp b/Sim/Simulation/ISimulation.cpp
index b1b0e630c3a81999bf4746e670ed21ce0548985d..aa171fce490e0f94fa16c4ce2746facceb71954d 100644
--- a/Sim/Simulation/ISimulation.cpp
+++ b/Sim/Simulation/ISimulation.cpp
@@ -18,8 +18,8 @@
 #include "Base/Util/StringUtils.h"
 #include "Device/Beam/Beam.h"
 #include "Device/Detector/IDetector.h"
-#include "Device/Histo/SimulationResult.h"
 #include "Device/Detector/SphericalDetector.h"
+#include "Device/Histo/SimulationResult.h"
 #include "Resample/Options/SimulationOptions.h"
 #include "Resample/Processed/ReSample.h"
 #include "Sample/Multilayer/MultiLayer.h"
diff --git a/Sim/Simulation/ISimulation.h b/Sim/Simulation/ISimulation.h
index 87823cf2e7d263aa2598da7823ad8db1b6baa927..582309d26141bd5d6940c7119ebf84cae9c65640 100644
--- a/Sim/Simulation/ISimulation.h
+++ b/Sim/Simulation/ISimulation.h
@@ -15,8 +15,8 @@
 #ifndef BORNAGAIN_SIM_SIMULATION_ISIMULATION_H
 #define BORNAGAIN_SIM_SIMULATION_ISIMULATION_H
 
-#include "Param/Node/INode.h"
 #include "Param/Distrib/DistributionHandler.h"
+#include "Param/Node/INode.h"
 
 template <class T>
 class Powerfield;
diff --git a/Sim/Simulation/SpecularSimulation.cpp b/Sim/Simulation/SpecularSimulation.cpp
index 5fa3af3cec91835e1311d4c2e1f5462313dd7134..076952cfeea398278e2cbfa6ee6794203beb678d 100644
--- a/Sim/Simulation/SpecularSimulation.cpp
+++ b/Sim/Simulation/SpecularSimulation.cpp
@@ -54,7 +54,6 @@ std::unique_ptr<AlphaScan> mangledScan(const AlphaScan& scan, const Beam& beam)
 SpecularSimulation::SpecularSimulation()
 {
     m_detector.reset(new SpecularDetector1D);
-
 }
 
 SpecularSimulation::~SpecularSimulation() = default;
diff --git a/Tests/Functional/Suite/MakeSimulations.cpp b/Tests/Functional/Suite/MakeSimulations.cpp
index f793bb860bbd5619343c89587835852d64868f78..3222c21f8a33cc67ccade05462558a90efbb9bfb 100644
--- a/Tests/Functional/Suite/MakeSimulations.cpp
+++ b/Tests/Functional/Suite/MakeSimulations.cpp
@@ -316,7 +316,7 @@ test::makeSimulation::ExtraLongWavelengthGISAS(const MultiLayer& sample)
 //! Beam intensity set to provide reasonably large values in detector channels.
 std::unique_ptr<ScatteringSimulation> test::makeSimulation::MiniGISASFit(const MultiLayer& sample)
 {
-    Beam beam(1e6, 1*angstrom, Direction(0.2 * deg, 0));
+    Beam beam(1e6, 1 * angstrom, Direction(0.2 * deg, 0));
     SphericalDetector detector(25, -2 * deg, 2 * deg, 25, 0, 2 * deg);
     return std::make_unique<ScatteringSimulation>(beam, sample, detector);
 }
diff --git a/Tests/Unit/Device/DepthProbeConverterTest.cpp b/Tests/Unit/Device/DepthProbeConverterTest.cpp
index 71305888b569464f177fa443052669cd2d30c43d..5b30a96227441ebb95c96c99bd7dc792254e691a 100644
--- a/Tests/Unit/Device/DepthProbeConverterTest.cpp
+++ b/Tests/Unit/Device/DepthProbeConverterTest.cpp
@@ -24,7 +24,7 @@ protected:
 DepthProbeCoordinatesTest::DepthProbeCoordinatesTest()
     : m_beam(Beam::horizontalBeam())
     , m_axes({new FixedBinAxis("Angles", m_nbins, m_alpha_start, m_alpha_end), // angles in radians
-            new FixedBinAxis("Positions", m_nbins, m_z_start, m_z_end) })         // z positions in nm
+              new FixedBinAxis("Positions", m_nbins, m_z_start, m_z_end)})     // z positions in nm
 {
 }
 
diff --git a/Tests/Unit/Device/RectangularConverterTest.cpp b/Tests/Unit/Device/RectangularConverterTest.cpp
index 694c81097642ddff8726a41a6fc2a2ee9fd22bfe..2f788e93e4dfa9eaa4f42599c00e2d4ef4969006 100644
--- a/Tests/Unit/Device/RectangularConverterTest.cpp
+++ b/Tests/Unit/Device/RectangularConverterTest.cpp
@@ -47,8 +47,8 @@ RectangularConverterTest::RectangularConverterTest()
 TEST_F(RectangularConverterTest, ImageCoords)
 {
     ImageCoords converter(m_detector.axesClippedToRegionOfInterest(),
-                          m_detector.regionOfInterestPixel(),
-                          m_beam.direction(), m_beam.wavelength());
+                          m_detector.regionOfInterestPixel(), m_beam.direction(),
+                          m_beam.wavelength());
 
     EXPECT_EQ(converter.rank(), 2u);
 
@@ -107,8 +107,8 @@ TEST_F(RectangularConverterTest, ImageCoords)
 TEST_F(RectangularConverterTest, ImageCoordsClone)
 {
     ImageCoords converter(m_detector.axesClippedToRegionOfInterest(),
-                          m_detector.regionOfInterestPixel(),
-                          m_beam.direction(), m_beam.wavelength());
+                          m_detector.regionOfInterestPixel(), m_beam.direction(),
+                          m_beam.wavelength());
     std::unique_ptr<ImageCoords> P_clone(converter.clone());
 
     EXPECT_EQ(P_clone->rank(), 2u);
@@ -160,8 +160,8 @@ TEST_F(RectangularConverterTest, ImageCoordsWithROI)
 
     m_detector.setRegionOfInterest(roi_xmin, roi_ymin, roi_xmax, roi_ymax);
     ImageCoords converter(m_detector.axesClippedToRegionOfInterest(),
-                          m_detector.regionOfInterestPixel(),
-                          m_beam.direction(), m_beam.wavelength());
+                          m_detector.regionOfInterestPixel(), m_beam.direction(),
+                          m_beam.wavelength());
 
     EXPECT_EQ(converter.calculateMin(0, Coords::UNDEFINED), 100);
     EXPECT_EQ(converter.calculateMax(0, Coords::UNDEFINED), 152);