From 17f84e600f43bfdb140bff54a957ef794cfed452 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Thu, 2 Dec 2021 09:14:27 +0100
Subject: [PATCH] autoformat: blank lines in namespaces, no braces around
 one-liners, ...

---
 App/AppOptions.cpp                            |  1 +
 Base/Axis/ConstKBinAxis.cpp                   |  6 +--
 Base/Axis/CustomBinAxis.cpp                   |  6 +--
 Base/Element/IElement.h                       |  1 +
 Base/Math/Bessel.h                            |  1 +
 Base/Math/Precomputed.h                       |  1 +
 Base/Py/PyUtils.cpp                           |  2 -
 Core/Computation/SpecularComputation.cpp      |  1 -
 Core/Contrib/RoughMultiLayerContribution.cpp  |  2 +
 Core/Export/PyFmt2.cpp                        | 10 ++---
 Core/Export/PyFmtLimits.cpp                   | 11 +++--
 Core/Export/PyFmtLimits.h                     |  2 +
 Core/Export/SampleToPython.cpp                |  9 +----
 Core/Fitting/FitObjective.h                   |  2 +
 Core/Fitting/FitStatus.h                      |  1 +
 Core/Fitting/FitTypes.h                       |  1 +
 Core/Fitting/ObjectiveMetric.cpp              |  2 +
 Core/Fitting/ObjectiveMetricUtils.cpp         |  2 +
 Core/Fitting/SimDataPair.cpp                  |  4 +-
 Core/Scan/AlphaScan.cpp                       |  1 +
 Core/Scan/ScanResolution.cpp                  |  4 ++
 Core/Simulation/ISimulation.cpp               |  6 +--
 Device/Beam/Beam.cpp                          |  7 ++--
 Device/Coord/AxisNames.h                      |  2 +
 Device/Coord/ICoordSystem.cpp                 |  1 -
 Device/Data/LLData.h                          |  5 +--
 Device/Data/OutputData.cpp                    |  1 -
 Device/Detector/RectangularDetector.cpp       | 11 +++--
 Device/Histo/Histogram2D.cpp                  |  8 +---
 Device/Histo/IHistogram.cpp                   |  9 ++---
 Device/Histo/IntensityDataIOFactory.cpp       |  1 -
 Device/InputOutput/DataFormatUtils.cpp        |  7 ++--
 Device/InputOutput/DataFormatUtils.h          |  2 +
 Device/InputOutput/OutputDataReadWriteNicos.h |  1 -
 .../ConvolutionDetectorResolution.cpp         |  3 +-
 Device/Resolution/Convolve.cpp                |  3 +-
 Fit/Adapter/GSLLevenbergMarquardtMinimizer.h  |  1 +
 Fit/Adapter/GSLMultiMinimizer.h               |  1 +
 Fit/Adapter/GeneticMinimizer.cpp              |  1 +
 Fit/Adapter/GeneticMinimizer.h                |  1 +
 Fit/Adapter/MinimizerAdapter.cpp              | 11 ++---
 Fit/Adapter/MinimizerAdapter.h                |  3 ++
 Fit/Adapter/Minuit2Minimizer.h                |  1 +
 Fit/Adapter/ResidualFunctionAdapter.cpp       |  5 ++-
 Fit/Adapter/ResidualFunctionAdapter.h         |  2 +-
 Fit/Adapter/ScalarFunctionAdapter.h           |  2 +-
 Fit/Adapter/SimAnMinimizer.h                  |  1 +
 Fit/Kernel/Kernel.cpp                         |  2 +
 Fit/Kernel/Minimizer.cpp                      |  1 -
 Fit/Kernel/MinimizerFactory.cpp               | 19 +++++----
 Fit/Minimizer/IMinimizer.h                    |  1 +
 Fit/Minimizer/MinimizerOptions.cpp            |  4 +-
 Fit/Minimizer/MinimizerResult.cpp             |  1 -
 Fit/Minimizer/Types.h                         |  1 +
 Fit/Param/Parameter.cpp                       |  2 +
 Fit/Test/Functional/ClassicalTestFunctions.h  |  2 +
 Fit/Test/Functional/PlanCases.cpp             |  1 +
 Fit/TestEngine/MinimizerTestPlan.h            |  2 +
 GUI/Application/ApplicationSettings.cpp       |  2 +
 GUI/Model/Data/Data1DViewItem.cpp             |  3 +-
 GUI/Model/Data/DataItemUtils.cpp              |  2 +
 GUI/Model/Data/DataProperties.cpp             |  4 ++
 GUI/Model/Data/DataViewUtils.h                |  2 +
 GUI/Model/Data/ImportDataInfo.cpp             |  2 +
 GUI/Model/Data/IntensityDataItem.cpp          |  2 +
 GUI/Model/Data/MaskUnitsConverter.cpp         |  1 +
 GUI/Model/Data/PointwiseAxisItem.h            |  1 -
 GUI/Model/Data/RealDataItem.h                 |  1 -
 GUI/Model/Fit/FitParameterContainerItem.h     |  1 +
 GUI/Model/Fit/FitParameterHelper.cpp          |  6 +--
 GUI/Model/Fit/FitParameterItem.cpp            |  5 +--
 GUI/Model/Fit/FitParameterProxyModel.cpp      | 25 +++++-------
 GUI/Model/Fit/ParameterTreeItems.cpp          |  5 ++-
 GUI/Model/From/FromDomain.cpp                 | 14 ++-----
 GUI/Model/From/GUIDomainSampleVisitor.cpp     |  1 +
 GUI/Model/From/GUIExamplesFactory.cpp         |  1 -
 GUI/Model/Group/DistributionItems.cpp         |  9 +++--
 GUI/Model/Group/DistributionItems.h           |  1 -
 GUI/Model/Group/FilterPropertyProxy.h         |  1 +
 GUI/Model/Group/ItemFactory.h                 |  1 -
 GUI/Model/Group/PropertyItem.h                |  1 -
 .../IO/AbstractDataLoaderResultModel.cpp      |  1 +
 GUI/Model/Instrument/BackgroundItems.cpp      |  1 +
 GUI/Model/Instrument/BeamDistributionItem.cpp |  3 +-
 GUI/Model/Instrument/BeamItems.cpp            |  3 ++
 GUI/Model/Instrument/BeamItems.h              |  1 -
 GUI/Model/Instrument/BeamWavelengthItem.cpp   |  1 +
 GUI/Model/Instrument/DetectorItems.cpp        |  1 +
 GUI/Model/Instrument/ItemWithDistribution.h   |  1 -
 .../Instrument/RectangularDetectorItem.cpp    | 12 +++---
 .../Instrument/ResolutionFunctionItems.h      |  2 -
 .../SpecularBeamInclinationItem.cpp           |  3 ++
 GUI/Model/Job/JobItem.cpp                     |  2 +
 GUI/Model/Job/JobItem.h                       |  1 -
 GUI/Model/Job/JobModel.h                      |  1 +
 GUI/Model/Job/JobQueueData.cpp                |  4 +-
 GUI/Model/Job/JobWorker.cpp                   |  1 -
 GUI/Model/Job/ParameterTreeUtils.cpp          |  2 +-
 GUI/Model/Material/MaterialItem.cpp           |  4 ++
 GUI/Model/Project/OutputDataIOService.cpp     |  5 ++-
 GUI/Model/Project/ProjectDocument.cpp         |  1 -
 GUI/Model/Sample/InterferenceItems.cpp        |  7 +---
 GUI/Model/Sample/ItemWithParticles.cpp        |  2 +
 GUI/Model/Sample/Lattice2DItems.cpp           |  1 +
 GUI/Model/Sample/Lattice2DItems.h             |  1 +
 GUI/Model/Sample/LayerRoughnessItems.cpp      |  1 +
 GUI/Model/Sample/MesoCrystalItem.cpp          |  1 +
 GUI/Model/Sample/MultiLayerItem.cpp           |  4 +-
 GUI/Model/Sample/ParticleCompositionItem.cpp  | 12 ++----
 GUI/Model/Sample/ParticleCoreShellItem.cpp    |  1 +
 GUI/Model/Sample/ParticleLayoutItem.cpp       |  1 +
 GUI/Model/Sample/SampleModel.cpp              |  1 -
 GUI/Model/Sample/SampleValidator.cpp          | 12 +++---
 GUI/Model/Session/ModelMapper.cpp             |  9 ++---
 GUI/Model/Session/RealLimitsItems.cpp         |  2 +
 GUI/Model/Session/SessionModel.cpp            |  7 ++--
 GUI/Model/Session/SessionXML.cpp              | 14 +++----
 GUI/Model/Session/SimulationOptionsItem.cpp   |  4 ++
 GUI/Model/To/DomainSimulationBuilder.cpp      |  1 -
 GUI/Model/To/DomainSimulationBuilder.h        |  1 +
 GUI/Model/To/ToDomain.cpp                     |  1 -
 GUI/Model/Types/DoubleDescriptor.h            |  1 -
 GUI/Util/ComboProperty.cpp                    |  2 +
 GUI/View/Common/DocksController.cpp           | 10 ++---
 GUI/View/Common/InfoPanel.cpp                 |  3 +-
 GUI/View/Common/InfoPanelToolBar.cpp          |  2 +
 GUI/View/Common/ScientificSpinBox.cpp         |  4 ++
 GUI/View/Compare/FitComparisonController.cpp  |  2 +
 GUI/View/Compare/PropertyRepeater.cpp         |  6 +--
 GUI/View/Fit/FitActivityPanel.cpp             |  1 -
 GUI/View/Fit/FitObjectiveBuilder.h            |  1 +
 GUI/View/Fit/FitParameterWidget.cpp           | 13 +++---
 GUI/View/Fit/FitSessionController.cpp         |  5 +--
 GUI/View/Fit/JobRealTimeWidget.cpp            |  1 +
 GUI/View/Fit/ParameterTuningDelegate.cpp      | 25 +++++-------
 GUI/View/Fit/ParameterTuningWidget.cpp        |  4 +-
 GUI/View/Fit/RunFitControlWidget.cpp          |  2 +
 GUI/View/Fit/SliderSettingsWidget.cpp         | 11 +++--
 GUI/View/Import/ImportDataView.cpp            |  1 +
 GUI/View/Import/SpecularDataImportWidget.cpp  |  9 +----
 GUI/View/Import/SpecularDataImportWidget.h    |  1 +
 GUI/View/Info/CautionSign.cpp                 |  4 +-
 GUI/View/Info/DetailedMessageBox.cpp          |  1 +
 GUI/View/Info/OverlayLabelController.cpp      |  1 -
 GUI/View/Info/ProjectLoadProblemDialog.cpp    |  1 +
 GUI/View/Info/PythonSyntaxHighlighter.cpp     |  3 +-
 GUI/View/Instrument/Detail/detailsbutton.cpp  |  2 +
 GUI/View/Instrument/Detail/detailswidget.cpp  |  2 +
 .../Instrument/DetectorAlignmentEditor.cpp    |  2 -
 GUI/View/Instrument/DetectorAlignmentEditor.h |  1 -
 GUI/View/Instrument/DetectorEditor.cpp        |  1 -
 GUI/View/Instrument/DistributionForms.cpp     |  3 ++
 GUI/View/Instrument/DistributionPlot.cpp      |  3 +-
 .../Instrument/EditDistributionDialog.cpp     |  1 -
 GUI/View/Instrument/EnvironmentEditor.cpp     |  1 -
 .../Instrument/FootprintCorrectionEditor.cpp  |  2 -
 GUI/View/Instrument/GISASBeamEditor.cpp       |  1 -
 GUI/View/Instrument/InclinationAnglesEditor.h |  1 -
 GUI/View/Instrument/InstrumentLibraryEditor.h |  1 +
 GUI/View/Instrument/OffSpecularBeamEditor.cpp |  1 -
 .../Instrument/PolarizationAnalysisEditor.cpp |  8 +---
 .../Instrument/RectangularDetectorEditor.cpp  |  1 -
 .../Instrument/ResolutionFunctionEditor.h     |  1 -
 GUI/View/Instrument/SphericalAxisEditor.cpp   |  1 -
 GUI/View/Instrument/SphericalAxisEditor.h     |  2 -
 .../Instrument/SphericalDetectorEditor.cpp    |  1 -
 GUI/View/Intensity/ColorMap.cpp               |  4 +-
 GUI/View/Intensity/ColorMapUtils.cpp          |  4 +-
 GUI/View/Intensity/FontScalingEvent.cpp       | 12 +++---
 GUI/View/Intensity/Plot1D.cpp                 |  5 ++-
 GUI/View/Intensity/SavePlotAssistant.h        |  1 +
 GUI/View/Intensity/StatusLabel.cpp            |  2 +
 GUI/View/Job/JobListView.cpp                  |  2 +
 GUI/View/Job/JobListViewDelegate.cpp          |  4 +-
 GUI/View/Job/JobPropertiesTableModel.cpp      |  4 ++
 GUI/View/Job/JobPropertiesWidget.cpp          |  1 +
 GUI/View/Job/JobViewActivities.cpp            |  1 +
 GUI/View/Loaders/QREDataLoader.cpp            |  6 +--
 GUI/View/Loaders/QREDataLoaderProperties.cpp  |  1 -
 GUI/View/Loaders/QREDataLoaderProperties.h    |  1 +
 GUI/View/Main/AutosaveController.cpp          |  1 +
 GUI/View/Main/MainWindow.cpp                  |  1 -
 GUI/View/Main/NewProjectDialog.cpp            |  4 +-
 GUI/View/Main/ProjectManager.cpp              |  4 +-
 GUI/View/Main/PyImportAssistant.cpp           |  9 +----
 GUI/View/Mask/ColorMapSceneAdaptor.h          |  1 +
 GUI/View/Mask/EllipseView.cpp                 |  3 --
 GUI/View/Mask/IShape2DView.cpp                |  6 ++-
 GUI/View/Mask/LineViews.cpp                   |  2 +
 GUI/View/Mask/MaskEditorActions.cpp           |  3 +-
 GUI/View/Mask/MaskEditorToolBar.cpp           |  4 +-
 GUI/View/Mask/MaskGraphicsProxy.cpp           |  5 +--
 GUI/View/Mask/MaskGraphicsScene.cpp           | 17 ++++----
 GUI/View/Mask/MaskGraphicsView.cpp            |  5 ++-
 GUI/View/Mask/MaskViewFactory.cpp             | 40 +++++++++----------
 GUI/View/Mask/PolygonPointView.cpp            |  3 +-
 GUI/View/Mask/PolygonView.cpp                 |  2 +-
 GUI/View/Mask/RectangleBaseView.cpp           |  4 +-
 GUI/View/Mask/RectangleView.cpp               |  5 ---
 GUI/View/Mask/SizeHandleElement.cpp           | 36 ++++++++---------
 .../MaterialEditor/MaterialEditorDialog.h     |  1 +
 GUI/View/MaterialEditor/MaterialEditorModel.h |  1 -
 .../Projection/ProjectionsEditorCanvas.cpp    |  1 +
 GUI/View/Projection/ProjectionsPlot.cpp       |  1 +
 GUI/View/Projection/ProjectionsToolBar.cpp    |  5 ++-
 GUI/View/Projection/ProjectionsWidget.cpp     |  2 +
 .../Projection/SaveProjectionsAssistant.cpp   |  1 +
 GUI/View/PropertyEditor/CustomEditors.cpp     |  1 +
 .../PropertyEditor/CustomEventFilters.cpp     |  6 +--
 GUI/View/PropertyEditor/GroupInfoBox.cpp      |  2 +
 GUI/View/Realspace/IPositionBuilder.cpp       |  6 ++-
 GUI/View/Realspace/Particle3DContainer.h      |  2 +
 .../Realspace/RealSpace2DParacrystalUtils.cpp |  4 +-
 .../Realspace/RealSpace2DParacrystalUtils.h   |  1 -
 GUI/View/Realspace/RealSpaceBuilder.cpp       |  1 -
 GUI/View/Realspace/RealSpaceBuilder.h         |  1 +
 GUI/View/Realspace/RealSpaceBuilderUtils.cpp  |  3 +-
 GUI/View/Realspace/RealSpaceBuilderUtils.h    |  3 ++
 GUI/View/Realspace/RealSpaceCanvas.cpp        |  1 -
 GUI/View/Realspace/RealSpaceCanvas.h          |  2 +
 .../Realspace/RealSpaceMesoCrystalUtils.cpp   |  2 +
 GUI/View/Realspace/TransformTo3D.cpp          |  3 ++
 .../LatticeTypeSelectionForm.cpp              |  6 +--
 GUI/View/SampleDesigner/LayerEditorUtils.cpp  |  2 +-
 GUI/View/SampleDesigner/MultiLayerForm.cpp    |  5 +--
 GUI/View/SampleDesigner/ScriptPanel.cpp       |  2 +-
 GUI/View/SampleDesigner/WidgetMoverButton.cpp |  5 +--
 GUI/View/Script/PythonScriptWidget.cpp        |  1 -
 GUI/View/SpecularData/SpecularPlot.cpp        |  5 ++-
 GUI/View/Tool/DesignerHelper.cpp              |  1 +
 GUI/View/Tool/ItemDelegateForHTML.cpp         |  3 +-
 GUI/View/Toplevel/ProjectSettingsView.h       |  1 +
 GUI/View/Toplevel/SessionModelView.cpp        |  1 +
 GUI/View/Toplevel/SimulationView.h            |  1 +
 GUI/View/Toplevel/WelcomeView.h               |  1 +
 GUI/ba3d/mesh/box.cpp                         |  1 +
 GUI/ba3d/model/geometry.cpp                   |  2 +
 GUI/ba3d/model/geometry_inc.cpp               |  1 +
 GUI/ba3d/model/layer.cpp                      |  1 +
 GUI/ba3d/model/object.cpp                     |  4 ++
 GUI/ba3d/model/particles.cpp                  |  1 +
 GUI/ba3d/view/buffer.cpp                      |  2 +
 GUI/ba3d/view/camera.h                        |  1 -
 GUI/ba3d/view/canvas.cpp                      |  4 +-
 GUI/ba3d/widget.cpp                           |  2 +
 Param/Distrib/Distributions.cpp               |  5 ++-
 Param/Node/INode.cpp                          |  1 -
 Resample/Slice/SliceStack.h                   |  1 +
 Resample/Specular/ComputeFluxMagnetic.h       |  1 +
 Resample/Specular/TransitionMagneticNevot.h   |  1 -
 Resample/Specular/TransitionMagneticTanh.h    |  1 -
 Resample/Swig/MultiLayerFuncs.cpp             |  3 +-
 Sample/Aggregate/Interference1DLattice.cpp    |  2 +
 Sample/Aggregate/Interference2DLattice.cpp    |  2 +
 .../InterferenceRadialParaCrystal.cpp         |  8 ++--
 Sample/Correlations/IPeakShape.cpp            |  6 +--
 Sample/HardParticle/IFormFactorPolyhedron.h   |  1 +
 Sample/Material/MaterialBySLDImpl.cpp         |  2 +
 Sample/Material/MaterialUtils.cpp             |  2 +
 Sample/Multilayer/PyImport.h                  |  1 +
 Sample/Particle/Particle.cpp                  |  3 +-
 .../StandardSamples/BoxCompositionBuilder.h   | 10 +++++
 .../BoxesSquareLatticeBuilder.h               |  2 +
 .../CoreShellParticleBuilder.h                |  4 ++
 .../CustomMorphologyBuilder.cpp               |  1 -
 .../StandardSamples/CustomMorphologyBuilder.h |  2 +
 .../CylindersAndPrismsBuilder.h               |  2 +
 Sample/StandardSamples/CylindersBuilder.h     |  8 ++++
 Sample/StandardSamples/FeNiBilayerBuilder.h   | 12 ++++++
 .../HomogeneousMultilayerBuilder.h            |  2 +
 Sample/StandardSamples/LatticeBuilder.h       |  2 +
 .../LayersWithAbsorptionBuilder.h             |  2 +
 .../LayersWithAbsorptionBySLDBuilder.h        |  2 +
 .../StandardSamples/MagneticLayersBuilder.h   | 10 +++++
 .../MagneticParticlesBuilder.h                |  6 +++
 Sample/StandardSamples/MesoCrystalBuilder.h   |  2 +
 .../MultiLayerWithNCRoughnessBuilder.h        |  2 +
 .../MultiLayerWithRoughnessBuilder.h          |  2 +
 .../StandardSamples/MultipleLayoutBuilder.h   |  2 +
 Sample/StandardSamples/ParaCrystalBuilder.h   |  8 ++++
 .../ParticleCompositionBuilder.h              |  2 +
 .../ParticleDistributionsBuilder.h            | 12 ++++++
 .../StandardSamples/ParticleInVacuumBuilder.h |  2 +
 Sample/StandardSamples/PercusYevickBuilder.h  |  2 +
 .../PlainMultiLayerBySLDBuilder.h             |  2 +
 Sample/StandardSamples/ResonatorBuilder.h     |  2 +
 Sample/StandardSamples/RipplesBuilder.h       |  6 +++
 .../StandardSamples/RotatedPyramidsBuilder.h  |  2 +
 .../SizeDistributionModelsBuilder.h           |  8 ++++
 .../SlicedCompositionBuilder.h                |  2 +
 .../SlicedCylindersBuilder.cpp                |  2 +
 .../StandardSamples/SlicedCylindersBuilder.h  |  6 +++
 .../ThickAbsorptiveSampleBuilder.h            |  2 +
 .../StandardSamples/TransformationsBuilder.h  |  2 +
 Sample/StandardSamples/TwoDimLatticeBuilder.h | 12 ++++++
 .../Core/CoreSpecial/CoreIOPathTest.cpp       |  1 +
 Tests/SingleUse/ff-tetrahedron.cpp            |  1 +
 Tests/Unit/Core/RectangularDetectorTest.cpp   |  3 +-
 Tests/Unit/Device/ConstKBinAxisTest.cpp       |  6 +--
 Tests/Unit/Device/DetectorMaskTest.cpp        | 23 +++++------
 Tests/Unit/Device/Histogram1DTest.cpp         | 39 ++++++------------
 Tests/Unit/Device/Histogram2DTest.cpp         | 30 +++++---------
 Tests/Unit/Device/LLDataTest.cpp              |  5 ---
 .../Unit/Device/RectangularConverterTest.cpp  |  2 +
 Tests/Unit/Device/SphericalDetectorTest.cpp   | 15 +++----
 Tests/Unit/Device/VariableBinAxisTest.cpp     |  3 +-
 Tests/Unit/GUI/TestDataItemViews.cpp          |  1 -
 Tests/Unit/GUI/TestProjectUtils.cpp           |  1 +
 Tests/Unit/GUI/TestPropertyRepeater.cpp       |  1 +
 .../GUI/TestSessionItemControllerHelper.h     |  1 +
 Tests/Unit/GUI/TestSessionXML.cpp             |  2 +
 Tests/Unit/GUI/Utils.cpp                      |  2 +
 Tests/Unit/Numeric/BisectFF.cpp               |  1 +
 Tests/Unit/Param/INodeTest.cpp                |  2 +
 Tests/Unit/Resample/LayerFillLimitsTest.cpp   |  1 -
 Tests/Unit/Sample/MultiLayerTest.cpp          |  6 +--
 ff/PolyhedralComponents.cpp                   |  7 ++--
 317 files changed, 685 insertions(+), 535 deletions(-)

diff --git a/App/AppOptions.cpp b/App/AppOptions.cpp
index f93814bf74d..d7254a7b5a8 100644
--- a/App/AppOptions.cpp
+++ b/App/AppOptions.cpp
@@ -22,6 +22,7 @@
 #include <iostream>
 
 namespace {
+
 const char* geometry = "geometry";
 const char* nohighdpi = "nohighdpi";
 
diff --git a/Base/Axis/ConstKBinAxis.cpp b/Base/Axis/ConstKBinAxis.cpp
index c6d758e3efa..85ce933856c 100644
--- a/Base/Axis/ConstKBinAxis.cpp
+++ b/Base/Axis/ConstKBinAxis.cpp
@@ -34,9 +34,8 @@ ConstKBinAxis::ConstKBinAxis(const std::string& name, size_t nbins, double start
 
     std::vector<double> bin_boundaries;
     bin_boundaries.resize(m_nbins + 1, 0.0);
-    for (size_t i = 0; i < bin_boundaries.size(); ++i) {
+    for (size_t i = 0; i < bin_boundaries.size(); ++i)
         bin_boundaries[i] = std::asin(start_sin + step * i);
-    }
     setBinBoundaries(bin_boundaries);
 }
 
@@ -62,9 +61,8 @@ void ConstKBinAxis::clip(double lower, double upper)
     size_t new_nbins = nbin2 - nbin1 + 1;
     std::vector<double> new_boundaries;
     std::vector<double> old_boundaries = binBoundaries();
-    for (size_t i = 0; i < new_nbins + 1; ++i) {
+    for (size_t i = 0; i < new_nbins + 1; ++i)
         new_boundaries.push_back(old_boundaries[nbin1 + i]);
-    }
 
     m_nbins = new_nbins;
     m_start = new_boundaries.front();
diff --git a/Base/Axis/CustomBinAxis.cpp b/Base/Axis/CustomBinAxis.cpp
index 31f74cdecd0..1297b0c564c 100644
--- a/Base/Axis/CustomBinAxis.cpp
+++ b/Base/Axis/CustomBinAxis.cpp
@@ -29,15 +29,13 @@ CustomBinAxis::CustomBinAxis(const std::string& name, size_t nbins, double start
     double step = (end_sin - start_sin) / (m_nbins - 1); // m_nbins-1 is intentionally
 
     m_bin_centers.resize(m_nbins, 0.0);
-    for (size_t i = 0; i < m_bin_centers.size(); ++i) {
+    for (size_t i = 0; i < m_bin_centers.size(); ++i)
         m_bin_centers[i] = std::asin(start_sin + i * step);
-    }
 
     std::vector<double> bin_boundaries;
     bin_boundaries.resize(m_nbins + 1, 0.0);
-    for (size_t i = 0; i < bin_boundaries.size(); ++i) {
+    for (size_t i = 0; i < bin_boundaries.size(); ++i)
         bin_boundaries[i] = std::asin(start_sin - step / 2. + step * i);
-    }
     setBinBoundaries(bin_boundaries);
 }
 
diff --git a/Base/Element/IElement.h b/Base/Element/IElement.h
index caa5fe2c06a..73e1f2bef26 100644
--- a/Base/Element/IElement.h
+++ b/Base/Element/IElement.h
@@ -21,6 +21,7 @@
 #define BORNAGAIN_BASE_ELEMENT_IELEMENT_H
 
 #include "Base/Element/PolMatrices.h"
+
 //#include <heinz/Vectors3D.h>
 #include <memory>
 #include <utility>
diff --git a/Base/Math/Bessel.h b/Base/Math/Bessel.h
index da83f384eca..841f9a5d17d 100644
--- a/Base/Math/Bessel.h
+++ b/Base/Math/Bessel.h
@@ -50,6 +50,7 @@ complex_t J1(complex_t z);
 complex_t J1c(complex_t z);
 
 } // namespace Bessel
+
 } // namespace Math
 
 #endif // BORNAGAIN_BASE_MATH_BESSEL_H
diff --git a/Base/Math/Precomputed.h b/Base/Math/Precomputed.h
index acda6ea611d..fc87f22d4af 100644
--- a/Base/Math/Precomputed.h
+++ b/Base/Math/Precomputed.h
@@ -51,6 +51,7 @@ constexpr std::array<double, N> generateReciprocalFactorialArray()
 {
     return internal::generateArrayHelper<internal::ReciprocalFactorial>(Indices{});
 };
+
 } // namespace Math
 
 #endif // BORNAGAIN_BASE_MATH_PRECOMPUTED_H
diff --git a/Base/Py/PyUtils.cpp b/Base/Py/PyUtils.cpp
index 0c7b1d68fd1..c26735bd7e3 100644
--- a/Base/Py/PyUtils.cpp
+++ b/Base/Py/PyUtils.cpp
@@ -39,13 +39,11 @@ std::vector<std::string> BaseUtils::Python::toVectorString(PyObject* obj)
             PyObject* value = PyTuple_GetItem(obj, i);
             result.push_back(toString(value));
         }
-
     } else if (PyList_Check(obj)) {
         for (Py_ssize_t i = 0; i < PyList_Size(obj); i++) {
             PyObject* value = PyList_GetItem(obj, i);
             result.push_back(toString(value));
         }
-
     } else
         throw std::runtime_error(
             "BaseUtils::Python::toVectorString() -> Error. Unexpected object.");
diff --git a/Core/Computation/SpecularComputation.cpp b/Core/Computation/SpecularComputation.cpp
index a774a44c8d1..cfc5c80e036 100644
--- a/Core/Computation/SpecularComputation.cpp
+++ b/Core/Computation/SpecularComputation.cpp
@@ -49,7 +49,6 @@ void SpecularComputation::runProtected()
             const complex_t trace = (polarization * R.adjoint() * analyzer * R).trace();
 
             ele.setIntensity(std::abs(trace));
-
         } else {
             const complex_t R = Compute::SpecularScalar::topLayerR(slices, kz_stack);
             ele.setIntensity(std::norm(R));
diff --git a/Core/Contrib/RoughMultiLayerContribution.cpp b/Core/Contrib/RoughMultiLayerContribution.cpp
index 1b8cd1a27b5..2e5e691acce 100644
--- a/Core/Contrib/RoughMultiLayerContribution.cpp
+++ b/Core/Contrib/RoughMultiLayerContribution.cpp
@@ -29,6 +29,7 @@
 // Phys. Rev. B, vol. 51 (4), p. 2311 (1995)
 
 namespace {
+
 complex_t h_plus(complex_t z)
 {
     return 0.5 * cerfcx(-mul_I(z) / std::sqrt(2.0));
@@ -37,6 +38,7 @@ complex_t h_min(complex_t z)
 {
     return 0.5 * cerfcx(mul_I(z) / std::sqrt(2.0));
 }
+
 } // namespace
 
 
diff --git a/Core/Export/PyFmt2.cpp b/Core/Export/PyFmt2.cpp
index 9f6e5e3b9e2..87c9c50a738 100644
--- a/Core/Export/PyFmt2.cpp
+++ b/Core/Export/PyFmt2.cpp
@@ -53,11 +53,9 @@ std::string representShape2D(const std::string& indent, const IShape2D* ishape,
         result << "]\n";
         result << indent << "simulation.addMask("
                << "ba.Polygon(points), " << Py::Fmt::printBool(mask_value) << ")\n";
-
-    } else if (dynamic_cast<const InfinitePlane*>(ishape)) {
+    } else if (dynamic_cast<const InfinitePlane*>(ishape))
         result << indent << "simulation.maskAll()\n";
-
-    } else if (const auto* shape = dynamic_cast<const Ellipse*>(ishape)) {
+    else if (const auto* shape = dynamic_cast<const Ellipse*>(ishape)) {
         result << indent << "simulation.addMask(";
         result << "ba.Ellipse(" << printValueFunc(shape->getCenterX()) << ", "
                << printValueFunc(shape->getCenterY()) << ", " << printValueFunc(shape->getRadiusX())
@@ -85,7 +83,6 @@ std::string representShape2D(const std::string& indent, const IShape2D* ishape,
         result << indent << "simulation.addMask(";
         result << "ba.HorizontalLine(" << printValueFunc(shape->getYpos()) << "), "
                << Py::Fmt::printBool(mask_value) << ")\n";
-
     } else
         throw std::runtime_error("representShape2D(const IShape2D*) -> Error. Unknown shape");
 
@@ -103,9 +100,8 @@ std::string printAxis(const IAxis* axis, const std::string& unit)
     else if (const auto* a = dynamic_cast<const PointwiseAxis*>(axis); a) {
         result << "numpy.asarray([";
         const std::vector<double>& points = a->binCenters();
-        for (auto iter = points.begin(); iter != points.end() - 1; ++iter) {
+        for (auto iter = points.begin(); iter != points.end() - 1; ++iter)
             result << Py::Fmt::printValue(*iter, unit) << ",";
-        }
         result << Py::Fmt::printValue(points.back(), unit) << "])\n";
     } else
         throw std::runtime_error("printAxis not implemented for current axis type");
diff --git a/Core/Export/PyFmtLimits.cpp b/Core/Export/PyFmtLimits.cpp
index d347cbe3488..ecc0755634b 100644
--- a/Core/Export/PyFmtLimits.cpp
+++ b/Core/Export/PyFmtLimits.cpp
@@ -23,17 +23,16 @@ std::string printRealLimits(const RealLimits& limits, const std::string& units)
 {
     std::ostringstream result;
 
-    if (limits.isLimitless()) {
+    if (limits.isLimitless())
         result << "RealLimits()";
-    }
 
-    else if (limits.isPositive()) {
+    else if (limits.isPositive())
         result << "RealLimits.positive()";
-    }
 
-    else if (limits.isNonnegative()) {
+
+    else if (limits.isNonnegative())
         result << "RealLimits.nonnegative()";
-    }
+
 
     else if (limits.isLowerLimited()) {
         result << "RealLimits.lowerLimited(" << Py::Fmt::printValue(limits.lowerLimit(), units)
diff --git a/Core/Export/PyFmtLimits.h b/Core/Export/PyFmtLimits.h
index 81bb4420a90..6ddccd5b243 100644
--- a/Core/Export/PyFmtLimits.h
+++ b/Core/Export/PyFmtLimits.h
@@ -27,8 +27,10 @@ class RealLimits;
 //! Utility functions for writing Python code snippets.
 
 namespace Py::Fmt {
+
 std::string printRealLimits(const RealLimits& limits, const std::string& units = "");
 std::string printRealLimitsArg(const RealLimits& limits, const std::string& units = "");
+
 } // namespace Py::Fmt
 
 #endif // BORNAGAIN_CORE_EXPORT_PYFMTLIMITS_H
diff --git a/Core/Export/SampleToPython.cpp b/Core/Export/SampleToPython.cpp
index ee35508e9a7..ea7d48ef826 100644
--- a/Core/Export/SampleToPython.cpp
+++ b/Core/Export/SampleToPython.cpp
@@ -267,7 +267,6 @@ std::string SampleToPython::defineInterferences() const
             if (pdf->decayLength() != 0.0)
                 result << indent() << key << "_pdf  = ba." << pdf->pythonConstructor() << "\n"
                        << indent() << key << ".setDecayFunction(" << key << "_pdf)\n";
-
         } else if (const auto* iff = dynamic_cast<const InterferenceRadialParaCrystal*>(s)) {
             result << indent() << key << " = ba.InterferenceRadialParaCrystal("
                    << Py::Fmt::printNm(iff->peakDistance()) << ", "
@@ -286,7 +285,6 @@ std::string SampleToPython::defineInterferences() const
             if (pdf->omega() != 0.0)
                 result << indent() << key << "_pdf  = ba." << pdf->pythonConstructor() << "\n"
                        << indent() << key << ".setProbabilityDistribution(" << key << "_pdf)\n";
-
         } else if (const auto* iff = dynamic_cast<const Interference2DLattice*>(s)) {
             const auto* lattice = NodeUtils::OnlyChildOfType<Lattice2D>(*iff);
 
@@ -300,7 +298,6 @@ std::string SampleToPython::defineInterferences() const
 
             if (iff->integrationOverXi())
                 result << indent() << key << ".setIntegrationOverXi(True)\n";
-
         } else if (const auto* iff = dynamic_cast<const InterferenceFinite2DLattice*>(s)) {
             const auto* lattice = NodeUtils::OnlyChildOfType<Lattice2D>(*iff);
 
@@ -310,7 +307,6 @@ std::string SampleToPython::defineInterferences() const
 
             if (iff->integrationOverXi())
                 result << indent() << key << ".setIntegrationOverXi(True)\n";
-
         } else if (const auto* iff = dynamic_cast<const Interference2DParaCrystal*>(s)) {
             const auto* lattice = NodeUtils::OnlyChildOfType<Lattice2D>(*iff);
             std::vector<double> domainSize = iff->domainSizes();
@@ -335,12 +331,10 @@ std::string SampleToPython::defineInterferences() const
             result << indent() << key << "_pdf_2  = ba." << pdf->pythonConstructor() << "\n";
             result << indent() << key << ".setProbabilityDistributions(" << key << "_pdf_1, " << key
                    << "_pdf_2)\n";
-
         } else if (const auto* lattice_hd = dynamic_cast<const InterferenceHardDisk*>(s)) {
             result << indent() << key << " = ba.InterferenceHardDisk("
                    << Py::Fmt::printNm(lattice_hd->radius()) << ", "
                    << Py::Fmt::printDouble(lattice_hd->density()) << ")\n";
-
         } else
             ASSERT(0);
 
@@ -429,9 +423,8 @@ std::string SampleToPython::defineParticleCompositions() const
         const std::string& key = m_objs->obj2key(s);
         result << indent() << key << " = ba.ParticleComposition()\n";
         const auto particle_list = NodeUtils::ChildNodesOfType<IParticle>(*s);
-        for (const auto* particle : particle_list) {
+        for (const auto* particle : particle_list)
             result << indent() << key << ".addParticle(" << m_objs->obj2key(particle) << ")\n";
-        }
         setRotationInformation(s, key, result);
         setPositionInformation(s, key, result);
     }
diff --git a/Core/Fitting/FitObjective.h b/Core/Fitting/FitObjective.h
index b8f96fee6f0..b10efec91c0 100644
--- a/Core/Fitting/FitObjective.h
+++ b/Core/Fitting/FitObjective.h
@@ -29,8 +29,10 @@ class PyObserverCallback;
 class SimDataPair;
 class SimulationResult;
 namespace mumufit {
+
 class MinimizerResult;
 class Parameters;
+
 } // namespace mumufit
 
 //! Holds vector of SimDataPair%s (experimental data and simulation results) for use in fitting.
diff --git a/Core/Fitting/FitStatus.h b/Core/Fitting/FitStatus.h
index 5e308f02d4f..3a8bec6f992 100644
--- a/Core/Fitting/FitStatus.h
+++ b/Core/Fitting/FitStatus.h
@@ -26,6 +26,7 @@
 #include <vector>
 
 namespace mumufit {
+
 class MinimizerResult;
 }
 class FitObjective;
diff --git a/Core/Fitting/FitTypes.h b/Core/Fitting/FitTypes.h
index 53363fe5ff9..05323d48362 100644
--- a/Core/Fitting/FitTypes.h
+++ b/Core/Fitting/FitTypes.h
@@ -25,6 +25,7 @@
 
 class ISimulation;
 namespace mumufit {
+
 class Parameters;
 }
 class FitObjective;
diff --git a/Core/Fitting/ObjectiveMetric.cpp b/Core/Fitting/ObjectiveMetric.cpp
index 78e4253b918..05e4a60dcb5 100644
--- a/Core/Fitting/ObjectiveMetric.cpp
+++ b/Core/Fitting/ObjectiveMetric.cpp
@@ -20,6 +20,7 @@
 #include <limits>
 
 namespace {
+
 const double double_max = std::numeric_limits<double>::max();
 const double double_min = std::numeric_limits<double>::min();
 const double ln10 = std::log(10.0);
@@ -52,6 +53,7 @@ void checkIntegrity(const std::vector<double>& sim_data, const std::vector<doubl
 
     checkIntegrity(sim_data, exp_data, weight_factors);
 }
+
 } // namespace
 
 ObjectiveMetric::ObjectiveMetric(std::function<double(double)> norm) : m_norm(std::move(norm)) {}
diff --git a/Core/Fitting/ObjectiveMetricUtils.cpp b/Core/Fitting/ObjectiveMetricUtils.cpp
index 88add45ebe2..9ed2cf093ac 100644
--- a/Core/Fitting/ObjectiveMetricUtils.cpp
+++ b/Core/Fitting/ObjectiveMetricUtils.cpp
@@ -20,6 +20,7 @@
 #include <sstream>
 
 namespace {
+
 const std::function<double(double)> l1_norm = [](double term) { return std::abs(term); };
 const std::function<double(double)> l2_norm = [](double term) { return term * term; };
 
@@ -43,6 +44,7 @@ template <class U> std::vector<std::string> keys(const std::map<std::string, U>&
         result.push_back(item.first);
     return result;
 }
+
 } // namespace
 
 std::function<double(double)> ObjectiveMetricUtils::l1Norm()
diff --git a/Core/Fitting/SimDataPair.cpp b/Core/Fitting/SimDataPair.cpp
index 121bd6c5142..21240192d1f 100644
--- a/Core/Fitting/SimDataPair.cpp
+++ b/Core/Fitting/SimDataPair.cpp
@@ -138,9 +138,9 @@ void SimDataPair::execSimulation(const mumufit::Parameters& params)
 
     m_exp_data = convertData(*simulation, *m_raw_data);
 
-    if (containsUncertainties()) {
+    if (containsUncertainties())
         m_uncertainties = convertData(*simulation, *m_raw_uncertainties);
-    } else {
+    else {
         const ICoordSystem& converter = m_sim_data.converter();
         std::unique_ptr<OutputData<double>> dummy_array =
             converter.createOutputData(converter.defaultUnits());
diff --git a/Core/Scan/AlphaScan.cpp b/Core/Scan/AlphaScan.cpp
index defe789ca04..8ac4a38d3cf 100644
--- a/Core/Scan/AlphaScan.cpp
+++ b/Core/Scan/AlphaScan.cpp
@@ -22,6 +22,7 @@
 #include "Resample/Element/SpecularElement.h"
 
 namespace {
+
 std::vector<std::vector<double>>
 extractValues(std::vector<std::vector<ParameterSample>> samples,
               const std::function<double(const ParameterSample&)> extractor)
diff --git a/Core/Scan/ScanResolution.cpp b/Core/Scan/ScanResolution.cpp
index 9eb82986e62..8a9017acbcf 100644
--- a/Core/Scan/ScanResolution.cpp
+++ b/Core/Scan/ScanResolution.cpp
@@ -18,6 +18,7 @@
 #include <utility>
 
 namespace {
+
 void checkIfEmpty(const std::vector<double>& input);
 
 const std::string relative_resolution = "ScanRelativeResolution";
@@ -151,6 +152,7 @@ public:
 protected:
     std::string name() const override;
 };
+
 } // namespace
 
 ScanResolution::~ScanResolution() = default;
@@ -196,6 +198,7 @@ ScanResolution::ScanResolution() = default;
 ScanResolution::ScanResolution(const IRangedDistribution& distr) : m_distr(distr.clone()) {}
 
 namespace {
+
 ScanResolution::DistrOutput ScanSingleRelativeResolution::generateSamples(double mean,
                                                                           size_t n_times) const
 {
@@ -358,4 +361,5 @@ void checkIfEmpty(const std::vector<double>& input)
     if (input.empty())
         throw std::runtime_error("Error in ScanResolution: passed vector is empty");
 }
+
 } // namespace
diff --git a/Core/Simulation/ISimulation.cpp b/Core/Simulation/ISimulation.cpp
index 40cc300f05b..a751c1e9dd2 100644
--- a/Core/Simulation/ISimulation.cpp
+++ b/Core/Simulation/ISimulation.cpp
@@ -202,10 +202,9 @@ void ISimulation::runSimulation()
     if (batch_size == 0)
         return;
 
-    if (param_combinations == 1) {
+    if (param_combinations == 1)
         runSingleSimulation(re_sample, batch_start, batch_size, 1.);
-
-    } else {
+    else {
         // init callbacks for setting the parameter values
         for (const auto& distribution : m_distribution_handler.getDistributions()) {
             const auto* dc = const_cast<ParameterDistribution*>(&distribution);
@@ -311,7 +310,6 @@ void ISimulation::runSingleSimulation(const ProcessedSample& re_sample, size_t b
     std::vector<std::unique_ptr<IComputation>> computations;
 
     for (size_t i_thread = 0; i_thread < n_threads; ++i_thread) {
-
         const size_t thread_start = batch_start + startIndex(n_threads, i_thread, batch_size);
         const size_t thread_size = batchSize(n_threads, i_thread, batch_size);
         if (thread_size == 0)
diff --git a/Device/Beam/Beam.cpp b/Device/Beam/Beam.cpp
index 0e5a55cb364..86f7ebf11a1 100644
--- a/Device/Beam/Beam.cpp
+++ b/Device/Beam/Beam.cpp
@@ -52,9 +52,8 @@ Beam Beam::horizontalBeam()
 Beam::Beam(const Beam& other) : Beam(other.m_intensity, other.m_wavelength, other.direction())
 {
     m_bloch_vector = other.m_bloch_vector;
-    if (other.m_shape_factor) {
+    if (other.m_shape_factor)
         m_shape_factor.reset(other.m_shape_factor->clone());
-    }
 }
 
 Beam& Beam::operator=(const Beam& other)
@@ -67,9 +66,9 @@ Beam& Beam::operator=(const Beam& other)
     m_alpha = other.m_alpha;
     m_phi = other.m_phi;
     m_bloch_vector = other.m_bloch_vector;
-    if (other.m_shape_factor) {
+    if (other.m_shape_factor)
         m_shape_factor.reset(other.m_shape_factor->clone());
-    } else
+    else
         m_shape_factor.release();
     return *this;
 }
diff --git a/Device/Coord/AxisNames.h b/Device/Coord/AxisNames.h
index 94d2f3663e9..e6fea13d69a 100644
--- a/Device/Coord/AxisNames.h
+++ b/Device/Coord/AxisNames.h
@@ -38,6 +38,7 @@ const std::map<Axes::Coords, const char*> axisUnitLabel = {{Axes::Coords::UNDEFI
 //! @ingroup detector
 
 namespace DataUtils::AxisNames {
+
 extern BA_DEVICE_API_ const std::map<Axes::Coords, std::string> sphericalAxis0;
 extern BA_DEVICE_API_ const std::map<Axes::Coords, std::string> sphericalAxis1;
 extern BA_DEVICE_API_ const std::map<Axes::Coords, std::string> rectangularAxis0;
@@ -47,6 +48,7 @@ extern BA_DEVICE_API_ const std::map<Axes::Coords, std::string> offSpecularAxis1
 extern BA_DEVICE_API_ const std::map<Axes::Coords, std::string> specAxis;
 extern BA_DEVICE_API_ const std::map<Axes::Coords, std::string> specAxisQ;
 extern BA_DEVICE_API_ const std::map<Axes::Coords, std::string> sampleDepthAxis;
+
 } // namespace DataUtils::AxisNames
 
 #endif // BORNAGAIN_DEVICE_COORD_AXISNAMES_H
diff --git a/Device/Coord/ICoordSystem.cpp b/Device/Coord/ICoordSystem.cpp
index 34cf5c3d8f1..df1b09bcdb9 100644
--- a/Device/Coord/ICoordSystem.cpp
+++ b/Device/Coord/ICoordSystem.cpp
@@ -16,7 +16,6 @@
 #include "Device/Coord/AxisNames.h"
 #include "Device/Data/OutputData.h"
 
-
 ICoordSystem::~ICoordSystem() = default;
 
 std::unique_ptr<OutputData<double>> ICoordSystem::createOutputData(Axes::Coords units) const
diff --git a/Device/Data/LLData.h b/Device/Data/LLData.h
index 42906a97571..445dc6b9c65 100644
--- a/Device/Data/LLData.h
+++ b/Device/Data/LLData.h
@@ -160,11 +160,10 @@ template <class T> LLData<T>& LLData<T>::operator/=(const LLData& right)
         if (std::abs(m_data_array[i] - right[i])
             <= std::numeric_limits<double>::epsilon() * std::abs(right[i])) {
             ratio = 1.0;
-        } else if (std::abs(right[i]) <= std::numeric_limits<double>::min()) {
+        } else if (std::abs(right[i]) <= std::numeric_limits<double>::min())
             ratio = double(m_data_array[i]) / std::numeric_limits<double>::min();
-        } else {
+        else
             ratio = double(m_data_array[i] / right[i]);
-        }
         m_data_array[i] = (T)ratio;
     }
     return *this;
diff --git a/Device/Data/OutputData.cpp b/Device/Data/OutputData.cpp
index 7d9233da156..8ae2008e308 100644
--- a/Device/Data/OutputData.cpp
+++ b/Device/Data/OutputData.cpp
@@ -51,7 +51,6 @@ template <> PyObject* OutputData<double>::getArray() const
                 axes_indices[0] + m_axes[0]->size() * (m_axes[1]->size() - 1 - axes_indices[1]);
             array_buffer[offset] = (*this)[index];
         }
-
     } else {
         for (size_t index = 0; index < getAllocatedSize(); ++index)
             *array_buffer++ = (*this)[index];
diff --git a/Device/Detector/RectangularDetector.cpp b/Device/Detector/RectangularDetector.cpp
index 859a154fee0..0e647027fd6 100644
--- a/Device/Detector/RectangularDetector.cpp
+++ b/Device/Detector/RectangularDetector.cpp
@@ -234,13 +234,13 @@ void RectangularDetector::initNormalVector(const R3 central_k)
         // do nothing
     }
 
-    else if (m_detector_arrangement == PERPENDICULAR_TO_SAMPLE) {
+    else if (m_detector_arrangement == PERPENDICULAR_TO_SAMPLE)
         m_normal_to_detector = R3(m_distance, 0.0, 0.0);
-    }
 
-    else if (m_detector_arrangement == PERPENDICULAR_TO_DIRECT_BEAM) {
+
+    else if (m_detector_arrangement == PERPENDICULAR_TO_DIRECT_BEAM)
         m_normal_to_detector = m_distance * central_k_unit;
-    }
+
 
     else if (m_detector_arrangement == PERPENDICULAR_TO_REFLECTED_BEAM
              || m_detector_arrangement == PERPENDICULAR_TO_REFLECTED_BEAM_DPOS) {
@@ -248,9 +248,8 @@ void RectangularDetector::initNormalVector(const R3 central_k)
         m_normal_to_detector.setZ(-m_normal_to_detector.z());
     }
 
-    else {
+    else
         throw std::runtime_error("RectangularDetector::init() -> Unknown detector arrangement");
-    }
 }
 
 void RectangularDetector::initUandV(double alpha_i)
diff --git a/Device/Histo/Histogram2D.cpp b/Device/Histo/Histogram2D.cpp
index ae24edf259e..acced428719 100644
--- a/Device/Histo/Histogram2D.cpp
+++ b/Device/Histo/Histogram2D.cpp
@@ -166,12 +166,10 @@ Histogram1D* Histogram2D::create_projectionX(int ybinlow, int ybinup)
     auto* result = new Histogram1D(this->xAxis());
 
     for (size_t index = 0; index < getTotalNumberOfBins(); ++index) {
-
         int ybin = static_cast<int>(yAxisIndex(index));
 
-        if (ybin >= ybinlow && ybin <= ybinup) {
+        if (ybin >= ybinlow && ybin <= ybinup)
             result->fill(xAxisValue(index), binContent(index));
-        }
     }
     return result;
 }
@@ -181,12 +179,10 @@ Histogram1D* Histogram2D::create_projectionY(int xbinlow, int xbinup)
     auto* result = new Histogram1D(this->yAxis());
 
     for (size_t index = 0; index < getTotalNumberOfBins(); ++index) {
-
         int xbin = static_cast<int>(xAxisIndex(index));
 
-        if (xbin >= xbinlow && xbin <= xbinup) {
+        if (xbin >= xbinlow && xbin <= xbinup)
             result->fill(yAxisValue(index), binContent(index));
-        }
     }
     return result;
 }
diff --git a/Device/Histo/IHistogram.cpp b/Device/Histo/IHistogram.cpp
index 34c00315d0c..8fa3928e2c2 100644
--- a/Device/Histo/IHistogram.cpp
+++ b/Device/Histo/IHistogram.cpp
@@ -208,17 +208,15 @@ size_t IHistogram::getMinimumBinIndex() const
 
 void IHistogram::scale(double value)
 {
-    for (size_t index = 0; index < getTotalNumberOfBins(); ++index) {
+    for (size_t index = 0; index < getTotalNumberOfBins(); ++index)
         m_data[index].setContent(value * m_data[index].getContent());
-    }
 }
 
 double IHistogram::integral() const
 {
     double result(0.0);
-    for (size_t index = 0; index < getTotalNumberOfBins(); ++index) {
+    for (size_t index = 0; index < getTotalNumberOfBins(); ++index)
         result += m_data[index].getContent();
-    }
     return result;
 }
 
@@ -294,9 +292,8 @@ void IHistogram::init_from_data(const OutputData<double>& source)
     }
 
     m_data.copyShapeFrom(source);
-    for (size_t i = 0; i < source.getAllocatedSize(); ++i) {
+    for (size_t i = 0; i < source.getAllocatedSize(); ++i)
         m_data[i].add(source[i]);
-    }
 }
 
 //! returns data of requested type for globalbin number
diff --git a/Device/Histo/IntensityDataIOFactory.cpp b/Device/Histo/IntensityDataIOFactory.cpp
index 25d98687e31..04386734133 100644
--- a/Device/Histo/IntensityDataIOFactory.cpp
+++ b/Device/Histo/IntensityDataIOFactory.cpp
@@ -166,7 +166,6 @@ OutputData<double>*
 IntensityDataIOFactory::readOutputData(const std::string& file_name,
                                        std::function<OutputData<double>*(std::istream&)> readData)
 {
-
     if (!BaseUtils::Filesystem::IsFileExists(file_name))
         throw std::runtime_error("File does not exist: " + file_name);
 
diff --git a/Device/InputOutput/DataFormatUtils.cpp b/Device/InputOutput/DataFormatUtils.cpp
index d1a77f9f723..c9724bf70fc 100644
--- a/Device/InputOutput/DataFormatUtils.cpp
+++ b/Device/InputOutput/DataFormatUtils.cpp
@@ -23,6 +23,7 @@
 #include <iterator>
 
 namespace {
+
 using createAxisFun = std::function<std::unique_ptr<IAxis>(std::istringstream iss)>;
 
 const std::string GzipExtension = ".gz";
@@ -125,11 +126,11 @@ bool DataUtils::Format::isBZipped(const std::string& name)
 std::string DataUtils::Format::GetFileMainExtension(const std::string& name)
 {
     std::string stripped_name(name);
-    if (isGZipped(name)) {
+    if (isGZipped(name))
         stripped_name = name.substr(0, name.size() - GzipExtension.size());
-    } else if (isBZipped(name)) {
+    else if (isBZipped(name))
         stripped_name = name.substr(0, name.size() - BzipExtension.size());
-    }
+
     return BaseUtils::Filesystem::extension(stripped_name);
 }
 
diff --git a/Device/InputOutput/DataFormatUtils.h b/Device/InputOutput/DataFormatUtils.h
index e71cceeef50..3d7266cd8db 100644
--- a/Device/InputOutput/DataFormatUtils.h
+++ b/Device/InputOutput/DataFormatUtils.h
@@ -30,6 +30,7 @@ template <class T> class OutputData;
 //! Utility functions for data input and output.
 
 namespace DataUtils::Format {
+
 //! Returns true if name contains *.gz extension
 bool isCompressed(const std::string& name);
 
@@ -58,6 +59,7 @@ void fillOutputData(OutputData<double>* data, std::istream& input_stream);
 std::vector<double> parse_doubles(const std::string& str);
 
 void readLineOfDoubles(std::vector<double>& buffer, std::istringstream& iss);
+
 } // namespace DataUtils::Format
 
 #endif // BORNAGAIN_DEVICE_INPUTOUTPUT_DATAFORMATUTILS_H
diff --git a/Device/InputOutput/OutputDataReadWriteNicos.h b/Device/InputOutput/OutputDataReadWriteNicos.h
index 8de8c39c95b..0c0c8251478 100644
--- a/Device/InputOutput/OutputDataReadWriteNicos.h
+++ b/Device/InputOutput/OutputDataReadWriteNicos.h
@@ -22,7 +22,6 @@
 namespace IO {
 
 OutputData<double>* readNicosData(std::istream& input_stream);
-
 };
 
 #endif // BORNAGAIN_DEVICE_INPUTOUTPUT_OUTPUTDATAREADWRITENICOS_H
diff --git a/Device/Resolution/ConvolutionDetectorResolution.cpp b/Device/Resolution/ConvolutionDetectorResolution.cpp
index e66a77b0225..e264e428354 100644
--- a/Device/Resolution/ConvolutionDetectorResolution.cpp
+++ b/Device/Resolution/ConvolutionDetectorResolution.cpp
@@ -96,9 +96,8 @@ void ConvolutionDetectorResolution::apply1dConvolution(OutputData<double>* p_int
     double step_size = std::abs(axis[0] - axis[axis.size() - 1]) / (data_size - 1);
     double mid_value = axis[axis.size() / 2]; // because Convolve expects zero at midpoint
     std::vector<double> kernel;
-    for (size_t index = 0; index < data_size; ++index) {
+    for (size_t index = 0; index < data_size; ++index)
         kernel.push_back(getIntegratedPDF1d(axis[index] - mid_value, step_size));
-    }
     // Calculate convolution
     std::vector<double> result;
     Convolve().fftconvolve(source_vector, kernel, result);
diff --git a/Device/Resolution/Convolve.cpp b/Device/Resolution/Convolve.cpp
index 680fbb68f55..d2b7d4e2db3 100644
--- a/Device/Resolution/Convolve.cpp
+++ b/Device/Resolution/Convolve.cpp
@@ -319,9 +319,8 @@ bool Convolve::is_optimal(int n)
         return false;
     size_t ntest = n;
     for (size_t i = 0; i < m_implemented_factors.size(); i++) {
-        while ((ntest % m_implemented_factors[i]) == 0) {
+        while ((ntest % m_implemented_factors[i]) == 0)
             ntest = ntest / m_implemented_factors[i];
-        }
     }
     return ntest == 1;
 }
diff --git a/Fit/Adapter/GSLLevenbergMarquardtMinimizer.h b/Fit/Adapter/GSLLevenbergMarquardtMinimizer.h
index e970a266b1a..9e213a6fb3b 100644
--- a/Fit/Adapter/GSLLevenbergMarquardtMinimizer.h
+++ b/Fit/Adapter/GSLLevenbergMarquardtMinimizer.h
@@ -23,6 +23,7 @@
 #include "Fit/Adapter/MinimizerAdapter.h"
 
 namespace ROOT::Math {
+
 class GSLNLSMinimizer;
 }
 
diff --git a/Fit/Adapter/GSLMultiMinimizer.h b/Fit/Adapter/GSLMultiMinimizer.h
index 2e6edc20a29..50cfe3a9cb3 100644
--- a/Fit/Adapter/GSLMultiMinimizer.h
+++ b/Fit/Adapter/GSLMultiMinimizer.h
@@ -23,6 +23,7 @@
 #include "Fit/Adapter/MinimizerAdapter.h"
 
 namespace ROOT::Math {
+
 class GSLMinimizer;
 }
 
diff --git a/Fit/Adapter/GeneticMinimizer.cpp b/Fit/Adapter/GeneticMinimizer.cpp
index 67547ad3875..e72781c9cc8 100644
--- a/Fit/Adapter/GeneticMinimizer.cpp
+++ b/Fit/Adapter/GeneticMinimizer.cpp
@@ -24,6 +24,7 @@ std::map<int, std::string> statusDescription()
     result[1] = "Maximum number of iterations reached";
     return result;
 }
+
 } // namespace
 
 GeneticMinimizer::GeneticMinimizer()
diff --git a/Fit/Adapter/GeneticMinimizer.h b/Fit/Adapter/GeneticMinimizer.h
index d0ba376ef7d..f262de411a3 100644
--- a/Fit/Adapter/GeneticMinimizer.h
+++ b/Fit/Adapter/GeneticMinimizer.h
@@ -23,6 +23,7 @@
 #include "Fit/Adapter/MinimizerAdapter.h"
 
 namespace ROOT::Math {
+
 class GeneticMinimizer;
 }
 
diff --git a/Fit/Adapter/MinimizerAdapter.cpp b/Fit/Adapter/MinimizerAdapter.cpp
index 3a040ecac67..590ff822671 100644
--- a/Fit/Adapter/MinimizerAdapter.cpp
+++ b/Fit/Adapter/MinimizerAdapter.cpp
@@ -141,11 +141,9 @@ void MinimizerAdapter::propagateResults(mumufit::Parameters& parameters)
 void MinimizerAdapter::setParameter(unsigned int index, const mumufit::Parameter& par)
 {
     bool success;
-    if (par.limits().isFixed()) {
+    if (par.limits().isFixed())
         success = rootMinimizer()->SetFixedVariable(index, par.name().c_str(), par.value());
 
-    }
-
     else if (par.limits().isLimited()) {
         success = rootMinimizer()->SetLimitedVariable(index, par.name().c_str(), par.value(),
                                                       par.step(), par.limits().lowerLimit(),
@@ -162,13 +160,12 @@ void MinimizerAdapter::setParameter(unsigned int index, const mumufit::Parameter
                                                            par.step(), par.limits().upperLimit());
     }
 
-    else if (par.limits().isLimitless()) {
+    else if (par.limits().isLimitless())
         success = rootMinimizer()->SetVariable(index, par.name().c_str(), par.value(), par.step());
-    }
 
-    else {
+
+    else
         throw std::runtime_error("BasicMinimizer::setParameter() -> Error! Unexpected parameter.");
-    }
 
     if (!success) {
         std::ostringstream ostr;
diff --git a/Fit/Adapter/MinimizerAdapter.h b/Fit/Adapter/MinimizerAdapter.h
index 7486ec3280c..8b1afb2e6b8 100644
--- a/Fit/Adapter/MinimizerAdapter.h
+++ b/Fit/Adapter/MinimizerAdapter.h
@@ -27,13 +27,16 @@
 #include <string>
 
 namespace mumufit {
+
 class Parameters;
 class Parameter;
 class ObjectiveFunctionAdapter;
 class MinimizerResult;
+
 } // namespace mumufit
 
 namespace ROOT::Math {
+
 class Minimizer;
 }
 
diff --git a/Fit/Adapter/Minuit2Minimizer.h b/Fit/Adapter/Minuit2Minimizer.h
index 583955fc0b9..df0c9ee4fae 100644
--- a/Fit/Adapter/Minuit2Minimizer.h
+++ b/Fit/Adapter/Minuit2Minimizer.h
@@ -24,6 +24,7 @@
 #include <memory>
 
 namespace ROOT::Minuit2 {
+
 class Minuit2Minimizer;
 }
 
diff --git a/Fit/Adapter/ResidualFunctionAdapter.cpp b/Fit/Adapter/ResidualFunctionAdapter.cpp
index aa5b016bc9c..163298653b0 100644
--- a/Fit/Adapter/ResidualFunctionAdapter.cpp
+++ b/Fit/Adapter/ResidualFunctionAdapter.cpp
@@ -20,8 +20,10 @@
 #include <utility>
 
 namespace {
+
 // step size of derivative calculations
 const double kEps = 1.0E-9;
+
 } // namespace
 
 using namespace mumufit;
@@ -101,9 +103,8 @@ std::vector<double> ResidualFunctionAdapter::get_residuals(const std::vector<dou
 double ResidualFunctionAdapter::element_residual(const std::vector<double>& pars,
                                                  unsigned int index, std::vector<double>& gradients)
 {
-    if (index == 0) {
+    if (index == 0)
         m_residuals = get_residuals(pars);
-    }
 
     if (!gradients.empty()) {
         // Non zero size means that minimizer wants to know gradients.
diff --git a/Fit/Adapter/ResidualFunctionAdapter.h b/Fit/Adapter/ResidualFunctionAdapter.h
index 12a2e1c094a..4a9be343a3d 100644
--- a/Fit/Adapter/ResidualFunctionAdapter.h
+++ b/Fit/Adapter/ResidualFunctionAdapter.h
@@ -59,7 +59,7 @@ private:
     std::unique_ptr<RootResidualFunction> m_root_objective;
 };
 
-} //  namespace mumufit
+} // namespace mumufit
 
 #endif // BORNAGAIN_FIT_ADAPTER_RESIDUALFUNCTIONADAPTER_H
 #endif // USER_API
diff --git a/Fit/Adapter/ScalarFunctionAdapter.h b/Fit/Adapter/ScalarFunctionAdapter.h
index c9cd6981e55..bf72d50b1f6 100644
--- a/Fit/Adapter/ScalarFunctionAdapter.h
+++ b/Fit/Adapter/ScalarFunctionAdapter.h
@@ -49,7 +49,7 @@ private:
     std::unique_ptr<RootScalarFunction> m_root_objective;
 };
 
-} //  namespace mumufit
+} // namespace mumufit
 
 #endif // BORNAGAIN_FIT_ADAPTER_SCALARFUNCTIONADAPTER_H
 #endif // USER_API
diff --git a/Fit/Adapter/SimAnMinimizer.h b/Fit/Adapter/SimAnMinimizer.h
index ebc0dfed1a7..38ad18b0bef 100644
--- a/Fit/Adapter/SimAnMinimizer.h
+++ b/Fit/Adapter/SimAnMinimizer.h
@@ -23,6 +23,7 @@
 #include "Fit/Adapter/MinimizerAdapter.h"
 
 namespace ROOT::Math {
+
 class GSLSimAnMinimizer;
 }
 
diff --git a/Fit/Kernel/Kernel.cpp b/Fit/Kernel/Kernel.cpp
index 9bc354812fc..ea7053b7361 100644
--- a/Fit/Kernel/Kernel.cpp
+++ b/Fit/Kernel/Kernel.cpp
@@ -20,8 +20,10 @@
 using namespace mumufit;
 
 namespace {
+
 const std::string default_minimizer = "Minuit2";
 const std::string default_algorithm = "Migrad";
+
 } // namespace
 
 Kernel::Kernel()
diff --git a/Fit/Kernel/Minimizer.cpp b/Fit/Kernel/Minimizer.cpp
index c7ee9fa8819..637d740dc38 100644
--- a/Fit/Kernel/Minimizer.cpp
+++ b/Fit/Kernel/Minimizer.cpp
@@ -48,7 +48,6 @@ MinimizerResult Minimizer::minimize(const PyCallback& callback, const Parameters
     if (callback.callback_type() == PyCallback::SCALAR) {
         fcn_scalar_t fcn = [&](const Parameters& pars) { return callback.call_scalar(pars); };
         return minimize(fcn, parameters);
-
     } else if (callback.callback_type() == PyCallback::RESIDUAL) {
         fcn_residual_t fcn = [&](const Parameters& pars) { return callback.call_residuals(pars); };
         return minimize(fcn, parameters);
diff --git a/Fit/Kernel/MinimizerFactory.cpp b/Fit/Kernel/MinimizerFactory.cpp
index 8785830c0ea..e2ac95f4d57 100644
--- a/Fit/Kernel/MinimizerFactory.cpp
+++ b/Fit/Kernel/MinimizerFactory.cpp
@@ -30,25 +30,24 @@ IMinimizer* MinimizerFactory::createMinimizer(const std::string& minimizerName,
 {
     IMinimizer* result(nullptr);
 
-    if (minimizerName == "Minuit2") {
+    if (minimizerName == "Minuit2")
         result = new Minuit2Minimizer(algorithmType);
-    }
 
-    else if (minimizerName == "GSLLMA") {
+    else if (minimizerName == "GSLLMA")
         result = new GSLLevenbergMarquardtMinimizer();
-    }
 
-    else if (minimizerName == "GSLSimAn") {
+
+    else if (minimizerName == "GSLSimAn")
         result = new SimAnMinimizer();
-    }
 
-    else if (minimizerName == "GSLMultiMin") {
+
+    else if (minimizerName == "GSLMultiMin")
         result = new GSLMultiMinimizer(algorithmType);
-    }
 
-    else if (minimizerName == "Genetic") {
+
+    else if (minimizerName == "Genetic")
         result = new GeneticMinimizer();
-    }
+
 
     if (!result) {
         std::ostringstream ostr;
diff --git a/Fit/Minimizer/IMinimizer.h b/Fit/Minimizer/IMinimizer.h
index e10369d25b5..64c668b47c1 100644
--- a/Fit/Minimizer/IMinimizer.h
+++ b/Fit/Minimizer/IMinimizer.h
@@ -21,6 +21,7 @@
 #include <string>
 
 namespace mumufit {
+
 class Parameters;
 }
 
diff --git a/Fit/Minimizer/MinimizerOptions.cpp b/Fit/Minimizer/MinimizerOptions.cpp
index 5d9bfa5ac7a..5beb83cbf1e 100644
--- a/Fit/Minimizer/MinimizerOptions.cpp
+++ b/Fit/Minimizer/MinimizerOptions.cpp
@@ -19,15 +19,15 @@
 #include <stdexcept>
 
 namespace {
+
 const std::string delimeter = ";";
 }
 
 std::string MinimizerOptions::toOptionString() const
 {
     std::ostringstream result;
-    for (const auto& option : m_options) {
+    for (const auto& option : m_options)
         result << option->name() << "=" << option->value_str() << delimeter;
-    }
     return result.str();
 }
 
diff --git a/Fit/Minimizer/MinimizerResult.cpp b/Fit/Minimizer/MinimizerResult.cpp
index 07fc8269319..4b8c24b8845 100644
--- a/Fit/Minimizer/MinimizerResult.cpp
+++ b/Fit/Minimizer/MinimizerResult.cpp
@@ -90,7 +90,6 @@ std::string MinimizerResult::toString() const
     if (m_minimizer_report.empty()) {
         result << "Don't know anything about external minimizer. "
                << "Use minimizer API to get result of minimization.\n";
-
     } else {
         result << mumufit::utils::sectionString();
         result << "Run time (sec)           : " << m_duration << "\n";
diff --git a/Fit/Minimizer/Types.h b/Fit/Minimizer/Types.h
index 10b2ba1bbf7..2ae44be5bbb 100644
--- a/Fit/Minimizer/Types.h
+++ b/Fit/Minimizer/Types.h
@@ -24,6 +24,7 @@
 #include <vector>
 
 namespace mumufit {
+
 class Parameters;
 }
 
diff --git a/Fit/Param/Parameter.cpp b/Fit/Param/Parameter.cpp
index f34ef057203..93423082bf1 100644
--- a/Fit/Param/Parameter.cpp
+++ b/Fit/Param/Parameter.cpp
@@ -17,6 +17,7 @@
 #include <utility>
 
 namespace {
+
 const double default_step = 0.01;
 const double step_factor = 0.01;
 
@@ -24,6 +25,7 @@ double step_for_value(double value)
 {
     return value == 0.0 ? default_step : std::abs(value) * step_factor;
 }
+
 } // namespace
 
 using namespace mumufit;
diff --git a/Fit/Test/Functional/ClassicalTestFunctions.h b/Fit/Test/Functional/ClassicalTestFunctions.h
index c0ee94f90f4..3c484d4b4d1 100644
--- a/Fit/Test/Functional/ClassicalTestFunctions.h
+++ b/Fit/Test/Functional/ClassicalTestFunctions.h
@@ -23,9 +23,11 @@
 //! Borrowed from StressFit test framework of http://root.cern.ch.
 
 namespace TestFunctions {
+
 double RosenBrock(const std::vector<double>& par);
 double WoodFour(const std::vector<double>& par);
 double DecayingSin(double x, const std::vector<double>& par);
+
 } // namespace TestFunctions
 
 #endif // BORNAGAIN_FIT_TEST_FUNCTIONAL_CLASSICALTESTFUNCTIONS_H
diff --git a/Fit/Test/Functional/PlanCases.cpp b/Fit/Test/Functional/PlanCases.cpp
index 7fd04ee2d05..dfc3f0d9be3 100644
--- a/Fit/Test/Functional/PlanCases.cpp
+++ b/Fit/Test/Functional/PlanCases.cpp
@@ -16,6 +16,7 @@
 #include "Fit/Test/Functional/ClassicalTestFunctions.h"
 
 namespace {
+
 const double loose_tolerance = 0.1;
 }
 
diff --git a/Fit/TestEngine/MinimizerTestPlan.h b/Fit/TestEngine/MinimizerTestPlan.h
index c6718818342..bd3c266a87b 100644
--- a/Fit/TestEngine/MinimizerTestPlan.h
+++ b/Fit/TestEngine/MinimizerTestPlan.h
@@ -34,9 +34,11 @@ struct ParameterReference {
 };
 
 namespace mumufit {
+
 class Parameter;
 class Parameters;
 class Minimizer;
+
 } // namespace mumufit
 
 //! Defines objective function to fit, expected minimum, initial fit parameters and
diff --git a/GUI/Application/ApplicationSettings.cpp b/GUI/Application/ApplicationSettings.cpp
index c16b1023313..8dbbf3a9800 100644
--- a/GUI/Application/ApplicationSettings.cpp
+++ b/GUI/Application/ApplicationSettings.cpp
@@ -21,6 +21,7 @@
 #include <QWidget>
 
 namespace {
+
 const QString S_CREATE_NEW_PROJECT_ON_STARTUP = "CreateNewProjectOnStartup";
 const QString S_STYLE = "Style";
 const QString S_SIZE = "Size";
@@ -29,6 +30,7 @@ const QString S_DEFAULT_FUNCTIONALITIES = "DefaultFunctionalities";
 const QString S_SINGLE_INSTRUMENT_MODE = "SingleInstrumentMode";
 const QString S_SINGLE_SAMPLE_MODE = "SingleSampleMode";
 const QString S_DEFAULT_UNIT_IS_ANGSTROM = "DefaultUnitIsAngstrom";
+
 } // namespace
 
 ApplicationSettings* appSettings; //!< global pointer to _the_ instance
diff --git a/GUI/Model/Data/Data1DViewItem.cpp b/GUI/Model/Data/Data1DViewItem.cpp
index 38d7c6c3152..ddf15e957ba 100644
--- a/GUI/Model/Data/Data1DViewItem.cpp
+++ b/GUI/Model/Data/Data1DViewItem.cpp
@@ -23,11 +23,13 @@
 #include "GUI/Util/Error.h"
 
 namespace {
+
 const QString x_axis_default_name = "X [nbins]";
 const QString y_axis_default_name = "Signal [a.u.]";
 
 const double default_min = 0.0;
 const double default_max = 1.0;
+
 } // namespace
 
 Data1DViewItem::Data1DViewItem() : SessionItem(M_TYPE), m_job_item(nullptr)
@@ -65,7 +67,6 @@ Data1DViewItem::Data1DViewItem() : SessionItem(M_TYPE), m_job_item(nullptr)
 
 int Data1DViewItem::getNbins() const
 {
-
     return xAxisItem()->binCount();
 }
 
diff --git a/GUI/Model/Data/DataItemUtils.cpp b/GUI/Model/Data/DataItemUtils.cpp
index 63f9da758ef..b299f6eef9a 100644
--- a/GUI/Model/Data/DataItemUtils.cpp
+++ b/GUI/Model/Data/DataItemUtils.cpp
@@ -19,6 +19,7 @@
 #include "GUI/Model/Job/JobItem.h"
 
 namespace {
+
 template <class DataItemType> DataItemType* dataItem(SessionItem* parent)
 {
     ASSERT(parent && "Assertion failed in GUI::Model::DataItemUtils::dataItem: nullptr passed.");
@@ -31,6 +32,7 @@ template <class DataItemType> DataItemType* dataItem(SessionItem* parent)
         return self;
     ASSERT(0);
 }
+
 } // namespace
 
 IntensityDataItem* GUI::Model::DataItemUtils::intensityDataItem(SessionItem* parent)
diff --git a/GUI/Model/Data/DataProperties.cpp b/GUI/Model/Data/DataProperties.cpp
index 7826c075e83..1e76ee8f7f0 100644
--- a/GUI/Model/Data/DataProperties.cpp
+++ b/GUI/Model/Data/DataProperties.cpp
@@ -22,6 +22,7 @@
 #include <utility>
 
 namespace {
+
 // set of simple colors for representation of 1D graphs
 const std::vector<std::pair<QString, Qt::GlobalColor>> color_queue = {
     {"Black", Qt::GlobalColor::black},   {"Blue", Qt::GlobalColor::blue},
@@ -39,6 +40,7 @@ struct ColorNameComparator {
 };
 
 ComboProperty defaultColorCombo();
+
 } // namespace
 
 DataProperties::DataProperties(const QString& model_type) : SessionItem(model_type)
@@ -107,6 +109,7 @@ void Data1DProperties::setColorProperty(const QString& color_name)
 }
 
 namespace {
+
 ComboProperty defaultColorCombo()
 {
     ComboProperty result;
@@ -115,4 +118,5 @@ ComboProperty defaultColorCombo()
     result.setValue(color_queue.front().first);
     return result;
 }
+
 } // namespace
diff --git a/GUI/Model/Data/DataViewUtils.h b/GUI/Model/Data/DataViewUtils.h
index 06848f21b2f..33c142800a6 100644
--- a/GUI/Model/Data/DataViewUtils.h
+++ b/GUI/Model/Data/DataViewUtils.h
@@ -24,10 +24,12 @@ class JobItem;
 template <class T> class OutputData;
 
 namespace GUI::Model::DataViewUtils {
+
 void updateAxesTitle(Data1DViewItem* view_item);
 
 std::unique_ptr<OutputData<double>> getTranslatedData(Data1DViewItem* view_item,
                                                       DataItem* data_item);
+
 } // namespace GUI::Model::DataViewUtils
 
 #endif // BORNAGAIN_GUI_MODEL_DATA_DATAVIEWUTILS_H
diff --git a/GUI/Model/Data/ImportDataInfo.cpp b/GUI/Model/Data/ImportDataInfo.cpp
index 140f41cbb22..48a38949655 100644
--- a/GUI/Model/Data/ImportDataInfo.cpp
+++ b/GUI/Model/Data/ImportDataInfo.cpp
@@ -22,6 +22,7 @@
 #include <memory>
 
 namespace {
+
 std::vector<Axes::Coords> specularUnits()
 {
     std::vector<Axes::Coords> result;
@@ -33,6 +34,7 @@ std::vector<Axes::Coords> specularUnits()
 // map: data rank --> available units
 std::map<size_t, std::vector<Axes::Coords>> available_units = {{1u, specularUnits()},
                                                                {2u, {Axes::Coords::NBINS}}};
+
 } // namespace
 
 ImportDataInfo::ImportDataInfo(ImportDataInfo&& other) noexcept
diff --git a/GUI/Model/Data/IntensityDataItem.cpp b/GUI/Model/Data/IntensityDataItem.cpp
index 2756a66e17d..17cd42c1bbc 100644
--- a/GUI/Model/Data/IntensityDataItem.cpp
+++ b/GUI/Model/Data/IntensityDataItem.cpp
@@ -23,6 +23,7 @@
 #include "GUI/Util/Error.h"
 
 namespace {
+
 ComboProperty gradientCombo()
 {
     ComboProperty result;
@@ -41,6 +42,7 @@ ComboProperty gradientCombo()
     result.setValue("Jet");
     return result;
 }
+
 } // namespace
 
 const QString x_axis_default_name = "X [nbins]";
diff --git a/GUI/Model/Data/MaskUnitsConverter.cpp b/GUI/Model/Data/MaskUnitsConverter.cpp
index 6abd1d82b6c..b6e1ef966d1 100644
--- a/GUI/Model/Data/MaskUnitsConverter.cpp
+++ b/GUI/Model/Data/MaskUnitsConverter.cpp
@@ -19,6 +19,7 @@
 #include "GUI/Model/Data/ProjectionItems.h"
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_downcast;
 
 MaskUnitsConverter::MaskUnitsConverter() : m_data(nullptr), m_direction(UNDEFINED) {}
diff --git a/GUI/Model/Data/PointwiseAxisItem.h b/GUI/Model/Data/PointwiseAxisItem.h
index 84db6449d02..b1ce8948249 100644
--- a/GUI/Model/Data/PointwiseAxisItem.h
+++ b/GUI/Model/Data/PointwiseAxisItem.h
@@ -23,7 +23,6 @@ class SpecularInstrumentItem;
 
 //! Item for non-uniform axis with specified coordinates.
 class PointwiseAxisItem : public BasicAxisItem, public SaveLoadInterface {
-
 private:
     static constexpr auto P_NATIVE_AXIS_UNITS{"NativeAxisUnits"};
     static constexpr auto P_FILE_NAME{"FileName"};
diff --git a/GUI/Model/Data/RealDataItem.h b/GUI/Model/Data/RealDataItem.h
index 5ad28fc9abd..193ef481bbb 100644
--- a/GUI/Model/Data/RealDataItem.h
+++ b/GUI/Model/Data/RealDataItem.h
@@ -34,7 +34,6 @@ class AbstractDataLoader;
 //! Owns an AbstractDataLoader.
 
 class BA_CORE_API_ RealDataItem : public QObject, public SessionItem {
-
     Q_OBJECT
 
     friend class TestView;
diff --git a/GUI/Model/Fit/FitParameterContainerItem.h b/GUI/Model/Fit/FitParameterContainerItem.h
index 0e9c6de103c..642d4fe43ce 100644
--- a/GUI/Model/Fit/FitParameterContainerItem.h
+++ b/GUI/Model/Fit/FitParameterContainerItem.h
@@ -18,6 +18,7 @@
 #include "GUI/Model/Session/SessionItem.h"
 
 namespace mumufit {
+
 class Parameters;
 }
 class FitParameterItem;
diff --git a/GUI/Model/Fit/FitParameterHelper.cpp b/GUI/Model/Fit/FitParameterHelper.cpp
index 0a61bdcdff3..f53316d53ba 100644
--- a/GUI/Model/Fit/FitParameterHelper.cpp
+++ b/GUI/Model/Fit/FitParameterHelper.cpp
@@ -83,9 +83,8 @@ QStringList FitParameterHelper::getFitParameterNames(FitParameterContainerItem*
 {
     ASSERT(container);
     QStringList result;
-    for (FitParameterItem* item : container->fitParameterItems()) {
+    for (FitParameterItem* item : container->fitParameterItems())
         result.append(item->displayName());
-    }
     return result;
 }
 
@@ -107,9 +106,8 @@ ParameterItem* FitParameterHelper::getParameterItem(FitParameterContainerItem* c
                                                     const QString& link)
 {
     SessionItem* cur = container;
-    while (cur && cur->modelType() != JobItem::M_TYPE) {
+    while (cur && cur->modelType() != JobItem::M_TYPE)
         cur = cur->parent();
-    }
     ASSERT(cur && cur->modelType() == JobItem::M_TYPE);
     auto* jobItem = dynamic_cast<JobItem*>(cur);
     ASSERT(jobItem);
diff --git a/GUI/Model/Fit/FitParameterItem.cpp b/GUI/Model/Fit/FitParameterItem.cpp
index 1b64c3ccb40..b0d18b5acdb 100644
--- a/GUI/Model/Fit/FitParameterItem.cpp
+++ b/GUI/Model/Fit/FitParameterItem.cpp
@@ -71,11 +71,10 @@ void FitParameterItem::initMinMaxValues(const RealLimits& limits)
     double value = getItemValue(P_START_VALUE).toDouble();
 
     double dr(0);
-    if (value == 0.0) {
+    if (value == 0.0)
         dr = 1.0 * range_factor;
-    } else {
+    else
         dr = std::abs(value) * range_factor;
-    }
 
     double min = value - dr;
     double max = value + dr;
diff --git a/GUI/Model/Fit/FitParameterProxyModel.cpp b/GUI/Model/Fit/FitParameterProxyModel.cpp
index 2a150c58eec..ce6ff0b73cc 100644
--- a/GUI/Model/Fit/FitParameterProxyModel.cpp
+++ b/GUI/Model/Fit/FitParameterProxyModel.cpp
@@ -25,6 +25,7 @@
 #include <QMimeData>
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_downcast;
 
 #include <optional>
@@ -56,9 +57,8 @@ FitParameterProxyModel::FitParameterProxyModel(FitParameterContainerItem* fitPar
 
 FitParameterProxyModel::~FitParameterProxyModel()
 {
-    if (m_root_item) {
+    if (m_root_item)
         m_root_item->mapper()->unsubscribe(this);
-    }
 }
 
 Qt::ItemFlags FitParameterProxyModel::flags(const QModelIndex& index) const
@@ -70,9 +70,8 @@ Qt::ItemFlags FitParameterProxyModel::flags(const QModelIndex& index) const
     if (SessionItem* item = itemForIndex(index)) {
         if (item->isEditable() && index.column() != COL_NAME)
             returnVal |= Qt::ItemIsEditable;
-        if (item->parent()->hasModelType<FitParameterLinkItem>() && index.column() == COL_NAME) {
+        if (item->parent()->hasModelType<FitParameterLinkItem>() && index.column() == COL_NAME)
             returnVal |= Qt::ItemIsDragEnabled;
-        }
         const bool allow_one_fit_parameter_to_have_more_than_one_link = true;
         if (allow_one_fit_parameter_to_have_more_than_one_link) {
             // drop is allowed to fit parameter container, and, to FitParameterItem itself.
@@ -84,9 +83,8 @@ Qt::ItemFlags FitParameterProxyModel::flags(const QModelIndex& index) const
         } else {
             // drop is allowed only to fit parameter container
             // (i.e. only one link is allowed in FitParameterItem)
-            if (item->hasModelType<FitParameterContainerItem>()) {
+            if (item->hasModelType<FitParameterContainerItem>())
                 returnVal |= Qt::ItemIsDropEnabled;
-            }
         }
     }
     return returnVal;
@@ -132,9 +130,8 @@ QModelIndex FitParameterProxyModel::index(int row, int column, const QModelIndex
         QVector<FitParameterLinkItem*> links =
             polymorphic_downcast<FitParameterItem*>(parent_item)->linkItems();
         if (row < links.size()) {
-            if (FitParameterLinkItem* linkItem = links.at(row)) {
+            if (FitParameterLinkItem* linkItem = links.at(row))
                 return createIndex(row, column, linkItem->linkItem());
-            }
         }
     }
     return QModelIndex();
@@ -195,9 +192,8 @@ int FitParameterProxyModel::columnCount(const QModelIndex& parent) const
 
     if (parent.isValid()) {
         if (SessionItem* parentItem = itemForIndex(parent)) {
-            if (parentItem->hasModelType<FitParameterItem>()) {
+            if (parentItem->hasModelType<FitParameterItem>())
                 return !polymorphic_downcast<FitParameterItem*>(parentItem)->linkItems().empty();
-            }
         }
     }
     return 0;
@@ -213,9 +209,8 @@ QVariant FitParameterProxyModel::data(const QModelIndex& index, int role) const
 
     if (SessionItem* item = itemForIndex(index)) {
         if (role == Qt::DisplayRole || role == Qt::EditRole) {
-            if (item->hasModelType<FitParameterItem>()) {
+            if (item->hasModelType<FitParameterItem>())
                 return item->displayName();
-            }
             return item->value();
         }
         if (role == Qt::ForegroundRole && !item->isEditable())
@@ -378,9 +373,8 @@ QModelIndex FitParameterProxyModel::indexOfItem(SessionItem* item) const
 
     if (SessionItem* parent_item = item->parent()) {
         if (parent_item->hasModelType<FitParameterContainerItem>()) {
-            if (item->hasModelType<FitParameterItem>()) {
+            if (item->hasModelType<FitParameterItem>())
                 return createIndex(ParentRow(*item), 0, item);
-            }
         } else if (parent_item->hasModelType<FitParameterItem>()) {
             auto* fitParam = polymorphic_downcast<FitParameterItem*>(parent_item);
             std::optional<int> col;
@@ -412,9 +406,8 @@ SessionItem* FitParameterProxyModel::itemForIndex(const QModelIndex& index) cons
     if (index.isValid()) {
         auto* item = static_cast<SessionItem*>(index.internalPointer());
         if (item) {
-            if (!isValidSourceItem(item)) {
+            if (!isValidSourceItem(item))
                 return nullptr;
-            }
             return item;
         }
     }
diff --git a/GUI/Model/Fit/ParameterTreeItems.cpp b/GUI/Model/Fit/ParameterTreeItems.cpp
index d1107ff06fc..76966e70526 100644
--- a/GUI/Model/Fit/ParameterTreeItems.cpp
+++ b/GUI/Model/Fit/ParameterTreeItems.cpp
@@ -27,12 +27,16 @@
 using namespace GUI::Session::XML;
 
 namespace {
+
 namespace Tags {
+
 const QString BackupValues("BackupValues");
 const QString BackupValue("BackupValue");
 const QString Link("Link");
 const QString Value("Value");
+
 } // namespace Tags
+
 } // namespace
 
 // ----------------------------------------------------------------------------
@@ -120,7 +124,6 @@ void ParameterContainerItem::readNonSessionItems(QXmlStreamReader* reader)
 
     while (reader->readNextStartElement()) {
         if (reader->name().toString() == Tags::BackupValues) {
-
             while (reader->readNextStartElement()) {
                 ASSERT(reader->name().toString() == Tags::BackupValue);
                 QString link;
diff --git a/GUI/Model/From/FromDomain.cpp b/GUI/Model/From/FromDomain.cpp
index f05d89afff2..980f38a9bd0 100644
--- a/GUI/Model/From/FromDomain.cpp
+++ b/GUI/Model/From/FromDomain.cpp
@@ -579,28 +579,24 @@ void GUI::Transform::FromDomain::setRectangularDetector(RectangularDetectorItem*
         detector_item->setDistance(detector.getDistance());
         detector_item->setU0(detector.getU0());
         detector_item->setV0(detector.getV0());
-
     } else if (detector.getDetectorArrangment()
                == RectangularDetector::PERPENDICULAR_TO_DIRECT_BEAM) {
         detector_item->setDetectorAlignment("Perpendicular to direct beam");
         detector_item->setDistance(detector.getDistance());
         detector_item->setDirectBeamU0(detector.getU0());
         detector_item->setDirectBeamV0(detector.getV0());
-
     } else if (detector.getDetectorArrangment()
                == RectangularDetector::PERPENDICULAR_TO_REFLECTED_BEAM) {
         detector_item->setDetectorAlignment("Perpendicular to reflected beam");
         detector_item->setDistance(detector.getDistance());
         detector_item->setU0(detector.getU0());
         detector_item->setV0(detector.getV0());
-
     } else if (detector.getDetectorArrangment()
                == RectangularDetector::PERPENDICULAR_TO_REFLECTED_BEAM_DPOS) {
         detector_item->setDetectorAlignment("Perpendicular to reflected beam (dpos)");
         detector_item->setDistance(detector.getDistance());
         detector_item->setDirectBeamU0(detector.getDirectBeamU0());
         detector_item->setDirectBeamV0(detector.getDirectBeamV0());
-
     } else {
         throw Error("GUI::Transform::FromDomain::setItemFromSample(RectangularDetectorItem* "
                     "detectorItem "
@@ -614,7 +610,6 @@ void GUI::Transform::FromDomain::setDetectorMasks(DetectorItem* detector_item,
     const IDetector& detector = simulation.detector();
     if ((detector.detectorMask() && detector.detectorMask()->hasMasks())
         || detector.hasExplicitRegionOfInterest()) {
-
         detector_item->createMaskContainer();
         double scale(1.0);
         if (detector_item->modelType() == SphericalDetectorItem::M_TYPE)
@@ -651,7 +646,6 @@ void GUI::Transform::FromDomain::setMaskContainer(MaskContainerItem* container_i
             rectangleItem->setYUp(scale * rectangle->getYup());
             rectangleItem->setMaskValue(mask_value);
             container_item->insertMask(0, rectangleItem);
-
         }
 
         else if (const auto* polygon = dynamic_cast<const Polygon*>(shape)) {
@@ -733,9 +727,8 @@ void GUI::Transform::FromDomain::setBackground(InstrumentItem* instrument_item,
         auto* constant_bg_item = instrument_item->setBackgroundType<ConstantBackgroundItem>();
         double value = p_constant_bg->backgroundValue();
         constant_bg_item->setBackgroundValue(value);
-    } else if (dynamic_cast<const PoissonNoiseBackground*>(p_bg)) {
+    } else if (dynamic_cast<const PoissonNoiseBackground*>(p_bg))
         instrument_item->setBackgroundType<PoissonNoiseBackgroundItem>();
-    }
 }
 
 void GUI::Transform::FromDomain::setFootprintFactor(const IFootprintFactor* footprint,
@@ -743,11 +736,10 @@ void GUI::Transform::FromDomain::setFootprintFactor(const IFootprintFactor* foot
 {
     if (!footprint)
         return;
-    if (const auto* const gaussian_fp = dynamic_cast<const FootprintGauss*>(footprint)) {
+    if (const auto* const gaussian_fp = dynamic_cast<const FootprintGauss*>(footprint))
         beam_item->setGaussianFootprint(gaussian_fp->widthRatio());
-    } else if (const auto* const square_fp = dynamic_cast<const FootprintSquare*>(footprint)) {
+    else if (const auto* const square_fp = dynamic_cast<const FootprintSquare*>(footprint))
         beam_item->setSquareFootprint(square_fp->widthRatio());
-    }
 }
 
 void GUI::Transform::FromDomain::setAxisItem(BasicAxisItem* item, const IAxis& axis, double factor)
diff --git a/GUI/Model/From/GUIDomainSampleVisitor.cpp b/GUI/Model/From/GUIDomainSampleVisitor.cpp
index cc6e76979c7..e6060320a14 100644
--- a/GUI/Model/From/GUIDomainSampleVisitor.cpp
+++ b/GUI/Model/From/GUIDomainSampleVisitor.cpp
@@ -44,6 +44,7 @@
 #include "Sample/SoftParticle/SoftParticles.h"
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_cast;
 
 namespace {
diff --git a/GUI/Model/From/GUIExamplesFactory.cpp b/GUI/Model/From/GUIExamplesFactory.cpp
index e323585ef6f..c64bfa789c3 100644
--- a/GUI/Model/From/GUIExamplesFactory.cpp
+++ b/GUI/Model/From/GUIExamplesFactory.cpp
@@ -24,7 +24,6 @@
 namespace {
 
 const QMap<QString, std::tuple<QString, QString, std::function<MultiLayer*()>>> builders{
-
     {"CylindersAndPrismsBuilder",
      {"Cylinder and prisms", "Mixture of cylinders and prisms without interference",
       ExemplarySamples::createCylindersAndPrisms}},
diff --git a/GUI/Model/Group/DistributionItems.cpp b/GUI/Model/Group/DistributionItems.cpp
index 275788f75e3..1a619d95f64 100644
--- a/GUI/Model/Group/DistributionItems.cpp
+++ b/GUI/Model/Group/DistributionItems.cpp
@@ -20,6 +20,7 @@
 #include <cmath>
 
 namespace {
+
 template <class DistrType>
 std::unique_ptr<IRangedDistribution>
 createIRangedDistribution(const SymmetricDistributionItem& distr_item, double scale)
@@ -72,13 +73,13 @@ void DistributionItem::init_limits_group(const RealLimits& limits, double factor
 {
     if (!isTag(P_LIMITS))
         return;
-    if (limits.isLimitless()) {
+    if (limits.isLimitless())
         setGroupProperty(P_LIMITS, LimitlessItem::M_TYPE);
-    } else if (limits.isPositive()) {
+    else if (limits.isPositive())
         setGroupProperty(P_LIMITS, PositiveItem::M_TYPE);
-    } else if (limits.isNonnegative()) {
+ else if (limits.isNonnegative())
         setGroupProperty(P_LIMITS, NonnegativeItem::M_TYPE);
-    } else if (limits.isLowerLimited()) {
+    else if (limits.isLowerLimited()) {
         LowerLimitedItem* lim =
             dynamic_cast<LowerLimitedItem*>(setGroupProperty(P_LIMITS, LowerLimitedItem::M_TYPE));
         lim->setLowerLimit(limits.lowerLimit() * factor);
diff --git a/GUI/Model/Group/DistributionItems.h b/GUI/Model/Group/DistributionItems.h
index 6e2c3a3e10e..430e942a756 100644
--- a/GUI/Model/Group/DistributionItems.h
+++ b/GUI/Model/Group/DistributionItems.h
@@ -72,7 +72,6 @@ public:
 };
 
 class DistributionNoneItem : public SymmetricDistributionItem {
-
 public:
     static constexpr auto M_TYPE{"DistributionNone"};
 
diff --git a/GUI/Model/Group/FilterPropertyProxy.h b/GUI/Model/Group/FilterPropertyProxy.h
index 89fad39f08d..faef02cad60 100644
--- a/GUI/Model/Group/FilterPropertyProxy.h
+++ b/GUI/Model/Group/FilterPropertyProxy.h
@@ -11,6 +11,7 @@
 //! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
 //
 //  ************************************************************************************************
+
 #ifndef BORNAGAIN_GUI_MODEL_GROUP_FILTERPROPERTYPROXY_H
 #define BORNAGAIN_GUI_MODEL_GROUP_FILTERPROPERTYPROXY_H
 
diff --git a/GUI/Model/Group/ItemFactory.h b/GUI/Model/Group/ItemFactory.h
index c272d9a4c8a..9af2541e618 100644
--- a/GUI/Model/Group/ItemFactory.h
+++ b/GUI/Model/Group/ItemFactory.h
@@ -36,7 +36,6 @@ template <typename ItemType> ItemType* CreateItem(SessionItem* parent)
     return dynamic_cast<ItemType*>(CreateItem(ItemType::M_TYPE, parent));
 }
 
-
 } // namespace GUI::Model::ItemFactory
 
 #endif // BORNAGAIN_GUI_MODEL_GROUP_ITEMFACTORY_H
diff --git a/GUI/Model/Group/PropertyItem.h b/GUI/Model/Group/PropertyItem.h
index d9c30f5b85b..d0f8a5299ee 100644
--- a/GUI/Model/Group/PropertyItem.h
+++ b/GUI/Model/Group/PropertyItem.h
@@ -18,7 +18,6 @@
 #include "GUI/Model/Session/SessionItem.h"
 
 class BA_CORE_API_ PropertyItem : public SessionItem {
-
 public:
     static constexpr auto M_TYPE{"Property"};
 
diff --git a/GUI/Model/IO/AbstractDataLoaderResultModel.cpp b/GUI/Model/IO/AbstractDataLoaderResultModel.cpp
index eb98668b1f5..2cccb28eb95 100644
--- a/GUI/Model/IO/AbstractDataLoaderResultModel.cpp
+++ b/GUI/Model/IO/AbstractDataLoaderResultModel.cpp
@@ -18,6 +18,7 @@
 #include <QVariant>
 
 namespace {
+
 struct Palette {
     static QColor backgroundColorFileContent;
     static QColor backgroundColorRawContent;
diff --git a/GUI/Model/Instrument/BackgroundItems.cpp b/GUI/Model/Instrument/BackgroundItems.cpp
index f2abd0df7f7..0c704e00fa0 100644
--- a/GUI/Model/Instrument/BackgroundItems.cpp
+++ b/GUI/Model/Instrument/BackgroundItems.cpp
@@ -32,6 +32,7 @@ std::unique_ptr<IBackground> NoBackgroundItem::createBackground() const
 /* ------------------------------------------------ */
 
 namespace {
+
 const QString constant_background_value_tooltip = "Constant background value [counts/pixel]";
 }
 
diff --git a/GUI/Model/Instrument/BeamDistributionItem.cpp b/GUI/Model/Instrument/BeamDistributionItem.cpp
index 0fa49bada40..7f1891f4261 100644
--- a/GUI/Model/Instrument/BeamDistributionItem.cpp
+++ b/GUI/Model/Instrument/BeamDistributionItem.cpp
@@ -67,9 +67,8 @@ std::unique_ptr<ParameterDistribution> BeamDistributionItem::getParameterDistrib
         if (P_distribution) {
             size_t nbr_samples = distributionItem->numberOfSamples();
             double sigma_factor(0);
-            if (distributionItem->hasSigmaFactor()) {
+            if (distributionItem->hasSigmaFactor())
                 sigma_factor = distributionItem->sigmaFactor();
-            }
 
             RealLimitsItem* limitsItem = distributionItem->limits();
             ASSERT(limitsItem);
diff --git a/GUI/Model/Instrument/BeamItems.cpp b/GUI/Model/Instrument/BeamItems.cpp
index 9538475a9f9..83e16707f47 100644
--- a/GUI/Model/Instrument/BeamItems.cpp
+++ b/GUI/Model/Instrument/BeamItems.cpp
@@ -25,6 +25,7 @@
 #include <cmath>
 
 namespace {
+
 // defines wavelength limits according to given maximum q value
 RealLimits getLimits(double max_q);
 
@@ -264,6 +265,7 @@ double GISASBeamItem::getInclinationAngle() const
 }
 
 namespace {
+
 RealLimits getLimits(double max_q)
 {
     double upper_lim = std::nextafter(4.0 * M_PI / max_q, 0.0);
@@ -271,4 +273,5 @@ RealLimits getLimits(double max_q)
     result.setUpperLimit(upper_lim);
     return result;
 }
+
 } // namespace
diff --git a/GUI/Model/Instrument/BeamItems.h b/GUI/Model/Instrument/BeamItems.h
index c10f1bc00ec..c1df416d290 100644
--- a/GUI/Model/Instrument/BeamItems.h
+++ b/GUI/Model/Instrument/BeamItems.h
@@ -64,7 +64,6 @@ protected:
 };
 
 class SpecularBeamItem : public BeamItem {
-
 public:
     static constexpr auto M_TYPE{"SpecularBeam"};
 
diff --git a/GUI/Model/Instrument/BeamWavelengthItem.cpp b/GUI/Model/Instrument/BeamWavelengthItem.cpp
index c512378e908..eaf8291b7b0 100644
--- a/GUI/Model/Instrument/BeamWavelengthItem.cpp
+++ b/GUI/Model/Instrument/BeamWavelengthItem.cpp
@@ -15,6 +15,7 @@
 #include "GUI/Model/Instrument/BeamWavelengthItem.h"
 
 namespace {
+
 const double default_wl = 0.1;
 }
 
diff --git a/GUI/Model/Instrument/DetectorItems.cpp b/GUI/Model/Instrument/DetectorItems.cpp
index e41ba3a6ddd..770a2ccd632 100644
--- a/GUI/Model/Instrument/DetectorItems.cpp
+++ b/GUI/Model/Instrument/DetectorItems.cpp
@@ -23,6 +23,7 @@
 #include "GUI/Model/Session/SessionModel.h"
 
 namespace {
+
 const QString res_func_group_label = "Type";
 
 GroupInfo createResolutionFunctionGroup()
diff --git a/GUI/Model/Instrument/ItemWithDistribution.h b/GUI/Model/Instrument/ItemWithDistribution.h
index afb9a8da7ef..bf6e0835384 100644
--- a/GUI/Model/Instrument/ItemWithDistribution.h
+++ b/GUI/Model/Instrument/ItemWithDistribution.h
@@ -25,7 +25,6 @@ class DistributionItem;
 /// Abstract interface of an item with a distribution property
 
 class BA_CORE_API_ ItemWithDistribution {
-
 public:
     virtual DistributionItem* distribution() const = 0;
     virtual DistributionItem* setDistributionType(const QString& model_type) = 0;
diff --git a/GUI/Model/Instrument/RectangularDetectorItem.cpp b/GUI/Model/Instrument/RectangularDetectorItem.cpp
index e7f5752a11d..807dae6c243 100644
--- a/GUI/Model/Instrument/RectangularDetectorItem.cpp
+++ b/GUI/Model/Instrument/RectangularDetectorItem.cpp
@@ -20,6 +20,7 @@
 #include "GUI/Util/Error.h"
 
 namespace {
+
 const double default_detector_width = 20.0;
 const double default_detector_height = 20.0;
 const double default_detector_distance = 1000.0;
@@ -58,6 +59,7 @@ ComboProperty alignmentCombo()
     result.setValue("Perpendicular to direct beam");
     return result;
 }
+
 } // namespace
 
 RectangularDetectorItem::RectangularDetectorItem() : DetectorItem(M_TYPE), m_is_constructed(false)
@@ -299,15 +301,15 @@ std::unique_ptr<IDetector2D> RectangularDetectorItem::createDomainDetector() con
 
     auto alignment = getItemValue(P_ALIGNMENT).value<ComboProperty>();
 
-    if (alignment.getValue() == "Generic") {
+    if (alignment.getValue() == "Generic")
         result->setPosition(normalVector(), u0, v0, directionVector());
-    } else if (alignment.getValue() == "Perpendicular to direct beam") {
+    else if (alignment.getValue() == "Perpendicular to direct beam")
         result->setPerpendicularToDirectBeam(distance, dbeam_u0, dbeam_v0);
-    } else if (alignment.getValue() == "Perpendicular to sample x-axis") {
+ else if (alignment.getValue() == "Perpendicular to sample x-axis")
         result->setPerpendicularToSampleX(distance, u0, v0);
-    } else if (alignment.getValue() == "Perpendicular to reflected beam") {
+    else if (alignment.getValue() == "Perpendicular to reflected beam")
         result->setPerpendicularToReflectedBeam(distance, u0, v0);
-    } else if (alignment.getValue() == "Perpendicular to reflected beam (dpos)") {
+ else if (alignment.getValue() == "Perpendicular to reflected beam (dpos)") {
         result->setPerpendicularToReflectedBeam(distance);
         result->setDirectBeamPosition(dbeam_u0, dbeam_v0);
     }
diff --git a/GUI/Model/Instrument/ResolutionFunctionItems.h b/GUI/Model/Instrument/ResolutionFunctionItems.h
index 9434fac99b8..a321cd9fcd9 100644
--- a/GUI/Model/Instrument/ResolutionFunctionItems.h
+++ b/GUI/Model/Instrument/ResolutionFunctionItems.h
@@ -21,7 +21,6 @@
 class IResolutionFunction2D;
 
 class BA_CORE_API_ ResolutionFunctionItem : public SessionItem {
-
 protected:
     explicit ResolutionFunctionItem(const QString& name);
 
@@ -33,7 +32,6 @@ public:
 };
 
 class ResolutionFunctionNoneItem : public ResolutionFunctionItem {
-
 public:
     static constexpr auto M_TYPE{"ResolutionFunctionNone"};
 
diff --git a/GUI/Model/Instrument/SpecularBeamInclinationItem.cpp b/GUI/Model/Instrument/SpecularBeamInclinationItem.cpp
index 22d83f0ee60..039d794d422 100644
--- a/GUI/Model/Instrument/SpecularBeamInclinationItem.cpp
+++ b/GUI/Model/Instrument/SpecularBeamInclinationItem.cpp
@@ -18,6 +18,7 @@
 #include "GUI/Model/Group/GroupItem.h"
 
 namespace {
+
 void setupDistributionMean(SessionItem* distribution);
 void setAxisPresentationDefaults(SessionItem* axis_item, const QString& type);
 
@@ -95,6 +96,7 @@ void SpecularBeamInclinationItem::setupAxisGroup()
 }
 
 namespace {
+
 void setupDistributionMean(SessionItem* distribution)
 {
     ASSERT(distribution);
@@ -130,4 +132,5 @@ void setAxisPresentationDefaults(SessionItem* item, const QString& type)
         axis_item->binsItem()->setEnabled(false);
     }
 }
+
 } // namespace
diff --git a/GUI/Model/Job/JobItem.cpp b/GUI/Model/Job/JobItem.cpp
index 23ca2f32d1a..9e6f4594f79 100644
--- a/GUI/Model/Job/JobItem.cpp
+++ b/GUI/Model/Job/JobItem.cpp
@@ -33,8 +33,10 @@
 using namespace GUI::Session::XML;
 
 namespace {
+
 const QString SimulationOptionsTag("SimulationOptions");
 const QString MaterialsTag("Materials");
+
 } // namespace
 
 
diff --git a/GUI/Model/Job/JobItem.h b/GUI/Model/Job/JobItem.h
index 8d0230c359d..62c857d526a 100644
--- a/GUI/Model/Job/JobItem.h
+++ b/GUI/Model/Job/JobItem.h
@@ -38,7 +38,6 @@ class RealDataItem;
 class SimulationOptionsItem;
 
 class BA_CORE_API_ JobItem : public SessionItem {
-
 private:
     static constexpr auto P_IDENTIFIER{"Identifier"};
     static constexpr auto P_SAMPLE_NAME{"Sample"};
diff --git a/GUI/Model/Job/JobModel.h b/GUI/Model/Job/JobModel.h
index 656f4ddc84f..70b4fb366df 100644
--- a/GUI/Model/Job/JobModel.h
+++ b/GUI/Model/Job/JobModel.h
@@ -11,6 +11,7 @@
 //! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
 //
 //  ************************************************************************************************
+
 #ifndef BORNAGAIN_GUI_MODEL_JOB_JOBMODEL_H
 #define BORNAGAIN_GUI_MODEL_JOB_JOBMODEL_H
 
diff --git a/GUI/Model/Job/JobQueueData.cpp b/GUI/Model/Job/JobQueueData.cpp
index 3a3173ef5d6..dc44d594eb8 100644
--- a/GUI/Model/Job/JobQueueData.cpp
+++ b/GUI/Model/Job/JobQueueData.cpp
@@ -223,9 +223,9 @@ void JobQueueData::processFinishedJob(JobWorker* worker, JobItem* jobItem)
     jobItem->setEndTime(worker->simulationEnd());
 
     // propagating status of runner
-    if (worker->status() == JobStatus::Failed) {
+    if (worker->status() == JobStatus::Failed)
         jobItem->setComments(worker->failureMessage());
-    } else {
+    else {
         // propagating simulation results
         auto* simulation = getSimulation(worker->identifier());
         jobItem->setResults(simulation);
diff --git a/GUI/Model/Job/JobWorker.cpp b/GUI/Model/Job/JobWorker.cpp
index 77f6b332331..2f9227992dc 100644
--- a/GUI/Model/Job/JobWorker.cpp
+++ b/GUI/Model/Job/JobWorker.cpp
@@ -63,7 +63,6 @@ void JobWorker::start()
 
             m_failure_message.append(QString(ex.what()));
         }
-
     } else {
         m_job_status = JobStatus::Failed;
         m_percentage_done = 100;
diff --git a/GUI/Model/Job/ParameterTreeUtils.cpp b/GUI/Model/Job/ParameterTreeUtils.cpp
index f64a7423aba..4265ee89ae9 100644
--- a/GUI/Model/Job/ParameterTreeUtils.cpp
+++ b/GUI/Model/Job/ParameterTreeUtils.cpp
@@ -27,6 +27,7 @@
 #include <QStack>
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_downcast;
 
 namespace {
@@ -59,7 +60,6 @@ void handleItem(ParameterContainerItem* container, SessionItem* tree, SessionIte
                     auto* branch = tree->model()->insertItem<ParameterItem>(tree);
                     handleItem(container, branch, child, recreateBackupValues);
                 }
-
             } else if (child->hasModelType<GroupItem>()) {
                 SessionItem* currentItem = dynamic_cast<GroupItem*>(child)->currentItem();
                 if (currentItem && currentItem->numberOfChildren() > 0) {
diff --git a/GUI/Model/Material/MaterialItem.cpp b/GUI/Model/Material/MaterialItem.cpp
index a9defd62f76..ecd88d82bb6 100644
--- a/GUI/Model/Material/MaterialItem.cpp
+++ b/GUI/Model/Material/MaterialItem.cpp
@@ -26,7 +26,9 @@
 using namespace GUI::Session::XML;
 
 namespace {
+
 namespace Tags {
+
 const QString Color("Color");
 const QString Id("Id");
 const QString Name("Name");
@@ -34,7 +36,9 @@ const QString Delta("Delta");
 const QString Beta("Beta");
 const QString Sld("Sld");
 const QString Magnetization("Magnetization");
+
 } // namespace Tags
+
 } // namespace
 
 #define m_delta std::get<Refractive>(m_data).delta
diff --git a/GUI/Model/Project/OutputDataIOService.cpp b/GUI/Model/Project/OutputDataIOService.cpp
index 52ffb331c11..4d8e84edecb 100644
--- a/GUI/Model/Project/OutputDataIOService.cpp
+++ b/GUI/Model/Project/OutputDataIOService.cpp
@@ -23,7 +23,9 @@
 #include <QSet>
 
 namespace {
+
 JobItem* parentJobItem(SaveLoadInterface* item);
+
 } // namespace
 
 OutputDataIOService::OutputDataIOService(QObject* parent)
@@ -81,7 +83,6 @@ void OutputDataIOService::loadDataFiles(const QString& projectDir, MessageServic
                     jobItem->setStatus(JobStatus::Failed);
                 }
             }
-
         } catch (const std::exception& ex) {
             if (auto* jobItem = parentJobItem(item)) {
                 // Handling corrupted file on disk
@@ -125,6 +126,7 @@ void OutputDataIOService::cleanOldFiles(const QString& projectDir, const QString
 }
 
 namespace {
+
 JobItem* parentJobItem(SaveLoadInterface* item)
 {
     auto* session_item = dynamic_cast<SessionItem*>(item); // sidecast
@@ -132,4 +134,5 @@ JobItem* parentJobItem(SaveLoadInterface* item)
         dynamic_cast<const JobItem*>(GUI::Model::Path::ancestor(session_item, JobItem::M_TYPE));
     return const_cast<JobItem*>(jobItem);
 }
+
 } // namespace
diff --git a/GUI/Model/Project/ProjectDocument.cpp b/GUI/Model/Project/ProjectDocument.cpp
index 4dc755ab5fa..3e07bad7c8b 100644
--- a/GUI/Model/Project/ProjectDocument.cpp
+++ b/GUI/Model/Project/ProjectDocument.cpp
@@ -221,7 +221,6 @@ ProjectDocument::ReadResult ProjectDocument::loadProjectFile(const QString& proj
         if (!messageService.warnings().empty())
             result = ReadResult::warning;
         return result;
-
     } catch (const std::exception& ex) {
         QString message = QString("Exception thrown '%1'").arg(QString(ex.what()));
         messageService.addError(this, message);
diff --git a/GUI/Model/Sample/InterferenceItems.cpp b/GUI/Model/Sample/InterferenceItems.cpp
index 7ca2ffbc259..34b43024332 100644
--- a/GUI/Model/Sample/InterferenceItems.cpp
+++ b/GUI/Model/Sample/InterferenceItems.cpp
@@ -111,7 +111,6 @@ Interference2DAbstractLatticeItem::Interference2DAbstractLatticeItem(const QStri
                                                                      bool xi_integration)
     : InterferenceItem(modelType)
 {
-
     GroupInfo info;
     info.add<BasicLattice2DItem>();
     info.add<SquareLattice2DItem>();
@@ -123,15 +122,13 @@ Interference2DAbstractLatticeItem::Interference2DAbstractLatticeItem(const QStri
         ->setToolTip("Enables/disables averaging over the lattice rotation angle.");
 
     mapper()->setOnPropertyChange([this](const QString& name) {
-        if (name == P_XI_INTEGRATION && isTag(P_LATTICE_TYPE)) {
+        if (name == P_XI_INTEGRATION && isTag(P_LATTICE_TYPE))
             update_rotation_availability();
-        }
     });
 
     mapper()->setOnChildPropertyChange([this](SessionItem* item, const QString&) {
-        if (item->hasModelType<GroupItem>() && item->displayName() == P_LATTICE_TYPE) {
+        if (item->hasModelType<GroupItem>() && item->displayName() == P_LATTICE_TYPE)
             update_rotation_availability();
-        }
     });
 }
 
diff --git a/GUI/Model/Sample/ItemWithParticles.cpp b/GUI/Model/Sample/ItemWithParticles.cpp
index 786216de2e4..02b5da7dbdc 100644
--- a/GUI/Model/Sample/ItemWithParticles.cpp
+++ b/GUI/Model/Sample/ItemWithParticles.cpp
@@ -26,6 +26,7 @@
 #include "Sample/Scattering/Rotations.h"
 
 namespace {
+
 bool hasOwnAbundance(const SessionItem* item)
 {
     static QStringList special_parent{ParticleCoreShellItem::M_TYPE,
@@ -33,6 +34,7 @@ bool hasOwnAbundance(const SessionItem* item)
 
     return item ? special_parent.contains(item->modelType()) : false;
 }
+
 } // namespace
 
 DoubleDescriptor ItemWithParticles::abundance() const
diff --git a/GUI/Model/Sample/Lattice2DItems.cpp b/GUI/Model/Sample/Lattice2DItems.cpp
index 1d1f526caf3..87bd888c864 100644
--- a/GUI/Model/Sample/Lattice2DItems.cpp
+++ b/GUI/Model/Sample/Lattice2DItems.cpp
@@ -18,6 +18,7 @@
 #include "Sample/Lattice/Lattice2D.h"
 
 namespace {
+
 const QString axis_rotation_tooltip =
     "Rotation of lattice with respect to x-axis of reference frame \n"
     "(beam direction) in degrees";
diff --git a/GUI/Model/Sample/Lattice2DItems.h b/GUI/Model/Sample/Lattice2DItems.h
index 046093775d1..b71d34d2cb0 100644
--- a/GUI/Model/Sample/Lattice2DItems.h
+++ b/GUI/Model/Sample/Lattice2DItems.h
@@ -16,6 +16,7 @@
 #define BORNAGAIN_GUI_MODEL_SAMPLE_LATTICE2DITEMS_H
 
 #include "GUI/Model/Session/SessionItem.h"
+
 class Lattice2D;
 class DoubleDescriptor;
 
diff --git a/GUI/Model/Sample/LayerRoughnessItems.cpp b/GUI/Model/Sample/LayerRoughnessItems.cpp
index fbb6aeaba9b..317daab03bc 100644
--- a/GUI/Model/Sample/LayerRoughnessItems.cpp
+++ b/GUI/Model/Sample/LayerRoughnessItems.cpp
@@ -16,6 +16,7 @@
 #include "GUI/Model/Types/DoubleDescriptor.h"
 
 namespace {
+
 const QString hurst_tooltip =
     "Hurst parameter which describes how jagged the interface,\n "
     "dimensionless [0.0, 1.0], where 0.0 gives more spikes, \n1.0 more smoothness.";
diff --git a/GUI/Model/Sample/MesoCrystalItem.cpp b/GUI/Model/Sample/MesoCrystalItem.cpp
index 8bee38cdbfb..4c0f3a8d704 100644
--- a/GUI/Model/Sample/MesoCrystalItem.cpp
+++ b/GUI/Model/Sample/MesoCrystalItem.cpp
@@ -27,6 +27,7 @@
 #include "Sample/Scattering/IFormFactor.h"
 
 namespace {
+
 const QString abundance_tooltip = "Proportion of this type of mesocrystal normalized to the \n"
                                   "total number of particles in the layout";
 
diff --git a/GUI/Model/Sample/MultiLayerItem.cpp b/GUI/Model/Sample/MultiLayerItem.cpp
index 26445675bdb..3962c28e6c8 100644
--- a/GUI/Model/Sample/MultiLayerItem.cpp
+++ b/GUI/Model/Sample/MultiLayerItem.cpp
@@ -18,6 +18,7 @@
 #include "GUI/Model/Types/VectorDescriptor.h"
 
 namespace {
+
 const QString external_field_tooltip = "External field (A/m)";
 }
 
@@ -113,9 +114,8 @@ void MultiLayerItem::removeLayer(LayerItem* item)
 void MultiLayerItem::moveLayer(LayerItem* item, LayerItem* beforeThisLayer)
 {
     int index = -1; // move to end
-    if (beforeThisLayer != nullptr) {
+    if (beforeThisLayer != nullptr)
         index = layers().indexOf(beforeThisLayer);
-    }
 
     model()->moveItem(item, this, index);
 }
diff --git a/GUI/Model/Sample/ParticleCompositionItem.cpp b/GUI/Model/Sample/ParticleCompositionItem.cpp
index f610cd54430..f64edccac49 100644
--- a/GUI/Model/Sample/ParticleCompositionItem.cpp
+++ b/GUI/Model/Sample/ParticleCompositionItem.cpp
@@ -54,27 +54,23 @@ std::unique_ptr<ParticleComposition> ParticleCompositionItem::createParticleComp
         if (childlist[i]->hasModelType<ParticleItem>()) {
             auto* particle_item = dynamic_cast<ParticleItem*>(childlist[i]);
             auto P_particle = particle_item->createParticle();
-            if (P_particle) {
+            if (P_particle)
                 P_composition->addParticle(*P_particle);
-            }
         } else if (childlist[i]->hasModelType<ParticleCoreShellItem>()) {
             auto* particle_coreshell_item = dynamic_cast<ParticleCoreShellItem*>(childlist[i]);
             auto P_particle_coreshell = particle_coreshell_item->createParticleCoreShell();
-            if (P_particle_coreshell) {
+            if (P_particle_coreshell)
                 P_composition->addParticle(*P_particle_coreshell);
-            }
         } else if (childlist[i]->hasModelType<ParticleCompositionItem>()) {
             auto* particlecomposition_item = dynamic_cast<ParticleCompositionItem*>(childlist[i]);
             auto P_child_composition = particlecomposition_item->createParticleComposition();
-            if (P_child_composition) {
+            if (P_child_composition)
                 P_composition->addParticle(*P_child_composition);
-            }
         } else if (childlist[i]->hasModelType<MesoCrystalItem>()) {
             auto* mesocrystal_item = dynamic_cast<MesoCrystalItem*>(childlist[i]);
             auto P_child_meso = mesocrystal_item->createMesoCrystal();
-            if (P_child_meso) {
+            if (P_child_meso)
                 P_composition->addParticle(*P_child_meso);
-            }
         }
     }
     setTransformationInfo(P_composition.get());
diff --git a/GUI/Model/Sample/ParticleCoreShellItem.cpp b/GUI/Model/Sample/ParticleCoreShellItem.cpp
index ff0f96bd694..dbe7fb69516 100644
--- a/GUI/Model/Sample/ParticleCoreShellItem.cpp
+++ b/GUI/Model/Sample/ParticleCoreShellItem.cpp
@@ -23,6 +23,7 @@
 #include "Sample/Particle/ParticleCoreShell.h"
 
 namespace {
+
 const QString abundance_tooltip = "Proportion of this type of particles normalized to the \n"
                                   "total number of particles in the layout";
 
diff --git a/GUI/Model/Sample/ParticleLayoutItem.cpp b/GUI/Model/Sample/ParticleLayoutItem.cpp
index 4ea90c9ce90..f957464230a 100644
--- a/GUI/Model/Sample/ParticleLayoutItem.cpp
+++ b/GUI/Model/Sample/ParticleLayoutItem.cpp
@@ -44,6 +44,7 @@ const QString density_tooltip =
 const QString weight_tooltip =
     "Weight of this particle layout.\n"
     "Should be used when multiple layouts define different domains in the sample.";
+
 } // namespace
 
 ParticleLayoutItem::ParticleLayoutItem() : SessionItem(M_TYPE)
diff --git a/GUI/Model/Sample/SampleModel.cpp b/GUI/Model/Sample/SampleModel.cpp
index b2071b98ee5..fb582f1bc54 100644
--- a/GUI/Model/Sample/SampleModel.cpp
+++ b/GUI/Model/Sample/SampleModel.cpp
@@ -40,7 +40,6 @@ QVariant SampleModel::data(const QModelIndex& index, int role) const
         return QVariant();
 
     if (SessionItem* item = itemForIndex(index)) {
-
         if (role == Qt::DecorationRole && index.column() == SessionFlags::ITEM_VALUE) {
             const auto propertyName = item->itemName();
             const auto* itemWithMaterial = dynamic_cast<ItemWithMaterial*>(item->parent());
diff --git a/GUI/Model/Sample/SampleValidator.cpp b/GUI/Model/Sample/SampleValidator.cpp
index 60ab7893c2b..d62ddf10c03 100644
--- a/GUI/Model/Sample/SampleValidator.cpp
+++ b/GUI/Model/Sample/SampleValidator.cpp
@@ -20,6 +20,7 @@
 #include "GUI/Model/Sample/ParticleLayoutItem.h"
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_cast;
 using boost::polymorphic_downcast;
 
@@ -46,9 +47,9 @@ void SampleValidator::validateItem(const SessionItem* item)
 
     QString diagnosis;
 
-    if (item->hasModelType<MultiLayerItem>()) {
+    if (item->hasModelType<MultiLayerItem>())
         diagnosis = validateMultiLayerItem(polymorphic_downcast<const MultiLayerItem*>(item));
-    } else if (item->hasModelType<ParticleLayoutItem>()) {
+    else if (item->hasModelType<ParticleLayoutItem>()) {
         diagnosis =
             validateParticleLayoutItem(polymorphic_downcast<const ParticleLayoutItem*>(item));
     } else if (item->hasModelType<ParticleCoreShellItem>()) {
@@ -70,12 +71,11 @@ QString SampleValidator::validateMultiLayerItem(const MultiLayerItem* item)
 
     QVector<LayerItem*> layers = item->layers();
 
-    if (layers.isEmpty()) {
+    if (layers.isEmpty())
         result = "MultiLayer should contain at least one layer.";
-    } else if (layers.size() == 1) {
-        if (layers.front()->layouts().isEmpty()) {
+    else if (layers.size() == 1) {
+        if (layers.front()->layouts().isEmpty())
             result = "The single layer in your MultiLayer should contain ParticleLayout.";
-        }
     }
     return result;
 }
diff --git a/GUI/Model/Session/ModelMapper.cpp b/GUI/Model/Session/ModelMapper.cpp
index eb69e1a0fcc..28eaca0dca5 100644
--- a/GUI/Model/Session/ModelMapper.cpp
+++ b/GUI/Model/Session/ModelMapper.cpp
@@ -219,17 +219,15 @@ void ModelMapper::onDataChanged(const QModelIndex& topLeft, const QModelIndex& b
         if (SessionItem* item = m_model->itemForIndex(topLeft)) {
             // only care f
             const QString tag = m_item->tagFromItem(item);
-            if (!tag.isEmpty()) {
+            if (!tag.isEmpty())
                 callOnPropertyChange(tag);
-            }
         }
     }
     if (nestling > 1) {
         if (SessionItem* parent = item->parent()) {
             const QString tag = parent->tagFromItem(item);
-            if (!tag.isEmpty()) {
+            if (!tag.isEmpty())
                 callOnChildPropertyChange(parent, tag);
-            }
         }
     }
     if (nestling > 0)
@@ -247,9 +245,8 @@ void ModelMapper::onRowsInserted(const QModelIndex& parent, int first, int /*las
             callOnParentChange(m_model->itemForIndex(parent));
     if (nestling == 1)
         callOnChildrenChange(newChild);
-    if (nestling > 0) {
+    if (nestling > 0)
         callOnAnyChildChange(newChild);
-    }
 }
 
 void ModelMapper::onBeginRemoveRows(const QModelIndex& parent, int first, int /*last*/)
diff --git a/GUI/Model/Session/RealLimitsItems.cpp b/GUI/Model/Session/RealLimitsItems.cpp
index 4219708f0fc..8d08c91c2b1 100644
--- a/GUI/Model/Session/RealLimitsItems.cpp
+++ b/GUI/Model/Session/RealLimitsItems.cpp
@@ -15,8 +15,10 @@
 #include "GUI/Model/Session/RealLimitsItems.h"
 
 namespace {
+
 const QString tooltip_min_value = "Minimum allowed value, value included.";
 const QString tooltip_max_value = "Maximum allowed value, value excluded.";
+
 } // namespace
 
 RealLimitsItem::RealLimitsItem(const QString& name, const std::optional<double>& lower,
diff --git a/GUI/Model/Session/SessionModel.cpp b/GUI/Model/Session/SessionModel.cpp
index b00c6f03ddd..521660e0ee6 100644
--- a/GUI/Model/Session/SessionModel.cpp
+++ b/GUI/Model/Session/SessionModel.cpp
@@ -26,6 +26,7 @@
 #include <utility>
 
 namespace {
+
 const int MaxCompression = 9;
 
 //! Returns tooltip for given item.
@@ -92,11 +93,11 @@ QVariant SessionModel::data(const QModelIndex& index, int role) const
                 return item->value();
             if (index.column() == SessionFlags::ITEM_NAME)
                 return item->itemName();
-        } else if (role == Qt::ToolTipRole) {
+        } else if (role == Qt::ToolTipRole)
             return toolTipRole(*item, index.column());
-        } else if (role == Qt::ForegroundRole) {
+        else if (role == Qt::ForegroundRole)
             return item->isEnabled() ? QVariant() : QColor(Qt::gray);
-        } else if (role == Qt::CheckStateRole && index.column() == SessionFlags::ITEM_VALUE) {
+ else if (role == Qt::CheckStateRole && index.column() == SessionFlags::ITEM_VALUE) {
             if (item->value().type() == QVariant::Bool)
                 return item->value().toBool() ? Qt::Checked : Qt::Unchecked;
         } else
diff --git a/GUI/Model/Session/SessionXML.cpp b/GUI/Model/Session/SessionXML.cpp
index bca4da3f09b..c5906470306 100644
--- a/GUI/Model/Session/SessionXML.cpp
+++ b/GUI/Model/Session/SessionXML.cpp
@@ -115,17 +115,17 @@ void GUI::Session::XML::writeAttribute(QXmlStreamWriter* writer, const QString&
     ASSERT(writer);
     ASSERT(variant.isValid());
 
-    if (variant.type() == QVariant::Double) {
+    if (variant.type() == QVariant::Double)
         writeAttribute(writer, attributeName, variant.toDouble());
-    } else if (variant.type() == QVariant::Int) {
+    else if (variant.type() == QVariant::Int)
         writeAttribute(writer, attributeName, variant.toInt());
-    } else if (variant.type() == QVariant::UInt) {
+ else if (variant.type() == QVariant::UInt)
         writeAttribute(writer, attributeName, variant.toUInt());
-    } else if (variant.type() == QVariant::Bool) {
+    else if (variant.type() == QVariant::Bool)
         writer->writeAttribute(attributeName, QString::number(variant.toBool()));
-    } else if (variant.type() == QVariant::String) {
+ else if (variant.type() == QVariant::String)
         writer->writeAttribute(attributeName, variant.toString());
-    } else if (variant.type() == QVariant::Color) {
+    else if (variant.type() == QVariant::Color) {
         const auto col = variant.value<QColor>();
         const QString tcol = col.isValid() ? col.name(QColor::HexArgb) : "";
         writer->writeAttribute(attributeName, tcol);
@@ -133,7 +133,6 @@ void GUI::Session::XML::writeAttribute(QXmlStreamWriter* writer, const QString&
         auto combo = variant.value<ComboProperty>();
         writer->writeAttribute(attributeName, combo.stringOfSelections());
         writer->writeAttribute(GUI::Session::XML::ParameterExtAttribute, combo.stringOfValues());
-
     } else
         throw Error("GUI::Session::XML::writeVariant: Parameter type not supported "
                     + QString(variant.typeName()));
@@ -304,7 +303,6 @@ QString GUI::Session::XML::readProperty(QXmlStreamReader* reader, SessionItem* i
             reader->attributes().value(GUI::Session::XML::ParameterValueAttribute).toString();
         variant = QColor(parameter_value);
     } else if (parameter_type == "ExternalProperty") {
-
         const bool isMaterialItemColor =
             item->parent() != nullptr && dynamic_cast<MaterialItem*>(item->parent());
 
diff --git a/GUI/Model/Session/SimulationOptionsItem.cpp b/GUI/Model/Session/SimulationOptionsItem.cpp
index 516f863be28..3a2d6d2876e 100644
--- a/GUI/Model/Session/SimulationOptionsItem.cpp
+++ b/GUI/Model/Session/SimulationOptionsItem.cpp
@@ -19,14 +19,18 @@
 #include <thread>
 
 namespace {
+
 namespace Tags {
+
 const QString RunImmediately("RunImmediately");
 const QString NumberOfThreads("NumberOfThreads");
 const QString Analytical("Analytical");
 const QString NumberOfMonteCarloPoints("NumberOfMonteCarloPoints");
 const QString UseAverageMaterials("UseAverageMaterials");
 const QString IncludeSpecularPeak("IncludeSpecularPeak");
+
 } // namespace Tags
+
 } // namespace
 
 using namespace GUI::Session::XML;
diff --git a/GUI/Model/To/DomainSimulationBuilder.cpp b/GUI/Model/To/DomainSimulationBuilder.cpp
index a358a3812a2..5ee90855d10 100644
--- a/GUI/Model/To/DomainSimulationBuilder.cpp
+++ b/GUI/Model/To/DomainSimulationBuilder.cpp
@@ -36,7 +36,6 @@
 #include "Resample/Options/SimulationOptions.h"
 #include "Sample/Multilayer/MultiLayer.h"
 
-
 namespace {
 
 //! If the given item has distributions, then add these distributions to the simulation's
diff --git a/GUI/Model/To/DomainSimulationBuilder.h b/GUI/Model/To/DomainSimulationBuilder.h
index a3c30c6115d..c6cbc16a201 100644
--- a/GUI/Model/To/DomainSimulationBuilder.h
+++ b/GUI/Model/To/DomainSimulationBuilder.h
@@ -31,6 +31,7 @@ namespace GUI::Model::DomainSimulationBuilder {
 std::unique_ptr<ISimulation> createSimulation(const MultiLayerItem* sampleItem,
                                               const InstrumentItem* instrumentItem,
                                               const SimulationOptionsItem& optionsItem);
+
 } // namespace GUI::Model::DomainSimulationBuilder
 
 #endif // BORNAGAIN_GUI_MODEL_TO_DOMAINSIMULATIONBUILDER_H
diff --git a/GUI/Model/To/ToDomain.cpp b/GUI/Model/To/ToDomain.cpp
index 3d08dc1abaa..b7184922a69 100644
--- a/GUI/Model/To/ToDomain.cpp
+++ b/GUI/Model/To/ToDomain.cpp
@@ -28,7 +28,6 @@
 #include "Sample/Particle/Particle.h"
 #include "Sample/Particle/ParticleCoreShell.h"
 
-
 std::unique_ptr<MultiLayer> GUI::Transform::ToDomain::createMultiLayer(const MultiLayerItem& item)
 {
     auto P_multilayer = std::make_unique<MultiLayer>();
diff --git a/GUI/Model/Types/DoubleDescriptor.h b/GUI/Model/Types/DoubleDescriptor.h
index 3fd1f54416d..fee8706ff4c 100644
--- a/GUI/Model/Types/DoubleDescriptor.h
+++ b/GUI/Model/Types/DoubleDescriptor.h
@@ -33,7 +33,6 @@ using std::variant;
 //! eases SessionItem migration. The underlying implementation can be a SessionItem, a simple double
 //! member, or any other construction to hold a double value.
 class DoubleDescriptor {
-
 public:
     DoubleDescriptor(const DoubleDescriptor& other) = default;
 
diff --git a/GUI/Util/ComboProperty.cpp b/GUI/Util/ComboProperty.cpp
index ffc07ad9a6c..a73f3a0ae00 100644
--- a/GUI/Util/ComboProperty.cpp
+++ b/GUI/Util/ComboProperty.cpp
@@ -17,8 +17,10 @@
 #include "GUI/Util/Error.h"
 
 namespace {
+
 const QString value_separator = ";";
 const QString selection_separator = ",";
+
 } // namespace
 
 ComboProperty::ComboProperty() = default;
diff --git a/GUI/View/Common/DocksController.cpp b/GUI/View/Common/DocksController.cpp
index c80ad50ee94..97ccba91316 100644
--- a/GUI/View/Common/DocksController.cpp
+++ b/GUI/View/Common/DocksController.cpp
@@ -25,6 +25,7 @@
 #include <QTimer>
 
 namespace {
+
 const char dockWidgetActiveState[] = "DockWidgetActiveState";
 const char StateKey[] = "State";
 const int settingsVersion = 2;
@@ -212,9 +213,8 @@ void DocksController::handleWindowVisibilityChanged(bool visible)
 {
     m_handleDockVisibilityChanges = false;
     for (auto* dockWidget : dockWidgets()) {
-        if (dockWidget->isFloating()) {
+        if (dockWidget->isFloating())
             dockWidget->setVisible(visible && dockWidget->property(dockWidgetActiveState).toBool());
-        }
     }
     if (visible)
         m_handleDockVisibilityChanges = true;
@@ -272,9 +272,8 @@ QHash<QString, QVariant> DocksController::saveSettings() const
 {
     QHash<QString, QVariant> settings;
     settings.insert(QLatin1String(StateKey), m_mainWindow->saveState(settingsVersion));
-    for (auto* dockWidget : dockWidgets()) {
+    for (auto* dockWidget : dockWidgets())
         settings.insert(dockWidget->objectName(), dockWidget->property(dockWidgetActiveState));
-    }
     return settings;
 }
 
@@ -283,7 +282,6 @@ void DocksController::restoreSettings(const QHash<QString, QVariant>& settings)
     QByteArray ba = settings.value(QLatin1String(StateKey), QByteArray()).toByteArray();
     if (!ba.isEmpty())
         m_mainWindow->restoreState(ba, settingsVersion);
-    for (auto* widget : dockWidgets()) {
+    for (auto* widget : dockWidgets())
         widget->setProperty(dockWidgetActiveState, settings.value(widget->objectName(), false));
-    }
 }
diff --git a/GUI/View/Common/InfoPanel.cpp b/GUI/View/Common/InfoPanel.cpp
index 0ca60958e2d..6466b730c0a 100644
--- a/GUI/View/Common/InfoPanel.cpp
+++ b/GUI/View/Common/InfoPanel.cpp
@@ -19,9 +19,11 @@
 #include <QStackedWidget>
 
 namespace {
+
 const int minimum_widget_height = 25; // height of toolbar
 const int minimum_height_before_collapse = 50;
 const int default_height = 200;
+
 } // namespace
 
 InfoPanel::InfoPanel(QWidget* parent)
@@ -83,7 +85,6 @@ void InfoPanel::setContentVisible(bool editor_status, bool dock_notify)
 
         if (m_stackedWidget->currentWidget())
             m_stackedWidget->currentWidget()->show();
-
     } else {
         m_cached_height = (height() < minimum_height_before_collapse ? default_height : height());
         if (m_stackedWidget->currentWidget())
diff --git a/GUI/View/Common/InfoPanelToolBar.cpp b/GUI/View/Common/InfoPanelToolBar.cpp
index 285e298dd70..ebf33b42e4a 100644
--- a/GUI/View/Common/InfoPanelToolBar.cpp
+++ b/GUI/View/Common/InfoPanelToolBar.cpp
@@ -18,10 +18,12 @@
 #include <QToolButton>
 
 namespace {
+
 const int minimum_size = 25;
 const QString icon_up = ":/images/dark-angle-up.svg";
 const QString icon_down = ":/images/dark-angle-down.svg";
 const QString expand_text = "Collapse/expand view";
+
 } // namespace
 
 InfoPanelToolBar::InfoPanelToolBar(QWidget* parent)
diff --git a/GUI/View/Common/ScientificSpinBox.cpp b/GUI/View/Common/ScientificSpinBox.cpp
index 9dc56aa24b7..b6893bf9dad 100644
--- a/GUI/View/Common/ScientificSpinBox.cpp
+++ b/GUI/View/Common/ScientificSpinBox.cpp
@@ -17,12 +17,14 @@
 #include <cmath>
 
 namespace {
+
 const double upper_switch = 100;
 const double lower_switch = 0.1;
 const double min_val = std::numeric_limits<double>::min();
 const double max_val = std::numeric_limits<double>::max();
 
 bool useExponentialNotation(double val);
+
 } // namespace
 
 ScientificSpinBox::ScientificSpinBox(QWidget* parent)
@@ -161,6 +163,7 @@ bool ScientificSpinBox::inRange(double val) const
 }
 
 namespace {
+
 bool useExponentialNotation(double val)
 {
     const double abs_val = std::abs(val);
@@ -170,4 +173,5 @@ bool useExponentialNotation(double val)
 
     return abs_val >= upper_switch || abs_val < lower_switch;
 }
+
 } // namespace
diff --git a/GUI/View/Compare/FitComparisonController.cpp b/GUI/View/Compare/FitComparisonController.cpp
index ee8e8ddb410..cf69657786e 100644
--- a/GUI/View/Compare/FitComparisonController.cpp
+++ b/GUI/View/Compare/FitComparisonController.cpp
@@ -22,10 +22,12 @@
 #include "GUI/View/Compare/PropertyRepeater.h"
 
 namespace {
+
 // different limits on relative difference plot are required
 // to provide the best appearance
 const double relative_diff_min_2d = 1e-05;
 const double relative_diff_max_2d = 1.0;
+
 } // namespace
 
 class FitComparisonController2D::DiffItemController : public QObject {
diff --git a/GUI/View/Compare/PropertyRepeater.cpp b/GUI/View/Compare/PropertyRepeater.cpp
index af211bc9b24..d983c0100e4 100644
--- a/GUI/View/Compare/PropertyRepeater.cpp
+++ b/GUI/View/Compare/PropertyRepeater.cpp
@@ -68,9 +68,8 @@ void PropertyRepeater::onPropertyChanged(SessionItem* item, const QString& prope
     m_block_repeater = true;
 
     QVariant value = item->getItemValue(propertyName);
-    for (auto* target : targetItems(item)) {
+    for (auto* target : targetItems(item))
         target->setItemValue(propertyName, value);
-    }
     m_block_repeater = false;
 }
 
@@ -84,9 +83,8 @@ void PropertyRepeater::setOnChildPropertyChange(SessionItem* item, const QString
     SessionItem* sourceItem = item->parent();
     QString tag = sourceItem->tagFromItem(item);
     QVariant value = item->getItemValue(propertyName);
-    for (auto* target : targetItems(sourceItem)) {
+    for (auto* target : targetItems(sourceItem))
         target->getItem(tag)->setItemValue(propertyName, value);
-    }
     m_block_repeater = false;
 }
 
diff --git a/GUI/View/Fit/FitActivityPanel.cpp b/GUI/View/Fit/FitActivityPanel.cpp
index 18ec625a4a9..93b3217cb7d 100644
--- a/GUI/View/Fit/FitActivityPanel.cpp
+++ b/GUI/View/Fit/FitActivityPanel.cpp
@@ -69,7 +69,6 @@ QSize FitActivityPanel::minimumSizeHint() const
 
 void FitActivityPanel::setItem(JobItem* item)
 {
-
     if (!isValidJobItem(item)) {
         if (!item)
             m_stack->setCurrentWidget(m_blankWidget);
diff --git a/GUI/View/Fit/FitObjectiveBuilder.h b/GUI/View/Fit/FitObjectiveBuilder.h
index e62d663a768..e4bee7069f6 100644
--- a/GUI/View/Fit/FitObjectiveBuilder.h
+++ b/GUI/View/Fit/FitObjectiveBuilder.h
@@ -21,6 +21,7 @@ class JobItem;
 class FitObjective;
 class ISimulation;
 namespace mumufit {
+
 class Parameters;
 }
 template <class T> class OutputData;
diff --git a/GUI/View/Fit/FitParameterWidget.cpp b/GUI/View/Fit/FitParameterWidget.cpp
index c0b3b7d99e9..084175336a8 100644
--- a/GUI/View/Fit/FitParameterWidget.cpp
+++ b/GUI/View/Fit/FitParameterWidget.cpp
@@ -34,6 +34,7 @@
 #include <QVBoxLayout>
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_downcast;
 
 FitParameterWidget::FitParameterWidget(QWidget* parent)
@@ -177,18 +178,16 @@ void FitParameterWidget::onRemoveFitParAction()
     // retrieve both, selected FitParameterItem and FitParameterItemLink
     QVector<FitParameterLinkItem*> linksToRemove = selectedFitParameterLinks();
 
-    for (auto* item : linksToRemove) {
+    for (auto* item : linksToRemove)
         container->model()->removeRow(item->index().row(), item->index().parent());
-    }
 
     QVector<FitParameterItem*> itemsToRemove = selectedFitParameters();
     //  By uncommenting line below, removing link from fit parameter will lead to fit parameter
     // removal too (if it doesn't have other links)
     //  QVector<FitParameterItem *> itemsToRemove = selectedFitParameters()+emptyFitParameters();
 
-    for (auto* item : itemsToRemove) {
+    for (auto* item : itemsToRemove)
         container->model()->removeRow(item->index().row(), item->index().parent());
-    }
 }
 
 //! Add all selected parameters to fitParameter with given index
@@ -259,9 +258,8 @@ void FitParameterWidget::initTuningWidgetContextMenu(QMenu& menu)
     if (allow_one_fit_parameter_to_have_more_than_one_link) {
         QStringList fitParNames =
             FitParameterHelper::getFitParameterNames(jobItem()->fitParameterContainerItem());
-        if (fitParNames.isEmpty() || !canCreateFitParameter()) {
+        if (fitParNames.isEmpty() || !canCreateFitParameter())
             addToFitParMenu->setEnabled(false);
-        }
         for (int i = 0; i < fitParNames.count(); ++i) {
             auto* action = new QAction(QString("to ").append(fitParNames.at(i)), addToFitParMenu);
             connect(action, &QAction::triggered, [=] { onAddToFitParAction(i); });
@@ -397,9 +395,8 @@ void FitParameterWidget::spanParameters()
             break;
         int childRowCount = m_fitParameterModel->rowCount(parameter);
         if (childRowCount > 0) {
-            for (int j = 0; j < childRowCount; j++) {
+            for (int j = 0; j < childRowCount; j++)
                 m_treeView->setFirstColumnSpanned(j, parameter, true);
-            }
         }
     }
 }
diff --git a/GUI/View/Fit/FitSessionController.cpp b/GUI/View/Fit/FitSessionController.cpp
index fa56a852428..56d8de7f49d 100644
--- a/GUI/View/Fit/FitSessionController.cpp
+++ b/GUI/View/Fit/FitSessionController.cpp
@@ -26,6 +26,7 @@
 #include "GUI/View/Fit/GUIFitObserver.h"
 
 namespace {
+
 const bool use_fit_objective = true;
 }
 
@@ -64,9 +65,8 @@ void FitSessionController::setItem(JobItem* item)
     // Propagates update interval from FitSuiteItem to fit observer.
     m_jobItem->fitSuiteItem()->mapper()->setOnPropertyChange(
         [this](const QString& name) {
-            if (FitSuiteItem::isUpdateIntervalPropertyName(name)) {
+            if (FitSuiteItem::isUpdateIntervalPropertyName(name))
                 m_observer->setInterval(m_jobItem->fitSuiteItem()->updateInterval());
-            }
         },
         this);
 }
@@ -82,7 +82,6 @@ void FitSessionController::onStartFittingRequest()
         m_objectiveBuilder->attachObserver(m_observer);
         m_observer->finishedPlotting();
         m_runFitManager->runFitting(m_objectiveBuilder);
-
     } catch (std::exception& e) {
         m_jobItem->setStatus(JobStatus::Failed);
         m_fitlog->append(e.what(), FitLogLevel::Error);
diff --git a/GUI/View/Fit/JobRealTimeWidget.cpp b/GUI/View/Fit/JobRealTimeWidget.cpp
index 719b77813e2..3d426bff14c 100644
--- a/GUI/View/Fit/JobRealTimeWidget.cpp
+++ b/GUI/View/Fit/JobRealTimeWidget.cpp
@@ -20,6 +20,7 @@
 #include <QVBoxLayout>
 
 namespace {
+
 const bool reuse_widget = true;
 }
 
diff --git a/GUI/View/Fit/ParameterTuningDelegate.cpp b/GUI/View/Fit/ParameterTuningDelegate.cpp
index 16521fca7fe..d9822ebd13e 100644
--- a/GUI/View/Fit/ParameterTuningDelegate.cpp
+++ b/GUI/View/Fit/ParameterTuningDelegate.cpp
@@ -34,8 +34,10 @@
 #include <limits>
 
 namespace {
+
 const double maximum_doublespin_value = std::numeric_limits<double>::max();
 const double minimum_doublespin_value = std::numeric_limits<double>::lowest();
+
 } // namespace
 
 ParameterTuningDelegate::TuningData::TuningData()
@@ -56,11 +58,10 @@ void ParameterTuningDelegate::TuningData::setItemLimits(const RealLimits& item_l
 int ParameterTuningDelegate::TuningData::value_to_slider(double value)
 {
     double dr(0);
-    if (value == 0.0) {
+    if (value == 0.0)
         dr = 1.0 * m_range_factor / 100.;
-    } else {
+    else
         dr = std::abs(value) * m_range_factor / 100.;
-    }
     m_rmin = value - dr;
     m_rmax = value + dr;
 
@@ -102,7 +103,6 @@ void ParameterTuningDelegate::paint(QPainter* painter, const QStyleOptionViewIte
                                     const QModelIndex& index) const
 {
     if (index.column() == m_valueColumn) {
-
         if (!index.parent().isValid())
             return;
 
@@ -158,17 +158,15 @@ QWidget* ParameterTuningDelegate::createEditor(QWidget* parent, const QStyleOpti
     m_valueBox->setDecimals(m_currentItem->decimalsOfLink());
     m_valueBox->setSingleStep(m_tuning_info.step());
 
-    if (limits.hasLowerLimit()) {
+    if (limits.hasLowerLimit())
         m_valueBox->setMinimum(limits.lowerLimit());
-    } else {
+    else
         m_valueBox->setMinimum(minimum_doublespin_value);
-    }
 
-    if (limits.hasUpperLimit()) {
+    if (limits.hasUpperLimit())
         m_valueBox->setMaximum(limits.upperLimit());
-    } else {
+    else
         m_valueBox->setMaximum(maximum_doublespin_value);
-    }
 
     m_valueBox->setValue(value);
     connect(m_valueBox, &ScientificSpinBox::valueChanged, this,
@@ -254,13 +252,10 @@ void ParameterTuningDelegate::setEditorData(QWidget* editor, const QModelIndex&
 void ParameterTuningDelegate::setModelData(QWidget* editor, QAbstractItemModel* model,
                                            const QModelIndex& index) const
 {
-    if (index.column() == m_valueColumn) {
-
+    if (index.column() == m_valueColumn)
         model->setData(index, m_valueBox->value());
-
-    } else {
+    else
         QItemDelegate::setModelData(editor, model, index);
-    }
 }
 
 void ParameterTuningDelegate::emitSignals(double value)
diff --git a/GUI/View/Fit/ParameterTuningWidget.cpp b/GUI/View/Fit/ParameterTuningWidget.cpp
index 7c65deaaf88..5e775ca11c4 100644
--- a/GUI/View/Fit/ParameterTuningWidget.cpp
+++ b/GUI/View/Fit/ParameterTuningWidget.cpp
@@ -206,9 +206,9 @@ void ParameterTuningWidget::updateDragAndDropSettings()
 //! editing widget, it will be forced to close.
 void ParameterTuningWidget::setTuningDelegateEnabled(bool enabled)
 {
-    if (enabled) {
+    if (enabled)
         m_delegate->setReadOnly(false);
-    } else {
+    else {
         m_delegate->setReadOnly(true);
         closeActiveEditors();
     }
diff --git a/GUI/View/Fit/RunFitControlWidget.cpp b/GUI/View/Fit/RunFitControlWidget.cpp
index 6602534d6e1..4b5f769c7e9 100644
--- a/GUI/View/Fit/RunFitControlWidget.cpp
+++ b/GUI/View/Fit/RunFitControlWidget.cpp
@@ -25,10 +25,12 @@
 #include <QSlider>
 
 namespace {
+
 const int default_interval = 10;
 const std::vector<int> slider_to_interval = {1,  2,  3,  4,   5,   10,  15,  20,
                                              25, 30, 50, 100, 200, 500, 1000};
 const QString slider_tooltip = "Updates fit progress every Nth iteration";
+
 } // namespace
 
 RunFitControlWidget::RunFitControlWidget(QWidget* parent)
diff --git a/GUI/View/Fit/SliderSettingsWidget.cpp b/GUI/View/Fit/SliderSettingsWidget.cpp
index ddc32f278ae..aed72604f0d 100644
--- a/GUI/View/Fit/SliderSettingsWidget.cpp
+++ b/GUI/View/Fit/SliderSettingsWidget.cpp
@@ -71,11 +71,11 @@ SliderSettingsWidget::SliderSettingsWidget(QWidget* parent)
 
 void SliderSettingsWidget::rangeChanged()
 {
-    if (m_radio1->isChecked()) {
+    if (m_radio1->isChecked())
         m_currentSliderRange = 10.0;
-    } else if (m_radio2->isChecked()) {
+    else if (m_radio2->isChecked())
         m_currentSliderRange = 100.0;
-    } else if (m_radio3->isChecked()) {
+ else if (m_radio3->isChecked()) {
         m_currentSliderRange = 1000.0;
     }
     emit sliderRangeFactorChanged(m_currentSliderRange);
@@ -83,9 +83,8 @@ void SliderSettingsWidget::rangeChanged()
 
 void SliderSettingsWidget::onLockZChanged(int state)
 {
-    if (state == Qt::Unchecked) {
+    if (state == Qt::Unchecked)
         emit lockzChanged(false);
-    } else if (state == Qt::Checked) {
+    else if (state == Qt::Checked)
         emit lockzChanged(true);
-    }
 }
diff --git a/GUI/View/Import/ImportDataView.cpp b/GUI/View/Import/ImportDataView.cpp
index 7d783da5eb3..628b9af847e 100644
--- a/GUI/View/Import/ImportDataView.cpp
+++ b/GUI/View/Import/ImportDataView.cpp
@@ -23,6 +23,7 @@
 #include <QVBoxLayout>
 
 namespace {
+
 const bool reuse_widget = true;
 }
 
diff --git a/GUI/View/Import/SpecularDataImportWidget.cpp b/GUI/View/Import/SpecularDataImportWidget.cpp
index 2135a470778..5c6b79637ec 100644
--- a/GUI/View/Import/SpecularDataImportWidget.cpp
+++ b/GUI/View/Import/SpecularDataImportWidget.cpp
@@ -150,12 +150,10 @@ void SpecularDataImportWidget::fillLoaderCombo()
 {
     QSignalBlocker b(m_ui->formatSelectionComboBox);
     m_ui->formatSelectionComboBox->clear();
-    for (auto* loader : DataLoaders1D::instance().recentlyUsedLoaders()) {
+    for (auto* loader : DataLoaders1D::instance().recentlyUsedLoaders())
         m_ui->formatSelectionComboBox->addItem(loader->name());
-    }
-    for (auto* loader : DataLoaders1D::instance().loaders()) {
+    for (auto* loader : DataLoaders1D::instance().loaders())
         m_ui->formatSelectionComboBox->addItem(loader->name());
-    }
 
     // e.g. legacy loader is not present in the combo by default. Add it here so it can be selected
     if (m_loader != nullptr)
@@ -193,7 +191,6 @@ AbstractDataLoader* SpecularDataImportWidget::selectedLoader()
 void SpecularDataImportWidget::onFormatSelectionChanged()
 {
     if (m_loader && m_loader->fileContent().isEmpty()) {
-
         QSignalBlocker b(m_ui->formatSelectionComboBox);
         m_ui->formatSelectionComboBox->setCurrentText(m_loader->name());
 
@@ -232,7 +229,6 @@ void SpecularDataImportWidget::updatePreview()
                                                                  // of QAbstractItemView::setModel
         auto* resultModel = m_loader->createResultModel();
         if (resultModel != nullptr) {
-
             const auto originalSections = resultModel->sectionsOfColumnType(
                 AbstractDataLoaderResultModel::ColumnType::fileContent);
 
@@ -314,7 +310,6 @@ void SpecularDataImportWidget::updatePreview()
 
         for (auto& w : warnings)
             new QListWidgetItem(w, m_ui->warningsListWidget);
-
     } else {
         m_ui->warningsIcon->hide();
         m_ui->warningsLabel->hide();
diff --git a/GUI/View/Import/SpecularDataImportWidget.h b/GUI/View/Import/SpecularDataImportWidget.h
index 4b518dbaeb4..a2c2dcc3b47 100644
--- a/GUI/View/Import/SpecularDataImportWidget.h
+++ b/GUI/View/Import/SpecularDataImportWidget.h
@@ -25,6 +25,7 @@ class AbstractDataLoader;
 class RealDataItem;
 
 namespace Ui {
+
 class SpecularDataImportWidget;
 }
 
diff --git a/GUI/View/Info/CautionSign.cpp b/GUI/View/Info/CautionSign.cpp
index e3603bb36f5..36dc1ce9362 100644
--- a/GUI/View/Info/CautionSign.cpp
+++ b/GUI/View/Info/CautionSign.cpp
@@ -21,8 +21,10 @@
 #include <QTimer>
 
 namespace {
+
 const int xpos_offset = 40;
 const int ypos_offset = 40;
+
 } // namespace
 
 CautionSign::CautionSign(QWidget* parent)
@@ -63,7 +65,6 @@ void CautionSign::setCautionMessage(const QString& cautionMessage)
         m_clear_just_had_happened = false;
         QTimer::singleShot(50, this, [=]() { setCautionMessage(cautionMessage); });
     } else {
-
         m_caution_message = cautionMessage;
 
         if (!m_cautionWidget)
@@ -111,7 +112,6 @@ QPoint CautionSign::positionForCautionSign() const
     int y = m_area->height() - ypos_offset;
 
     if (auto* scrollArea = dynamic_cast<QAbstractScrollArea*>(m_area)) {
-
         if (QScrollBar* horizontal = scrollArea->horizontalScrollBar()) {
             if (horizontal->isVisible())
                 y -= horizontal->height();
diff --git a/GUI/View/Info/DetailedMessageBox.cpp b/GUI/View/Info/DetailedMessageBox.cpp
index 72157165013..d39dd515469 100644
--- a/GUI/View/Info/DetailedMessageBox.cpp
+++ b/GUI/View/Info/DetailedMessageBox.cpp
@@ -22,6 +22,7 @@
 #include <QVBoxLayout>
 
 namespace {
+
 const QSize default_dialog_size(512, 300);
 }
 
diff --git a/GUI/View/Info/OverlayLabelController.cpp b/GUI/View/Info/OverlayLabelController.cpp
index 879cb46c355..71f2171a378 100644
--- a/GUI/View/Info/OverlayLabelController.cpp
+++ b/GUI/View/Info/OverlayLabelController.cpp
@@ -47,7 +47,6 @@ void OverlayLabelController::setShown(bool shown)
             updateLabelGeometry();
             m_label->show();
         }
-
     } else {
         delete m_label;
         m_label = nullptr;
diff --git a/GUI/View/Info/ProjectLoadProblemDialog.cpp b/GUI/View/Info/ProjectLoadProblemDialog.cpp
index 392d1d0c8e3..3b65e1fb82a 100644
--- a/GUI/View/Info/ProjectLoadProblemDialog.cpp
+++ b/GUI/View/Info/ProjectLoadProblemDialog.cpp
@@ -23,6 +23,7 @@
 #include <utility>
 
 namespace {
+
 const int top_panel_height = 80;
 }
 
diff --git a/GUI/View/Info/PythonSyntaxHighlighter.cpp b/GUI/View/Info/PythonSyntaxHighlighter.cpp
index ea0a62b8dda..02031e16dca 100644
--- a/GUI/View/Info/PythonSyntaxHighlighter.cpp
+++ b/GUI/View/Info/PythonSyntaxHighlighter.cpp
@@ -136,9 +136,8 @@ void PythonSyntaxHighlighter::initializeRules()
         rules.append(
             HighlightingRule(QString("%1").arg(currOperator), 0, basicStyles.value("operator")));
     }
-    for (const QString& currBrace : braces) {
+    for (const QString& currBrace : braces)
         rules.append(HighlightingRule(QString("%1").arg(currBrace), 0, basicStyles.value("brace")));
-    }
     // 'self'
     rules.append(HighlightingRule("\\bself\\b", 0, basicStyles.value("self")));
 
diff --git a/GUI/View/Instrument/Detail/detailsbutton.cpp b/GUI/View/Instrument/Detail/detailsbutton.cpp
index c224e98dfe4..a09a13f4f87 100644
--- a/GUI/View/Instrument/Detail/detailsbutton.cpp
+++ b/GUI/View/Instrument/Detail/detailsbutton.cpp
@@ -33,8 +33,10 @@
 #include <QStyleOption>
 
 namespace {
+
 const bool FlatProjectsMode(false);
 const QColor DetailsButtonBackgroundColorHover("#eff0f1");
+
 } // namespace
 
 namespace GUI::FromQt {
diff --git a/GUI/View/Instrument/Detail/detailswidget.cpp b/GUI/View/Instrument/Detail/detailswidget.cpp
index aa42aac670a..9d6d486786a 100644
--- a/GUI/View/Instrument/Detail/detailswidget.cpp
+++ b/GUI/View/Instrument/Detail/detailswidget.cpp
@@ -35,6 +35,7 @@
 #include <QScrollArea>
 #include <QStyle>
 #include <qglobal.h>
+
 /*!
     \class GUI::Util::DetailsWidget
 
@@ -56,6 +57,7 @@
 */
 
 namespace {
+
 const bool FlatProjectsMode(false);
 }
 
diff --git a/GUI/View/Instrument/DetectorAlignmentEditor.cpp b/GUI/View/Instrument/DetectorAlignmentEditor.cpp
index 64a571d5055..59005b989a8 100644
--- a/GUI/View/Instrument/DetectorAlignmentEditor.cpp
+++ b/GUI/View/Instrument/DetectorAlignmentEditor.cpp
@@ -261,7 +261,6 @@ void PerpendicularDetectorAlignmentForm::onDistanceValueChanged(double distance)
 
 /// detector alignment form for the perpendicular case where the reflected beam is used
 class ReflectedBeamDetectorAlignmentForm : public PerpendicularDetectorAlignmentForm {
-
 public:
     ReflectedBeamDetectorAlignmentForm(const QString& title, const QString& tooltip,
                                        QWidget* parent = nullptr,
@@ -318,7 +317,6 @@ void ReflectedBeamDetectorAlignmentForm::setV0(double v0)
 
 /// detector alignment form for the perpendicular case where the direct beam is used
 class DirectBeamDetectorAlignmentForm : public PerpendicularDetectorAlignmentForm {
-
 public:
     DirectBeamDetectorAlignmentForm(const QString& title, const QString& tooltip,
                                     QWidget* parent = nullptr,
diff --git a/GUI/View/Instrument/DetectorAlignmentEditor.h b/GUI/View/Instrument/DetectorAlignmentEditor.h
index 33d65937e69..a4ebe3a1b8e 100644
--- a/GUI/View/Instrument/DetectorAlignmentEditor.h
+++ b/GUI/View/Instrument/DetectorAlignmentEditor.h
@@ -29,7 +29,6 @@ class RectangularDetectorItem;
 /// values
 
 class DetectorAlignmentEditor : public QWidget {
-
 public:
     DetectorAlignmentEditor(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
     void setItem(RectangularDetectorItem* item);
diff --git a/GUI/View/Instrument/DetectorEditor.cpp b/GUI/View/Instrument/DetectorEditor.cpp
index e4d642b51ab..dd9fb442b24 100644
--- a/GUI/View/Instrument/DetectorEditor.cpp
+++ b/GUI/View/Instrument/DetectorEditor.cpp
@@ -23,7 +23,6 @@
 #include <QFormLayout>
 #include <QStackedLayout>
 
-
 //==================================================================================================
 // DetectorEditor
 //==================================================================================================
diff --git a/GUI/View/Instrument/DistributionForms.cpp b/GUI/View/Instrument/DistributionForms.cpp
index 367a372e603..f2dc09622bb 100644
--- a/GUI/View/Instrument/DistributionForms.cpp
+++ b/GUI/View/Instrument/DistributionForms.cpp
@@ -23,9 +23,11 @@
 #include <QSpinBox>
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_downcast;
 
 #include <boost/numeric/interval.hpp>
+
 using boost::numeric::interval;
 
 namespace {
@@ -38,6 +40,7 @@ static const interval<double> full(std::numeric_limits<double>::lowest(),
 
 // constant for often used interval [0,inf[
 static const interval<double> nonnegative(0, std::numeric_limits<double>::max());
+
 } // namespace Range
 
 /// perform a strandard configuration for the QSpinBox
diff --git a/GUI/View/Instrument/DistributionPlot.cpp b/GUI/View/Instrument/DistributionPlot.cpp
index 0e047264711..cb315451be1 100644
--- a/GUI/View/Instrument/DistributionPlot.cpp
+++ b/GUI/View/Instrument/DistributionPlot.cpp
@@ -23,6 +23,7 @@
 #include <qcustomplot.h>
 
 namespace {
+
 const QPair<double, double> default_xrange(-0.1, 0.1);
 const QPair<double, double> default_yrange(0.0, 1.1);
 
@@ -93,7 +94,6 @@ void DistributionPlot::plotItem()
 
     try {
         plot_distributions();
-
     } catch (const std::exception& ex) {
         init_plot();
 
@@ -315,6 +315,7 @@ void DistributionPlot::setXAxisName(const QString& xAxisName)
 }
 
 namespace {
+
 //! Returns (xmin, xmax) of x-axis to display single value.
 QPair<double, double> xRangeForValue(double value)
 {
diff --git a/GUI/View/Instrument/EditDistributionDialog.cpp b/GUI/View/Instrument/EditDistributionDialog.cpp
index e421326c960..c2013bfbec5 100644
--- a/GUI/View/Instrument/EditDistributionDialog.cpp
+++ b/GUI/View/Instrument/EditDistributionDialog.cpp
@@ -21,7 +21,6 @@
 #include <QSplitter>
 #include <QVBoxLayout>
 
-
 EditDistributionDialog::EditDistributionDialog(ItemWithDistribution* item, const QString& title,
                                                const std::optional<MeanConfig>& mean_config,
                                                GUI::ID::Distributions distributions,
diff --git a/GUI/View/Instrument/EnvironmentEditor.cpp b/GUI/View/Instrument/EnvironmentEditor.cpp
index d265c5d5089..4fa1d3a5501 100644
--- a/GUI/View/Instrument/EnvironmentEditor.cpp
+++ b/GUI/View/Instrument/EnvironmentEditor.cpp
@@ -27,7 +27,6 @@
 //==================================================================================================
 
 class ConstantBackgroundForm : public QWidget {
-
 public:
     ConstantBackgroundForm(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
     void setupBackground(ConstantBackgroundItem* item);
diff --git a/GUI/View/Instrument/FootprintCorrectionEditor.cpp b/GUI/View/Instrument/FootprintCorrectionEditor.cpp
index 652597ffc68..1ab51cf9896 100644
--- a/GUI/View/Instrument/FootprintCorrectionEditor.cpp
+++ b/GUI/View/Instrument/FootprintCorrectionEditor.cpp
@@ -27,7 +27,6 @@
 //==================================================================================================
 
 class SquareFootprintForm : public QWidget {
-
 public:
     SquareFootprintForm(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
     void setFootprint(FootprintSquareItem* item);
@@ -85,7 +84,6 @@ void SquareFootprintForm::onValueChanged(double value)
 //==================================================================================================
 
 class GaussFootprintForm : public QWidget {
-
 public:
     GaussFootprintForm(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
     void setFootprint(FootprintGaussianItem* item);
diff --git a/GUI/View/Instrument/GISASBeamEditor.cpp b/GUI/View/Instrument/GISASBeamEditor.cpp
index 0fad4120c4c..96b70d32799 100644
--- a/GUI/View/Instrument/GISASBeamEditor.cpp
+++ b/GUI/View/Instrument/GISASBeamEditor.cpp
@@ -23,7 +23,6 @@
 #include <QGridLayout>
 #include <QLineEdit>
 
-
 GISASBeamEditor::GISASBeamEditor(QWidget* parent, Qt::WindowFlags f)
     : QWidget(parent, f), m_item(nullptr)
 {
diff --git a/GUI/View/Instrument/InclinationAnglesEditor.h b/GUI/View/Instrument/InclinationAnglesEditor.h
index a73439ecda6..4cd20838799 100644
--- a/GUI/View/Instrument/InclinationAnglesEditor.h
+++ b/GUI/View/Instrument/InclinationAnglesEditor.h
@@ -25,7 +25,6 @@ class SphericalAxisForm;
 //! Editor for the case where there is no single inclination angle
 
 class InclinationAnglesEditor : public QWidget {
-
 public:
     explicit InclinationAnglesEditor(QWidget* parent = nullptr,
                                      Qt::WindowFlags f = Qt::WindowFlags());
diff --git a/GUI/View/Instrument/InstrumentLibraryEditor.h b/GUI/View/Instrument/InstrumentLibraryEditor.h
index 8bfa939c617..692cf380ece 100644
--- a/GUI/View/Instrument/InstrumentLibraryEditor.h
+++ b/GUI/View/Instrument/InstrumentLibraryEditor.h
@@ -21,6 +21,7 @@
 class InstrumentItem;
 
 namespace Ui {
+
 class InstrumentLibraryEditor;
 }
 
diff --git a/GUI/View/Instrument/OffSpecularBeamEditor.cpp b/GUI/View/Instrument/OffSpecularBeamEditor.cpp
index 6240318a5d1..0be4835ea3f 100644
--- a/GUI/View/Instrument/OffSpecularBeamEditor.cpp
+++ b/GUI/View/Instrument/OffSpecularBeamEditor.cpp
@@ -24,7 +24,6 @@
 #include <QGridLayout>
 #include <QLineEdit>
 
-
 OffSpecularBeamEditor::OffSpecularBeamEditor(QWidget* parent, Qt::WindowFlags f)
     : QWidget(parent, f), m_item(nullptr)
 {
diff --git a/GUI/View/Instrument/PolarizationAnalysisEditor.cpp b/GUI/View/Instrument/PolarizationAnalysisEditor.cpp
index f84240bfe6a..4638f26d8d8 100644
--- a/GUI/View/Instrument/PolarizationAnalysisEditor.cpp
+++ b/GUI/View/Instrument/PolarizationAnalysisEditor.cpp
@@ -24,13 +24,11 @@
 #include <QGridLayout>
 #include <QGroupBox>
 
-
 //==================================================================================================
 // AnalyzerPropertiesEditor
 //==================================================================================================
 
 class AnalyzerPropertiesEditor : public QWidget {
-
 public:
     AnalyzerPropertiesEditor(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
     void setItem(InstrumentItem* item);
@@ -102,16 +100,14 @@ void AnalyzerPropertiesEditor::clearItem()
 
 void AnalyzerPropertiesEditor::onEfficiencyValueChanged(double efficiency)
 {
-    if (m_item) {
+    if (m_item)
         m_item->setAnalyzerEfficiency(efficiency);
-    }
 }
 
 void AnalyzerPropertiesEditor::onTransmissionValueChanged(double transmission)
 {
-    if (m_item) {
+    if (m_item)
         m_item->setAnalyzerTotalTransmission(transmission);
-    }
 }
 
 //==================================================================================================
diff --git a/GUI/View/Instrument/RectangularDetectorEditor.cpp b/GUI/View/Instrument/RectangularDetectorEditor.cpp
index 90c914612d1..ff439c71878 100644
--- a/GUI/View/Instrument/RectangularDetectorEditor.cpp
+++ b/GUI/View/Instrument/RectangularDetectorEditor.cpp
@@ -33,7 +33,6 @@
 //==================================================================================================
 
 class RectangularAxisEditor : public QWidget {
-
 public:
     enum Orientation { X_Axis, Y_Axis };
     RectangularAxisEditor(const Orientation& orientation, QWidget* parent = nullptr,
diff --git a/GUI/View/Instrument/ResolutionFunctionEditor.h b/GUI/View/Instrument/ResolutionFunctionEditor.h
index 7dfd8f09645..dbd5e238384 100644
--- a/GUI/View/Instrument/ResolutionFunctionEditor.h
+++ b/GUI/View/Instrument/ResolutionFunctionEditor.h
@@ -28,7 +28,6 @@ class GaussResolutionFunctionForm;
 /// corresponding values
 
 class ResolutionFunctionEditor : public QWidget {
-
 public:
     enum Unit { Degree, Millimeter };
     ResolutionFunctionEditor(Unit unit, QWidget* parent = nullptr,
diff --git a/GUI/View/Instrument/SphericalAxisEditor.cpp b/GUI/View/Instrument/SphericalAxisEditor.cpp
index b19d8d9ad76..f4fcad6ee76 100644
--- a/GUI/View/Instrument/SphericalAxisEditor.cpp
+++ b/GUI/View/Instrument/SphericalAxisEditor.cpp
@@ -20,7 +20,6 @@
 #include <QGroupBox>
 #include <QSpinBox>
 
-
 //==================================================================================================
 // SphericalAxisForm
 //==================================================================================================
diff --git a/GUI/View/Instrument/SphericalAxisEditor.h b/GUI/View/Instrument/SphericalAxisEditor.h
index 3cffb4c32ca..e668a2acc43 100644
--- a/GUI/View/Instrument/SphericalAxisEditor.h
+++ b/GUI/View/Instrument/SphericalAxisEditor.h
@@ -27,7 +27,6 @@ class QSpinBox;
 /// The input widgets will be inserted in the form given in the constructor
 
 class SphericalAxisForm : public QObject {
-
 public:
     SphericalAxisForm(QFormLayout* form, QWidget* parent);
     void setItem(BasicAxisItem* item);
@@ -50,7 +49,6 @@ private:
 /// An editor for a spherical axis: the form for the axis placed into a group box with title
 
 class SphericalAxisEditor : public QWidget {
-
 public:
     SphericalAxisEditor(const QString& title, QWidget* parent = nullptr,
                         Qt::WindowFlags f = Qt::WindowFlags());
diff --git a/GUI/View/Instrument/SphericalDetectorEditor.cpp b/GUI/View/Instrument/SphericalDetectorEditor.cpp
index 944002c945e..29b0d261c81 100644
--- a/GUI/View/Instrument/SphericalDetectorEditor.cpp
+++ b/GUI/View/Instrument/SphericalDetectorEditor.cpp
@@ -19,7 +19,6 @@
 
 #include <QGridLayout>
 
-
 //==================================================================================================
 // SphericalDetectorEditor
 //==================================================================================================
diff --git a/GUI/View/Intensity/ColorMap.cpp b/GUI/View/Intensity/ColorMap.cpp
index 33978bc29b7..e0cd4acb2d0 100644
--- a/GUI/View/Intensity/ColorMap.cpp
+++ b/GUI/View/Intensity/ColorMap.cpp
@@ -21,9 +21,11 @@
 #include "GUI/View/Tool/UpdateTimer.h"
 
 namespace {
+
 const int replot_update_interval = 10;
 const int colorbar_width_logz = 50;
 const int colorbar_width = 80;
+
 } // namespace
 
 ColorMap::ColorMap(QWidget* parent)
@@ -154,7 +156,6 @@ void ColorMap::onAxisPropertyChanged(const QString& axisName, const QString& pro
         } else if (AmplitudeAxisItem::isLogScalePropertyName(propertyName)) {
             setLogz(intensityItem()->isLogz());
             replot();
-
         } else if (BasicAxisItem::isVisibilityPropertyName(propertyName)) {
             setColorScaleVisible(intensityItem()->zAxisItem()->visibilityValue());
             replot();
@@ -272,7 +273,6 @@ void ColorMap::setAxesRangeConnected(bool isConnected)
         connect(m_customPlot->yAxis,
                 static_cast<void (QCPAxis::*)(const QCPRange&)>(&QCPAxis::rangeChanged), this,
                 &ColorMap::onYaxisRangeChanged, Qt::UniqueConnection);
-
     } else {
         disconnect(m_customPlot->xAxis,
                    static_cast<void (QCPAxis::*)(const QCPRange&)>(&QCPAxis::rangeChanged), this,
diff --git a/GUI/View/Intensity/ColorMapUtils.cpp b/GUI/View/Intensity/ColorMapUtils.cpp
index 6f0ba2cf1e4..136cf940111 100644
--- a/GUI/View/Intensity/ColorMapUtils.cpp
+++ b/GUI/View/Intensity/ColorMapUtils.cpp
@@ -20,6 +20,7 @@
 using gradient_map_t = QMap<QString, QCPColorGradient::GradientPreset>;
 
 namespace {
+
 gradient_map_t createGradientMap()
 {
     gradient_map_t result;
@@ -65,9 +66,8 @@ QCPColorGradient GUI::View::ColorMapUtils::getGradient(const QString& gradientNa
     static gradient_map_t gradient_map = createGradientMap();
 
     auto it = gradient_map.find(gradientName);
-    if (it == gradient_map.end()) {
+    if (it == gradient_map.end())
         throw Error("ColorMapHelper::getGradient() -> Error. No such gradient" + gradientName);
-    }
     return QCPColorGradient(it.value());
 }
 
diff --git a/GUI/View/Intensity/FontScalingEvent.cpp b/GUI/View/Intensity/FontScalingEvent.cpp
index a432c5bfff2..bcc924855d8 100644
--- a/GUI/View/Intensity/FontScalingEvent.cpp
+++ b/GUI/View/Intensity/FontScalingEvent.cpp
@@ -19,8 +19,10 @@
 #include <qcustomplot.h>
 
 namespace {
+
 const QString tick_font = "tick-font-key";
 const int widget_size_to_switch_font = 500;
+
 } // namespace
 
 FontScalingEvent::FontScalingEvent(ScientificPlot* plot, QWidget* parent)
@@ -34,15 +36,13 @@ bool FontScalingEvent::eventFilter(QObject* obj, QEvent* event)
         auto* resizeEvent = dynamic_cast<QResizeEvent*>(event);
         ASSERT(resizeEvent);
 
-        if (!m_fonts.contains(tick_font)) {
+        if (!m_fonts.contains(tick_font))
             backupFonts();
-
-        } else {
-            if (resizeEvent->size().width() < widget_size_to_switch_font) {
+        else {
+            if (resizeEvent->size().width() < widget_size_to_switch_font)
                 scaleFonts(0.8);
-            } else {
+            else
                 restoreFonts();
-            }
         }
     }
 
diff --git a/GUI/View/Intensity/Plot1D.cpp b/GUI/View/Intensity/Plot1D.cpp
index 26cf0e4ba86..f398c39798b 100644
--- a/GUI/View/Intensity/Plot1D.cpp
+++ b/GUI/View/Intensity/Plot1D.cpp
@@ -24,9 +24,11 @@
 #include "GUI/View/Tool/UpdateTimer.h"
 
 namespace {
+
 const int replot_update_interval = 10;
 
 int bin(double x, const QCPGraph* graph);
+
 } // namespace
 
 Plot1D::Plot1D(QWidget* parent)
@@ -169,7 +171,6 @@ void Plot1D::setAxesRangeConnected(bool isConnected)
         connect(m_custom_plot->yAxis,
                 static_cast<void (QCPAxis::*)(const QCPRange&)>(&QCPAxis::rangeChanged), this,
                 &Plot1D::onYaxisRangeChanged, Qt::UniqueConnection);
-
     } else {
         disconnect(m_custom_plot->xAxis,
                    static_cast<void (QCPAxis::*)(const QCPRange&)>(&QCPAxis::rangeChanged), this,
@@ -300,6 +301,7 @@ void Plot1D::replot()
 }
 
 namespace {
+
 int bin(double x, const QCPGraph* graph)
 {
     const int key_start = graph->findBegin(x);
@@ -309,4 +311,5 @@ int bin(double x, const QCPGraph* graph)
     return (x - graph->dataSortKey(key_start)) <= (graph->dataSortKey(key_end) - x) ? key_start
                                                                                     : key_end;
 }
+
 } // namespace
diff --git a/GUI/View/Intensity/SavePlotAssistant.h b/GUI/View/Intensity/SavePlotAssistant.h
index 64f8cb03753..d08278248d6 100644
--- a/GUI/View/Intensity/SavePlotAssistant.h
+++ b/GUI/View/Intensity/SavePlotAssistant.h
@@ -21,6 +21,7 @@ class QCustomPlot;
 template <class T> class OutputData;
 
 namespace GUI::Plot {
+
 void savePlot(const QString& dirname, QCustomPlot* plot, OutputData<double>* output_data);
 };
 
diff --git a/GUI/View/Intensity/StatusLabel.cpp b/GUI/View/Intensity/StatusLabel.cpp
index 0081ce72afa..b876d623dd7 100644
--- a/GUI/View/Intensity/StatusLabel.cpp
+++ b/GUI/View/Intensity/StatusLabel.cpp
@@ -19,6 +19,7 @@
 #include <QPainter>
 
 namespace {
+
 int default_text_size()
 {
     return GUI::Util::Style::SystemPointSize();
@@ -27,6 +28,7 @@ int default_label_height()
 {
     return GUI::Util::Style::SizeOfLetterM().height() * 1.75;
 }
+
 } // namespace
 
 StatusLabel::StatusLabel(QWidget* parent)
diff --git a/GUI/View/Job/JobListView.cpp b/GUI/View/Job/JobListView.cpp
index 3ac4d5037f5..eeba68f290f 100644
--- a/GUI/View/Job/JobListView.cpp
+++ b/GUI/View/Job/JobListView.cpp
@@ -25,6 +25,7 @@
 #include <QVBoxLayout>
 
 namespace {
+
 //! compare function for sorting indexes according to row descending
 bool row_descending(const QModelIndex& idx1, const QModelIndex& idx2)
 {
@@ -36,6 +37,7 @@ bool row_ascending(const QModelIndex& idx1, const QModelIndex& idx2)
 {
     return idx1.row() < idx2.row();
 }
+
 } // namespace
 
 //==================================================================================================
diff --git a/GUI/View/Job/JobListViewDelegate.cpp b/GUI/View/Job/JobListViewDelegate.cpp
index fab20c5dac7..2758863c55c 100644
--- a/GUI/View/Job/JobListViewDelegate.cpp
+++ b/GUI/View/Job/JobListViewDelegate.cpp
@@ -93,9 +93,9 @@ bool JobListViewDelegate::editorEvent(QEvent* event, QAbstractItemModel* model,
         return false; // so that selection can change
     }
 
-    if (event->type() == QEvent::MouseButtonPress) {
+    if (event->type() == QEvent::MouseButtonPress)
         m_buttonState = QStyle::State_Sunken;
-    } else if (event->type() == QEvent::MouseButtonRelease) {
+    else if (event->type() == QEvent::MouseButtonRelease) {
         m_buttonState = QStyle::State_Raised;
         emit cancelButtonClicked(index);
     }
diff --git a/GUI/View/Job/JobPropertiesTableModel.cpp b/GUI/View/Job/JobPropertiesTableModel.cpp
index fb50fdc7963..e3e3b92d312 100644
--- a/GUI/View/Job/JobPropertiesTableModel.cpp
+++ b/GUI/View/Job/JobPropertiesTableModel.cpp
@@ -17,19 +17,23 @@
 #include <QLocale>
 
 namespace {
+
 namespace Column {
+
 enum Columns { Name, Value };
 }
 const QString ColumnNames[] = {"Name", "Value"};
 const int NumColumns = (int)std::size(ColumnNames);
 
 namespace Row {
+
 enum Rows { Name, Sample, Instrument, Status, Begin, End, Duration };
 }
 const QString RowNames[] = {"Name", "Sample", "Instrument", "Status", "Begin", "End", "Duration"};
 const int NumRows = (int)std::size(RowNames);
 
 const QString ModelDateShortFormat = "yyyy.MM.dd hh:mm:ss";
+
 } // namespace
 
 //==================================================================================================
diff --git a/GUI/View/Job/JobPropertiesWidget.cpp b/GUI/View/Job/JobPropertiesWidget.cpp
index e7c2ee24fe6..42bbd476db2 100644
--- a/GUI/View/Job/JobPropertiesWidget.cpp
+++ b/GUI/View/Job/JobPropertiesWidget.cpp
@@ -24,6 +24,7 @@
 #include <QVBoxLayout>
 
 namespace {
+
 enum ETabId { JOB_PROPERTIES, JOB_COMMENTS };
 }
 
diff --git a/GUI/View/Job/JobViewActivities.cpp b/GUI/View/Job/JobViewActivities.cpp
index 3bf8d80d526..1c2166d59d6 100644
--- a/GUI/View/Job/JobViewActivities.cpp
+++ b/GUI/View/Job/JobViewActivities.cpp
@@ -17,6 +17,7 @@
 #include "GUI/View/Tool/mainwindow_constants.h"
 
 namespace {
+
 QMap<JobViewActivity, QVector<JobViewFlags::Dock>> createActivityMap()
 {
     QMap<JobViewActivity, QVector<JobViewFlags::Dock>> result;
diff --git a/GUI/View/Loaders/QREDataLoader.cpp b/GUI/View/Loaders/QREDataLoader.cpp
index 3f9b1904739..23c55539ef7 100644
--- a/GUI/View/Loaders/QREDataLoader.cpp
+++ b/GUI/View/Loaders/QREDataLoader.cpp
@@ -53,9 +53,9 @@ QVector<QPair<int, int>> expandLineNumberPattern(const QString& pattern, bool* o
             const auto conv0 = parts[0].toInt(&ok2);
             if (ok2) {
                 const auto conv1 = parts.size() > 1 ? parts[1].toInt(&ok2) : conv0;
-                if (ok2) {
+                if (ok2)
                     result.push_back({conv0, conv1});
-                } else {
+                else {
                     if (ok != nullptr) {
                         *ok = false;
                     }
@@ -268,7 +268,6 @@ void QREDataLoader::processContents()
     }
 
     if (creationOfOutputDataIsNecessary) {
-
         try {
             createOutputDataFromParsingResult(m_item);
         } catch (...) {
@@ -421,7 +420,6 @@ void QREDataLoader::parseFileContent() const
     m_importResult.rawValues.resize(m_importResult.lines.size());
 
     for (int lineNr = 0; lineNr < m_importResult.lines.size(); lineNr++) {
-
         const bool skip = m_importResult.lines[lineNr].first;
         if (skip)
             continue;
diff --git a/GUI/View/Loaders/QREDataLoaderProperties.cpp b/GUI/View/Loaders/QREDataLoaderProperties.cpp
index d680860b6f7..58de0ef78b5 100644
--- a/GUI/View/Loaders/QREDataLoaderProperties.cpp
+++ b/GUI/View/Loaders/QREDataLoaderProperties.cpp
@@ -36,7 +36,6 @@ QREDataLoaderProperties::QREDataLoaderProperties() : m_allowFactors(false)
             [=]() { emit propertiesChanged(); });
 
     for (int dataType = 0; dataType < 3; dataType++) {
-
         // In the following: disable the checkbox before signaling propertyChanged to suppress ghost
         // value changes in case the propertiesChanged signals triggers long calculations (the
         // spinbox would see a timeout in its "pressed"-loop and generate a second value change)
diff --git a/GUI/View/Loaders/QREDataLoaderProperties.h b/GUI/View/Loaders/QREDataLoaderProperties.h
index d13c489ed51..0200175f3a1 100644
--- a/GUI/View/Loaders/QREDataLoaderProperties.h
+++ b/GUI/View/Loaders/QREDataLoaderProperties.h
@@ -24,6 +24,7 @@ class QCheckBox;
 class QLabel;
 
 namespace Ui {
+
 class QREDataLoaderProperties;
 }
 
diff --git a/GUI/View/Main/AutosaveController.cpp b/GUI/View/Main/AutosaveController.cpp
index 71056e4ed8e..6b15d8d300f 100644
--- a/GUI/View/Main/AutosaveController.cpp
+++ b/GUI/View/Main/AutosaveController.cpp
@@ -19,6 +19,7 @@
 #include <QDir>
 
 namespace {
+
 const int update_every = 20000; // in msec
 }
 
diff --git a/GUI/View/Main/MainWindow.cpp b/GUI/View/Main/MainWindow.cpp
index bf02c7dfc9c..d720a1b53d2 100644
--- a/GUI/View/Main/MainWindow.cpp
+++ b/GUI/View/Main/MainWindow.cpp
@@ -61,7 +61,6 @@ MainWindow::MainWindow()
     , m_jobView(nullptr)
     , m_sessionModelView(nullptr)
 {
-
     s_instance = this;
 
     auto* centralWidget = new QWidget(this);
diff --git a/GUI/View/Main/NewProjectDialog.cpp b/GUI/View/Main/NewProjectDialog.cpp
index 327fd94ba0d..07a5d9109ac 100644
--- a/GUI/View/Main/NewProjectDialog.cpp
+++ b/GUI/View/Main/NewProjectDialog.cpp
@@ -180,9 +180,9 @@ void NewProjectDialog::updateWarningStatus()
                                 + "' does not exist. </font>");
     } else if (!m_valid_projectName) {
         m_createButton->setEnabled(false);
-        if (getProjectName().isEmpty()) {
+        if (getProjectName().isEmpty())
             m_warningLabel->setText("<font color='darkRed'> Please specify project name. </font>");
-        } else {
+        else {
             m_warningLabel->setText("<font color='darkRed'> The directory '" + getProjectName()
                                     + "' already exists. </font>");
         }
diff --git a/GUI/View/Main/ProjectManager.cpp b/GUI/View/Main/ProjectManager.cpp
index 6e97e054357..516fc719a14 100644
--- a/GUI/View/Main/ProjectManager.cpp
+++ b/GUI/View/Main/ProjectManager.cpp
@@ -319,9 +319,9 @@ void ProjectManager::openProject(QString fileName)
     MessageService messageService;
     const auto readResult = loadProject(fileName, messageService);
 
-    if (readResult == ProjectDocument::ReadResult::ok) {
+    if (readResult == ProjectDocument::ReadResult::ok)
         addToRecentProjects();
-    } else if (readResult == ProjectDocument::ReadResult::error) {
+    else if (readResult == ProjectDocument::ReadResult::error) {
         riseProjectLoadFailedDialog(messageService);
         deleteCurrentProject();
         createNewProject();
diff --git a/GUI/View/Main/PyImportAssistant.cpp b/GUI/View/Main/PyImportAssistant.cpp
index 1f3eecba544..6141f607d71 100644
--- a/GUI/View/Main/PyImportAssistant.cpp
+++ b/GUI/View/Main/PyImportAssistant.cpp
@@ -146,7 +146,6 @@ QString PyImportAssistant::getPySampleFunctionName(const QString& snippet)
     try {
         auto funcs = Py::Import::listOfFunctions(snippet.toStdString(), bornagainDir());
         funcList = GUI::Util::String::fromStdStrings(funcs);
-
     } catch (const std::exception& ex) {
         QApplication::restoreOverrideCursor();
         QString message("Exception thrown while acquiring functions from Python code.\n\n");
@@ -169,11 +168,9 @@ QString PyImportAssistant::selectPySampleFunction(const QStringList& funcNames)
     if (funcNames.empty()) {
         QString message("Python code doesn't contain any functions.\n\n");
         GUI::View::Helpers::warning(m_parentForDialogs, "Python failure", message);
-
-    } else if (funcNames.size() == 1) {
+    } else if (funcNames.size() == 1)
         return funcNames.front();
-
-    } else {
+    else {
         ComboSelectorDialog dialog;
         dialog.addItems(funcNames, getCandidate(funcNames));
         dialog.setTextTop("Python code contains a few functions. Do you know by chance, "
@@ -199,7 +196,6 @@ std::unique_ptr<MultiLayer> PyImportAssistant::createMultiLayer(const QString& s
     try {
         result = Py::Import::createFromPython(snippet.toStdString(), funcName.toStdString(),
                                               bornagainDir());
-
     } catch (const std::exception& ex) {
         QApplication::restoreOverrideCursor();
         QString message("Exception thrown while executing Python code to create multilayer.\n\n");
@@ -226,7 +222,6 @@ void PyImportAssistant::populateModels(const MultiLayer& multilayer, const QStri
         QString message("Seems that import was successful.\n\n"
                         "Check SampleView for new sample and material editor for new materials.");
         GUI::View::Helpers::information(m_parentForDialogs, "PyImport", message);
-
     } catch (const std::exception& ex) {
         QString message("Exception thrown while trying to build GUI models.\n"
                         "GUI models might be in inconsistent state.\n\n");
diff --git a/GUI/View/Mask/ColorMapSceneAdaptor.h b/GUI/View/Mask/ColorMapSceneAdaptor.h
index e46c9693ca3..139ead585f9 100644
--- a/GUI/View/Mask/ColorMapSceneAdaptor.h
+++ b/GUI/View/Mask/ColorMapSceneAdaptor.h
@@ -16,6 +16,7 @@
 #define BORNAGAIN_GUI_VIEW_MASK_COLORMAPSCENEADAPTOR_H
 
 #include "GUI/View/Mask/ISceneAdaptor.h"
+
 class ColorMap;
 
 //! Performs conversion of MaskItems coordinates between ColorMap and GraphicsScene.
diff --git a/GUI/View/Mask/EllipseView.cpp b/GUI/View/Mask/EllipseView.cpp
index 190038dcabe..78669bc6d3f 100644
--- a/GUI/View/Mask/EllipseView.cpp
+++ b/GUI/View/Mask/EllipseView.cpp
@@ -73,20 +73,17 @@ void EllipseView::mouseMoveEvent(QGraphicsSceneMouseEvent* event)
             m_item->setYRadius((fromSceneY(centerInScene.y() - height / 2.)
                                 - fromSceneY(centerInScene.y() + height / 2.))
                                / 2.);
-
         } else if (m_activeHandleElement->getHandleType() == SizeHandleElement::RESIZE_HEIGHT) {
             m_item->setYCenter(fromSceneY(centerInScene.y()));
             m_item->setYRadius((fromSceneY(centerInScene.y() - height / 2.)
                                 - fromSceneY(centerInScene.y() + height / 2.))
                                / 2.);
-
         } else if (m_activeHandleElement->getHandleType() == SizeHandleElement::RESIZE_WIDTH) {
             m_item->setXCenter(fromSceneX(centerInScene.x()));
             m_item->setXRadius((fromSceneX(centerInScene.x() + width / 2.)
                                 - fromSceneX(centerInScene.x() - width / 2.))
                                / 2.);
         }
-
     } else {
         IShape2DView::mouseMoveEvent(event);
     }
diff --git a/GUI/View/Mask/IShape2DView.cpp b/GUI/View/Mask/IShape2DView.cpp
index c51c8ee8230..6cf70815232 100644
--- a/GUI/View/Mask/IShape2DView.cpp
+++ b/GUI/View/Mask/IShape2DView.cpp
@@ -22,12 +22,14 @@
 #include <QPainter>
 
 namespace {
+
 bool itemMaskValue(const SessionItem* item)
 {
     if (const auto* maskItem = dynamic_cast<const MaskItem*>(item))
         return maskItem->maskValue();
     return false;
 }
+
 } // namespace
 
 IShape2DView::IShape2DView(SessionItem* item)
@@ -153,9 +155,9 @@ void IShape2DView::onItemPropertyChange(const QString& propertyName)
     m_block_on_property_change = true;
 
     bool schedule_update = false;
-    if (MaskItem::isMaskValuePropertyName(propertyName)) {
+    if (MaskItem::isMaskValuePropertyName(propertyName))
         schedule_update = true;
-    } else if (MaskItem::isIsVisiblePropertyName(propertyName)) {
+    else if (MaskItem::isIsVisiblePropertyName(propertyName)) {
         bool visible = false;
         if (auto* maskItem = dynamic_cast<MaskItem*>(parameterizedItem()))
             visible = maskItem->isVisibleValue();
diff --git a/GUI/View/Mask/LineViews.cpp b/GUI/View/Mask/LineViews.cpp
index 89f8e47c1d8..7abef9872e4 100644
--- a/GUI/View/Mask/LineViews.cpp
+++ b/GUI/View/Mask/LineViews.cpp
@@ -20,8 +20,10 @@
 #include <QStyleOptionGraphicsItem>
 
 namespace {
+
 const double mask_width = 8.0;
 const double mask_visible_width = 3.0;
+
 } // namespace
 
 VerticalLineView::VerticalLineView(VerticalLineItem* item) : IShape2DView(item), m_item(item)
diff --git a/GUI/View/Mask/MaskEditorActions.cpp b/GUI/View/Mask/MaskEditorActions.cpp
index 486616215dc..1d5d1e57e0d 100644
--- a/GUI/View/Mask/MaskEditorActions.cpp
+++ b/GUI/View/Mask/MaskEditorActions.cpp
@@ -121,9 +121,8 @@ void MaskEditorActions::onToggleMaskValueAction()
     ASSERT(m_maskModel);
     ASSERT(m_selectionModel);
     for (auto itemIndex : m_selectionModel->selectedIndexes()) {
-        if (auto* item = dynamic_cast<MaskItem*>(m_maskModel->itemForIndex(itemIndex))) {
+        if (auto* item = dynamic_cast<MaskItem*>(m_maskModel->itemForIndex(itemIndex)))
             item->setMaskValue(!item->maskValue());
-        }
     }
 }
 
diff --git a/GUI/View/Mask/MaskEditorToolBar.cpp b/GUI/View/Mask/MaskEditorToolBar.cpp
index 2cc66c1f9e1..38447ea3c80 100644
--- a/GUI/View/Mask/MaskEditorToolBar.cpp
+++ b/GUI/View/Mask/MaskEditorToolBar.cpp
@@ -59,9 +59,9 @@ MaskEditorToolBar::MaskEditorToolBar(MaskEditorActions* editorActions, QWidget*
 //! space bar. As soon as space bar is released, activity is returned to previous state.
 void MaskEditorToolBar::onChangeActivityRequest(MaskEditorFlags::Activity value)
 {
-    if (value == MaskEditorFlags::PREVIOUS_MODE) {
+    if (value == MaskEditorFlags::PREVIOUS_MODE)
         setCurrentActivity(m_previousActivity);
-    } else {
+    else {
         m_previousActivity = currentActivity();
         setCurrentActivity(value);
     }
diff --git a/GUI/View/Mask/MaskGraphicsProxy.cpp b/GUI/View/Mask/MaskGraphicsProxy.cpp
index a2b7919a929..480e42b132d 100644
--- a/GUI/View/Mask/MaskGraphicsProxy.cpp
+++ b/GUI/View/Mask/MaskGraphicsProxy.cpp
@@ -55,11 +55,10 @@ void MaskGraphicsProxy::setSceneAdaptor(ISceneAdaptor* sceneAdaptor)
 void MaskGraphicsProxy::setInZoomMode(bool value)
 {
     m_send_signals_to_colormap = value;
-    if (value) {
+    if (value)
         setAcceptedMouseButtons(Qt::LeftButton);
-    } else {
+    else
         setAcceptedMouseButtons(Qt::NoButton);
-    }
 }
 
 ColorMap* MaskGraphicsProxy::colorMap()
diff --git a/GUI/View/Mask/MaskGraphicsScene.cpp b/GUI/View/Mask/MaskGraphicsScene.cpp
index 18140aa464d..3278749fef3 100644
--- a/GUI/View/Mask/MaskGraphicsScene.cpp
+++ b/GUI/View/Mask/MaskGraphicsScene.cpp
@@ -30,11 +30,14 @@
 #include <QPainter>
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_downcast;
 
 namespace {
+
 const QRectF default_scene_rect(0, 0, 800, 600);
 const qreal min_distance_to_create_rect = 10;
+
 } // namespace
 
 MaskGraphicsScene::MaskGraphicsScene(QObject* parent)
@@ -64,7 +67,6 @@ void MaskGraphicsScene::setMaskContext(SessionModel* model, const QModelIndex& m
     m_intensityItem = intensityItem;
 
     if (model != m_maskModel || m_maskContainerIndex != maskContainerIndex) {
-
         if (m_maskModel) {
             disconnect(m_maskModel, &SessionModel::modelAboutToBeReset, this,
                        &MaskGraphicsScene::resetScene);
@@ -256,11 +258,10 @@ void MaskGraphicsScene::onSceneSelectionChanged()
 void MaskGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent* event)
 {
     if (event->buttons() & Qt::RightButton) {
-        if (isDrawingInProgress()) {
+        if (isDrawingInProgress())
             cancelCurrentDrawing();
-        } else {
+        else
             makeViewAtMousePosSelected(event);
-        }
         return;
     }
     if (isValidForPolygonDrawing(event)) {
@@ -305,9 +306,8 @@ void MaskGraphicsScene::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
             clearSelection();
             if (m_currentItem) {
                 // drawing ended up with item drawn, let's make it selected
-                if (IShape2DView* view = m_ItemToView[m_currentItem]) {
+                if (IShape2DView* view = m_ItemToView[m_currentItem])
                     view->setSelected(true);
-                }
             } else {
                 // drawing ended without item to be draw (too short mouse move)
                 // making item beneath of mouse release position to be selected
@@ -575,11 +575,10 @@ void MaskGraphicsScene::setInPanAndZoomMode(bool value)
 void MaskGraphicsScene::updateCursors()
 {
     for (auto it = m_ItemToView.begin(); it != m_ItemToView.end(); ++it) {
-        if (it.key()->modelType() == VerticalLineItem::M_TYPE) {
+        if (it.key()->modelType() == VerticalLineItem::M_TYPE)
             it.value()->setCursor(m_context.isInZoomMode() ? Qt::ArrowCursor : Qt::SizeHorCursor);
-        } else if (it.key()->modelType() == HorizontalLineItem::M_TYPE) {
+        else if (it.key()->modelType() == HorizontalLineItem::M_TYPE)
             it.value()->setCursor(m_context.isInZoomMode() ? Qt::ArrowCursor : Qt::SizeVerCursor);
-        }
     }
 }
 
diff --git a/GUI/View/Mask/MaskGraphicsView.cpp b/GUI/View/Mask/MaskGraphicsView.cpp
index 635393f4cb7..4e66f84a32f 100644
--- a/GUI/View/Mask/MaskGraphicsView.cpp
+++ b/GUI/View/Mask/MaskGraphicsView.cpp
@@ -21,9 +21,11 @@
 #include <QWheelEvent>
 
 namespace {
+
 const double min_zoom_value = 1.0;
 const double max_zoom_value = 5.0;
 const double zoom_step = 0.05;
+
 } // namespace
 
 MaskGraphicsView::MaskGraphicsView(QGraphicsScene* scene, QWidget* parent)
@@ -84,9 +86,8 @@ void MaskGraphicsView::keyPressEvent(QKeyEvent* event)
     case Qt::Key_Left:
         break;
     case Qt::Key_Space:
-        if (!event->isAutoRepeat()) {
+        if (!event->isAutoRepeat())
             emit changeActivityRequest(MaskEditorFlags::PAN_ZOOM_MODE);
-        }
         break;
     case Qt::Key_Escape:
         cancelCurrentDrawing();
diff --git a/GUI/View/Mask/MaskViewFactory.cpp b/GUI/View/Mask/MaskViewFactory.cpp
index 7caa57c8ac8..dec7adb56ab 100644
--- a/GUI/View/Mask/MaskViewFactory.cpp
+++ b/GUI/View/Mask/MaskViewFactory.cpp
@@ -26,51 +26,51 @@
 #include "GUI/View/Mask/RegionOfInterestView.h"
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_downcast;
 
 IShape2DView* MaskViewFactory::createMaskView(SessionItem* item, ISceneAdaptor* adaptor)
 {
     IShape2DView* result(nullptr);
 
-    if (item->hasModelType<MaskContainerItem>()) {
+    if (item->hasModelType<MaskContainerItem>())
         result = new MaskContainerView(polymorphic_downcast<MaskContainerItem*>(item));
-    }
 
-    else if (item->hasModelType<ProjectionContainerItem>()) {
+    else if (item->hasModelType<ProjectionContainerItem>())
         result = new MaskContainerView(polymorphic_downcast<ProjectionContainerItem*>(item));
-    }
 
-    else if (item->hasModelType<RectangleItem>()) {
+
+    else if (item->hasModelType<RectangleItem>())
         result = new RectangleView(polymorphic_downcast<RectangleItem*>(item));
-    }
 
-    else if (item->hasModelType<PolygonItem>()) {
+
+    else if (item->hasModelType<PolygonItem>())
         result = new PolygonView(polymorphic_downcast<PolygonItem*>(item));
-    }
 
-    else if (item->hasModelType<PolygonPointItem>()) {
+
+    else if (item->hasModelType<PolygonPointItem>())
         result = new PolygonPointView(polymorphic_downcast<PolygonPointItem*>(item));
-    }
 
-    else if (item->hasModelType<VerticalLineItem>()) {
+
+    else if (item->hasModelType<VerticalLineItem>())
         result = new VerticalLineView(polymorphic_downcast<VerticalLineItem*>(item));
-    }
 
-    else if (item->hasModelType<HorizontalLineItem>()) {
+
+    else if (item->hasModelType<HorizontalLineItem>())
         result = new HorizontalLineView(polymorphic_downcast<HorizontalLineItem*>(item));
-    }
 
-    else if (item->hasModelType<EllipseItem>()) {
+
+    else if (item->hasModelType<EllipseItem>())
         result = new EllipseView(polymorphic_downcast<EllipseItem*>(item));
-    }
 
-    else if (item->hasModelType<MaskAllItem>()) {
+
+    else if (item->hasModelType<MaskAllItem>())
         result = new MaskAllView(polymorphic_downcast<MaskAllItem*>(item));
-    }
 
-    else if (item->hasModelType<RegionOfInterestItem>()) {
+
+    else if (item->hasModelType<RegionOfInterestItem>())
         result = new RegionOfInterestView(polymorphic_downcast<RegionOfInterestItem*>(item));
-    }
+
 
     else {
         throw Error("MaskViewFactory::createSampleView() -> Error! "
diff --git a/GUI/View/Mask/PolygonPointView.cpp b/GUI/View/Mask/PolygonPointView.cpp
index 91fd118469a..8b5049ed4e2 100644
--- a/GUI/View/Mask/PolygonPointView.cpp
+++ b/GUI/View/Mask/PolygonPointView.cpp
@@ -59,9 +59,8 @@ void PolygonPointView::paint(QPainter* painter, const QStyleOptionGraphicsItem*,
 {
     painter->setRenderHints(QPainter::Antialiasing);
     QBrush brush = MaskEditorHelper::getSelectionMarkerBrush();
-    if (acceptHoverEvents() && m_on_hover) {
+    if (acceptHoverEvents() && m_on_hover)
         brush.setColor(Qt::red);
-    }
     painter->setBrush(brush);
     painter->setPen(MaskEditorHelper::getSelectionMarkerPen());
     painter->drawEllipse(boundingRect());
diff --git a/GUI/View/Mask/PolygonView.cpp b/GUI/View/Mask/PolygonView.cpp
index 4d7e5a25630..7d189017b26 100644
--- a/GUI/View/Mask/PolygonView.cpp
+++ b/GUI/View/Mask/PolygonView.cpp
@@ -19,6 +19,7 @@
 #include <QPainter>
 
 namespace {
+
 const double bbox_margins = 5; // additional margins around points to form bounding box
 }
 
@@ -152,7 +153,6 @@ void PolygonView::update_polygon()
     m_block_on_point_update = true;
 
     if (!m_item->points().isEmpty()) {
-
         m_polygon.clear();
 
         for (auto* point : m_item->points())
diff --git a/GUI/View/Mask/RectangleBaseView.cpp b/GUI/View/Mask/RectangleBaseView.cpp
index f0619235cf6..8916130980c 100644
--- a/GUI/View/Mask/RectangleBaseView.cpp
+++ b/GUI/View/Mask/RectangleBaseView.cpp
@@ -16,6 +16,7 @@
 #include "Base/Util/Assert.h"
 
 namespace {
+
 const double bbox_margins = 5; // additional margins around rectangle to form bounding box
 }
 
@@ -50,9 +51,8 @@ QVariant RectangleBaseView::itemChange(QGraphicsItem::GraphicsItemChange change,
                                        const QVariant& value)
 {
     if (change == QGraphicsItem::ItemSelectedChange) {
-        for (auto it = m_resize_handles.begin(); it != m_resize_handles.end(); ++it) {
+        for (auto it = m_resize_handles.begin(); it != m_resize_handles.end(); ++it)
             it.value()->setVisible(!this->isSelected());
-        }
     }
     return value;
 }
diff --git a/GUI/View/Mask/RectangleView.cpp b/GUI/View/Mask/RectangleView.cpp
index 404ed0607dd..2e996b75fb9 100644
--- a/GUI/View/Mask/RectangleView.cpp
+++ b/GUI/View/Mask/RectangleView.cpp
@@ -60,7 +60,6 @@ void RectangleView::onPropertyChange()
 void RectangleView::mouseMoveEvent(QGraphicsSceneMouseEvent* event)
 {
     if (m_activeHandleElement) {
-
         qreal xmin = std::min(event->scenePos().x(), m_resize_opposite_origin.x());
         qreal xmax = std::max(event->scenePos().x(), m_resize_opposite_origin.x());
         qreal ymin = std::min(event->scenePos().y(), m_resize_opposite_origin.y());
@@ -71,18 +70,14 @@ void RectangleView::mouseMoveEvent(QGraphicsSceneMouseEvent* event)
             m_item->setYLow(fromSceneY(ymax));
             m_item->setXUp(fromSceneX(xmax));
             m_item->setYUp(fromSceneY(ymin));
-
         } else if (m_activeHandleElement->getHandleType() == SizeHandleElement::RESIZE_HEIGHT) {
             m_item->setYLow(fromSceneY(ymax));
             m_item->setYUp(fromSceneY(ymin));
-
         } else if (m_activeHandleElement->getHandleType() == SizeHandleElement::RESIZE_WIDTH) {
-
             m_item->setXLow(fromSceneX(xmin));
             m_item->setXUp(fromSceneX(xmax));
         }
         update_view();
-
     } else {
         IShape2DView::mouseMoveEvent(event);
     }
diff --git a/GUI/View/Mask/SizeHandleElement.cpp b/GUI/View/Mask/SizeHandleElement.cpp
index 85a677696a2..cb98b00c301 100644
--- a/GUI/View/Mask/SizeHandleElement.cpp
+++ b/GUI/View/Mask/SizeHandleElement.cpp
@@ -17,6 +17,7 @@
 #include <QPainter>
 
 namespace {
+
 QMap<SizeHandleElement::EHandleLocation, Qt::CursorShape> create_cursors_map()
 {
     QMap<SizeHandleElement::EHandleLocation, Qt::CursorShape> result;
@@ -96,11 +97,10 @@ void SizeHandleElement::paint(QPainter* painter, const QStyleOptionGraphicsItem*
 
     painter->setBrush(MaskEditorHelper::getSelectionMarkerBrush());
     painter->setPen(MaskEditorHelper::getSelectionMarkerPen());
-    if (getHandleType() == RESIZE) {
+    if (getHandleType() == RESIZE)
         painter->drawRect(boundingRect());
-    } else {
+    else
         painter->drawEllipse(boundingRect());
-    }
 }
 
 void SizeHandleElement::mousePressEvent(QGraphicsSceneMouseEvent* event)
@@ -118,37 +118,35 @@ void SizeHandleElement::mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
 //! set position from location type using coordinates of external rectangle
 void SizeHandleElement::updateHandleElementPosition(const QRectF& rect)
 {
-    if (m_handleLocation == TOPLEFT) {
+    if (m_handleLocation == TOPLEFT)
         setPos(rect.topLeft());
-    }
 
-    else if (m_handleLocation == TOPMIDDLE) {
+    else if (m_handleLocation == TOPMIDDLE)
         setPos(QPointF(rect.x() + rect.width() / 2., rect.y()));
-    }
 
-    else if (m_handleLocation == TOPRIGHT) {
+
+    else if (m_handleLocation == TOPRIGHT)
         setPos(rect.topRight());
-    }
 
-    else if (m_handleLocation == MIDDLERIGHT) {
+
+    else if (m_handleLocation == MIDDLERIGHT)
         setPos(QPointF(rect.x() + rect.width(), rect.y() + rect.height() / 2.));
-    }
 
-    else if (m_handleLocation == BOTTOMRIGHT) {
+
+    else if (m_handleLocation == BOTTOMRIGHT)
         setPos(rect.bottomRight());
-    }
 
-    else if (m_handleLocation == BOTTOMMIDLE) {
+
+    else if (m_handleLocation == BOTTOMMIDLE)
         setPos(QPointF(rect.x() + rect.width() / 2., rect.y() + rect.height()));
-    }
 
-    else if (m_handleLocation == BOTTOMLEFT) {
+
+    else if (m_handleLocation == BOTTOMLEFT)
         setPos(rect.bottomLeft());
-    }
 
-    else if (m_handleLocation == MIDDLELEFT) {
+
+    else if (m_handleLocation == MIDDLELEFT)
         setPos(QPointF(rect.x(), rect.y() + rect.height() / 2.));
-    }
 }
 
 SizeHandleElement::EHandleLocation SizeHandleElement::getHandleLocation() const
diff --git a/GUI/View/MaterialEditor/MaterialEditorDialog.h b/GUI/View/MaterialEditor/MaterialEditorDialog.h
index bf37d20260d..e71d496a3d4 100644
--- a/GUI/View/MaterialEditor/MaterialEditorDialog.h
+++ b/GUI/View/MaterialEditor/MaterialEditorDialog.h
@@ -24,6 +24,7 @@ class MaterialEditorModel;
 class ProjectDocument;
 
 namespace Ui {
+
 class MaterialEditorDialog;
 }
 
diff --git a/GUI/View/MaterialEditor/MaterialEditorModel.h b/GUI/View/MaterialEditor/MaterialEditorModel.h
index 92486aac46b..35eca50ac12 100644
--- a/GUI/View/MaterialEditor/MaterialEditorModel.h
+++ b/GUI/View/MaterialEditor/MaterialEditorModel.h
@@ -25,7 +25,6 @@ class MaterialModel;
 //! This model is also used for changing values of a material, therefore the list can be
 //! updated accordingly.
 class MaterialEditorModel : public QAbstractTableModel {
-
 public:
     MaterialEditorModel(MaterialModel* p);
 
diff --git a/GUI/View/Projection/ProjectionsEditorCanvas.cpp b/GUI/View/Projection/ProjectionsEditorCanvas.cpp
index 6743a507d65..1fa6f752091 100644
--- a/GUI/View/Projection/ProjectionsEditorCanvas.cpp
+++ b/GUI/View/Projection/ProjectionsEditorCanvas.cpp
@@ -25,6 +25,7 @@
 #include <QVBoxLayout>
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_downcast;
 
 ProjectionsEditorCanvas::ProjectionsEditorCanvas(QWidget* parent)
diff --git a/GUI/View/Projection/ProjectionsPlot.cpp b/GUI/View/Projection/ProjectionsPlot.cpp
index f746dba570d..c219dcd15de 100644
--- a/GUI/View/Projection/ProjectionsPlot.cpp
+++ b/GUI/View/Projection/ProjectionsPlot.cpp
@@ -25,6 +25,7 @@
 
 #include <boost/polymorphic_cast.hpp>
 #include <utility>
+
 using boost::polymorphic_downcast;
 
 ProjectionsPlot::ProjectionsPlot(QString projectionType, QWidget* parent)
diff --git a/GUI/View/Projection/ProjectionsToolBar.cpp b/GUI/View/Projection/ProjectionsToolBar.cpp
index 675dcce532b..0ec9ac06ffc 100644
--- a/GUI/View/Projection/ProjectionsToolBar.cpp
+++ b/GUI/View/Projection/ProjectionsToolBar.cpp
@@ -20,6 +20,7 @@
 #include <QToolButton>
 
 namespace {
+
 const QString pan_zoom_tooltip = "Pan/zoom mode (space)\n"
                                  "Drag axes with the mouse, use mouse wheel to zoom in/out";
 
@@ -62,9 +63,9 @@ ProjectionsToolBar::ProjectionsToolBar(ProjectionsEditorActions* editorActions,
 
 void ProjectionsToolBar::onChangeActivityRequest(MaskEditorFlags::Activity value)
 {
-    if (value == MaskEditorFlags::PREVIOUS_MODE) {
+    if (value == MaskEditorFlags::PREVIOUS_MODE)
         setCurrentActivity(m_previousActivity);
-    } else {
+    else {
         m_previousActivity = currentActivity();
         setCurrentActivity(value);
     }
diff --git a/GUI/View/Projection/ProjectionsWidget.cpp b/GUI/View/Projection/ProjectionsWidget.cpp
index 91c87e19400..a82ccb9032f 100644
--- a/GUI/View/Projection/ProjectionsWidget.cpp
+++ b/GUI/View/Projection/ProjectionsWidget.cpp
@@ -19,8 +19,10 @@
 #include <QVBoxLayout>
 
 namespace {
+
 const int horizontal_projection_tab = 0;
 const int vertical_projection_tab = 1;
+
 } // namespace
 
 ProjectionsWidget::ProjectionsWidget(QWidget* parent)
diff --git a/GUI/View/Projection/SaveProjectionsAssistant.cpp b/GUI/View/Projection/SaveProjectionsAssistant.cpp
index 7383611498a..f33e8ff6289 100644
--- a/GUI/View/Projection/SaveProjectionsAssistant.cpp
+++ b/GUI/View/Projection/SaveProjectionsAssistant.cpp
@@ -26,6 +26,7 @@
 #include <QTextStream>
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_downcast;
 
 namespace {
diff --git a/GUI/View/PropertyEditor/CustomEditors.cpp b/GUI/View/PropertyEditor/CustomEditors.cpp
index 208be506db4..95c31216867 100644
--- a/GUI/View/PropertyEditor/CustomEditors.cpp
+++ b/GUI/View/PropertyEditor/CustomEditors.cpp
@@ -23,6 +23,7 @@
 #include <cmath>
 
 namespace {
+
 //! Single step for QDoubleSpinBox.
 
 double singleStep(int decimals)
diff --git a/GUI/View/PropertyEditor/CustomEventFilters.cpp b/GUI/View/PropertyEditor/CustomEventFilters.cpp
index 9c98c98cb87..0461821908f 100644
--- a/GUI/View/PropertyEditor/CustomEventFilters.cpp
+++ b/GUI/View/PropertyEditor/CustomEventFilters.cpp
@@ -46,7 +46,6 @@ void WheelEventEater::install(QObject* obj)
 bool WheelEventEater::eventFilter(QObject* obj, QEvent* event)
 {
     if (auto* spinBox = qobject_cast<QAbstractSpinBox*>(obj)) {
-
         if (event->type() == QEvent::Wheel) {
             if (spinBox->focusPolicy() == Qt::WheelFocus) {
                 event->accept();
@@ -55,11 +54,10 @@ bool WheelEventEater::eventFilter(QObject* obj, QEvent* event)
             event->ignore();
             return true;
         }
-        if (event->type() == QEvent::FocusIn) {
+        if (event->type() == QEvent::FocusIn)
             spinBox->setFocusPolicy(Qt::WheelFocus);
-        } else if (event->type() == QEvent::FocusOut) {
+        else if (event->type() == QEvent::FocusOut)
             spinBox->setFocusPolicy(Qt::StrongFocus);
-        }
     } else if (qobject_cast<QComboBox*>(obj)) {
         if (event->type() == QEvent::Wheel) {
             event->ignore();
diff --git a/GUI/View/PropertyEditor/GroupInfoBox.cpp b/GUI/View/PropertyEditor/GroupInfoBox.cpp
index 45b72cc999a..ee422cced17 100644
--- a/GUI/View/PropertyEditor/GroupInfoBox.cpp
+++ b/GUI/View/PropertyEditor/GroupInfoBox.cpp
@@ -25,10 +25,12 @@
 #include <iostream>
 
 namespace {
+
 int imageWidth = 16;
 int imageheigth = 16;
 int offset_of_tooltip_position = 20;
 int offset_of_icon_position = 24;
+
 } // namespace
 
 GroupInfoBox::GroupInfoBox(QWidget* parent) : QGroupBox(parent), m_xImage(0), m_yImage(0)
diff --git a/GUI/View/Realspace/IPositionBuilder.cpp b/GUI/View/Realspace/IPositionBuilder.cpp
index bef6089b662..33611b5b539 100644
--- a/GUI/View/Realspace/IPositionBuilder.cpp
+++ b/GUI/View/Realspace/IPositionBuilder.cpp
@@ -19,6 +19,7 @@
 #include <random>
 
 namespace {
+
 std::vector<std::vector<double>> Generate2DLatticePoints(double l1, double l2, double alpha,
                                                          double xi, unsigned n1, unsigned n2);
 }
@@ -229,9 +230,8 @@ RadialParacrystalPositionBuilder::generatePositionsImpl(double layer_size, doubl
     int n = distance <= 0.0 ? 1 : static_cast<int>(layer_size * std::sqrt(2.0) / distance);
 
     lattice_positions.resize(2 * n + 1);
-    for (auto& it : lattice_positions) {
+    for (auto& it : lattice_positions)
         it.resize(2);
-    }
 
     lattice_positions[0][0] = 0.0; // x coordinate of reference particle - at the origin
     lattice_positions[0][1] = 0.0; // y coordinate of reference particle - at the origin
@@ -258,6 +258,7 @@ double RadialParacrystalPositionBuilder::positionVariance() const
 }
 
 namespace {
+
 std::vector<std::vector<double>> Generate2DLatticePoints(double l1, double l2, double alpha,
                                                          double xi, unsigned n1, unsigned n2)
 {
@@ -286,4 +287,5 @@ std::vector<std::vector<double>> Generate2DLatticePoints(double l1, double l2, d
     }
     return lattice_positions;
 }
+
 } // namespace
diff --git a/GUI/View/Realspace/Particle3DContainer.h b/GUI/View/Realspace/Particle3DContainer.h
index 3ccba92a042..b29d80596d8 100644
--- a/GUI/View/Realspace/Particle3DContainer.h
+++ b/GUI/View/Realspace/Particle3DContainer.h
@@ -20,7 +20,9 @@
 #include <vector>
 
 namespace GUI::RealSpace::Particles {
+
 class Particle;
+
 } // namespace GUI::RealSpace::Particles
 
 class Particle3DContainer {
diff --git a/GUI/View/Realspace/RealSpace2DParacrystalUtils.cpp b/GUI/View/Realspace/RealSpace2DParacrystalUtils.cpp
index b7c4e689202..8a68b660ad1 100644
--- a/GUI/View/Realspace/RealSpace2DParacrystalUtils.cpp
+++ b/GUI/View/Realspace/RealSpace2DParacrystalUtils.cpp
@@ -30,9 +30,8 @@ void ResizeLatticePositions(std::vector<std::vector<double>>& lattice_positions,
     n1 = std::max(n1, n2);
 
     lattice_positions.resize((2 * n1 + 1) * (2 * n1 + 1));
-    for (auto& it : lattice_positions) {
+    for (auto& it : lattice_positions)
         it.resize(2);
-    }
 
     lattice_positions[0][0] = 0.0; // x coordinate of reference particle - at the origin
     lattice_positions[0][1] = 0.0; // y coordinate of reference particle - at the origin
@@ -132,7 +131,6 @@ void ComputePositionsAlongLatticeVectorAxes(std::vector<std::vector<double>>& la
     std::pair<double, double> xy;
 
     for (int iter = 1; iter <= 2 * n; ++iter) {
-
         int iterl1, iterl2;
 
         if (std::sin(l_alpha) == 0) {
diff --git a/GUI/View/Realspace/RealSpace2DParacrystalUtils.h b/GUI/View/Realspace/RealSpace2DParacrystalUtils.h
index 7e37f847005..fc875cfc357 100644
--- a/GUI/View/Realspace/RealSpace2DParacrystalUtils.h
+++ b/GUI/View/Realspace/RealSpace2DParacrystalUtils.h
@@ -23,7 +23,6 @@ namespace GUI::RealSpace::Paracrystal2D {
 
 std::vector<std::vector<double>> latticePositions(const Interference2DParaCrystal*,
                                                   double layer_size);
-
 }
 
 #endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACE2DPARACRYSTALUTILS_H
diff --git a/GUI/View/Realspace/RealSpaceBuilder.cpp b/GUI/View/Realspace/RealSpaceBuilder.cpp
index 709e06e45e9..dd73b1b3b88 100644
--- a/GUI/View/Realspace/RealSpaceBuilder.cpp
+++ b/GUI/View/Realspace/RealSpaceBuilder.cpp
@@ -101,7 +101,6 @@ void RealSpaceBuilder::populateMultiLayer(GUI::RealSpace::Model* model,
     double total_height(0.0);
     int index(0);
     for (LayerItem* layer : mlayerItem.layers()) {
-
         bool isTopLayer = index == 0;
         populateLayer(model, *layer, sceneGeometry,
                       QVector3D(0, 0, static_cast<float>(-total_height)), isTopLayer);
diff --git a/GUI/View/Realspace/RealSpaceBuilder.h b/GUI/View/Realspace/RealSpaceBuilder.h
index b11e0aa95c6..53538f6d531 100644
--- a/GUI/View/Realspace/RealSpaceBuilder.h
+++ b/GUI/View/Realspace/RealSpaceBuilder.h
@@ -29,6 +29,7 @@ struct SceneGeometry;
 class Particle3DContainer;
 
 namespace GUI::RealSpace {
+
 class Model;
 }
 
diff --git a/GUI/View/Realspace/RealSpaceBuilderUtils.cpp b/GUI/View/Realspace/RealSpaceBuilderUtils.cpp
index 8eaae01d56a..9a549926c7f 100644
--- a/GUI/View/Realspace/RealSpaceBuilderUtils.cpp
+++ b/GUI/View/Realspace/RealSpaceBuilderUtils.cpp
@@ -34,6 +34,7 @@
 #include "Sample/Scattering/IFormFactorDecorator.h"
 
 namespace {
+
 const double layerBorderWidth = 10.0;
 
 const IFormFactor* getUnderlyingFormFactor(const IFormFactor* ff)
@@ -100,7 +101,6 @@ void GUI::RealSpace::BuilderUtils::populateParticlesAtLatticePositions(
                 if (std::abs(pos_x) <= layer_size - layerBorderWidth
                     && std::abs(pos_y) <= layer_size - layerBorderWidth
                     && std::abs(pos_z) <= layer_thickness) {
-
                     builder3D->populateParticleFromParticle3DContainer(
                         model, particle3DContainer,
                         QVector3D(static_cast<float>(position[0]), static_cast<float>(position[1]),
@@ -218,7 +218,6 @@ GUI::RealSpace::BuilderUtils::particle3DContainerVector(const ParticleLayoutItem
     double cumulative_abundance = 0;
 
     for (auto* particleItem : layoutItem.particles()) {
-
         Particle3DContainer particle3DContainer;
 
         if (particleItem->hasModelType<ParticleItem>()) {
diff --git a/GUI/View/Realspace/RealSpaceBuilderUtils.h b/GUI/View/Realspace/RealSpaceBuilderUtils.h
index af0601ee5ed..564a946a4b0 100644
--- a/GUI/View/Realspace/RealSpaceBuilderUtils.h
+++ b/GUI/View/Realspace/RealSpaceBuilderUtils.h
@@ -34,11 +34,14 @@ class Particle3DContainer;
 class Interference2DParaCrystal;
 class MaterialModel;
 namespace GUI::RealSpace {
+
 struct Vector3D;
 class Model;
 namespace Particles {
+
 class Particle;
 }
+
 } // namespace GUI::RealSpace
 
 namespace GUI::RealSpace {
diff --git a/GUI/View/Realspace/RealSpaceCanvas.cpp b/GUI/View/Realspace/RealSpaceCanvas.cpp
index 5fdb5519893..62a4755ade4 100644
--- a/GUI/View/Realspace/RealSpaceCanvas.cpp
+++ b/GUI/View/Realspace/RealSpaceCanvas.cpp
@@ -187,7 +187,6 @@ void RealSpaceCanvas::setConnected(SampleModel* model, bool makeConnected)
         connect(
             model, &SampleModel::modelAboutToBeReset, this, [&]() { m_currentItem = nullptr; },
             Qt::UniqueConnection);
-
     } else
         model->disconnect(this);
 }
diff --git a/GUI/View/Realspace/RealSpaceCanvas.h b/GUI/View/Realspace/RealSpaceCanvas.h
index 9b732deaf59..a1d1f764f84 100644
--- a/GUI/View/Realspace/RealSpaceCanvas.h
+++ b/GUI/View/Realspace/RealSpaceCanvas.h
@@ -23,8 +23,10 @@ class CautionSign;
 class SessionItem;
 class MaterialModel;
 namespace GUI::RealSpace {
+
 class Canvas;
 class Model;
+
 } // namespace GUI::RealSpace
 
 //! Size and thickness information of layers
diff --git a/GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp b/GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp
index 629f8c1a6f1..fb6eeae81a5 100644
--- a/GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp
+++ b/GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp
@@ -25,6 +25,7 @@
 #include "Sample/Particle/ParticleCoreShell.h"
 
 namespace {
+
 const int n = 10; // TODO: Adjust this parameter based on the size of the mesocrystal
 
 bool isPositionInsideMesoCrystal(const IFormFactor* outerShape, R3 positionInside)
@@ -336,6 +337,7 @@ bool isPositionInsideMesoCrystal(const IFormFactor* outerShape, R3 positionInsid
     }
     return check;
 }
+
 } // namespace
 
 
diff --git a/GUI/View/Realspace/TransformTo3D.cpp b/GUI/View/Realspace/TransformTo3D.cpp
index 364fc83a3c2..6c740dee016 100644
--- a/GUI/View/Realspace/TransformTo3D.cpp
+++ b/GUI/View/Realspace/TransformTo3D.cpp
@@ -21,9 +21,11 @@
 #include "Sample/HardParticle/HardParticles.h"
 
 #include <boost/polymorphic_cast.hpp>
+
 using boost::polymorphic_downcast;
 
 namespace {
+
 bool isTopLayer(const LayerItem& layerItem)
 {
     auto layers = polymorphic_downcast<MultiLayerItem*>(layerItem.parent())->layers();
@@ -34,6 +36,7 @@ bool isBottomLayer(const LayerItem& layerItem)
     auto layers = polymorphic_downcast<MultiLayerItem*>(layerItem.parent())->layers();
     return layers.indexOf(const_cast<LayerItem*>(&layerItem)) == layers.size() - 1;
 }
+
 } // namespace
 
 
diff --git a/GUI/View/SampleDesigner/LatticeTypeSelectionForm.cpp b/GUI/View/SampleDesigner/LatticeTypeSelectionForm.cpp
index 3ae9358204e..418e1c3cfae 100644
--- a/GUI/View/SampleDesigner/LatticeTypeSelectionForm.cpp
+++ b/GUI/View/SampleDesigner/LatticeTypeSelectionForm.cpp
@@ -34,11 +34,11 @@ void LatticeTypeSelectionForm::createContent()
     if (auto* p = dynamic_cast<BasicLattice2DItem*>(currentLatticeType)) {
         vertical = true;
         valueDescriptors = {p->latticeLength1(), p->latticeLength2(), p->latticeAngle()};
-    } else if (auto* p = dynamic_cast<SquareLattice2DItem*>(currentLatticeType)) {
+    } else if (auto* p = dynamic_cast<SquareLattice2DItem*>(currentLatticeType))
         valueDescriptors = {p->latticeLength()};
-    } else if (auto* p = dynamic_cast<HexagonalLattice2DItem*>(currentLatticeType)) {
+    else if (auto* p = dynamic_cast<HexagonalLattice2DItem*>(currentLatticeType))
         valueDescriptors = {p->latticeLength()};
-    }
+
 
 
     const auto onValueChange = [=](double newValue, DoubleDescriptor d) {
diff --git a/GUI/View/SampleDesigner/LayerEditorUtils.cpp b/GUI/View/SampleDesigner/LayerEditorUtils.cpp
index 34fa452e6ce..d69403b7d25 100644
--- a/GUI/View/SampleDesigner/LayerEditorUtils.cpp
+++ b/GUI/View/SampleDesigner/LayerEditorUtils.cpp
@@ -34,8 +34,8 @@
 #include <QMenu>
 #include <QPushButton>
 
-
 namespace {
+
 void updateLabelUnit(QLabel* label, const QString& unit)
 {
     QString text = label->text();
diff --git a/GUI/View/SampleDesigner/MultiLayerForm.cpp b/GUI/View/SampleDesigner/MultiLayerForm.cpp
index 9085b1e8714..e074bce7b52 100644
--- a/GUI/View/SampleDesigner/MultiLayerForm.cpp
+++ b/GUI/View/SampleDesigner/MultiLayerForm.cpp
@@ -113,7 +113,6 @@ void MultiLayerForm::onLayerMoved(LayerItem* layerItem)
     LayerForm* wl = nullptr;
     AddLayerWidget* al = nullptr;
     for (int index = 0; index < m_layout->count(); index++) {
-
         if (auto* w = dynamic_cast<AddLayerWidget*>(m_layout->itemAt(index)->widget()))
             if (w->m_layer == layerItem) {
                 al = w;
@@ -147,15 +146,13 @@ void MultiLayerForm::onAboutToRemoveLayer(LayerItem* layerItem)
     LayerForm* layerForm = nullptr;
     AddLayerWidget* addLayerWidget = nullptr;
     for (auto* c : findChildren<QWidget*>()) {
-
         if (auto* w = dynamic_cast<AddLayerWidget*>(c))
             if (w->m_layer == layerItem)
                 addLayerWidget = w;
 
         if (auto* w = dynamic_cast<LayerForm*>(c)) {
-            if (w->layerItem() == layerItem) {
+            if (w->layerItem() == layerItem)
                 layerForm = w;
-            }
         }
     }
 
diff --git a/GUI/View/SampleDesigner/ScriptPanel.cpp b/GUI/View/SampleDesigner/ScriptPanel.cpp
index 6bb6a78db56..b48d55a3c2c 100644
--- a/GUI/View/SampleDesigner/ScriptPanel.cpp
+++ b/GUI/View/SampleDesigner/ScriptPanel.cpp
@@ -29,6 +29,7 @@
 #include <QVBoxLayout>
 
 namespace {
+
 const int accumulateUpdatesDuringMsec = 20.;
 }
 
@@ -96,7 +97,6 @@ void ScriptPanel::setEditorConnected(bool isConnected)
                 Qt::UniqueConnection);
 
         m_updateTimer->scheduleUpdate();
-
     } else {
         m_sampleModel->disconnect(this);
         m_sampleModel->disconnect(m_updateTimer);
diff --git a/GUI/View/SampleDesigner/WidgetMoverButton.cpp b/GUI/View/SampleDesigner/WidgetMoverButton.cpp
index e16d27cc315..f1767006fad 100644
--- a/GUI/View/SampleDesigner/WidgetMoverButton.cpp
+++ b/GUI/View/SampleDesigner/WidgetMoverButton.cpp
@@ -82,7 +82,6 @@ void WidgetMoverButton::mouseMoveEvent(QMouseEvent* event)
     }
 
     if (m_started) {
-
         // -- move the dragged widget to the new position
         QPoint newPos =
             m_widgetToMove->parentWidget()->mapFromGlobal(event->globalPos()) - m_hotSpot;
@@ -112,9 +111,9 @@ void WidgetMoverButton::mouseMoveEvent(QMouseEvent* event)
 
             if (r != layoutItem->geometry()) {
                 QWidget* w = layoutItem->widget();
-                if (w == nullptr) {
+                if (w == nullptr)
                     layoutItem->setGeometry(r);
-                } else if (!m_animations.contains(w)) {
+                else if (!m_animations.contains(w)) {
                     auto* animation = new QPropertyAnimation(w, "geometry");
                     animation->setDuration(100);
                     animation->setEasingCurve(QEasingCurve::OutQuad);
diff --git a/GUI/View/Script/PythonScriptWidget.cpp b/GUI/View/Script/PythonScriptWidget.cpp
index a2679968b82..aad5ac58deb 100644
--- a/GUI/View/Script/PythonScriptWidget.cpp
+++ b/GUI/View/Script/PythonScriptWidget.cpp
@@ -96,7 +96,6 @@ void PythonScriptWidget::generatePythonScript(const MultiLayerItem* sampleItem,
         QString code = QString::fromStdString(Py::Export::simulationPlotCode(*simulation));
         m_textEdit->clear();
         m_textEdit->setText(code);
-
     } catch (const std::exception& ex) {
         QString message =
             QString(
diff --git a/GUI/View/SpecularData/SpecularPlot.cpp b/GUI/View/SpecularData/SpecularPlot.cpp
index 0d947b637f4..27c69403c8a 100644
--- a/GUI/View/SpecularData/SpecularPlot.cpp
+++ b/GUI/View/SpecularData/SpecularPlot.cpp
@@ -21,9 +21,11 @@
 #include "GUI/View/Tool/UpdateTimer.h"
 
 namespace {
+
 const int replot_update_interval = 10;
 
 int bin(double x, const QCPGraph* graph);
+
 } // namespace
 
 SpecularPlot::SpecularPlot(QWidget* parent)
@@ -157,7 +159,6 @@ void SpecularPlot::setAxesRangeConnected(bool isConnected)
         connect(m_custom_plot->yAxis,
                 static_cast<void (QCPAxis::*)(const QCPRange&)>(&QCPAxis::rangeChanged), this,
                 &SpecularPlot::onYaxisRangeChanged, Qt::UniqueConnection);
-
     } else {
         disconnect(m_custom_plot->xAxis,
                    static_cast<void (QCPAxis::*)(const QCPRange&)>(&QCPAxis::rangeChanged), this,
@@ -285,6 +286,7 @@ void SpecularPlot::replot()
 }
 
 namespace {
+
 int bin(double x, const QCPGraph* graph)
 {
     const int key_start = graph->findBegin(x);
@@ -294,4 +296,5 @@ int bin(double x, const QCPGraph* graph)
     return (x - graph->dataSortKey(key_start)) <= (graph->dataSortKey(key_end) - x) ? key_start
                                                                                     : key_end;
 }
+
 } // namespace
diff --git a/GUI/View/Tool/DesignerHelper.cpp b/GUI/View/Tool/DesignerHelper.cpp
index f43170d3336..94116f7c550 100644
--- a/GUI/View/Tool/DesignerHelper.cpp
+++ b/GUI/View/Tool/DesignerHelper.cpp
@@ -19,6 +19,7 @@
 #include <iostream>
 
 namespace {
+
 double m_current_zoom_level = 1.0;
 }
 
diff --git a/GUI/View/Tool/ItemDelegateForHTML.cpp b/GUI/View/Tool/ItemDelegateForHTML.cpp
index 40f14e8d72e..48de8571ee9 100644
--- a/GUI/View/Tool/ItemDelegateForHTML.cpp
+++ b/GUI/View/Tool/ItemDelegateForHTML.cpp
@@ -12,7 +12,6 @@
 //
 //  ************************************************************************************************
 
-
 #include "GUI/View/Tool/ItemDelegateForHTML.h"
 #include <QAbstractItemView>
 #include <QAbstractTextDocumentLayout>
@@ -21,10 +20,12 @@
 #include <QTextDocument>
 
 namespace {
+
 bool hasHtml(const QString& t)
 {
     return t.contains("<") && t.contains(">");
 }
+
 } // namespace
 
 
diff --git a/GUI/View/Toplevel/ProjectSettingsView.h b/GUI/View/Toplevel/ProjectSettingsView.h
index 42bc2b03033..848adc2c9f2 100644
--- a/GUI/View/Toplevel/ProjectSettingsView.h
+++ b/GUI/View/Toplevel/ProjectSettingsView.h
@@ -19,6 +19,7 @@
 #include <QWidget>
 
 namespace Ui {
+
 class ProjectSettingsView;
 }
 
diff --git a/GUI/View/Toplevel/SessionModelView.cpp b/GUI/View/Toplevel/SessionModelView.cpp
index bba330a1fcc..49d8d0b6205 100644
--- a/GUI/View/Toplevel/SessionModelView.cpp
+++ b/GUI/View/Toplevel/SessionModelView.cpp
@@ -31,6 +31,7 @@
 #include <QVBoxLayout>
 
 namespace {
+
 //! The SessionModelDelegate class presents the content of SessionModel items in
 //! standard QTreeView. Extents base QItemDelegate with possibility to show/edit
 //! our custom QVariant's.
diff --git a/GUI/View/Toplevel/SimulationView.h b/GUI/View/Toplevel/SimulationView.h
index ff820e4f9de..cf36fc98630 100644
--- a/GUI/View/Toplevel/SimulationView.h
+++ b/GUI/View/Toplevel/SimulationView.h
@@ -26,6 +26,7 @@ class SimulationOptionsItem;
 class ProjectDocument;
 
 namespace Ui {
+
 class SimulationView;
 }
 
diff --git a/GUI/View/Toplevel/WelcomeView.h b/GUI/View/Toplevel/WelcomeView.h
index ce49ad398f2..d777a79f727 100644
--- a/GUI/View/Toplevel/WelcomeView.h
+++ b/GUI/View/Toplevel/WelcomeView.h
@@ -20,6 +20,7 @@
 class ProjectManager;
 
 namespace Ui {
+
 class WelcomeView;
 }
 
diff --git a/GUI/ba3d/mesh/box.cpp b/GUI/ba3d/mesh/box.cpp
index 6fe3cdba8fb..0557d3ac61c 100644
--- a/GUI/ba3d/mesh/box.cpp
+++ b/GUI/ba3d/mesh/box.cpp
@@ -44,4 +44,5 @@ Geometry::Mesh Geometry::meshBox()
 
     return makeMesh(vs);
 }
+
 } // namespace GUI::RealSpace
diff --git a/GUI/ba3d/model/geometry.cpp b/GUI/ba3d/model/geometry.cpp
index f53fe68d5d4..2b62411889d 100644
--- a/GUI/ba3d/model/geometry.cpp
+++ b/GUI/ba3d/model/geometry.cpp
@@ -17,6 +17,7 @@
 #include "GUI/ba3d/model/model.h"
 
 namespace GUI::RealSpace {
+
 //------------------------------------------------------------------------------
 
 Geometry::Vert_Normal::Vert_Normal(const Vector3D& v_, const Vector3D& n_) : v(v_), n(n_) {}
@@ -174,4 +175,5 @@ GeometryStore& geometryStore()
 }
 
 //------------------------------------------------------------------------------
+
 } // namespace GUI::RealSpace
diff --git a/GUI/ba3d/model/geometry_inc.cpp b/GUI/ba3d/model/geometry_inc.cpp
index 9e372b57dca..1d806400186 100644
--- a/GUI/ba3d/model/geometry_inc.cpp
+++ b/GUI/ba3d/model/geometry_inc.cpp
@@ -44,4 +44,5 @@ std::size_t GeometricID::KeyHash::operator()(const GeometricID::Key& key) const
         return h1 ^ (h2 ^ (h3 ^ h4));
     }
 }
+
 } // namespace GUI::RealSpace
diff --git a/GUI/ba3d/model/layer.cpp b/GUI/ba3d/model/layer.cpp
index 294649e3525..4584a16b2d9 100644
--- a/GUI/ba3d/model/layer.cpp
+++ b/GUI/ba3d/model/layer.cpp
@@ -20,4 +20,5 @@ Layer::Layer(VectorRange d) : Object(GeometricID::Key(GeometricID::BaseShape::Bo
 {
     transform(d.size(), Vector3D::_0, d.mid());
 }
+
 } // namespace GUI::RealSpace
diff --git a/GUI/ba3d/model/object.cpp b/GUI/ba3d/model/object.cpp
index d8a3d7d266f..679e7ae045a 100644
--- a/GUI/ba3d/model/object.cpp
+++ b/GUI/ba3d/model/object.cpp
@@ -18,9 +18,11 @@
 #include <cmath>
 
 namespace {
+
 QQuaternion EulerToQuaternion(const GUI::RealSpace::Vector3D& euler);
 
 GUI::RealSpace::Vector3D QuaternionToEuler(const QQuaternion& q);
+
 } // namespace
 
 namespace GUI::RealSpace {
@@ -106,6 +108,7 @@ void Object::draw(Canvas& canvas)
 } // namespace GUI::RealSpace
 
 namespace {
+
 QQuaternion EulerToQuaternion(const GUI::RealSpace::Vector3D& euler)
 {
     float cpsi2 = std::cos(euler.x / 2.0f);
@@ -144,4 +147,5 @@ GUI::RealSpace::Vector3D QuaternionToEuler(const QQuaternion& q)
 
     return GUI::RealSpace::Vector3D(x, y, z);
 }
+
 } // namespace
diff --git a/GUI/ba3d/model/particles.cpp b/GUI/ba3d/model/particles.cpp
index 27c2b0209ef..264bd6e5eaf 100644
--- a/GUI/ba3d/model/particles.cpp
+++ b/GUI/ba3d/model/particles.cpp
@@ -346,4 +346,5 @@ TruncatedSpheroid::TruncatedSpheroid(float R, float H, float fp, float deltaH)
     offset = Vector3D(0, 0, 0);
     set();
 }
+
 } // namespace GUI::RealSpace::Particles
diff --git a/GUI/ba3d/view/buffer.cpp b/GUI/ba3d/view/buffer.cpp
index 0019e8dbc4a..396ec13bf12 100644
--- a/GUI/ba3d/view/buffer.cpp
+++ b/GUI/ba3d/view/buffer.cpp
@@ -16,8 +16,10 @@
 #include "GUI/ba3d/model/geometry.h"
 
 namespace {
+
 const float cx = 120; // multiplication scale for controlling how long the axes shall be in xy
 const float cz = 100; // multiplication scale for controlling how long the axes shall be in z
+
 } // namespace
 
 namespace GUI::RealSpace {
diff --git a/GUI/ba3d/view/camera.h b/GUI/ba3d/view/camera.h
index 8bffd805371..cd080208cbd 100644
--- a/GUI/ba3d/view/camera.h
+++ b/GUI/ba3d/view/camera.h
@@ -34,7 +34,6 @@ public:
     Camera();
 
     struct Position {
-
         Position();
         Position(const Vector3D& eye, const Vector3D& ctr, const Vector3D& up,
                  const QQuaternion& = {});
diff --git a/GUI/ba3d/view/canvas.cpp b/GUI/ba3d/view/canvas.cpp
index d11ee35386a..16eac8985b3 100644
--- a/GUI/ba3d/view/canvas.cpp
+++ b/GUI/ba3d/view/canvas.cpp
@@ -25,6 +25,7 @@
 #include <cstdlib>
 
 namespace {
+
 float ZoomInScale()
 {
     if (QSysInfo::productType() == "osx")
@@ -44,6 +45,7 @@ const float rot_speed_v = 0.4f; // camera rotation speed in vertical direction
 // Default camera position in accordance with RealSpaceBuilder.h
 const float cameraDefaultPosY = -200.0f; // default camera position on Y axis
 const float cameraDefaultPosZ = 120.0f;  // default camera position on Z axis
+
 } // namespace
 
 namespace GUI::RealSpace {
@@ -389,7 +391,6 @@ void Canvas::topView()
 void Canvas::horizontalCameraTurn(float angle)
 {
     if (isInitialized()) {
-
         float theta = angle * static_cast<float>(M_PI / 180.0); // in radians
 
         // Horizontal camera turn for 3D axes
@@ -435,7 +436,6 @@ void Canvas::horizontalCameraTurn(float angle)
 void Canvas::verticalCameraTurn(float angle)
 {
     if (isInitialized()) {
-
         float theta = angle * static_cast<float>(M_PI / 180.0); // in radians
 
         // Vertical camera turn for 3D axes
diff --git a/GUI/ba3d/widget.cpp b/GUI/ba3d/widget.cpp
index 652f5f1c4cc..2865fd498fc 100644
--- a/GUI/ba3d/widget.cpp
+++ b/GUI/ba3d/widget.cpp
@@ -20,6 +20,7 @@
 #include <QBoxLayout>
 
 namespace GUI::RealSpace {
+
 //------------------------------------------------------------------------------
 
 Widget3D::Widget3D() : canvas(nullptr)
@@ -68,4 +69,5 @@ Model* Widget3D::model()
 }
 
 //------------------------------------------------------------------------------
+
 } // namespace GUI::RealSpace
diff --git a/Param/Distrib/Distributions.cpp b/Param/Distrib/Distributions.cpp
index 451f11dded8..6d50abd8451 100644
--- a/Param/Distrib/Distributions.cpp
+++ b/Param/Distrib/Distributions.cpp
@@ -433,9 +433,8 @@ double DistributionTrapezoid::probabilityDensity(double x) const
         return (x - min) * height / m_left;
     if (x < min + m_left + m_middle)
         return height;
-    if (x < min + m_left + m_middle + m_right) {
+    if (x < min + m_left + m_middle + m_right)
         return height - (x - min - m_left - m_middle) * height / m_right;
-    }
     return 0.0;
 }
 
@@ -480,6 +479,7 @@ void DistributionTrapezoid::adjustLimitsToNonZeroSamples(double& min, double& ma
 }
 
 namespace {
+
 bool DoubleEqual(double a, double b)
 {
     double eps = 10.0
@@ -487,4 +487,5 @@ bool DoubleEqual(double a, double b)
                             std::numeric_limits<double>::min());
     return std::abs(a - b) < eps;
 }
+
 } // namespace
diff --git a/Param/Node/INode.cpp b/Param/Node/INode.cpp
index 0421eb493ca..063cf352893 100644
--- a/Param/Node/INode.cpp
+++ b/Param/Node/INode.cpp
@@ -28,7 +28,6 @@ NodeMeta nodeMetaUnion(const std::vector<ParaMeta>& base, const NodeMeta& other)
 
 INode::INode(const NodeMeta& meta, std::vector<double> PValues) : m_P(std::move(PValues))
 {
-
     for (size_t i = 0; i < meta.paraMeta.size(); ++i) {
         const ParaMeta& pm = meta.paraMeta[i];
 
diff --git a/Resample/Slice/SliceStack.h b/Resample/Slice/SliceStack.h
index 020ddb0db84..5d801cf8724 100644
--- a/Resample/Slice/SliceStack.h
+++ b/Resample/Slice/SliceStack.h
@@ -22,6 +22,7 @@
 
 #include "Resample/Slice/Slice.h" // TODO move back to cpp file
 #include <heinz/Vectors3D.h>
+
 // - either get rid of m_roughness_model
 // - or of inheritance from std::vector
 
diff --git a/Resample/Specular/ComputeFluxMagnetic.h b/Resample/Specular/ComputeFluxMagnetic.h
index 44390ffb11d..0eda0fc837f 100644
--- a/Resample/Specular/ComputeFluxMagnetic.h
+++ b/Resample/Specular/ComputeFluxMagnetic.h
@@ -48,6 +48,7 @@ Fluxes fluxes(const SliceStack& slices, const R3& k, bool forward);
 //! Introduced in order to speed up pure reflectivity computations
 Eigen::Matrix2cd topLayerR(const SliceStack& slices, const std::vector<complex_t>& kzs,
                            bool forward);
+
 } // namespace Compute::SpecularMagnetic
 
 #endif // BORNAGAIN_RESAMPLE_SPECULAR_COMPUTEFLUXMAGNETIC_H
diff --git a/Resample/Specular/TransitionMagneticNevot.h b/Resample/Specular/TransitionMagneticNevot.h
index 0e851d3b9be..ed769bf8f8b 100644
--- a/Resample/Specular/TransitionMagneticNevot.h
+++ b/Resample/Specular/TransitionMagneticNevot.h
@@ -36,7 +36,6 @@ namespace Compute::MagneticNevotCroceTransition {
 
 std::pair<Eigen::Matrix2cd, Eigen::Matrix2cd>
 backwardsSubmatrices(const MatrixFlux& coeff_i, const MatrixFlux& coeff_i1, double sigma);
-
 }
 
 #endif // BORNAGAIN_RESAMPLE_SPECULAR_TRANSITIONMAGNETICNEVOT_H
diff --git a/Resample/Specular/TransitionMagneticTanh.h b/Resample/Specular/TransitionMagneticTanh.h
index cd186ea3b18..b43b1742efe 100644
--- a/Resample/Specular/TransitionMagneticTanh.h
+++ b/Resample/Specular/TransitionMagneticTanh.h
@@ -36,7 +36,6 @@ namespace Compute::TransitionMagneticTanh {
 
 std::pair<Eigen::Matrix2cd, Eigen::Matrix2cd>
 backwardsSubmatrices(const MatrixFlux& coeff_i, const MatrixFlux& coeff_i1, double sigma);
-
 }
 
 #endif // BORNAGAIN_RESAMPLE_SPECULAR_TRANSITIONMAGNETICTANH_H
diff --git a/Resample/Swig/MultiLayerFuncs.cpp b/Resample/Swig/MultiLayerFuncs.cpp
index 63688cd0346..15cf5bfa00d 100644
--- a/Resample/Swig/MultiLayerFuncs.cpp
+++ b/Resample/Swig/MultiLayerFuncs.cpp
@@ -23,9 +23,8 @@ std::vector<double> swigAPI::generateZValues(int n_points, double z_min, double
     if (n_points < 1)
         return result;
     double step = n_points > 1 ? (z_max - z_min) / (n_points - 1) : 0.0;
-    for (int i = 0; i < n_points; ++i) {
+    for (int i = 0; i < n_points; ++i)
         result.push_back(z_min + i * step);
-    }
     return result;
 }
 
diff --git a/Sample/Aggregate/Interference1DLattice.cpp b/Sample/Aggregate/Interference1DLattice.cpp
index ec2a07bcbb1..b9649005f11 100644
--- a/Sample/Aggregate/Interference1DLattice.cpp
+++ b/Sample/Aggregate/Interference1DLattice.cpp
@@ -20,10 +20,12 @@
 #include <algorithm>
 
 namespace {
+
 // maximum value for qx*Lambdax
 const int nmax = 20;
 // minimum number of neighboring reciprocal lattice points to use
 const int min_points = 4;
+
 } // namespace
 
 //! Constructor of interference function of one-dimensional lattice.
diff --git a/Sample/Aggregate/Interference2DLattice.cpp b/Sample/Aggregate/Interference2DLattice.cpp
index d91a0ecbb1d..3c2b9155d76 100644
--- a/Sample/Aggregate/Interference2DLattice.cpp
+++ b/Sample/Aggregate/Interference2DLattice.cpp
@@ -17,10 +17,12 @@
 #include <algorithm>
 
 namespace {
+
 // maximum value for qx*Lambdax and qy*lambday
 const int nmax = 20;
 // minimum number of neighboring reciprocal lattice points to use
 const int min_points = 4;
+
 } // namespace
 
 Interference2DLattice::Interference2DLattice(const Lattice2D& lattice)
diff --git a/Sample/Aggregate/InterferenceRadialParaCrystal.cpp b/Sample/Aggregate/InterferenceRadialParaCrystal.cpp
index 9951e19ea7e..1f3259d5146 100644
--- a/Sample/Aggregate/InterferenceRadialParaCrystal.cpp
+++ b/Sample/Aggregate/InterferenceRadialParaCrystal.cpp
@@ -104,15 +104,13 @@ double InterferenceRadialParaCrystal::iff_without_dw(const R3 q) const
     auto nd = static_cast<double>(n);
     complex_t fp = FTPDF(qpar);
     if (n < 1) {
-        if (std::abs(1.0 - fp) < 10. * std::numeric_limits<double>::epsilon()) {
+        if (std::abs(1.0 - fp) < 10. * std::numeric_limits<double>::epsilon())
             result = m_pdf->qSecondDerivative() / m_peak_distance / m_peak_distance;
-        } else {
+        else
             result = ((1.0 + fp) / (1.0 - fp)).real();
-        }
     } else {
-        if (std::norm(1.0 - fp) < 10. * std::numeric_limits<double>::epsilon()) {
+        if (std::norm(1.0 - fp) < 10. * std::numeric_limits<double>::epsilon())
             result = nd;
-        }
         // for (1-fp)*nd small, take the series expansion to second order in nd*(1-fp)
         else if (std::abs(1.0 - fp) * nd < 2e-4) {
             complex_t intermediate =
diff --git a/Sample/Correlations/IPeakShape.cpp b/Sample/Correlations/IPeakShape.cpp
index b0327cced2f..87726d7d942 100644
--- a/Sample/Correlations/IPeakShape.cpp
+++ b/Sample/Correlations/IPeakShape.cpp
@@ -25,13 +25,11 @@ const double maxkappa2 = std::log(std::numeric_limits<double>::max());
 
 double FisherDistribution(double x, double kappa)
 {
-    if (kappa <= 0.0) {
+    if (kappa <= 0.0)
         return 1.0 / (4.0 * M_PI);
-    }
     double prefactor = kappa / (4.0 * M_PI);
-    if (kappa > maxkappa) {
+    if (kappa > maxkappa)
         return 2.0 * prefactor * std::exp(kappa * (x - 1.0));
-    }
     return prefactor * std::exp(kappa * x) / std::sinh(kappa);
 }
 
diff --git a/Sample/HardParticle/IFormFactorPolyhedron.h b/Sample/HardParticle/IFormFactorPolyhedron.h
index 50c234531a7..faf98d7dff5 100644
--- a/Sample/HardParticle/IFormFactorPolyhedron.h
+++ b/Sample/HardParticle/IFormFactorPolyhedron.h
@@ -21,6 +21,7 @@
 #include <memory>
 
 namespace ff {
+
 class Polyhedron;
 }
 
diff --git a/Sample/Material/MaterialBySLDImpl.cpp b/Sample/Material/MaterialBySLDImpl.cpp
index 0fab576ba60..e0503d26702 100644
--- a/Sample/Material/MaterialBySLDImpl.cpp
+++ b/Sample/Material/MaterialBySLDImpl.cpp
@@ -17,12 +17,14 @@
 #include "Base/Vector/WavevectorInfo.h"
 
 namespace {
+
 const double square_angstroms = Units::angstrom * Units::angstrom;
 
 inline double getWlPrefactor(double wavelength)
 {
     return wavelength * wavelength / M_PI;
 }
+
 } // namespace
 
 MaterialBySLDImpl::MaterialBySLDImpl(const std::string& name, double sld_real, double sld_imag,
diff --git a/Sample/Material/MaterialUtils.cpp b/Sample/Material/MaterialUtils.cpp
index 03ef9749e81..4612fc4be1a 100644
--- a/Sample/Material/MaterialUtils.cpp
+++ b/Sample/Material/MaterialUtils.cpp
@@ -26,10 +26,12 @@ constexpr double magnetic_prefactor = (m_n * g_factor_n * mu_N / h_bar / h_bar)
 const Eigen::Matrix2cd Unit_Matrix(Eigen::Matrix2cd::Identity());
 
 namespace {
+
 // Pauli matrices
 const Eigen::Matrix2cd Pauli_X((Eigen::Matrix2cd() << 0, 1, 1, 0).finished());
 const Eigen::Matrix2cd Pauli_Y((Eigen::Matrix2cd() << 0, -I, I, 0).finished());
 const Eigen::Matrix2cd Pauli_Z((Eigen::Matrix2cd() << 1, 0, 0, -1).finished());
+
 } // namespace
 
 template <typename T>
diff --git a/Sample/Multilayer/PyImport.h b/Sample/Multilayer/PyImport.h
index cdad48d3533..ed407d63278 100644
--- a/Sample/Multilayer/PyImport.h
+++ b/Sample/Multilayer/PyImport.h
@@ -45,6 +45,7 @@ std::unique_ptr<MultiLayer> createFromPython(const std::string& script,
 //! @param script: Python script
 //! @param path: A path to import BornAgain library. If empty, relies on PYTHONPATH
 std::vector<std::string> listOfFunctions(const std::string& script, const std::string& path = "");
+
 } // namespace Py::Import
 
 #endif // BORNAGAIN_PYTHON
diff --git a/Sample/Particle/Particle.cpp b/Sample/Particle/Particle.cpp
index 023c0430933..889c5abb47e 100644
--- a/Sample/Particle/Particle.cpp
+++ b/Sample/Particle/Particle.cpp
@@ -78,9 +78,8 @@ void Particle::setMaterial(Material material)
 
 void Particle::setFormFactor(const IFormFactor& form_factor)
 {
-    if (&form_factor != m_form_factor.get()) {
+    if (&form_factor != m_form_factor.get())
         m_form_factor.reset(form_factor.clone());
-    }
 }
 
 std::vector<const INode*> Particle::getChildren() const
diff --git a/Sample/StandardSamples/BoxCompositionBuilder.h b/Sample/StandardSamples/BoxCompositionBuilder.h
index a19b5228b18..44d5ff1cb53 100644
--- a/Sample/StandardSamples/BoxCompositionBuilder.h
+++ b/Sample/StandardSamples/BoxCompositionBuilder.h
@@ -27,35 +27,45 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createBoxCompositionRotateX();
+
 } // namespace ExemplarySamples
 
 //! Two boxes in particle composition rotated in Y by 90 degrees.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createBoxCompositionRotateY();
+
 } // namespace ExemplarySamples
 
 //! Two boxes in particle composition rotated in Z by 90 degrees.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createBoxCompositionRotateZ();
+
 } // namespace ExemplarySamples
 
 //! Two boxes in particle composition rotated in Z and Y by 90 degrees.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createBoxCompositionRotateZandY();
+
 } // namespace ExemplarySamples
 
 //! Two different boxes are first rotated and then composed, composition is then rotated.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createBoxStackComposition();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_BOXCOMPOSITIONBUILDER_H
diff --git a/Sample/StandardSamples/BoxesSquareLatticeBuilder.h b/Sample/StandardSamples/BoxesSquareLatticeBuilder.h
index 898f07d8c19..2c6039cae5c 100644
--- a/Sample/StandardSamples/BoxesSquareLatticeBuilder.h
+++ b/Sample/StandardSamples/BoxesSquareLatticeBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createBoxesSquareLattice2D();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_BOXESSQUARELATTICEBUILDER_H
diff --git a/Sample/StandardSamples/CoreShellParticleBuilder.h b/Sample/StandardSamples/CoreShellParticleBuilder.h
index 489b216c459..f08cc7884cb 100644
--- a/Sample/StandardSamples/CoreShellParticleBuilder.h
+++ b/Sample/StandardSamples/CoreShellParticleBuilder.h
@@ -27,14 +27,18 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createCoreShellParticle();
+
 } // namespace ExemplarySamples
 
 //! Rotation and translation of core shell box particle in 3 layers system.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createCoreShellBoxRotateZandY();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_CORESHELLPARTICLEBUILDER_H
diff --git a/Sample/StandardSamples/CustomMorphologyBuilder.cpp b/Sample/StandardSamples/CustomMorphologyBuilder.cpp
index a402dedd082..8a10b81dec2 100644
--- a/Sample/StandardSamples/CustomMorphologyBuilder.cpp
+++ b/Sample/StandardSamples/CustomMorphologyBuilder.cpp
@@ -25,7 +25,6 @@ using Units::deg;
 
 MultiLayer* ExemplarySamples::createCustomMorphology()
 {
-
     Material mat_vacuum = refMat::Vacuum;
     Material mat_particle = refMat::Particle;
 
diff --git a/Sample/StandardSamples/CustomMorphologyBuilder.h b/Sample/StandardSamples/CustomMorphologyBuilder.h
index 610c845b58a..a046d835738 100644
--- a/Sample/StandardSamples/CustomMorphologyBuilder.h
+++ b/Sample/StandardSamples/CustomMorphologyBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createCustomMorphology();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_CUSTOMMORPHOLOGYBUILDER_H
diff --git a/Sample/StandardSamples/CylindersAndPrismsBuilder.h b/Sample/StandardSamples/CylindersAndPrismsBuilder.h
index 6ffc7302539..1e00118aa9e 100644
--- a/Sample/StandardSamples/CylindersAndPrismsBuilder.h
+++ b/Sample/StandardSamples/CylindersAndPrismsBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createCylindersAndPrisms();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_CYLINDERSANDPRISMSBUILDER_H
diff --git a/Sample/StandardSamples/CylindersBuilder.h b/Sample/StandardSamples/CylindersBuilder.h
index 38c166263a3..481e89a41c2 100644
--- a/Sample/StandardSamples/CylindersBuilder.h
+++ b/Sample/StandardSamples/CylindersBuilder.h
@@ -27,28 +27,36 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createCylindersInDWBA();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: cylinder form factor in BA (IsGISAXS example #3, part II).
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createCylindersInBA(double height = 5, double radius = 5);
+
 } // namespace ExemplarySamples
 
 //! Builds sample with large cylinders for MC integration tests.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createLargeCylindersInDWBA(double height = 1000, double radius = 500);
+
 } // namespace ExemplarySamples
 
 //! Builds sample: cylinder form factor in DWBA (IsGISAXS example #3, part I).
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createRotatedCylinders();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_CYLINDERSBUILDER_H
diff --git a/Sample/StandardSamples/FeNiBilayerBuilder.h b/Sample/StandardSamples/FeNiBilayerBuilder.h
index 934d5a42912..9b9aa83dec9 100644
--- a/Sample/StandardSamples/FeNiBilayerBuilder.h
+++ b/Sample/StandardSamples/FeNiBilayerBuilder.h
@@ -25,27 +25,39 @@ class MultiLayer;
 
 
 namespace ExemplarySamples {
+
 MultiLayer* createFeNiBilayer();
+
 } // namespace ExemplarySamples
 
 namespace ExemplarySamples {
+
 MultiLayer* createFeNiBilayerTanh();
+
 } // namespace ExemplarySamples
 
 namespace ExemplarySamples {
+
 MultiLayer* createFeNiBilayerNC();
+
 } // namespace ExemplarySamples
 
 namespace ExemplarySamples {
+
 MultiLayer* createFeNiBilayerSpinFlip();
+
 } // namespace ExemplarySamples
 
 namespace ExemplarySamples {
+
 MultiLayer* createFeNiBilayerSpinFlipTanh();
+
 } // namespace ExemplarySamples
 
 namespace ExemplarySamples {
+
 MultiLayer* createFeNiBilayerSpinFlipNC();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_FENIBILAYERBUILDER_H
diff --git a/Sample/StandardSamples/HomogeneousMultilayerBuilder.h b/Sample/StandardSamples/HomogeneousMultilayerBuilder.h
index 8f75a0c7738..36b938befcf 100644
--- a/Sample/StandardSamples/HomogeneousMultilayerBuilder.h
+++ b/Sample/StandardSamples/HomogeneousMultilayerBuilder.h
@@ -29,7 +29,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createHomogeneousMultilayer();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_HOMOGENEOUSMULTILAYERBUILDER_H
diff --git a/Sample/StandardSamples/LatticeBuilder.h b/Sample/StandardSamples/LatticeBuilder.h
index d9684d42bc9..7e985a92510 100644
--- a/Sample/StandardSamples/LatticeBuilder.h
+++ b/Sample/StandardSamples/LatticeBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createLattice1D();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_LATTICEBUILDER_H
diff --git a/Sample/StandardSamples/LayersWithAbsorptionBuilder.h b/Sample/StandardSamples/LayersWithAbsorptionBuilder.h
index 3f565c9a61e..bb78ccd9a1f 100644
--- a/Sample/StandardSamples/LayersWithAbsorptionBuilder.h
+++ b/Sample/StandardSamples/LayersWithAbsorptionBuilder.h
@@ -31,7 +31,9 @@ class IFormFactor;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createLayersWithAbsorptionWithFF(const IFormFactor*);
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_LAYERSWITHABSORPTIONBUILDER_H
diff --git a/Sample/StandardSamples/LayersWithAbsorptionBySLDBuilder.h b/Sample/StandardSamples/LayersWithAbsorptionBySLDBuilder.h
index e97c173e0b8..300a079b6d8 100644
--- a/Sample/StandardSamples/LayersWithAbsorptionBySLDBuilder.h
+++ b/Sample/StandardSamples/LayersWithAbsorptionBySLDBuilder.h
@@ -29,7 +29,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createLayersWithAbsorptionBySLD();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_LAYERSWITHABSORPTIONBYSLDBUILDER_H
diff --git a/Sample/StandardSamples/MagneticLayersBuilder.h b/Sample/StandardSamples/MagneticLayersBuilder.h
index 6dee042e9e5..df4aeead574 100644
--- a/Sample/StandardSamples/MagneticLayersBuilder.h
+++ b/Sample/StandardSamples/MagneticLayersBuilder.h
@@ -28,35 +28,45 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createMagneticSubstrateZeroField();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: ambient and one magnetized layer on a non-magnetized substrate.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createSimpleMagneticLayer();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: magnetic spheres in a magnetized layer on a non-magnetized substrate.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createMagneticLayer();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: magnetic layer on a magnetic substrate with the fields rotated by 90°
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createSimpleMagneticRotationWithRoughness(const std::string& roughnessKey);
+
 } // namespace ExemplarySamples
 
 //! Builds sample: rotated magnetic spheres in substrate layer with a unit magnetic field.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createMagneticRotation();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_MAGNETICLAYERSBUILDER_H
diff --git a/Sample/StandardSamples/MagneticParticlesBuilder.h b/Sample/StandardSamples/MagneticParticlesBuilder.h
index 0e2e1d2ad6b..469984db84b 100644
--- a/Sample/StandardSamples/MagneticParticlesBuilder.h
+++ b/Sample/StandardSamples/MagneticParticlesBuilder.h
@@ -27,21 +27,27 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createMagneticParticleZeroField();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: cylinders with magnetic material and non-zero magnetic field.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createMagneticCylinders();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: spheres with magnetization inside substrate.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createMagneticSpheres();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_MAGNETICPARTICLESBUILDER_H
diff --git a/Sample/StandardSamples/MesoCrystalBuilder.h b/Sample/StandardSamples/MesoCrystalBuilder.h
index 880fdb89116..78fd3180e30 100644
--- a/Sample/StandardSamples/MesoCrystalBuilder.h
+++ b/Sample/StandardSamples/MesoCrystalBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createMesoCrystal();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_MESOCRYSTALBUILDER_H
diff --git a/Sample/StandardSamples/MultiLayerWithNCRoughnessBuilder.h b/Sample/StandardSamples/MultiLayerWithNCRoughnessBuilder.h
index 06416fd02f5..24f225cd3ad 100644
--- a/Sample/StandardSamples/MultiLayerWithNCRoughnessBuilder.h
+++ b/Sample/StandardSamples/MultiLayerWithNCRoughnessBuilder.h
@@ -28,7 +28,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createMultiLayerWithNCRoughness();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_MULTILAYERWITHNCROUGHNESSBUILDER_H
diff --git a/Sample/StandardSamples/MultiLayerWithRoughnessBuilder.h b/Sample/StandardSamples/MultiLayerWithRoughnessBuilder.h
index d981c870ba5..c464f30f6f3 100644
--- a/Sample/StandardSamples/MultiLayerWithRoughnessBuilder.h
+++ b/Sample/StandardSamples/MultiLayerWithRoughnessBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createMultiLayerWithRoughness();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_MULTILAYERWITHROUGHNESSBUILDER_H
diff --git a/Sample/StandardSamples/MultipleLayoutBuilder.h b/Sample/StandardSamples/MultipleLayoutBuilder.h
index 78f3fce7d96..cab1f32e4af 100644
--- a/Sample/StandardSamples/MultipleLayoutBuilder.h
+++ b/Sample/StandardSamples/MultipleLayoutBuilder.h
@@ -28,7 +28,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createMultipleLayout();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_MULTIPLELAYOUTBUILDER_H
diff --git a/Sample/StandardSamples/ParaCrystalBuilder.h b/Sample/StandardSamples/ParaCrystalBuilder.h
index 26322355dbd..b90474376d1 100644
--- a/Sample/StandardSamples/ParaCrystalBuilder.h
+++ b/Sample/StandardSamples/ParaCrystalBuilder.h
@@ -31,7 +31,9 @@ class FTDistribution2DComponents;
 //! Builds sample: cylinders with 1DDL structure factor (IsGISAXS example #4).
 
 namespace ExemplarySamples {
+
 MultiLayer* createRadialParaCrystal();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: basic two dimensional paracrystal with various probability
@@ -39,21 +41,27 @@ MultiLayer* createRadialParaCrystal();
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createBasic2DParaCrystalWithFTDis(const IFTDistribution2D* pdf2);
+
 } // namespace ExemplarySamples
 
 //! Builds sample: cylinders with 2DDL structure factor (IsGISAXS example #4).
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createHexParaCrystal();
+
 } // namespace ExemplarySamples
 
 //! @ingroup standard_samples
 //! Builds sample: 2D paracrystal lattice (IsGISAXS example #8).
 
 namespace ExemplarySamples {
+
 MultiLayer* createRectParaCrystal();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_PARACRYSTALBUILDER_H
diff --git a/Sample/StandardSamples/ParticleCompositionBuilder.h b/Sample/StandardSamples/ParticleCompositionBuilder.h
index 92acaa2856b..06c4eaaeddc 100644
--- a/Sample/StandardSamples/ParticleCompositionBuilder.h
+++ b/Sample/StandardSamples/ParticleCompositionBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createParticleComposition();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_PARTICLECOMPOSITIONBUILDER_H
diff --git a/Sample/StandardSamples/ParticleDistributionsBuilder.h b/Sample/StandardSamples/ParticleDistributionsBuilder.h
index 5117bf1af7a..67e2f99875a 100644
--- a/Sample/StandardSamples/ParticleDistributionsBuilder.h
+++ b/Sample/StandardSamples/ParticleDistributionsBuilder.h
@@ -27,42 +27,54 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createCylindersWithSizeDistribution();
+
 } // namespace ExemplarySamples
 
 //! Builds mixture of cylinder particles with different size distribution (IsGISAXS example #2)
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createTwoTypesCylindersDistribution();
+
 } // namespace ExemplarySamples
 
 //! Rotated Pyramids with the distribution applied to the rotation angle.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createRotatedPyramidsDistribution();
+
 } // namespace ExemplarySamples
 
 //! Spherical particles with the distribution applied to the radius and RealLimits defined.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createSpheresWithLimitsDistribution();
+
 } // namespace ExemplarySamples
 
 //! Cones with the distribution applied to the angle and RealLimits defined.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createConesWithLimitsDistribution();
+
 } // namespace ExemplarySamples
 
 //! Distribution of boxes with main parameter and two linked parameters.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createLinkedBoxDistribution();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_PARTICLEDISTRIBUTIONSBUILDER_H
diff --git a/Sample/StandardSamples/ParticleInVacuumBuilder.h b/Sample/StandardSamples/ParticleInVacuumBuilder.h
index 722b0c23467..4b85957022d 100644
--- a/Sample/StandardSamples/ParticleInVacuumBuilder.h
+++ b/Sample/StandardSamples/ParticleInVacuumBuilder.h
@@ -29,7 +29,9 @@ class IFormFactor;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createParticleInVacuumWithFF(const IFormFactor*);
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_PARTICLEINVACUUMBUILDER_H
diff --git a/Sample/StandardSamples/PercusYevickBuilder.h b/Sample/StandardSamples/PercusYevickBuilder.h
index fcf67187730..25377baf8dd 100644
--- a/Sample/StandardSamples/PercusYevickBuilder.h
+++ b/Sample/StandardSamples/PercusYevickBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! Builds sample: cylinders with hard disk Percus-Yevick interference.
 
 namespace ExemplarySamples {
+
 MultiLayer* createHardDisk();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_PERCUSYEVICKBUILDER_H
diff --git a/Sample/StandardSamples/PlainMultiLayerBySLDBuilder.h b/Sample/StandardSamples/PlainMultiLayerBySLDBuilder.h
index d63b4e69182..d558e075b35 100644
--- a/Sample/StandardSamples/PlainMultiLayerBySLDBuilder.h
+++ b/Sample/StandardSamples/PlainMultiLayerBySLDBuilder.h
@@ -28,7 +28,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createPlainMultiLayerBySLD(int n_layers = 10, double thick_ti = 3.0);
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_PLAINMULTILAYERBYSLDBUILDER_H
diff --git a/Sample/StandardSamples/ResonatorBuilder.h b/Sample/StandardSamples/ResonatorBuilder.h
index c38528ed989..f389d103011 100644
--- a/Sample/StandardSamples/ResonatorBuilder.h
+++ b/Sample/StandardSamples/ResonatorBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createResonator(double ti_thickness = 13.0);
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_RESONATORBUILDER_H
diff --git a/Sample/StandardSamples/RipplesBuilder.h b/Sample/StandardSamples/RipplesBuilder.h
index 8bed0a9230a..94486fe553c 100644
--- a/Sample/StandardSamples/RipplesBuilder.h
+++ b/Sample/StandardSamples/RipplesBuilder.h
@@ -27,18 +27,24 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createCosineRipple();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: triangular ripple within the 1D-paracrystal model (from PRB 85, 235415, 2012).
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createTriangularRipple(double d = 0);
+
 } // namespace ExemplarySamples
 
 namespace ExemplarySamples {
+
 MultiLayer* createAsymRipple();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_RIPPLESBUILDER_H
diff --git a/Sample/StandardSamples/RotatedPyramidsBuilder.h b/Sample/StandardSamples/RotatedPyramidsBuilder.h
index f9c3caa8512..70cc017d851 100644
--- a/Sample/StandardSamples/RotatedPyramidsBuilder.h
+++ b/Sample/StandardSamples/RotatedPyramidsBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createRotatedPyramids();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_ROTATEDPYRAMIDSBUILDER_H
diff --git a/Sample/StandardSamples/SizeDistributionModelsBuilder.h b/Sample/StandardSamples/SizeDistributionModelsBuilder.h
index d4a83aa96aa..55b82f73bf5 100644
--- a/Sample/StandardSamples/SizeDistributionModelsBuilder.h
+++ b/Sample/StandardSamples/SizeDistributionModelsBuilder.h
@@ -28,7 +28,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createSizeDistributionDAModel();
+
 } // namespace ExemplarySamples
 
 //! Creates the sample demonstrating size distribution model in local monodisperse approximation.
@@ -36,7 +38,9 @@ MultiLayer* createSizeDistributionDAModel();
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createSizeDistributionLMAModel();
+
 } // namespace ExemplarySamples
 
 //! Creates the sample demonstrating size distribution model in size space coupling approximation.
@@ -44,14 +48,18 @@ MultiLayer* createSizeDistributionLMAModel();
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createSizeDistributionSSCAModel();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: size spacing correlation approximation (IsGISAXS example #15).
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createCylindersInSSCA();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_SIZEDISTRIBUTIONMODELSBUILDER_H
diff --git a/Sample/StandardSamples/SlicedCompositionBuilder.h b/Sample/StandardSamples/SlicedCompositionBuilder.h
index 463e5e66141..71074e7cd4c 100644
--- a/Sample/StandardSamples/SlicedCompositionBuilder.h
+++ b/Sample/StandardSamples/SlicedCompositionBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createSlicedComposition();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_SLICEDCOMPOSITIONBUILDER_H
diff --git a/Sample/StandardSamples/SlicedCylindersBuilder.cpp b/Sample/StandardSamples/SlicedCylindersBuilder.cpp
index dfae7d9da17..71e24dcb610 100644
--- a/Sample/StandardSamples/SlicedCylindersBuilder.cpp
+++ b/Sample/StandardSamples/SlicedCylindersBuilder.cpp
@@ -23,6 +23,7 @@
 #include "Sample/Particle/Particle.h"
 
 namespace {
+
 const double height(5);
 const double radius(5);
 const double wavelength(0.154); // nm
@@ -40,6 +41,7 @@ complex_t averageSLD(complex_t sld_p, complex_t sld_l, double eff_vol)
 {
     return sld_l + eff_vol * (sld_p - sld_l);
 }
+
 } // namespace
 
 MultiLayer* ExemplarySamples::createSlicedCylinders()
diff --git a/Sample/StandardSamples/SlicedCylindersBuilder.h b/Sample/StandardSamples/SlicedCylindersBuilder.h
index 68ad96a2213..ff388b7b3d9 100644
--- a/Sample/StandardSamples/SlicedCylindersBuilder.h
+++ b/Sample/StandardSamples/SlicedCylindersBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createSlicedCylinders();
+
 } // namespace ExemplarySamples
 
 //! Provides exactly the same sample as SlicedCylindersBuilder, but with
@@ -35,7 +37,9 @@ MultiLayer* createSlicedCylinders();
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createSLDSlicedCylinders();
+
 } // namespace ExemplarySamples
 
 //! Provides exactly the same sample as SLDSlicedCylindersBuilder, but with
@@ -44,7 +48,9 @@ MultiLayer* createSLDSlicedCylinders();
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createAveragedSlicedCylinders();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_SLICEDCYLINDERSBUILDER_H
diff --git a/Sample/StandardSamples/ThickAbsorptiveSampleBuilder.h b/Sample/StandardSamples/ThickAbsorptiveSampleBuilder.h
index 34e5f080a5e..8e8cc2fa408 100644
--- a/Sample/StandardSamples/ThickAbsorptiveSampleBuilder.h
+++ b/Sample/StandardSamples/ThickAbsorptiveSampleBuilder.h
@@ -24,7 +24,9 @@ class MultiLayer;
 
 
 namespace ExemplarySamples {
+
 MultiLayer* createThickAbsorptiveSample();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_THICKABSORPTIVESAMPLEBUILDER_H
diff --git a/Sample/StandardSamples/TransformationsBuilder.h b/Sample/StandardSamples/TransformationsBuilder.h
index d2b4b93f456..cac21f5eda2 100644
--- a/Sample/StandardSamples/TransformationsBuilder.h
+++ b/Sample/StandardSamples/TransformationsBuilder.h
@@ -27,7 +27,9 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createTransformBox();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_TRANSFORMATIONSBUILDER_H
diff --git a/Sample/StandardSamples/TwoDimLatticeBuilder.h b/Sample/StandardSamples/TwoDimLatticeBuilder.h
index 552906c7673..28af754ce74 100644
--- a/Sample/StandardSamples/TwoDimLatticeBuilder.h
+++ b/Sample/StandardSamples/TwoDimLatticeBuilder.h
@@ -27,42 +27,54 @@ class MultiLayer;
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createBasic2DLattice();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: 2D lattice with different disorder (IsGISAXS example #6).
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createSquareLattice2D();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: 2D lattice with different disorder (IsGISAXS example #6).
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createCenteredSquareLattice2D();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: 2D lattice with different disorder (IsGISAXS example #6).
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createRotatedSquareLattice2D();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: 2D finite lattice with thermal disorder.
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createFiniteSquareLattice2D();
+
 } // namespace ExemplarySamples
 
 //! Builds sample: 2D finite lattice of 2D finite lattices (superlattice).
 //! @ingroup standard_samples
 
 namespace ExemplarySamples {
+
 MultiLayer* createSuperLattice();
+
 } // namespace ExemplarySamples
 
 #endif // BORNAGAIN_SAMPLE_STANDARDSAMPLES_TWODIMLATTICEBUILDER_H
diff --git a/Tests/Functional/Core/CoreSpecial/CoreIOPathTest.cpp b/Tests/Functional/Core/CoreSpecial/CoreIOPathTest.cpp
index d1543306314..0756bf3f1fe 100644
--- a/Tests/Functional/Core/CoreSpecial/CoreIOPathTest.cpp
+++ b/Tests/Functional/Core/CoreSpecial/CoreIOPathTest.cpp
@@ -22,6 +22,7 @@
 #include <memory>
 
 namespace {
+
 std::unique_ptr<OutputData<double>> createTestData()
 {
     std::unique_ptr<OutputData<double>> result(new OutputData<double>);
diff --git a/Tests/SingleUse/ff-tetrahedron.cpp b/Tests/SingleUse/ff-tetrahedron.cpp
index 410a8887732..bb627f25b83 100644
--- a/Tests/SingleUse/ff-tetrahedron.cpp
+++ b/Tests/SingleUse/ff-tetrahedron.cpp
@@ -1,5 +1,6 @@
 #include "Base/Math/Constants.h"
 #include "Sample/HardParticle/HardParticles.h"
+
 <ff / PolyhedralComponents.h>
 #include "Tests/GTestWrapper/google_test.h"
 #include <iostream>
diff --git a/Tests/Unit/Core/RectangularDetectorTest.cpp b/Tests/Unit/Core/RectangularDetectorTest.cpp
index 12567f80663..af175b6ca93 100644
--- a/Tests/Unit/Core/RectangularDetectorTest.cpp
+++ b/Tests/Unit/Core/RectangularDetectorTest.cpp
@@ -17,9 +17,8 @@ protected:
         bool is_equal = BaseUtils::algo::almostEqual(lhs.x(), rhs.x())
                         && BaseUtils::algo::almostEqual(lhs.y(), rhs.y())
                         && BaseUtils::algo::almostEqual(lhs.z(), rhs.z());
-        if (!is_equal) {
+        if (!is_equal)
             std::cout << "lhs:" << lhs << " rhs:" << rhs << " diff:" << (lhs - rhs) << std::endl;
-        }
         return is_equal;
     }
 };
diff --git a/Tests/Unit/Device/ConstKBinAxisTest.cpp b/Tests/Unit/Device/ConstKBinAxisTest.cpp
index 8631b95364a..9d956641647 100644
--- a/Tests/Unit/Device/ConstKBinAxisTest.cpp
+++ b/Tests/Unit/Device/ConstKBinAxisTest.cpp
@@ -21,9 +21,8 @@ protected:
                 (std::asin(start_sin + step * i) + std::asin(start_sin + step * (i + 1))) / 2.0);
         }
 
-        for (size_t i = 0; i < m_nbins + 1; ++i) {
+        for (size_t i = 0; i < m_nbins + 1; ++i)
             m_boundaries.push_back(std::asin(start_sin + step * i));
-        }
     }
 
     size_t m_nbins;
@@ -45,9 +44,8 @@ TEST_F(ConstKBinAxisTest, TypicalAxis)
     EXPECT_DOUBLE_EQ(m_start, m_axis.binBoundaries().front());
     EXPECT_DOUBLE_EQ(m_end, m_axis.binBoundaries().back());
 
-    for (size_t i = 0; i < m_axis.size(); ++i) {
+    for (size_t i = 0; i < m_axis.size(); ++i)
         EXPECT_DOUBLE_EQ(m_centers[i], m_axis[i]);
-    }
 
     for (size_t i = 0; i < m_axis.size(); ++i) {
         EXPECT_DOUBLE_EQ(m_boundaries[i], m_axis.bin(i).m_lower);
diff --git a/Tests/Unit/Device/DetectorMaskTest.cpp b/Tests/Unit/Device/DetectorMaskTest.cpp
index 50b3b65af87..17e664076c8 100644
--- a/Tests/Unit/Device/DetectorMaskTest.cpp
+++ b/Tests/Unit/Device/DetectorMaskTest.cpp
@@ -50,11 +50,10 @@ TEST_F(DetectorMaskTest, AddMask)
     for (size_t index = 0; index < detectorMask.getMaskData()->getAllocatedSize(); ++index) {
         double x = detectorMask.getMaskData()->getAxisValue(index, 0);
         double y = detectorMask.getMaskData()->getAxisValue(index, 1);
-        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0) {
+        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0)
             EXPECT_TRUE(detectorMask.isMasked(index));
-        } else {
+        else
             EXPECT_FALSE(detectorMask.isMasked(index));
-        }
     }
 
     EXPECT_EQ(detectorMask.numberOfMaskedChannels(), 32);
@@ -63,9 +62,8 @@ TEST_F(DetectorMaskTest, AddMask)
     detectorMask.addMask(polygon, false);
     detectorMask.initMaskData(detector.axes());
 
-    for (size_t index = 0; index < detectorMask.getMaskData()->getAllocatedSize(); ++index) {
+    for (size_t index = 0; index < detectorMask.getMaskData()->getAllocatedSize(); ++index)
         EXPECT_FALSE(detectorMask.isMasked(index));
-    }
     EXPECT_EQ(detectorMask.numberOfMaskedChannels(), 0);
 
     // adding third mask
@@ -77,11 +75,10 @@ TEST_F(DetectorMaskTest, AddMask)
     for (size_t index = 0; index < detectorMask.getMaskData()->getAllocatedSize(); ++index) {
         double x = detectorMask.getMaskData()->getAxisValue(index, 0);
         double y = detectorMask.getMaskData()->getAxisValue(index, 1);
-        if (x >= 5.0 && x <= 8.0 && y >= 2.0 && y <= 4.0) {
+        if (x >= 5.0 && x <= 8.0 && y >= 2.0 && y <= 4.0)
             EXPECT_TRUE(detectorMask.isMasked(index));
-        } else {
+        else
             EXPECT_FALSE(detectorMask.isMasked(index));
-        }
     }
 }
 
@@ -108,11 +105,10 @@ TEST_F(DetectorMaskTest, AssignmentOperator)
     for (size_t index = 0; index < mask.getMaskData()->getAllocatedSize(); ++index) {
         double x = mask.getMaskData()->getAxisValue(index, 0);
         double y = mask.getMaskData()->getAxisValue(index, 1);
-        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0) {
+        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0)
             EXPECT_TRUE(mask.isMasked(index));
-        } else {
+        else
             EXPECT_FALSE(mask.isMasked(index));
-        }
     }
     EXPECT_EQ(mask.numberOfMaskedChannels(), 32);
 }
@@ -140,10 +136,9 @@ TEST_F(DetectorMaskTest, CopyConstructor)
     for (size_t index = 0; index < mask.getMaskData()->getAllocatedSize(); ++index) {
         double x = mask.getMaskData()->getAxisValue(index, 0);
         double y = mask.getMaskData()->getAxisValue(index, 1);
-        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0) {
+        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0)
             EXPECT_TRUE(mask.isMasked(index));
-        } else {
+        else
             EXPECT_FALSE(mask.isMasked(index));
-        }
     }
 }
diff --git a/Tests/Unit/Device/Histogram1DTest.cpp b/Tests/Unit/Device/Histogram1DTest.cpp
index df6d346a7f5..2eb67000a1a 100644
--- a/Tests/Unit/Device/Histogram1DTest.cpp
+++ b/Tests/Unit/Device/Histogram1DTest.cpp
@@ -48,9 +48,8 @@ TEST_F(Histogram1DTest, FixedBinDefaultContent)
     }
 
     // default bin entries
-    for (size_t index = 0; index < bin_centers.size(); ++index) {
+    for (size_t index = 0; index < bin_centers.size(); ++index)
         EXPECT_EQ(hist.binNumberOfEntries(index), 0);
-    }
 }
 
 TEST_F(Histogram1DTest, FixedBinFill)
@@ -114,9 +113,8 @@ TEST_F(Histogram1DTest, crop)
     std::vector<double> xvalues = {-0.75, 0.0, 0.75, 1.5};
     Histogram1D hist(4, xedges);
 
-    for (size_t i = 0; i < xvalues.size(); ++i) {
+    for (size_t i = 0; i < xvalues.size(); ++i)
         hist.fill(xvalues[i], i * 10.0);
-    }
 
     std::unique_ptr<Histogram1D> crop(hist.crop(-0.49, 0.99));
 
@@ -131,9 +129,8 @@ TEST_F(Histogram1DTest, CreateHistogram)
 {
     OutputData<double> data;
     data.addAxis("x-axis", 10, 0.0, 10.0);
-    for (size_t i = 0; i < data.getAllocatedSize(); ++i) {
+    for (size_t i = 0; i < data.getAllocatedSize(); ++i)
         data[i] = double(i);
-    }
 
     std::unique_ptr<IHistogram> hist(IHistogram::createHistogram(data));
     EXPECT_EQ(size_t(1), hist->rank());
@@ -162,24 +159,20 @@ TEST_F(Histogram1DTest, CreateOutputData)
     EXPECT_EQ(data->getAllocatedSize(), hist.getNbinsX());
     EXPECT_EQ(data->axis(0).lowerBound(), hist.getXmin());
     EXPECT_EQ(data->axis(0).upperBound(), hist.getXmax());
-    for (size_t i = 0; i < data->getAllocatedSize(); ++i) {
+    for (size_t i = 0; i < data->getAllocatedSize(); ++i)
         EXPECT_EQ(4.0, (*data)[i]);
-    }
 
     data.reset(hist.createOutputData(IHistogram::DataType::AVERAGE));
-    for (size_t i = 0; i < data->getAllocatedSize(); ++i) {
+    for (size_t i = 0; i < data->getAllocatedSize(); ++i)
         EXPECT_EQ(2.0, (*data)[i]);
-    }
 
     data.reset(hist.createOutputData(IHistogram::DataType::STANDARD_ERROR));
-    for (size_t i = 0; i < data->getAllocatedSize(); ++i) {
+    for (size_t i = 0; i < data->getAllocatedSize(); ++i)
         EXPECT_EQ(1.0, (*data)[i]);
-    }
 
     data.reset(hist.createOutputData(IHistogram::DataType::NENTRIES));
-    for (size_t i = 0; i < data->getAllocatedSize(); ++i) {
+    for (size_t i = 0; i < data->getAllocatedSize(); ++i)
         EXPECT_EQ(2.0, (*data)[i]);
-    }
 }
 
 TEST_F(Histogram1DTest, GetMaximumGetMinimum)
@@ -200,39 +193,33 @@ TEST_F(Histogram1DTest, Scale)
 {
     Histogram1D hist(10, -5.0, 5.0);
 
-    for (size_t i = 0; i < hist.getTotalNumberOfBins(); ++i) {
+    for (size_t i = 0; i < hist.getTotalNumberOfBins(); ++i)
         hist.fill(-4.5 + i, 1.0);
-    }
     hist.scale(10.0);
-    for (size_t i = 0; i < hist.getTotalNumberOfBins(); ++i) {
+    for (size_t i = 0; i < hist.getTotalNumberOfBins(); ++i)
         EXPECT_EQ(10.0, hist.binContent(i));
-    }
 }
 
 TEST_F(Histogram1DTest, Integral)
 {
     Histogram1D hist(10, -5.0, 5.0);
 
-    for (size_t i = 0; i < hist.getTotalNumberOfBins(); ++i) {
+    for (size_t i = 0; i < hist.getTotalNumberOfBins(); ++i)
         hist.fill(-4.5 + i, 1.0);
-    }
     EXPECT_EQ(10.0, hist.integral());
 }
 
 TEST_F(Histogram1DTest, Addition)
 {
     Histogram1D hist1(10, -5.0, 5.0);
-    for (size_t i = 0; i < hist1.getTotalNumberOfBins(); ++i) {
+    for (size_t i = 0; i < hist1.getTotalNumberOfBins(); ++i)
         hist1.fill(-4.5 + i, 1.0);
-    }
 
     Histogram1D hist2(10, -5.0, 5.0);
-    for (size_t i = 0; i < hist2.getTotalNumberOfBins(); ++i) {
+    for (size_t i = 0; i < hist2.getTotalNumberOfBins(); ++i)
         hist2.fill(-4.5 + i, 2.0);
-    }
 
     hist1 += hist2;
-    for (size_t i = 0; i < hist1.getTotalNumberOfBins(); ++i) {
+    for (size_t i = 0; i < hist1.getTotalNumberOfBins(); ++i)
         EXPECT_EQ(3.0, hist1.binContent(i));
-    }
 }
diff --git a/Tests/Unit/Device/Histogram2DTest.cpp b/Tests/Unit/Device/Histogram2DTest.cpp
index 7562407ecf0..6135cc9ac4d 100644
--- a/Tests/Unit/Device/Histogram2DTest.cpp
+++ b/Tests/Unit/Device/Histogram2DTest.cpp
@@ -106,9 +106,8 @@ TEST_F(Histogram2DTest, VariableHistFill)
     std::vector<double> yvalues = {0.5, 1.5, 3.0, 0.5, 1.5, 3.0, 0.5, 1.5, 3.0, 0.5, 1.5, 3.0};
 
     // put in every histogram bin one double value proportional to globalbin (globalbin*10.0)
-    for (size_t i = 0; i < xvalues.size(); ++i) {
+    for (size_t i = 0; i < xvalues.size(); ++i)
         hist.fill(xvalues[i], yvalues[i], i * 10.0);
-    }
 
     // check bin content using globalbin
     for (size_t globalbin = 0; globalbin < hist.getTotalNumberOfBins(); ++globalbin) {
@@ -148,9 +147,8 @@ TEST_F(Histogram2DTest, projectionX)
     std::vector<double> content = {1.0, 2.0, 3.0, 1.0, 2.0, 3.0, 1.0, 2.0, 3.0, 1.0, 2.0, 3.0};
 
     // put in every histogram bin the value from 'content' vector
-    for (size_t i = 0; i < xvalues.size(); ++i) {
+    for (size_t i = 0; i < xvalues.size(); ++i)
         hist.fill(xvalues[i], yvalues[i], content[i]);
-    }
 
     // a) create projection along X axis
     std::unique_ptr<Histogram1D> h1(hist.projectionX());
@@ -226,9 +224,8 @@ TEST_F(Histogram2DTest, projectionY)
     std::vector<double> content = {1.0, 2.0, 3.0, 1.0, 2.0, 3.0, 1.0, 2.0, 3.0, 1.0, 2.0, 3.0};
 
     // put in every histogram bin the value from 'content' vector
-    for (size_t i = 0; i < xvalues.size(); ++i) {
+    for (size_t i = 0; i < xvalues.size(); ++i)
         hist.fill(xvalues[i], yvalues[i], content[i]);
-    }
 
     // a) create projection along Y axis
     std::unique_ptr<Histogram1D> h1(hist.projectionY());
@@ -313,9 +310,8 @@ TEST_F(Histogram2DTest, crop)
     std::vector<double> content = {1.0, 2.0, 3.0, 1.0, 2.0, 3.0, 1.0, 2.0, 3.0, 1.0, 2.0, 3.0};
 
     // put in every histogram bin the value from 'content' vector
-    for (size_t i = 0; i < xvalues.size(); ++i) {
+    for (size_t i = 0; i < xvalues.size(); ++i)
         hist.fill(xvalues[i], yvalues[i], content[i]);
-    }
 
     std::unique_ptr<Histogram2D> crop(hist.crop(-0.49, 0.0, 1.99, 1.9));
     EXPECT_EQ(-0.5, crop->getXmin());
@@ -338,9 +334,8 @@ TEST_F(Histogram2DTest, CreateHistogram)
     OutputData<double> data;
     data.addAxis("x-axis", 10, 0.0, 10.0);
     data.addAxis("y-axis", 5, -5.0, 0.0);
-    for (size_t i = 0; i < data.getAllocatedSize(); ++i) {
+    for (size_t i = 0; i < data.getAllocatedSize(); ++i)
         data[i] = double(i);
-    }
 
     std::unique_ptr<IHistogram> h2(IHistogram::createHistogram(data));
     EXPECT_EQ(size_t(2), h2->rank());
@@ -376,24 +371,20 @@ TEST_F(Histogram2DTest, CreateOutputData)
     EXPECT_EQ(data->axis(0).upperBound(), h2.getXmax());
     EXPECT_EQ(data->axis(1).lowerBound(), h2.getYmin());
     EXPECT_EQ(data->axis(1).upperBound(), h2.getYmax());
-    for (size_t i = 0; i < data->getAllocatedSize(); ++i) {
+    for (size_t i = 0; i < data->getAllocatedSize(); ++i)
         EXPECT_EQ(double(i), (*data)[i]);
-    }
 
     data.reset(h2.createOutputData(IHistogram::DataType::AVERAGE));
-    for (size_t i = 0; i < data->getAllocatedSize(); ++i) {
+    for (size_t i = 0; i < data->getAllocatedSize(); ++i)
         EXPECT_EQ(double(i), (*data)[i]);
-    }
 
     data.reset(h2.createOutputData(IHistogram::DataType::STANDARD_ERROR));
-    for (size_t i = 0; i < data->getAllocatedSize(); ++i) {
+    for (size_t i = 0; i < data->getAllocatedSize(); ++i)
         EXPECT_EQ(0.0, (*data)[i]);
-    }
 
     data.reset(h2.createOutputData(IHistogram::DataType::NENTRIES));
-    for (size_t i = 0; i < data->getAllocatedSize(); ++i) {
+    for (size_t i = 0; i < data->getAllocatedSize(); ++i)
         EXPECT_EQ(1.0, (*data)[i]);
-    }
 }
 
 TEST_F(Histogram2DTest, GetMaximumGetMinimum)
@@ -401,9 +392,8 @@ TEST_F(Histogram2DTest, GetMaximumGetMinimum)
     Histogram2D h2(10, -5.0, 5.0, 5, -5.0, 0.0);
 
     for (size_t ix = 0; ix < h2.getNbinsX(); ++ix) {
-        for (size_t iy = 0; iy < h2.getNbinsY(); ++iy) {
+        for (size_t iy = 0; iy < h2.getNbinsY(); ++iy)
             h2.fill(-5.0 + ix + 0.5, -5.0 + iy + 0.5, 10.0 + ix + h2.getNbinsX() * iy);
-        }
     }
 
     EXPECT_EQ(10.0, h2.getMinimum());
diff --git a/Tests/Unit/Device/LLDataTest.cpp b/Tests/Unit/Device/LLDataTest.cpp
index cab22c18850..c43a18f36b7 100644
--- a/Tests/Unit/Device/LLDataTest.cpp
+++ b/Tests/Unit/Device/LLDataTest.cpp
@@ -128,7 +128,6 @@ TEST_F(LLDataTest, DataCopyingConstructor)
 
 TEST_F(LLDataTest, DataAssignment)
 {
-
     auto* other_fl_data_1d = new LLData<float>(*fl_data_1d);
     fl_data_1d->setAll(1.1f);
     (*other_fl_data_1d) = (*fl_data_1d);
@@ -154,7 +153,6 @@ TEST_F(LLDataTest, DataAssignment)
 
 TEST_F(LLDataTest, Addition)
 {
-
     auto* other_fl_data_1d = new LLData<float>(*fl_data_1d);
     fl_data_1d->setAll(1.1f);
     other_fl_data_1d->setAll(2.9f);
@@ -193,7 +191,6 @@ TEST_F(LLDataTest, Addition)
 
 TEST_F(LLDataTest, Substraction)
 {
-
     auto* other_fl_data_1d = new LLData<float>(*fl_data_1d);
     fl_data_1d->setAll(1.15f);
     other_fl_data_1d->setAll(5.15f);
@@ -231,7 +228,6 @@ TEST_F(LLDataTest, Substraction)
 
 TEST_F(LLDataTest, Multiplication)
 {
-
     auto* other_fl_data_1d = new LLData<float>(*fl_data_1d);
     fl_data_1d->setAll(1.15f);
     other_fl_data_1d->setAll(2.0f);
@@ -269,7 +265,6 @@ TEST_F(LLDataTest, Multiplication)
 
 TEST_F(LLDataTest, Division)
 {
-
     auto* other_fl_data_1d = new LLData<float>(*fl_data_1d);
     fl_data_1d->setAll(1.15f);
     other_fl_data_1d->setAll(2.3f);
diff --git a/Tests/Unit/Device/RectangularConverterTest.cpp b/Tests/Unit/Device/RectangularConverterTest.cpp
index 7797010d31b..5fae564ffde 100644
--- a/Tests/Unit/Device/RectangularConverterTest.cpp
+++ b/Tests/Unit/Device/RectangularConverterTest.cpp
@@ -9,11 +9,13 @@
 #include <cmath>
 
 namespace {
+
 const double det_width = 200.0;
 const double det_height = 140.0;
 const double det_distance = 1000.0;
 const size_t det_nx = 100u;
 const size_t det_ny = 70u;
+
 } // namespace
 
 class ImageCoordsTest : public ::testing::Test {
diff --git a/Tests/Unit/Device/SphericalDetectorTest.cpp b/Tests/Unit/Device/SphericalDetectorTest.cpp
index 69411a82b78..0c1cc6361bc 100644
--- a/Tests/Unit/Device/SphericalDetectorTest.cpp
+++ b/Tests/Unit/Device/SphericalDetectorTest.cpp
@@ -146,11 +146,10 @@ TEST_F(SphericalDetectorTest, MaskOfDetector)
     for (size_t index = 0; index < mask->getAllocatedSize(); ++index) {
         double x = mask->getAxisValue(index, 0);
         double y = mask->getAxisValue(index, 1);
-        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0) {
+        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0)
             EXPECT_TRUE(detector.detectorMask()->isMasked(index));
-        } else {
+        else
             EXPECT_FALSE(detector.detectorMask()->isMasked(index));
-        }
     }
 
     SphericalDetector detector2(detector);
@@ -158,22 +157,20 @@ TEST_F(SphericalDetectorTest, MaskOfDetector)
     for (size_t index = 0; index < mask->getAllocatedSize(); ++index) {
         double x = mask->getAxisValue(index, 0);
         double y = mask->getAxisValue(index, 1);
-        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0) {
+        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0)
             EXPECT_TRUE(detector2.detectorMask()->isMasked(index));
-        } else {
+        else
             EXPECT_FALSE(detector2.detectorMask()->isMasked(index));
-        }
     }
 
     mask = detector.detectorMask()->getMaskData();
     for (size_t index = 0; index < mask->getAllocatedSize(); ++index) {
         double x = mask->getAxisValue(index, 0);
         double y = mask->getAxisValue(index, 1);
-        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0) {
+        if (x >= -4.0 && x <= 4.0 && y >= -2.0 && y <= 2.0)
             EXPECT_TRUE(detector.detectorMask()->isMasked(index));
-        } else {
+        else
             EXPECT_FALSE(detector.detectorMask()->isMasked(index));
-        }
     }
 }
 
diff --git a/Tests/Unit/Device/VariableBinAxisTest.cpp b/Tests/Unit/Device/VariableBinAxisTest.cpp
index 09ab8ecf5bd..57e24353238 100644
--- a/Tests/Unit/Device/VariableBinAxisTest.cpp
+++ b/Tests/Unit/Device/VariableBinAxisTest.cpp
@@ -40,9 +40,8 @@ TEST_F(VariableBinAxisTest, IndexedAccessor)
     double end(10.0);
     size_t nbins(100);
     double step = (end - start) / (nbins);
-    for (size_t i = 0; i < nbins + 1; ++i) {
+    for (size_t i = 0; i < nbins + 1; ++i)
         values.push_back(start + step * (int)i);
-    }
 
     VariableBinAxis a1("name", nbins, values);
 
diff --git a/Tests/Unit/GUI/TestDataItemViews.cpp b/Tests/Unit/GUI/TestDataItemViews.cpp
index eefcbceba7e..0cccc04b3a2 100644
--- a/Tests/Unit/GUI/TestDataItemViews.cpp
+++ b/Tests/Unit/GUI/TestDataItemViews.cpp
@@ -121,7 +121,6 @@ TEST_F(TestDataItemViews, testSavingLinkedData)
     UTest::GUI::create_dir(projectDir);
     const QString projectFileName(projectDir + "/document.pro");
     {
-
         ProjectDocument document;
 
         SessionModel* real_data_model = document.realDataModel();
diff --git a/Tests/Unit/GUI/TestProjectUtils.cpp b/Tests/Unit/GUI/TestProjectUtils.cpp
index 0e7d1181e04..37192cf8a26 100644
--- a/Tests/Unit/GUI/TestProjectUtils.cpp
+++ b/Tests/Unit/GUI/TestProjectUtils.cpp
@@ -9,6 +9,7 @@
 #include <iostream>
 
 namespace {
+
 QStringList nonXMLDataInDir(const QString& dirname)
 {
     QDir dir(dirname);
diff --git a/Tests/Unit/GUI/TestPropertyRepeater.cpp b/Tests/Unit/GUI/TestPropertyRepeater.cpp
index 19a09dd2758..ad217d8fba8 100644
--- a/Tests/Unit/GUI/TestPropertyRepeater.cpp
+++ b/Tests/Unit/GUI/TestPropertyRepeater.cpp
@@ -15,6 +15,7 @@ BasicAxisItem* createAxis(SessionModel& model)
 {
     return model.insertItem<BasicAxisItem>();
 }
+
 } // namespace
 
 class TestPropertyRepeater : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestSessionItemControllerHelper.h b/Tests/Unit/GUI/TestSessionItemControllerHelper.h
index 247b99c18f4..b1749c7e73f 100644
--- a/Tests/Unit/GUI/TestSessionItemControllerHelper.h
+++ b/Tests/Unit/GUI/TestSessionItemControllerHelper.h
@@ -2,6 +2,7 @@
 #define BORNAGAIN_TESTS_UNIT_GUI_TESTSESSIONITEMCONTROLLERHELPER_H
 
 #include <QObject>
+
 class SessionItem;
 class SessionItemController;
 
diff --git a/Tests/Unit/GUI/TestSessionXML.cpp b/Tests/Unit/GUI/TestSessionXML.cpp
index 39a76f641ae..2a9351e2a21 100644
--- a/Tests/Unit/GUI/TestSessionXML.cpp
+++ b/Tests/Unit/GUI/TestSessionXML.cpp
@@ -10,6 +10,7 @@
 #include <memory>
 
 namespace {
+
 QString itemToXML(SessionItem* item)
 {
     QString result;
@@ -23,6 +24,7 @@ void itemFromXML(QString buffer, SessionItem* item)
     QXmlStreamReader reader(buffer);
     GUI::Session::XML::readItems(&reader, item);
 }
+
 } // namespace
 
 class TestSessionXML : public ::testing::Test {
diff --git a/Tests/Unit/GUI/Utils.cpp b/Tests/Unit/GUI/Utils.cpp
index e36c833d07e..10e9c640c4b 100644
--- a/Tests/Unit/GUI/Utils.cpp
+++ b/Tests/Unit/GUI/Utils.cpp
@@ -23,8 +23,10 @@
 #include <QDir>
 
 namespace {
+
 const int nxsize = 5;
 const int nysize = 10;
+
 } // namespace
 
 void UTest::GUI::create_dir(const QString& dir_name)
diff --git a/Tests/Unit/Numeric/BisectFF.cpp b/Tests/Unit/Numeric/BisectFF.cpp
index 536ea5f2bf0..6593756832c 100644
--- a/Tests/Unit/Numeric/BisectFF.cpp
+++ b/Tests/Unit/Numeric/BisectFF.cpp
@@ -2,6 +2,7 @@
 
 #include "Base/Math/Constants.h"
 #include "Sample/HardParticle/HardParticles.h"
+
 <ff / PolyhedralComponents.h> // for diagnostic
 #include "Tests/GTestWrapper/google_test.h"
 #include <cassert>
diff --git a/Tests/Unit/Param/INodeTest.cpp b/Tests/Unit/Param/INodeTest.cpp
index b89234b94c9..e4efc171b94 100644
--- a/Tests/Unit/Param/INodeTest.cpp
+++ b/Tests/Unit/Param/INodeTest.cpp
@@ -6,8 +6,10 @@
 #include <stdexcept>
 
 namespace {
+
 const std::string test_class_name = "TestClass";
 const std::string another_test_class_name = "AnotherTestClass";
+
 } // namespace
 
 class INodeTest : public ::testing::Test {
diff --git a/Tests/Unit/Resample/LayerFillLimitsTest.cpp b/Tests/Unit/Resample/LayerFillLimitsTest.cpp
index ef0ef33b4e1..bb1bc05f013 100644
--- a/Tests/Unit/Resample/LayerFillLimitsTest.cpp
+++ b/Tests/Unit/Resample/LayerFillLimitsTest.cpp
@@ -4,7 +4,6 @@
 #define INCLUDED_BY_TEST
 #include "Resample/Processed/ParticleRegions.cpp"
 
-
 class LayerFillLimitsTest : public ::testing::Test {
 protected:
     LayerFillLimitsTest();
diff --git a/Tests/Unit/Sample/MultiLayerTest.cpp b/Tests/Unit/Sample/MultiLayerTest.cpp
index 50128f20fe3..0ef4a1e4d4c 100644
--- a/Tests/Unit/Sample/MultiLayerTest.cpp
+++ b/Tests/Unit/Sample/MultiLayerTest.cpp
@@ -228,10 +228,8 @@ TEST_F(MultiLayerTest, MultiLayerCompositeTest)
     }
     EXPECT_EQ(size_t(5), layer_buffer.size());
     EXPECT_EQ(size_t(4), interface_buffer.size());
-    for (size_t i = 0; i < layer_buffer.size(); ++i) {
+    for (size_t i = 0; i < layer_buffer.size(); ++i)
         EXPECT_EQ(double(i * 10), layer_buffer[i]->thickness());
-    }
-    for (size_t i = 0; i < interface_buffer.size(); ++i) {
+    for (size_t i = 0; i < interface_buffer.size(); ++i)
         EXPECT_EQ(double((i + 1) * 10), interface_buffer[i]->bottomLayer()->thickness());
-    }
 }
diff --git a/ff/PolyhedralComponents.cpp b/ff/PolyhedralComponents.cpp
index aa90f5aff64..59937d13097 100644
--- a/ff/PolyhedralComponents.cpp
+++ b/ff/PolyhedralComponents.cpp
@@ -89,9 +89,9 @@ complex_t ff::PolyhedralEdge::contrib(int M, C3 qpa, complex_t qrperp) const
     }
     complex_t ret = 0;
     // the l=0 term, minus (qperp.R)^M, which cancels under the sum over E*contrib()
-    if (v1 == 0.) {
+    if (v1 == 0.)
         ret = ReciprocalFactorialArray[M] * pow(v2, M);
-    } else if (v2 == 0.) {
+    else if (v2 == 0.) {
         ; // leave ret=0
     } else {
         // binomial expansion
@@ -170,9 +170,8 @@ ff::PolyhedralFace::PolyhedralFace(const std::vector<R3>& V, bool _sym_S2) : sym
     for (size_t j = 0; j < NE; ++j) {
         size_t jj = (j + 1) % NE;
         R3 ee = edges[j].E().cross(edges[jj].E());
-        if (ee.mag2() == 0) {
+        if (ee.mag2() == 0)
             throw std::runtime_error("Invalid polyhedral face: two adjacent edges are parallel");
-        }
         m_normal += ee.unit();
     }
     m_normal /= NE;
-- 
GitLab