diff --git a/Core/Algorithms/src/ChiSquaredModule.cpp b/Core/Algorithms/src/ChiSquaredModule.cpp
index 36af8182d03c22b113bac08c43a4d06d43c0f36d..19972a2930d3f56133cc0bb7d641f396c336043d 100644
--- a/Core/Algorithms/src/ChiSquaredModule.cpp
+++ b/Core/Algorithms/src/ChiSquaredModule.cpp
@@ -73,9 +73,9 @@
 
 //double ChiSquaredModule::getResidualValue(size_t index ) const
 //{
-//    assert(mp_real_data != NULL );
-//    assert(mp_simulation_data != NULL);
-//    assert(mp_weights != NULL);
+//    assert(mp_real_data != nullptr );
+//    assert(mp_simulation_data != nullptr);
+//    assert(mp_weights != nullptr);
 //    assert(index < mp_real_data->getAllocatedSize() );
 //    double value_real = (*mp_real_data)[index];
 //    double value_simu  = (*mp_simulation_data)[index];
@@ -184,5 +184,3 @@ void ChiSquaredModule::processFitElements(std::vector<FitElement>::iterator firs
 
     }
 }
-
-
diff --git a/Core/Algorithms/src/ConvolutionDetectorResolution.cpp b/Core/Algorithms/src/ConvolutionDetectorResolution.cpp
index 85c8839227bbe19517116e0052c73d2adc246749..88efa38409855711b5fdfe741b8cbbc2dc208a91 100644
--- a/Core/Algorithms/src/ConvolutionDetectorResolution.cpp
+++ b/Core/Algorithms/src/ConvolutionDetectorResolution.cpp
@@ -205,7 +205,7 @@ double ConvolutionDetectorResolution::getIntegratedPDF1d(double x,
     double halfstep = step/2.0;
     double xmin = x - halfstep;
     double xmax = x + halfstep;
-    assert(m_res_function_1d != NULL);
+    assert(m_res_function_1d != nullptr);
     return m_res_function_1d(xmax) - m_res_function_1d(xmin);
 }
 
diff --git a/Core/Algorithms/src/Instrument.cpp b/Core/Algorithms/src/Instrument.cpp
index 149543894f295bb5a74dc2af4915d793f05402fe..35f27b91f06945fc2682ed2ec8084fc70344fd5f 100644
--- a/Core/Algorithms/src/Instrument.cpp
+++ b/Core/Algorithms/src/Instrument.cpp
@@ -39,7 +39,6 @@ Instrument &Instrument::operator=(const Instrument &other)
     if (this != &other) {
         m_beam = other.m_beam;
         mP_detector.reset(other.mP_detector->clone());
-        setName(other.getName());
         init_parameters();
     }
     return *this;
diff --git a/Core/FormFactors/inc/FormFactorDecoratorFactor.h b/Core/FormFactors/inc/FormFactorDecoratorFactor.h
index 7d27e6057b4f289ad75e5034973c0b61f19f3ddc..6ca306c3a54530b6fc547ed3dd5e3b56e75e0cda 100644
--- a/Core/FormFactors/inc/FormFactorDecoratorFactor.h
+++ b/Core/FormFactors/inc/FormFactorDecoratorFactor.h
@@ -52,9 +52,7 @@ inline FormFactorDecoratorFactor::FormFactorDecoratorFactor(const IFormFactor &f
 
 inline FormFactorDecoratorFactor *FormFactorDecoratorFactor::clone() const
 {
-    FormFactorDecoratorFactor *result = new FormFactorDecoratorFactor(*mp_form_factor, m_factor);
-    result->setName(getName());
-    return result;
+    return new FormFactorDecoratorFactor(*mp_form_factor, m_factor);
 }
 
 inline complex_t FormFactorDecoratorFactor::evaluate(const WavevectorInfo& wavevectors) const
diff --git a/Core/FormFactors/src/FormFactorAnisoPyramid.cpp b/Core/FormFactors/src/FormFactorAnisoPyramid.cpp
index 2137c3bc5b0780497387360d4ebe9f9abd0576b0..d60c22f0d1c3072c7bc1aea8926b6f96857b49cb 100644
--- a/Core/FormFactors/src/FormFactorAnisoPyramid.cpp
+++ b/Core/FormFactors/src/FormFactorAnisoPyramid.cpp
@@ -76,10 +76,7 @@ void FormFactorAnisoPyramid::init_parameters()
 
 FormFactorAnisoPyramid* FormFactorAnisoPyramid::clone() const
 {
-    FormFactorAnisoPyramid *result =
-        new FormFactorAnisoPyramid(m_length, m_width, m_height, m_alpha);
-    result->setName(getName());
-    return result;
+    return new FormFactorAnisoPyramid(m_length, m_width, m_height, m_alpha);
 }
 
 complex_t FormFactorAnisoPyramid::evaluate_for_q(const cvector_t& q) const
diff --git a/Core/FormFactors/src/FormFactorBox.cpp b/Core/FormFactors/src/FormFactorBox.cpp
index 9c7d296196f7fbfb54238facd33332cdb2d00e26..27ae5fc477f0cde176d84fc39703838e46bd677b 100644
--- a/Core/FormFactors/src/FormFactorBox.cpp
+++ b/Core/FormFactors/src/FormFactorBox.cpp
@@ -28,9 +28,7 @@ FormFactorBox::FormFactorBox(double length, double width, double height)
 
 FormFactorBox *FormFactorBox::clone() const
 {
-    FormFactorBox *result = new FormFactorBox(m_length, m_width, m_height);
-    result->setName(getName());
-    return result;
+    return new FormFactorBox(m_length, m_width, m_height);
 }
 
 void FormFactorBox::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorCone.cpp b/Core/FormFactors/src/FormFactorCone.cpp
index 00426ad274b1e52a2052c7445a8922b2b26553e0..6ef46f0b2325070d83acd500e9c5a754ccd79755 100644
--- a/Core/FormFactors/src/FormFactorCone.cpp
+++ b/Core/FormFactors/src/FormFactorCone.cpp
@@ -62,9 +62,7 @@ void FormFactorCone::init_parameters()
 
 FormFactorCone* FormFactorCone::clone() const
 {
-   FormFactorCone* result = new FormFactorCone(m_radius, m_height, m_alpha);
-   result->setName(getName());
-   return result;
+   return new FormFactorCone(m_radius, m_height, m_alpha);
 }
 
 
diff --git a/Core/FormFactors/src/FormFactorCone6.cpp b/Core/FormFactors/src/FormFactorCone6.cpp
index 2ada20b21ea82c344c9ad75afa3bd7eadbb7510e..d522f2fa98dc9af9f5a6d448e38851b0f6e06a2a 100644
--- a/Core/FormFactors/src/FormFactorCone6.cpp
+++ b/Core/FormFactors/src/FormFactorCone6.cpp
@@ -64,9 +64,7 @@ void FormFactorCone6::init_parameters()
 
 FormFactorCone6* FormFactorCone6::clone() const
 {
-   FormFactorCone6* result = new FormFactorCone6(m_radius, m_height, m_alpha);
-   result->setName(getName());
-   return result;
+   return new FormFactorCone6(m_radius, m_height, m_alpha);
 }
 
 
diff --git a/Core/FormFactors/src/FormFactorCrystal.cpp b/Core/FormFactors/src/FormFactorCrystal.cpp
index a520d018775d84aa91f1b684a0f8ce2784421849..a663cf7c49563c690398674b6a1b383cc4675187 100644
--- a/Core/FormFactors/src/FormFactorCrystal.cpp
+++ b/Core/FormFactors/src/FormFactorCrystal.cpp
@@ -35,10 +35,7 @@ FormFactorCrystal::~FormFactorCrystal()
 
 FormFactorCrystal *FormFactorCrystal::clone() const
 {
-    FormFactorCrystal *result = new FormFactorCrystal(m_lattice, *mp_basis_form_factor,
-                                                      *mp_meso_form_factor);
-    result->setName(getName());
-    return result;
+    return new FormFactorCrystal(m_lattice, *mp_basis_form_factor, *mp_meso_form_factor);
 }
 
 complex_t FormFactorCrystal::evaluate_for_q(const cvector_t &q) const
diff --git a/Core/FormFactors/src/FormFactorCuboctahedron.cpp b/Core/FormFactors/src/FormFactorCuboctahedron.cpp
index f0066a1be5297aabe757a6c62c7b9dee5e402bbe..476f27150190b4145c6f19d969ff7c80e572cbd1 100644
--- a/Core/FormFactors/src/FormFactorCuboctahedron.cpp
+++ b/Core/FormFactors/src/FormFactorCuboctahedron.cpp
@@ -57,11 +57,7 @@ void FormFactorCuboctahedron::init_parameters()
 
 FormFactorCuboctahedron* FormFactorCuboctahedron::clone() const
 {
-    FormFactorCuboctahedron *result =
-        new FormFactorCuboctahedron(m_length, m_height,
-                                    m_height_ratio, m_alpha);
-    result->setName(getName());
-    return result;
+    return new FormFactorCuboctahedron(m_length, m_height, m_height_ratio, m_alpha);
 }
 
 complex_t FormFactorCuboctahedron::evaluate_for_q(const cvector_t& q) const
diff --git a/Core/FormFactors/src/FormFactorCylinder.cpp b/Core/FormFactors/src/FormFactorCylinder.cpp
index c0f1da0b7255e6499146a9954de1e44ff69169cd..faa4447e90c608768b304a1e54083571ed9ac809 100644
--- a/Core/FormFactors/src/FormFactorCylinder.cpp
+++ b/Core/FormFactors/src/FormFactorCylinder.cpp
@@ -41,9 +41,7 @@ void FormFactorCylinder::init_parameters()
 
 FormFactorCylinder* FormFactorCylinder::clone() const
 {
-    FormFactorCylinder *result = new FormFactorCylinder(m_radius, m_height);
-    result->setName(getName());
-    return result;
+    return new FormFactorCylinder(m_radius, m_height);
 }
 
 complex_t FormFactorCylinder::evaluate_for_q(const cvector_t& q) const
diff --git a/Core/FormFactors/src/FormFactorDWBA.cpp b/Core/FormFactors/src/FormFactorDWBA.cpp
index 57c26df678d056170d9f961a9650dfaab6f850a6..8b943de056e5cffe384f9bcf008adbc2be496e8d 100644
--- a/Core/FormFactors/src/FormFactorDWBA.cpp
+++ b/Core/FormFactors/src/FormFactorDWBA.cpp
@@ -34,7 +34,6 @@ FormFactorDWBA* FormFactorDWBA::clone() const
 {
     FormFactorDWBA *result = new FormFactorDWBA(*mp_form_factor);
     result->setSpecularInfo(mp_in_coeffs, mp_out_coeffs);
-    result->setName(getName());
     return result;
 }
 
diff --git a/Core/FormFactors/src/FormFactorDWBAPol.cpp b/Core/FormFactors/src/FormFactorDWBAPol.cpp
index 13cc64f34bf9e38ca0a9ad6f0ad657ceb4cf4998..80d8a64a4fac39b786c74457ec790f3a3c226c28 100644
--- a/Core/FormFactors/src/FormFactorDWBAPol.cpp
+++ b/Core/FormFactors/src/FormFactorDWBAPol.cpp
@@ -33,7 +33,6 @@ FormFactorDWBAPol* FormFactorDWBAPol::clone() const
 {
     FormFactorDWBAPol *p_result = new FormFactorDWBAPol(*mp_form_factor);
     p_result->setSpecularInfo(mp_in_coeffs, mp_out_coeffs);
-    p_result->setName(getName());
     return p_result;
 }
 
diff --git a/Core/FormFactors/src/FormFactorDecoratorDebyeWaller.cpp b/Core/FormFactors/src/FormFactorDecoratorDebyeWaller.cpp
index 92a4423c7be6a954ebce7dfa40205a99b384ed87..5e410e9f1a941d0920b7ee41a48883ff798198c3 100644
--- a/Core/FormFactors/src/FormFactorDecoratorDebyeWaller.cpp
+++ b/Core/FormFactors/src/FormFactorDecoratorDebyeWaller.cpp
@@ -33,10 +33,7 @@ FormFactorDecoratorDebyeWaller::FormFactorDecoratorDebyeWaller(const IFormFactor
 
 FormFactorDecoratorDebyeWaller *FormFactorDecoratorDebyeWaller::clone() const
 {
-    FormFactorDecoratorDebyeWaller *result
-        = new FormFactorDecoratorDebyeWaller(*mp_form_factor, m_h_dw_factor, m_r_dw_factor);
-    result->setName(getName());
-    return result;
+    return new FormFactorDecoratorDebyeWaller(*mp_form_factor, m_h_dw_factor, m_r_dw_factor);
 }
 
 complex_t FormFactorDecoratorDebyeWaller::evaluate(const WavevectorInfo& wavevectors) const
diff --git a/Core/FormFactors/src/FormFactorDecoratorMaterial.cpp b/Core/FormFactors/src/FormFactorDecoratorMaterial.cpp
index 4e14a10ed6f7321e18c2e0e9e6cdfbf8b6337da0..486c3d18daaa00d2a1a792fcc1ee7197f6088bd1 100644
--- a/Core/FormFactors/src/FormFactorDecoratorMaterial.cpp
+++ b/Core/FormFactors/src/FormFactorDecoratorMaterial.cpp
@@ -31,7 +31,6 @@ FormFactorDecoratorMaterial *FormFactorDecoratorMaterial::clone() const
         = new FormFactorDecoratorMaterial(*mp_form_factor, m_wavevector_scattering_factor);
     result->setMaterial(*mP_material);
     result->setAmbientMaterial(*mP_ambient_material);
-    result->setName(getName());
     return result;
 }
 
diff --git a/Core/FormFactors/src/FormFactorDecoratorRotation.cpp b/Core/FormFactors/src/FormFactorDecoratorRotation.cpp
index 23365c0485495fdf6da14b4c93d61ec762e441b1..772b12fed107b72ac05dfc145d007618bd41a7c6 100644
--- a/Core/FormFactors/src/FormFactorDecoratorRotation.cpp
+++ b/Core/FormFactors/src/FormFactorDecoratorRotation.cpp
@@ -28,10 +28,7 @@ FormFactorDecoratorRotation::FormFactorDecoratorRotation(const IFormFactor &form
 FormFactorDecoratorRotation *FormFactorDecoratorRotation::clone() const
 {
     std::unique_ptr<IRotation> P_rotation(IRotation::createRotation(m_transform));
-    FormFactorDecoratorRotation *result
-            = new FormFactorDecoratorRotation(*mp_form_factor, *P_rotation);
-    result->setName(getName());
-    return result;
+    return new FormFactorDecoratorRotation(*mp_form_factor, *P_rotation);
 }
 
 void FormFactorDecoratorRotation::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorFullSphere.cpp b/Core/FormFactors/src/FormFactorFullSphere.cpp
index 4582c15aab14e9576417c65e8286b21eee9f6413..3683f71f91c9a5e0bdf9b6fcdd0e9992fa82d723 100644
--- a/Core/FormFactors/src/FormFactorFullSphere.cpp
+++ b/Core/FormFactors/src/FormFactorFullSphere.cpp
@@ -39,9 +39,7 @@ void FormFactorFullSphere::init_parameters()
 
 FormFactorFullSphere* FormFactorFullSphere::clone() const
 {
-    FormFactorFullSphere *result = new FormFactorFullSphere(m_radius);
-    result->setName(getName());
-    return result;
+    return new FormFactorFullSphere(m_radius);
 }
 
 void FormFactorFullSphere::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorFullSpheroid.cpp b/Core/FormFactors/src/FormFactorFullSpheroid.cpp
index ebaab675937a0562e882344dcbb2a4caf84ca165..8e457f1f5ced71164e53ce720890400217c9f0b5 100644
--- a/Core/FormFactors/src/FormFactorFullSpheroid.cpp
+++ b/Core/FormFactors/src/FormFactorFullSpheroid.cpp
@@ -48,10 +48,7 @@ void FormFactorFullSpheroid::init_parameters()
 
 FormFactorFullSpheroid* FormFactorFullSpheroid::clone() const
 {
-   FormFactorFullSpheroid* result =
-       new FormFactorFullSpheroid(m_radius, m_height);
-   result->setName(getName());
-   return result;
+   return new FormFactorFullSpheroid(m_radius, m_height);
 }
 
 //! Integrand for complex formfactor.
diff --git a/Core/FormFactors/src/FormFactorGauss.cpp b/Core/FormFactors/src/FormFactorGauss.cpp
index 3ddee7acf0331ebb6301fc285ebefe46c41136c4..39149919fc31dc4b17eb666884ccc43bddec6d68 100644
--- a/Core/FormFactors/src/FormFactorGauss.cpp
+++ b/Core/FormFactors/src/FormFactorGauss.cpp
@@ -47,9 +47,7 @@ void FormFactorGauss::init_parameters()
 
 FormFactorGauss* FormFactorGauss::clone() const
 {
-    FormFactorGauss *result = new FormFactorGauss(m_width, m_height);
-    result->setName(getName());
-    return result;
+    return new FormFactorGauss(m_width, m_height);
 }
 
 complex_t FormFactorGauss::evaluate_for_q(const cvector_t& q) const
diff --git a/Core/FormFactors/src/FormFactorHemiEllipsoid.cpp b/Core/FormFactors/src/FormFactorHemiEllipsoid.cpp
index 1a8b590d5e1c87112f33b40a68e639071e293208..00ad6d81acf553a15643e5baf4acf08c59f7f159 100644
--- a/Core/FormFactors/src/FormFactorHemiEllipsoid.cpp
+++ b/Core/FormFactors/src/FormFactorHemiEllipsoid.cpp
@@ -54,10 +54,7 @@ void FormFactorHemiEllipsoid::init_parameters()
 
 FormFactorHemiEllipsoid* FormFactorHemiEllipsoid::clone() const
 {
-   FormFactorHemiEllipsoid* result =
-       new FormFactorHemiEllipsoid(m_radius_a,  m_radius_b, m_height);
-   result->setName(getName());
-   return result;
+   return new FormFactorHemiEllipsoid(m_radius_a,  m_radius_b, m_height);
 }
 
 //! Integrand for complex formfactor.
diff --git a/Core/FormFactors/src/FormFactorLorentz.cpp b/Core/FormFactors/src/FormFactorLorentz.cpp
index 20f13810f653bcb081c7a1103f2fc737e0880a8c..a414d630a6a3f938a6388b7d4950346a54c6bab8 100644
--- a/Core/FormFactors/src/FormFactorLorentz.cpp
+++ b/Core/FormFactors/src/FormFactorLorentz.cpp
@@ -47,9 +47,7 @@ void FormFactorLorentz::init_parameters()
 
 FormFactorLorentz* FormFactorLorentz::clone() const
 {
-    FormFactorLorentz *result = new FormFactorLorentz(m_width, m_height);
-    result->setName(getName());
-    return result;
+    return new FormFactorLorentz(m_width, m_height);
 }
 
 void FormFactorLorentz::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorPrism3.cpp b/Core/FormFactors/src/FormFactorPrism3.cpp
index db52b3da2b06c165201c81b81880bd739937e2e3..2a0dffc4f2c4dcc14c2be29d0a2b1b21f577b5dd 100644
--- a/Core/FormFactors/src/FormFactorPrism3.cpp
+++ b/Core/FormFactors/src/FormFactorPrism3.cpp
@@ -41,9 +41,7 @@ void FormFactorPrism3::init_parameters()
 
 FormFactorPrism3* FormFactorPrism3::clone() const
 {
-    FormFactorPrism3 *result = new FormFactorPrism3(m_length, m_height);
-    result->setName(getName());
-    return result;
+    return new FormFactorPrism3(m_length, m_height);
 }
 
 void FormFactorPrism3::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorPrism6.cpp b/Core/FormFactors/src/FormFactorPrism6.cpp
index 806886d0270831b4751dcfa488d9e5b8e410f3cf..d0caea6b69d1d305ac91aa61df57e7a31195cd99 100644
--- a/Core/FormFactors/src/FormFactorPrism6.cpp
+++ b/Core/FormFactors/src/FormFactorPrism6.cpp
@@ -41,9 +41,7 @@ void FormFactorPrism6::init_parameters()
 
 FormFactorPrism6* FormFactorPrism6::clone() const
 {
-      FormFactorPrism6 *result = new FormFactorPrism6(m_radius, m_height);
-      result->setName(getName());
-      return result;
+    return new FormFactorPrism6(m_radius, m_height);
 }
 
 void FormFactorPrism6::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorPyramid.cpp b/Core/FormFactors/src/FormFactorPyramid.cpp
index 72a3e466226a8d6d344b8fdd029f8744f7cf3bc6..3c4c4a4c56d2933ef68c7e5b46799b6e8076b0b6 100644
--- a/Core/FormFactors/src/FormFactorPyramid.cpp
+++ b/Core/FormFactors/src/FormFactorPyramid.cpp
@@ -71,10 +71,7 @@ void FormFactorPyramid::init_parameters()
 
 FormFactorPyramid* FormFactorPyramid::clone() const
 {
-    FormFactorPyramid *result =
-        new FormFactorPyramid(m_length, m_height, m_alpha);
-    result->setName(getName());
-    return result;
+    return new FormFactorPyramid(m_length, m_height, m_alpha);
 }
 
 void FormFactorPyramid::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorRipple1.cpp b/Core/FormFactors/src/FormFactorRipple1.cpp
index cb40706dc16f16c4408de2c5689e318e7dc6e496..2f229d437333dbd563a57fb8d5170c9b73f3f7e8 100644
--- a/Core/FormFactors/src/FormFactorRipple1.cpp
+++ b/Core/FormFactors/src/FormFactorRipple1.cpp
@@ -62,9 +62,7 @@ void FormFactorRipple1::init_parameters()
 
 FormFactorRipple1 *FormFactorRipple1::clone() const
 {
-    FormFactorRipple1 *result = new FormFactorRipple1(m_length, m_width, m_height);
-    result->setName(getName());
-    return result;
+    return new FormFactorRipple1(m_length, m_width, m_height);
 }
 
 void FormFactorRipple1::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorRipple2.cpp b/Core/FormFactors/src/FormFactorRipple2.cpp
index 21b8a265a2d25f90e8f87110975bdbeb1351b382..c4e2c0cf6f8824eded191e81619db5a35c37898d 100644
--- a/Core/FormFactors/src/FormFactorRipple2.cpp
+++ b/Core/FormFactors/src/FormFactorRipple2.cpp
@@ -74,9 +74,7 @@ void FormFactorRipple2::init_parameters()
 
 FormFactorRipple2 *FormFactorRipple2::clone() const
 {
-    FormFactorRipple2 *result = new FormFactorRipple2(m_length, m_width, m_height, m_d);
-    result->setName(getName());
-    return result;
+    return new FormFactorRipple2(m_length, m_width, m_height, m_d);
 }
 
 void FormFactorRipple2::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorSphereGaussianRadius.cpp b/Core/FormFactors/src/FormFactorSphereGaussianRadius.cpp
index 13f930f86ec1eef110db2a98489aa9ab273f3b20..9330e1d35b0f20a7c5668d0e24bbd56ab6eed286 100644
--- a/Core/FormFactors/src/FormFactorSphereGaussianRadius.cpp
+++ b/Core/FormFactors/src/FormFactorSphereGaussianRadius.cpp
@@ -33,10 +33,7 @@ FormFactorSphereGaussianRadius::FormFactorSphereGaussianRadius(double mean,
 
 FormFactorSphereGaussianRadius* FormFactorSphereGaussianRadius::clone() const
 {
-    FormFactorSphereGaussianRadius *result =
-        new FormFactorSphereGaussianRadius(m_mean, m_sigma);
-    result->setName(getName());
-    return result;
+    return new FormFactorSphereGaussianRadius(m_mean, m_sigma);
 }
 
 FormFactorSphereGaussianRadius::~FormFactorSphereGaussianRadius()
diff --git a/Core/FormFactors/src/FormFactorSphereLogNormalRadius.cpp b/Core/FormFactors/src/FormFactorSphereLogNormalRadius.cpp
index 64dd9dc1bc59505c089720cbe60e14a908b8c4ba..9fcb2fad26c0e457d2fb96369ea37caecf3069ff 100644
--- a/Core/FormFactors/src/FormFactorSphereLogNormalRadius.cpp
+++ b/Core/FormFactors/src/FormFactorSphereLogNormalRadius.cpp
@@ -33,10 +33,7 @@ FormFactorSphereLogNormalRadius::FormFactorSphereLogNormalRadius(
 
 FormFactorSphereLogNormalRadius* FormFactorSphereLogNormalRadius::clone() const
 {
-    FormFactorSphereLogNormalRadius *result =
-        new FormFactorSphereLogNormalRadius(m_mean, m_scale_param, m_n_samples);
-    result->setName(getName());
-    return result;
+    return new FormFactorSphereLogNormalRadius(m_mean, m_scale_param, m_n_samples);
 }
 
 FormFactorSphereLogNormalRadius::~FormFactorSphereLogNormalRadius()
diff --git a/Core/FormFactors/src/FormFactorSphereUniformRadius.cpp b/Core/FormFactors/src/FormFactorSphereUniformRadius.cpp
index c044de0ba25cc92f5bd0335dd19e2c44a94a2401..2a163a4266bdc2e752b5873729c8e9b422270f38 100644
--- a/Core/FormFactors/src/FormFactorSphereUniformRadius.cpp
+++ b/Core/FormFactors/src/FormFactorSphereUniformRadius.cpp
@@ -34,10 +34,7 @@ FormFactorSphereUniformRadius::FormFactorSphereUniformRadius(double mean,
 
 FormFactorSphereUniformRadius* FormFactorSphereUniformRadius::clone() const
 {
-    FormFactorSphereUniformRadius *p_result = new FormFactorSphereUniformRadius(
-            m_mean, m_full_width);
-    p_result->setName(getName());
-    return p_result;
+    return new FormFactorSphereUniformRadius(m_mean, m_full_width);
 }
 
 FormFactorSphereUniformRadius::~FormFactorSphereUniformRadius()
diff --git a/Core/FormFactors/src/FormFactorTetrahedron.cpp b/Core/FormFactors/src/FormFactorTetrahedron.cpp
index 441b4567c183957ac79027664f50a873c71a21f1..75ea3694ea8d29277ba37a2c369f04a5e9c4611a 100644
--- a/Core/FormFactors/src/FormFactorTetrahedron.cpp
+++ b/Core/FormFactors/src/FormFactorTetrahedron.cpp
@@ -66,10 +66,7 @@ void FormFactorTetrahedron::init_parameters()
 
 FormFactorTetrahedron* FormFactorTetrahedron::clone() const
 {
-    FormFactorTetrahedron *result =
-        new FormFactorTetrahedron(m_length, m_height, m_alpha);
-    result->setName(getName());
-    return result;
+    return new FormFactorTetrahedron(m_length, m_height, m_alpha);
 }
 
 void FormFactorTetrahedron::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorTrivial.cpp b/Core/FormFactors/src/FormFactorTrivial.cpp
index b3bff7dcfb43dfae3eb9508c592994b6fedac221..bfc7b06c5c46cbfb500605a1945433c9c4d86244 100644
--- a/Core/FormFactors/src/FormFactorTrivial.cpp
+++ b/Core/FormFactors/src/FormFactorTrivial.cpp
@@ -26,9 +26,7 @@ FormFactorTrivial::FormFactorTrivial()
 
 FormFactorTrivial* FormFactorTrivial::clone() const
 {
-    FormFactorTrivial *result = new FormFactorTrivial();
-    result->setName(getName());
-    return result;
+    return new FormFactorTrivial();
 }
 
 void FormFactorTrivial::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorTruncatedCube.cpp b/Core/FormFactors/src/FormFactorTruncatedCube.cpp
index ff14ca2167bd3df3e9b2741c6d304b1d2b1a2282..4c2203804a79bfb5ac98a0d7e1efbb57444a8288 100644
--- a/Core/FormFactors/src/FormFactorTruncatedCube.cpp
+++ b/Core/FormFactors/src/FormFactorTruncatedCube.cpp
@@ -37,10 +37,7 @@ void FormFactorTruncatedCube::init_parameters()
 
 FormFactorTruncatedCube* FormFactorTruncatedCube::clone() const
 {
-    FormFactorTruncatedCube *result =
-        new FormFactorTruncatedCube(m_length, m_removed_length);
-    result->setName(getName());
-    return result;
+    return new FormFactorTruncatedCube(m_length, m_removed_length);
 }
 
 void FormFactorTruncatedCube::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorTruncatedSphere.cpp b/Core/FormFactors/src/FormFactorTruncatedSphere.cpp
index faf5d5f1fd0028852257dd457bc2cd5280340f6b..4815f7f99f115f886dabe1efb9f12a2d37611a22 100644
--- a/Core/FormFactors/src/FormFactorTruncatedSphere.cpp
+++ b/Core/FormFactors/src/FormFactorTruncatedSphere.cpp
@@ -58,9 +58,7 @@ void FormFactorTruncatedSphere::init_parameters()
 
 FormFactorTruncatedSphere *FormFactorTruncatedSphere::clone() const
 {
-    FormFactorTruncatedSphere *result = new FormFactorTruncatedSphere(m_radius, m_height);
-    result->setName(getName());
-    return result;
+    return new FormFactorTruncatedSphere(m_radius, m_height);
 }
 
 void FormFactorTruncatedSphere::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorTruncatedSpheroid.cpp b/Core/FormFactors/src/FormFactorTruncatedSpheroid.cpp
index d130e1671cbe2187a7d8c4717c99f86f490c377f..e9f539329c09c6c94931779f80bdb6c994c310a7 100644
--- a/Core/FormFactors/src/FormFactorTruncatedSpheroid.cpp
+++ b/Core/FormFactors/src/FormFactorTruncatedSpheroid.cpp
@@ -65,10 +65,7 @@ void FormFactorTruncatedSpheroid::init_parameters()
 
 FormFactorTruncatedSpheroid* FormFactorTruncatedSpheroid::clone() const
 {
-   FormFactorTruncatedSpheroid* result =
-       new FormFactorTruncatedSpheroid(m_radius, m_height, m_height_flattening);
-   result->setName(getName());
-   return result;
+   return new FormFactorTruncatedSpheroid(m_radius, m_height, m_height_flattening);
 }
 
 void FormFactorTruncatedSpheroid::accept(ISampleVisitor *visitor) const
diff --git a/Core/FormFactors/src/FormFactorWeighted.cpp b/Core/FormFactors/src/FormFactorWeighted.cpp
index e5c5c624fc745f0c6a94c912b473b697e5721b2b..2f57f1502e494b040581ed49a57afe6f2ae3c928 100644
--- a/Core/FormFactors/src/FormFactorWeighted.cpp
+++ b/Core/FormFactors/src/FormFactorWeighted.cpp
@@ -35,7 +35,6 @@ FormFactorWeighted* FormFactorWeighted::clone() const
     for (size_t index=0; index<m_form_factors.size(); ++index) {
         result->addFormFactor(*m_form_factors[index], m_weights[index]);
     }
-    result->setName(getName());
     return result;
 }
 
diff --git a/Core/InputOutput/OutputDataIOHelper.cpp b/Core/InputOutput/OutputDataIOHelper.cpp
index 5c739fd6544cf49657bba03489f3977677f9e4d0..a20f58d67ff1571d9ebf0dc6523e9ae832bc61ba 100644
--- a/Core/InputOutput/OutputDataIOHelper.cpp
+++ b/Core/InputOutput/OutputDataIOHelper.cpp
@@ -154,7 +154,7 @@ IAxis *OutputDataIOHelper::createFixedBinAxis(std::string line)
     std::vector<double> boundaries;
     std::string value;
     while( iss >> value) {
-        boundaries.push_back(std::strtod(value.c_str(), NULL));
+        boundaries.push_back(std::strtod(value.c_str(), nullptr));
     }
 
     if(boundaries.size() != 2)
@@ -192,7 +192,7 @@ IAxis *OutputDataIOHelper::createVariableBinAxis(std::string line)
     std::vector<double> boundaries;
     std::string value;
     while( iss >> value) {
-        boundaries.push_back(std::strtod(value.c_str(), NULL));
+        boundaries.push_back(std::strtod(value.c_str(), nullptr));
     }
 
     if(boundaries.size() != nbins+1)
@@ -218,7 +218,7 @@ void OutputDataIOHelper::fillOutputData(OutputData<double> *data, std::istream &
         std::istringstream iss(line);
         std::string svalue;
         while(iss >> svalue) {
-            *it = std::strtod(svalue.c_str(), NULL);
+            *it = std::strtod(svalue.c_str(), nullptr);
             ++it;
         }
     }
diff --git a/Core/PythonAPI/src/IDetector2D.pypp.cpp b/Core/PythonAPI/src/IDetector2D.pypp.cpp
index 8a7ee7efeb0cab84e77fc39837f94ae53a735ddf..d26f0bfeb0ae4dab7edf50b808132049acdd5211 100644
--- a/Core/PythonAPI/src/IDetector2D.pypp.cpp
+++ b/Core/PythonAPI/src/IDetector2D.pypp.cpp
@@ -261,8 +261,7 @@ void register_IDetector2D_class(){
             IDetector2D_exposer.def( 
                 "getDetectorResolutionFunction"
                 , getDetectorResolutionFunction_function_type( &::IDetector2D::getDetectorResolutionFunction )
-                , bp::return_value_policy< bp::reference_existing_object >()
-                , "Applies the detector resolution to the given intensity maps." );
+                , bp::return_value_policy< bp::reference_existing_object >() );
         
         }
         { //::IDetector2D::getDimension
diff --git a/Core/PythonAPI/src/NumpyUtils.cpp b/Core/PythonAPI/src/NumpyUtils.cpp
index 68fc440119c3ce28fb5f530fcf4657e7a3cb7244..6074588cb8259aa8c7d635385eb8713c6b3fc9e1 100644
--- a/Core/PythonAPI/src/NumpyUtils.cpp
+++ b/Core/PythonAPI/src/NumpyUtils.cpp
@@ -33,7 +33,7 @@ PyObject *Utils::createNumpyArray(const std::vector<double> &data)
     // creating standalone numpy array
     PyObject *pyarray = PyArray_SimpleNew(ndim_numpy, ndimsizes_numpy, NPY_DOUBLE);
     delete [] ndimsizes_numpy;
-    if(pyarray == NULL ) {
+    if(pyarray == nullptr ) {
         throw RuntimeErrorException(
                 "ExportOutputData() -> Panic in PyArray_SimpleNew");
     }
diff --git a/Core/PythonAPI/src/PythonOutputData.cpp b/Core/PythonAPI/src/PythonOutputData.cpp
index f688f091b8f77f4e44454cdfa935a38d5e6f3a17..f6015477ad9fb6cf1aaae2fa44c4af7ed65aadc0 100644
--- a/Core/PythonAPI/src/PythonOutputData.cpp
+++ b/Core/PythonAPI/src/PythonOutputData.cpp
@@ -100,7 +100,7 @@ PyObject *ExportOutputData(const OutputData<double >& output_data)
     PyObject *pyarray = PyArray_SimpleNew(ndim_numpy, ndimsizes_numpy,
             NPY_DOUBLE);
     delete [] ndimsizes_numpy;
-    if(pyarray == NULL ) {
+    if(pyarray == nullptr ) {
         throw RuntimeErrorException(
                 "ExportOutputData() -> Panic in PyArray_SimpleNew");
     }
@@ -147,7 +147,7 @@ PyObject *ExportOutputDataAxis(const OutputData<double >& output_data,
     // creating standalone numpy array
     PyObject *pyarray = PyArray_SimpleNew(ndim_numpy, ndimsizes_numpy,
             NPY_DOUBLE);
-    if(pyarray == NULL ) {
+    if(pyarray == nullptr ) {
         throw RuntimeErrorException(
                 "ExportOutputDataAxis() -> Panic in in PyArray_SimpleNew");
     }
diff --git a/Core/Samples/src/InterferenceFunction1DLattice.cpp b/Core/Samples/src/InterferenceFunction1DLattice.cpp
index 3888e4328df560bccadde667f4f78592ed189a94..128c1d910f60a2d1dad0c1e1766eec71016081f8 100644
--- a/Core/Samples/src/InterferenceFunction1DLattice.cpp
+++ b/Core/Samples/src/InterferenceFunction1DLattice.cpp
@@ -35,7 +35,6 @@ InterferenceFunction1DLattice *InterferenceFunction1DLattice::clone() const
     InterferenceFunction1DLattice *result = new InterferenceFunction1DLattice(m_lattice_params);
     if (mp_pdf)
         result->setProbabilityDistribution(*mp_pdf);
-    result->setName(getName());
     return result;
 }
 
diff --git a/Core/Samples/src/InterferenceFunction2DLattice.cpp b/Core/Samples/src/InterferenceFunction2DLattice.cpp
index d525153fa8f6afe54a887728c96f10aafc5b42d4..57dfe0c05ea882a551195c7654c76b5f0f238860 100644
--- a/Core/Samples/src/InterferenceFunction2DLattice.cpp
+++ b/Core/Samples/src/InterferenceFunction2DLattice.cpp
@@ -44,7 +44,6 @@ InterferenceFunction2DLattice *InterferenceFunction2DLattice::clone() const
     InterferenceFunction2DLattice *result = new InterferenceFunction2DLattice(m_lattice_params);
     if (mp_pdf)
         result->setProbabilityDistribution(*mp_pdf);
-    result->setName(getName());
     return result;
 }
 
diff --git a/Core/Samples/src/InterferenceFunction2DParaCrystal.cpp b/Core/Samples/src/InterferenceFunction2DParaCrystal.cpp
index 10f8721ba588d76f9885eea772e62f15d0b9e57b..c36602fc3a2d6861ff010005bd9996f0a01be7fb 100644
--- a/Core/Samples/src/InterferenceFunction2DParaCrystal.cpp
+++ b/Core/Samples/src/InterferenceFunction2DParaCrystal.cpp
@@ -57,7 +57,6 @@ InterferenceFunction2DParaCrystal
     if(m_pdfs[0] && m_pdfs[1])
         result->setProbabilityDistributions(*m_pdfs[0], *m_pdfs[1]);
     result->setIntegrationOverXi(m_integrate_xi);
-    result->setName(getName());
     return result;
 }
 
diff --git a/Core/Samples/src/InterferenceFunctionRadialParaCrystal.cpp b/Core/Samples/src/InterferenceFunctionRadialParaCrystal.cpp
index 54a41e6b1f53cfc641e31b6af2890a17737486ce..b5fd0c11588c47d829fe320bd7db4e0740da2284 100644
--- a/Core/Samples/src/InterferenceFunctionRadialParaCrystal.cpp
+++ b/Core/Samples/src/InterferenceFunctionRadialParaCrystal.cpp
@@ -46,7 +46,6 @@ InterferenceFunctionRadialParaCrystal *InterferenceFunctionRadialParaCrystal::cl
     InterferenceFunctionRadialParaCrystal *result =
         new InterferenceFunctionRadialParaCrystal(
             m_peak_distance, m_damping_length);
-    result->setName(getName());
     result->setDomainSize(getDomainSize());
     result->setKappa(m_kappa);
     if (mP_pdf.get()) {
diff --git a/Core/Samples/src/Layer.cpp b/Core/Samples/src/Layer.cpp
index 512e8188d3aed23f0b8d23433005e6876cc118e1..39085546883a0e2c02d19a876ecfce6ca300e68e 100644
--- a/Core/Samples/src/Layer.cpp
+++ b/Core/Samples/src/Layer.cpp
@@ -62,8 +62,6 @@ Layer* Layer::cloneInvertB() const
         p_clone->addLayoutPtr(getLayout(i)->cloneInvertB());
     }
     p_clone->m_thickness = this->m_thickness;
-    std::string clone_name = this->getName() + "_inv";
-    p_clone->setName(clone_name);
     p_clone->setNumberOfLayers(getNumberOfLayers());
     p_clone->init_parameters();
     return p_clone;
diff --git a/Core/Samples/src/MultiLayer.cpp b/Core/Samples/src/MultiLayer.cpp
index d3280ad230fcb8fc31a5e1397f07c77c9f76348c..0766bd005f46b34b7a30f9330782d587ac748af4 100644
--- a/Core/Samples/src/MultiLayer.cpp
+++ b/Core/Samples/src/MultiLayer.cpp
@@ -54,7 +54,6 @@ void MultiLayer::clear()
 MultiLayer *MultiLayer::clone() const
 {
     MultiLayer *newMultiLayer = new MultiLayer();
-    newMultiLayer->setName(getName());
 
     newMultiLayer->m_layers_z = m_layers_z;
 
@@ -90,7 +89,6 @@ MultiLayer *MultiLayer::clone() const
 MultiLayer* MultiLayer::cloneInvertB() const
 {
     MultiLayer *newMultiLayer = new MultiLayer();
-    newMultiLayer->setName(getName());
 
     newMultiLayer->m_layers_z = m_layers_z;
 
diff --git a/Core/Samples/src/ParticleComposition.cpp b/Core/Samples/src/ParticleComposition.cpp
index 2033fa5fb14dcd68d6427e497870d88f35b53757..45dffbece341bc151cb5992defcd74e98dabacde 100644
--- a/Core/Samples/src/ParticleComposition.cpp
+++ b/Core/Samples/src/ParticleComposition.cpp
@@ -56,7 +56,6 @@ ParticleComposition* ParticleComposition::clone() const
     for (size_t index=0; index<m_particles.size(); ++index) {
         p_new->addParticle(*m_particles[index]);
     }
-    p_new->setName(getName());
     p_new->setAmbientMaterial(*getAmbientMaterial());
     if (mP_rotation.get()) {
         p_new->setRotation(*mP_rotation);
diff --git a/Core/Samples/src/ParticleLayout.cpp b/Core/Samples/src/ParticleLayout.cpp
index 0f97ea6f7f3b356dc808262004ffc54d7866796f..088b0782818f3d4ffe6e77b97334448075456ca4 100644
--- a/Core/Samples/src/ParticleLayout.cpp
+++ b/Core/Samples/src/ParticleLayout.cpp
@@ -40,17 +40,15 @@ ParticleLayout::~ParticleLayout()
 {
 }
 
-ParticleLayout* ParticleLayout::clone() const
+ParticleLayout *ParticleLayout::clone() const
 {
     ParticleLayout *p_new = new ParticleLayout();
-    p_new->setName(getName());
 
-    for (size_t i=0; i<m_particles.size(); ++i)
+    for (size_t i = 0; i < m_particles.size(); ++i)
         p_new->addAndRegisterParticleInfo(m_particles[i]->clone());
 
-    for (size_t i=0; i<m_interference_functions.size(); ++i)
-        p_new->addAndRegisterInterferenceFunction(
-            m_interference_functions[i]->clone());
+    for (size_t i = 0; i < m_interference_functions.size(); ++i)
+        p_new->addAndRegisterInterferenceFunction(m_interference_functions[i]->clone());
 
     p_new->setTotalParticleSurfaceDensity(getTotalParticleSurfaceDensity());
     p_new->setApproximation(getApproximation());
@@ -58,17 +56,15 @@ ParticleLayout* ParticleLayout::clone() const
     return p_new;
 }
 
-ParticleLayout* ParticleLayout::cloneInvertB() const
+ParticleLayout *ParticleLayout::cloneInvertB() const
 {
     ParticleLayout *p_new = new ParticleLayout();
-    p_new->setName(getName() + "_inv");
 
-    for (size_t i=0; i<m_particles.size(); ++i)
+    for (size_t i = 0; i < m_particles.size(); ++i)
         p_new->addAndRegisterParticleInfo(m_particles[i]->cloneInvertB());
 
-    for (size_t i=0; i<m_interference_functions.size(); ++i)
-        p_new->addAndRegisterInterferenceFunction(
-            m_interference_functions[i]->clone());
+    for (size_t i = 0; i < m_interference_functions.size(); ++i)
+        p_new->addAndRegisterInterferenceFunction(m_interference_functions[i]->clone());
 
     p_new->setTotalParticleSurfaceDensity(getTotalParticleSurfaceDensity());
     p_new->setApproximation(getApproximation());
@@ -124,8 +120,8 @@ const IAbstractParticle* ParticleLayout::getParticle(size_t index) const
         "Error! Not so many particles in this decoration.");
 }
 
-void ParticleLayout::getParticleInfos(SafePointerVector<const IParticle>& particle_vector,
-                                      std::vector<double>& abundance_vector) const
+void ParticleLayout::getParticleInfos(SafePointerVector<const IParticle> &particle_vector,
+                                      std::vector<double> &abundance_vector) const
 {
     particle_vector.clear();
     abundance_vector.clear();
@@ -136,9 +132,10 @@ void ParticleLayout::getParticleInfos(SafePointerVector<const IParticle>& partic
             = dynamic_cast<const ParticleDistribution *>(p_info->getParticle());
         const IParticle *p_iparticle = dynamic_cast<const IParticle *>(p_info->getParticle());
         if (p_part_distr) {
-            std::vector<const IParticle*> generated_particles;
+            std::vector<const IParticle *> generated_particles;
             std::vector<double> abundances;
-            p_part_distr->generateParticleInfos(generated_particles, abundances, p_info->getAbundance());
+            p_part_distr->generateParticleInfos(generated_particles, abundances,
+                                                p_info->getAbundance());
             for (size_t i = 0; i < generated_particles.size(); ++i) {
                 particle_vector.push_back(generated_particles[i]);
                 abundance_vector.push_back(abundances[i]);
@@ -179,14 +176,12 @@ void ParticleLayout::addInterferenceFunction(
     addAndRegisterInterferenceFunction(interference_function.clone());
 }
 
-const IInterferenceFunction* ParticleLayout::getInterferenceFunction(
-    size_t index) const
+const IInterferenceFunction *ParticleLayout::getInterferenceFunction(size_t index) const
 {
-    if (index<m_interference_functions.size())
+    if (index < m_interference_functions.size())
         return m_interference_functions[index];
-    throw OutOfBoundsException(
-        "ParticleLayout::getInterferenceFunction() ->"
-                "Not so many interference functions in this decoration.");
+    throw OutOfBoundsException("ParticleLayout::getInterferenceFunction() ->"
+                               "Not so many interference functions in this decoration.");
 }
 
 //! Adds particle information with simultaneous registration in parent class.
diff --git a/Core/Tools/src/Convolve.cpp b/Core/Tools/src/Convolve.cpp
index c733929517aeeea57a496db2ce472fd1bd68beac..f312c4059399b3f16901dd280ba845bf9ef42c03 100644
--- a/Core/Tools/src/Convolve.cpp
+++ b/Core/Tools/src/Convolve.cpp
@@ -36,7 +36,7 @@ MathFunctions::Convolve::Workspace::Workspace() :
     w_fftw(0), h_fftw(0), in_src(0), out_src(0), in_kernel(0), out_kernel(0), dst_fft(0), h_dst(0), w_dst(0),
     //dst(0),
     h_offset(0), w_offset(0),
-    p_forw_src(NULL), p_forw_kernel(NULL), p_back(NULL)
+    p_forw_src(nullptr), p_forw_kernel(nullptr), p_back(nullptr)
 {
 
 }
@@ -73,9 +73,9 @@ void MathFunctions::Convolve::Workspace::clear()
     h_offset = 0;
     w_offset = 0;
 
-    if(p_forw_src != NULL) fftw_destroy_plan(p_forw_src);
-    if(p_forw_kernel != NULL) fftw_destroy_plan(p_forw_kernel);
-    if(p_back != NULL)  fftw_destroy_plan(p_back);
+    if(p_forw_src != nullptr) fftw_destroy_plan(p_forw_src);
+    if(p_forw_kernel != nullptr) fftw_destroy_plan(p_forw_kernel);
+    if(p_back != nullptr)  fftw_destroy_plan(p_back);
 
     // this returns fftw3 into completely initial state but is dramatically slow
     //fftw_cleanup();
@@ -249,14 +249,14 @@ void MathFunctions::Convolve::init(int h_src, int w_src, int h_kernel, int w_ker
 
     // Initialization of the plans
     ws.p_forw_src = fftw_plan_dft_r2c_2d(ws.h_fftw, ws.w_fftw, ws.in_src, (fftw_complex*)ws.out_src, FFTW_ESTIMATE);
-    if( ws.p_forw_src == NULL ) throw RuntimeErrorException("MathFunctions::Convolve::init() -> Error! Can't initialise p_forw_src plan.");
+    if( ws.p_forw_src == nullptr ) throw RuntimeErrorException("MathFunctions::Convolve::init() -> Error! Can't initialise p_forw_src plan.");
 
     ws.p_forw_kernel = fftw_plan_dft_r2c_2d(ws.h_fftw, ws.w_fftw, ws.in_kernel, (fftw_complex*)ws.out_kernel, FFTW_ESTIMATE);
-    if( ws.p_forw_kernel == NULL ) throw RuntimeErrorException("MathFunctions::Convolve::init() -> Error! Can't initialise p_forw_kernel plan.");
+    if( ws.p_forw_kernel == nullptr ) throw RuntimeErrorException("MathFunctions::Convolve::init() -> Error! Can't initialise p_forw_kernel plan.");
 
     // The backward FFT takes ws.out_kernel as input
     ws.p_back = fftw_plan_dft_c2r_2d(ws.h_fftw, ws.w_fftw, (fftw_complex*)ws.out_kernel, ws.dst_fft, FFTW_ESTIMATE);
-    if( ws.p_back == NULL ) throw RuntimeErrorException("MathFunctions::Convolve::init() -> Error! Can't initialise p_back plan.");
+    if( ws.p_back == nullptr ) throw RuntimeErrorException("MathFunctions::Convolve::init() -> Error! Can't initialise p_back plan.");
 
 
 }
diff --git a/Core/Tools/src/OutputData.cpp b/Core/Tools/src/OutputData.cpp
index fe8439cc0ac869b50532aab1cbaad19efca82596..e6329cd7be7c3a8dcd06ed47dc52f37f0c10aeab 100644
--- a/Core/Tools/src/OutputData.cpp
+++ b/Core/Tools/src/OutputData.cpp
@@ -46,7 +46,7 @@ PyObject *OutputData<double>::getArray() const
     // creating standalone numpy array
     PyObject *pyarray = PyArray_SimpleNew(ndim_numpy, ndimsizes_numpy, NPY_DOUBLE);
     delete [] ndimsizes_numpy;
-    if(pyarray == NULL ) {
+    if(pyarray == nullptr ) {
         throw RuntimeErrorException(
                 "ExportOutputData() -> Panic in PyArray_SimpleNew");
     }
diff --git a/Core/Tools/src/Utils.cpp b/Core/Tools/src/Utils.cpp
index d6b617445fa47a5413840d8d9c6fecc18772db6b..f09c987eee5a9a0864fa72da0a7080228aa8ac71 100644
--- a/Core/Tools/src/Utils.cpp
+++ b/Core/Tools/src/Utils.cpp
@@ -46,7 +46,7 @@ vdouble1d_t Utils::String::parse_doubles(const std::string& str)
     std::istringstream iss(str);
     std::string svalue;
     while(iss >> svalue) {
-        buff_1d.push_back(std::strtod(svalue.c_str(), NULL));
+        buff_1d.push_back(std::strtod(svalue.c_str(), nullptr));
     }
 // approach below doesnt work under mac 10.6 for doubles like 4.3882628771e-313
 //    std::copy(std::istream_iterator<double>(iss),
diff --git a/Fit/FitKernel/src/FitKernel.cpp b/Fit/FitKernel/src/FitKernel.cpp
index 9b72762ca453c065a6f523a2e326b794cc969bca..a60398ee53103267f33902b4ab3342c7a23aaeb5 100644
--- a/Fit/FitKernel/src/FitKernel.cpp
+++ b/Fit/FitKernel/src/FitKernel.cpp
@@ -71,7 +71,7 @@ void FitKernel::addFitStrategy(const IFitStrategy &strategy)
 void FitKernel::setMinimizer(IMinimizer *minimizer)
 {
     if(!minimizer) {
-        msglog(MSG::ERROR) << "FitSuite::setMinimizer() -> Error. Attempt to set NULL minimizer.";
+        msglog(MSG::ERROR) << "FitSuite::setMinimizer() -> Error. Attempt to set nullptr minimizer.";
     }
     m_minimizer.reset(minimizer);
 }
diff --git a/Fit/FitKernel/src/FitSuiteFunctions.cpp b/Fit/FitKernel/src/FitSuiteFunctions.cpp
index 97a960251194c14b08a20472ced270aecb202696..08a17eb00209009470758c740818baa797f221d9 100644
--- a/Fit/FitKernel/src/FitSuiteFunctions.cpp
+++ b/Fit/FitKernel/src/FitSuiteFunctions.cpp
@@ -21,7 +21,7 @@
 //! evaluate chi squared value
 double FitSuiteChiSquaredFunction::evaluate(const double *pars)
 {
-    assert(m_fit_kernel != NULL);
+    assert(m_fit_kernel != nullptr);
 
     m_fit_kernel->getFitParameters()->setValues(pars);
     m_fit_kernel->getFitObjects()->runSimulations();
@@ -36,7 +36,7 @@ double FitSuiteChiSquaredFunction::evaluate(const double *pars)
 // calculated data just returned
 double FitSuiteGradientFunction::evaluate(const double *pars, unsigned int index, double *gradients)
 {
-    assert(m_fit_kernel != NULL);
+    assert(m_fit_kernel != nullptr);
 
     bool parameters_changed(true);
     if(m_ncalls_total != 0) parameters_changed = m_fit_kernel->getFitParameters()->valuesAreDifferrent(pars, 2);
diff --git a/GUI/coregui/Models/ParameterModelBuilder.cpp b/GUI/coregui/Models/ParameterModelBuilder.cpp
index 21a75f036fb6d8282574b902f39d49982c05a420..efdc85fe2fbb0f9d165149743e41fd3bbddb781a 100644
--- a/GUI/coregui/Models/ParameterModelBuilder.cpp
+++ b/GUI/coregui/Models/ParameterModelBuilder.cpp
@@ -133,7 +133,7 @@ QStandardItem *ParameterModelBuilder::iterateSessionModel(SessionModel *sampleMo
                 }
             }
 
-            if (parentItem == NULL) {
+            if (parentItem == nullptr) {
                 parentItem = standardItem;
             } else {
                 InsertRowIntoItem(parentItem, standardItem);
@@ -217,7 +217,7 @@ void ParameterModelBuilder::InsertRowIntoItem(QStandardItem *parentItem,
                                               QStandardItem *childTitleItem,
                                               QStandardItem *childValueItem)
 {
-    if (childValueItem == NULL) {
+    if (childValueItem == nullptr) {
         childValueItem = new QStandardItem();
         childValueItem->setEditable(false);
         childTitleItem->setEditable(false);
diff --git a/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp b/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp
index dd78027cf8e932781b8459ecfb66bd48f7136ea3..629aa045090e55e52c360431ab99cde20432c1c6 100644
--- a/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp
+++ b/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp
@@ -125,7 +125,7 @@ QWidget *ModelTuningDelegate::createEditor(QWidget *parent,
                                            const QModelIndex &index) const
 {
     if (index.column() == m_valueColumn) {
-        if(index.parent().isValid() == false) return NULL;
+        if(index.parent().isValid() == false) return nullptr;
 
         double value = index.model()->data(index, Qt::EditRole).toDouble();
 
@@ -238,7 +238,7 @@ void ModelTuningDelegate::setModelData(QWidget *editor,
         model->setData(index, m_valueBox->value());
         ItemLink link = model->data(index, Qt::UserRole).value<ItemLink>();
 
-        if(link.getItem() != NULL)
+        if(link.getItem() != nullptr)
         {
             qDebug() << "SampleTuningDelegate::setModelData() -> setting property " << link.getPropertyName();
             //link.getItem()->setRegisteredProperty(link.getPropertyName(), m_valueBox->value());
diff --git a/GUI/main/stacktracesetup.cpp b/GUI/main/stacktracesetup.cpp
index 6c104f94863882b0b95230914fa709c6ff164a69..ebd67ef69221b781835e253775458288ddbe22ce 100644
--- a/GUI/main/stacktracesetup.cpp
+++ b/GUI/main/stacktracesetup.cpp
@@ -77,9 +77,9 @@ static inline void printStackTrace( FILE *out = stderr, unsigned int max_frames
    // address of this function.
    for ( unsigned int i = 4; i < addrlen; i++ )
    {
-      char* begin_name   = NULL;
-      char* begin_offset = NULL;
-      char* end_offset   = NULL;
+      char* begin_name   = nullptr;
+      char* begin_offset = nullptr;
+      char* end_offset   = nullptr;
 
       // find parentheses and +address offset surrounding the mangled name
 #ifdef DARWIN
@@ -168,7 +168,7 @@ static inline void printStackTrace( FILE *out = stderr, unsigned int max_frames
 void abortHandler(int signum )
 {
    // associate each signal with a signal name string.
-   const char* name = NULL;
+   const char* name = nullptr;
    switch( signum )
    {
    case SIGABRT: name = "SIGABRT";  break;
diff --git a/Tests/UnitTests/TestCore/ChiSquaredModuleTest.h b/Tests/UnitTests/TestCore/ChiSquaredModuleTest.h
index a229401ef22308975d74c33b3c1c54d0d503ab9e..4a1309aa6350b0ae28784b6ca4254ac54a655d95 100644
--- a/Tests/UnitTests/TestCore/ChiSquaredModuleTest.h
+++ b/Tests/UnitTests/TestCore/ChiSquaredModuleTest.h
@@ -42,12 +42,12 @@ ChiSquaredModuleTest::~ChiSquaredModuleTest()
 
 TEST_F(ChiSquaredModuleTest, InitialState)
 {
-//    EXPECT_EQ( NULL, m_chi_empty.getRealData());
-//    EXPECT_EQ( NULL, m_chi_empty.getSimulationData());
+//    EXPECT_EQ( nullptr, m_chi_empty.getRealData());
+//    EXPECT_EQ( nullptr, m_chi_empty.getSimulationData());
     EXPECT_TRUE( dynamic_cast<const SquaredFunctionDefault*>(m_chi_empty.getSquaredFunction()));
 //    EXPECT_TRUE( dynamic_cast<const DefaultAllDataSelector*>(m_chi_empty.getFittingDataSelector()));
-    EXPECT_EQ( NULL, m_chi_empty.getIntensityNormalizer());
-    EXPECT_EQ( NULL, m_chi_empty.getIntensityFunction());
+    EXPECT_EQ( nullptr, m_chi_empty.getIntensityNormalizer());
+    EXPECT_EQ( nullptr, m_chi_empty.getIntensityFunction());
 //    ASSERT_THROW(m_chi_empty.calculateChiSquared(), NullPointerException);
 //    ASSERT_THROW(m_chi_empty.createChi2DifferenceMap(), NullPointerException);
 }
@@ -55,12 +55,12 @@ TEST_F(ChiSquaredModuleTest, InitialState)
 TEST_F(ChiSquaredModuleTest, CloneOfEmpty)
 {
     ChiSquaredModule *clone_of_empty = m_chi_empty.clone();
-//    EXPECT_EQ( NULL, clone_of_empty->getRealData());
-//    EXPECT_EQ( NULL, clone_of_empty->getSimulationData());
+//    EXPECT_EQ( nullptr, clone_of_empty->getRealData());
+//    EXPECT_EQ( nullptr, clone_of_empty->getSimulationData());
     EXPECT_TRUE( dynamic_cast<const SquaredFunctionDefault*>(clone_of_empty->getSquaredFunction()));
 //    EXPECT_TRUE( dynamic_cast<const DefaultAllDataSelector*>(clone_of_empty->getFittingDataSelector()));
-    EXPECT_EQ( NULL, clone_of_empty->getIntensityNormalizer());
-    EXPECT_EQ( NULL, clone_of_empty->getIntensityFunction());
+    EXPECT_EQ( nullptr, clone_of_empty->getIntensityNormalizer());
+    EXPECT_EQ( nullptr, clone_of_empty->getIntensityFunction());
 //    ASSERT_THROW(clone_of_empty->calculateChiSquared(), NullPointerException);
 //    ASSERT_THROW(clone_of_empty->createChi2DifferenceMap(), NullPointerException);
     delete clone_of_empty;
diff --git a/Tests/UnitTests/TestCore/GISASSimulationTest.h b/Tests/UnitTests/TestCore/GISASSimulationTest.h
index abeef4932b72b10b81d9d689ffeadd10524299c3..ec07952a1821f50b7bb316f56098ea8356f23d13 100644
--- a/Tests/UnitTests/TestCore/GISASSimulationTest.h
+++ b/Tests/UnitTests/TestCore/GISASSimulationTest.h
@@ -48,11 +48,11 @@ GISASSimulationTest::~GISASSimulationTest()
 
 TEST_F(GISASSimulationTest, SimulationInitialState)
 {
-    EXPECT_EQ( NULL, emptySimulation.getSample());
+    EXPECT_EQ( nullptr, emptySimulation.getSample());
     EXPECT_EQ( size_t(1), emptySimulation.getOutputData()->getAllocatedSize());
     EXPECT_EQ( size_t(0), emptySimulation.getOutputData()->getRank());
     EXPECT_TRUE(emptySimulation.getOutputData()->getRank() == emptySimulation.getInstrument().getDetectorDimension() );
-    EXPECT_EQ(NULL, emptySimulation.getSampleBuilder().get());
+    EXPECT_EQ(nullptr, emptySimulation.getSampleBuilder().get());
 }
 
 
@@ -69,12 +69,12 @@ TEST_F(GISASSimulationTest, SimulationConstruction)
     constructedSimulation.setSample(ml);
     EXPECT_EQ( size_t(1), dynamic_cast<MultiLayer *>(constructedSimulation.getSample())->getNumberOfLayers());
     constructedSimulation.setSampleBuilder(sample_builder);
-    EXPECT_EQ( NULL, constructedSimulation.getSample());
+    EXPECT_EQ( nullptr, constructedSimulation.getSample());
     EXPECT_EQ( sample_builder.get(), constructedSimulation.getSampleBuilder().get());
 
     constructedSimulation.prepareSimulation();
 
-    EXPECT_TRUE( NULL == constructedSimulation.getSample());
+    EXPECT_TRUE( nullptr == constructedSimulation.getSample());
     boost::scoped_ptr<ISample> sample(constructedSimulation.getSampleBuilder()->buildSample());
     EXPECT_EQ( std::string("Layer"), sample->getName());
     EXPECT_EQ( double(0), dynamic_cast<Layer *>(sample.get())->getThickness());
@@ -83,7 +83,7 @@ TEST_F(GISASSimulationTest, SimulationConstruction)
 TEST_F(GISASSimulationTest, SimulationInitialStateOfClone)
 {
     GISASSimulation *emptyClonedSimulation = emptySimulation.clone();
-    EXPECT_EQ( NULL, emptyClonedSimulation->getSample());
+    EXPECT_EQ( nullptr, emptyClonedSimulation->getSample());
     EXPECT_EQ( size_t(1), emptyClonedSimulation->getOutputData()->getAllocatedSize());
     EXPECT_EQ( size_t(0), emptyClonedSimulation->getOutputData()->getRank());
     EXPECT_TRUE(emptyClonedSimulation->getOutputData()->getRank() == emptyClonedSimulation->getInstrument().getDetector()->getDimension() );
@@ -103,9 +103,9 @@ TEST_F(GISASSimulationTest, SimulationClone)
 
     EXPECT_TRUE( clonedSimulation->getOutputData()->hasSameShape(test_data));
     EXPECT_EQ( double(10), clonedSimulation->getInstrument().getBeamIntensity());
-    EXPECT_TRUE( NULL == clonedSimulation->getSample());
+    EXPECT_TRUE( nullptr == clonedSimulation->getSample());
     clonedSimulation->prepareSimulation();
-    EXPECT_TRUE( NULL == clonedSimulation->getSample());
+    EXPECT_TRUE( nullptr == clonedSimulation->getSample());
 
     delete clonedSimulation;
 }
diff --git a/Tests/UnitTests/TestCore/LayerTest.h b/Tests/UnitTests/TestCore/LayerTest.h
index 355986a4d79895223337d5026e194c77d6e0563b..f0feaf1e2442ba7decfec54a4e621904cb80fe64 100644
--- a/Tests/UnitTests/TestCore/LayerTest.h
+++ b/Tests/UnitTests/TestCore/LayerTest.h
@@ -20,24 +20,24 @@ class LayerTest : public ::testing::Test
 TEST_F(LayerTest, LayerInitialState)
 {
     Layer layer;
-    EXPECT_EQ(NULL, layer.getMaterial());
-    EXPECT_EQ(NULL, layer.getLayout(0));
+    EXPECT_EQ(nullptr, layer.getMaterial());
+    EXPECT_EQ(nullptr, layer.getLayout(0));
     EXPECT_EQ(0, layer.getThickness());
     EXPECT_FALSE(layer.hasDWBASimulation());
     EXPECT_EQ(complex_t(1.0, 0.0), layer.getRefractiveIndex());
     EXPECT_EQ(0.0, layer.getTotalParticleSurfaceDensity(0));
     EXPECT_EQ("Layer", layer.getName());
-    EXPECT_EQ(NULL, layer.createDWBASimulation());
+    EXPECT_EQ(nullptr, layer.createDWBASimulation());
 
     Layer *new_layer = layer.clone();
-    EXPECT_EQ(NULL, new_layer->getMaterial());
-    EXPECT_EQ(NULL, new_layer->getLayout(0));
+    EXPECT_EQ(nullptr, new_layer->getMaterial());
+    EXPECT_EQ(nullptr, new_layer->getLayout(0));
     EXPECT_EQ(0, new_layer->getThickness());
     EXPECT_FALSE(new_layer->hasDWBASimulation());
     EXPECT_EQ(complex_t(1.0, 0.0), new_layer->getRefractiveIndex());
     EXPECT_EQ(0.0, new_layer->getTotalParticleSurfaceDensity(0));
     EXPECT_EQ("Layer", new_layer->getName());
-    EXPECT_EQ(NULL, new_layer->createDWBASimulation());
+    EXPECT_EQ(nullptr, new_layer->createDWBASimulation());
 
     delete new_layer;
 }
@@ -50,13 +50,13 @@ TEST_F(LayerTest, LayerGetAndSet)
 
     Layer layer(air, 10*Units::nanometer);
     EXPECT_EQ(air.getName(), layer.getMaterial()->getName());
-    EXPECT_EQ(NULL, layer.getLayout(0));
+    EXPECT_EQ(nullptr, layer.getLayout(0));
     EXPECT_EQ(10, layer.getThickness());
     EXPECT_FALSE(layer.hasDWBASimulation());
     EXPECT_EQ(complex_t(1,0), layer.getRefractiveIndex());
     EXPECT_EQ(0.0, layer.getTotalParticleSurfaceDensity(0));
     EXPECT_EQ("Layer", layer.getName());
-    EXPECT_EQ(NULL, layer.createDWBASimulation());
+    EXPECT_EQ(nullptr, layer.createDWBASimulation());
 
     layer.setThickness(20.0);
     EXPECT_EQ(20, layer.getThickness());
@@ -67,13 +67,13 @@ TEST_F(LayerTest, LayerGetAndSet)
 
     Layer *new_layer = layer.clone();
     EXPECT_EQ(something.getName(), new_layer->getMaterial()->getName());
-    EXPECT_EQ(NULL, new_layer->getLayout(0));
+    EXPECT_EQ(nullptr, new_layer->getLayout(0));
     EXPECT_EQ(20, new_layer->getThickness());
     EXPECT_FALSE(new_layer->hasDWBASimulation());
     EXPECT_EQ(complex_t(1,0.5), new_layer->getRefractiveIndex());
     EXPECT_EQ(0.0, new_layer->getTotalParticleSurfaceDensity(0));
     EXPECT_EQ("Layer", new_layer->getName());
-    EXPECT_EQ(NULL, new_layer->createDWBASimulation());
+    EXPECT_EQ(nullptr, new_layer->createDWBASimulation());
     delete new_layer;
 }
 
diff --git a/Tests/UnitTests/TestCore/MatrixSpecularInfoMapTest.h b/Tests/UnitTests/TestCore/MatrixSpecularInfoMapTest.h
index 69fa9e540d00f3c025953ea38c0a997097b5a083..3568cca0920384b1c6bf538a8a6aeffe19762ba7 100644
--- a/Tests/UnitTests/TestCore/MatrixSpecularInfoMapTest.h
+++ b/Tests/UnitTests/TestCore/MatrixSpecularInfoMapTest.h
@@ -43,7 +43,7 @@ TEST_F(MatrixSpecularInfoMapTest, getCoefficients)
     (void)R0;
     (void)lambda0;
 
-    EXPECT_TRUE(NULL != P_rt_coeffs.get());
+    EXPECT_TRUE(nullptr != P_rt_coeffs.get());
 
     EXPECT_EQ(0.0, P_rt_coeffs->T1plus()(0));
     EXPECT_EQ(0.0, P_rt_coeffs->T1plus()(1));
diff --git a/Tests/UnitTests/TestCore/MultiLayerTest.h b/Tests/UnitTests/TestCore/MultiLayerTest.h
index 4029ec406689b41712d7a3109bdb9e407f9c68fd..78ad11303aa78d03eb188d647ec27eba75bfcca0 100644
--- a/Tests/UnitTests/TestCore/MultiLayerTest.h
+++ b/Tests/UnitTests/TestCore/MultiLayerTest.h
@@ -2,6 +2,7 @@
 #define MULTILAYERTEST_H
 
 #include "MultiLayer.h"
+#include "BornAgainNamespace.h"
 #include "Layer.h"
 #include "HomogeneousMaterial.h"
 #include "Materials.h"
@@ -19,7 +20,7 @@ TEST_F(MultiLayerTest, BasicProperty)
 {
     MultiLayer mLayer;
     //check default properties
-    EXPECT_EQ("MultiLayer", mLayer.getName());
+    EXPECT_EQ(BornAgain::MultiLayerType, mLayer.getName());
     EXPECT_EQ(0.0, mLayer.getCrossCorrLength());
     EXPECT_EQ(size_t(0), mLayer.getNumberOfLayers());
     EXPECT_EQ(size_t(0), mLayer.getNumberOfInterfaces());
@@ -45,7 +46,6 @@ TEST_F(MultiLayerTest, BasicProperty)
     mLayer.addLayer(stoneLayer);
     EXPECT_EQ(size_t(4), mLayer.getNumberOfLayers());
     EXPECT_EQ(size_t(3), mLayer.getNumberOfInterfaces());
-
 }
 
 TEST_F(MultiLayerTest, LayerThicknesses)
@@ -89,7 +89,6 @@ TEST_F(MultiLayerTest, LayerThicknesses)
     EXPECT_EQ(-85.0, mLayer.getLayerBottomZ(3));
 }
 
-
 TEST_F(MultiLayerTest, CheckAllLayers)
 {
     MultiLayer mLayer;
@@ -111,25 +110,24 @@ TEST_F(MultiLayerTest, CheckAllLayers)
 
     //check individual layer
     const Layer * layer0 = mLayer.getLayer(0);
-    EXPECT_EQ("Layer", layer0->getName());
+    EXPECT_EQ(BornAgain::LayerType, layer0->getName());
     EXPECT_EQ(0, layer0->getThickness());
     EXPECT_EQ(airLayer.getMaterial()->getName(), layer0->getMaterial()->getName());
 
     const Layer * layer1 = mLayer.getLayer(1);
-    EXPECT_EQ("Layer", layer1->getName());
+    EXPECT_EQ(BornAgain::LayerType, layer1->getName());
     EXPECT_EQ(20, layer1->getThickness());
     EXPECT_EQ(ironLayer.getMaterial()->getName(), layer1->getMaterial()->getName());
 
     const Layer * layer2 = mLayer.getLayer(2);
-    EXPECT_EQ("Layer", layer2->getName());
+    EXPECT_EQ(BornAgain::LayerType, layer2->getName());
     EXPECT_EQ(40, layer2->getThickness());
     EXPECT_EQ(chromiumLayer.getMaterial()->getName(), layer2->getMaterial()->getName());
 
     const Layer * layer3 = mLayer.getLayer(3);
-    EXPECT_EQ("Layer", layer3->getName());
+    EXPECT_EQ(BornAgain::LayerType, layer3->getName());
     EXPECT_EQ(0, layer3->getThickness());
     EXPECT_EQ(stoneLayer.getMaterial()->getName(), layer3->getMaterial()->getName());
-
 }
 
 TEST_F(MultiLayerTest, LayerInterfaces)
@@ -153,49 +151,48 @@ TEST_F(MultiLayerTest, LayerInterfaces)
 
     //check interfaces
     const LayerInterface * interface0 = mLayer.getLayerInterface(0);
-    EXPECT_TRUE(NULL!=interface0);
-    EXPECT_EQ("LayerInterface",interface0->getName());
-    EXPECT_EQ(NULL, interface0->getRoughness());
+    EXPECT_TRUE(nullptr!=interface0);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interface0->getName());
+    EXPECT_EQ(nullptr, interface0->getRoughness());
     EXPECT_EQ(layer0.getMaterial()->getName(), interface0->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer1.getMaterial()->getName(), interface0->getLayerBottom()->getMaterial()->getName());
 
     const LayerInterface * interface1 = mLayer.getLayerInterface(1);
-    EXPECT_TRUE(NULL!=interface1);
-    EXPECT_EQ("LayerInterface",interface1->getName());
-    EXPECT_EQ(NULL, interface1->getRoughness());
+    EXPECT_TRUE(nullptr!=interface1);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interface1->getName());
+    EXPECT_EQ(nullptr, interface1->getRoughness());
     EXPECT_EQ(layer1.getMaterial()->getName(), interface1->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer2.getMaterial()->getName(), interface1->getLayerBottom()->getMaterial()->getName());
 
     const LayerInterface * interface2 = mLayer.getLayerInterface(2);
-    EXPECT_TRUE(NULL!=interface2);
-    EXPECT_EQ("LayerInterface",interface2->getName());
-    EXPECT_EQ(NULL, interface2->getRoughness());
+    EXPECT_TRUE(nullptr!=interface2);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interface2->getName());
+    EXPECT_EQ(nullptr, interface2->getRoughness());
     EXPECT_EQ(layer2.getMaterial()->getName(), interface2->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer3.getMaterial()->getName(), interface2->getLayerBottom()->getMaterial()->getName());
 
     //bottom interface
     const LayerInterface * interfaceBottom = mLayer.getLayerBottomInterface(0);
-    EXPECT_TRUE(NULL!=interfaceBottom);
-    EXPECT_EQ("LayerInterface",interfaceBottom->getName());
-    EXPECT_EQ(NULL, interfaceBottom->getRoughness());
+    EXPECT_TRUE(nullptr!=interfaceBottom);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interfaceBottom->getName());
+    EXPECT_EQ(nullptr, interfaceBottom->getRoughness());
     EXPECT_EQ(layer0.getMaterial()->getName(), interfaceBottom->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer1.getMaterial()->getName(), interfaceBottom->getLayerBottom()->getMaterial()->getName());
 
     //top interface
     const LayerInterface * interfaceTop = mLayer.getLayerTopInterface(3);
-    EXPECT_TRUE(NULL!=interfaceTop);
-    EXPECT_EQ("LayerInterface",interfaceTop->getName());
-    EXPECT_EQ(NULL, interfaceTop->getRoughness());
+    EXPECT_TRUE(nullptr!=interfaceTop);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interfaceTop->getName());
+    EXPECT_EQ(nullptr, interfaceTop->getRoughness());
     EXPECT_EQ(layer2.getMaterial()->getName(), interfaceTop->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer3.getMaterial()->getName(), interfaceTop->getLayerBottom()->getMaterial()->getName());
 
     //null interface
     const LayerInterface * interfaceTopNull = mLayer.getLayerTopInterface(0);
-    EXPECT_TRUE(NULL==interfaceTopNull);
+    EXPECT_TRUE(nullptr==interfaceTopNull);
 
     const LayerInterface * interfaceBottomNull = mLayer.getLayerBottomInterface(3);
-    EXPECT_TRUE(NULL==interfaceBottomNull);
-
+    EXPECT_TRUE(nullptr==interfaceBottomNull);
 }
 
 TEST_F(MultiLayerTest, Clone)
@@ -220,7 +217,7 @@ TEST_F(MultiLayerTest, Clone)
     MultiLayer * mLayerClone = mLayer.clone();
 
     //check properties
-    EXPECT_EQ("MultiLayer", mLayerClone->getName());
+    EXPECT_EQ(BornAgain::MultiLayerType, mLayerClone->getName());
     EXPECT_EQ(0.0,mLayerClone->getCrossCorrLength());
     EXPECT_EQ(size_t(4), mLayerClone->getNumberOfLayers());
     EXPECT_EQ(size_t(3), mLayerClone->getNumberOfInterfaces());
@@ -260,53 +257,52 @@ TEST_F(MultiLayerTest, Clone)
 
     //check interfaces
     const LayerInterface * interface0 = mLayerClone->getLayerInterface(0);
-    EXPECT_TRUE(NULL!=interface0);
-    EXPECT_EQ("LayerInterface",interface0->getName());
-    EXPECT_EQ(NULL, interface0->getRoughness());
+    EXPECT_TRUE(nullptr!=interface0);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interface0->getName());
+    EXPECT_EQ(nullptr, interface0->getRoughness());
     EXPECT_EQ(layer0.getMaterial()->getName(), interface0->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer1.getMaterial()->getName(), interface0->getLayerBottom()->getMaterial()->getName());
 
     const LayerInterface * interface1 = mLayerClone->getLayerInterface(1);
-    EXPECT_TRUE(NULL!=interface1);
-    EXPECT_EQ("LayerInterface",interface1->getName());
-    EXPECT_EQ(NULL, interface1->getRoughness());
+    EXPECT_TRUE(nullptr!=interface1);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interface1->getName());
+    EXPECT_EQ(nullptr, interface1->getRoughness());
     EXPECT_EQ(layer1.getMaterial()->getName(), interface1->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer2.getMaterial()->getName(), interface1->getLayerBottom()->getMaterial()->getName());
 
     const LayerInterface * interface2 = mLayerClone->getLayerInterface(2);
-    EXPECT_TRUE(NULL!=interface2);
-    EXPECT_EQ("LayerInterface",interface2->getName());
-    EXPECT_EQ(NULL, interface2->getRoughness());
+    EXPECT_TRUE(nullptr!=interface2);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interface2->getName());
+    EXPECT_EQ(nullptr, interface2->getRoughness());
     EXPECT_EQ(layer2.getMaterial()->getName(), interface2->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer3.getMaterial()->getName(), interface2->getLayerBottom()->getMaterial()->getName());
 
     //top interface
     const LayerInterface * interfaceBottom = mLayerClone->getLayerTopInterface(1);
-    EXPECT_TRUE(NULL!=interfaceBottom);
-    EXPECT_EQ("LayerInterface",interfaceBottom->getName());
-    EXPECT_EQ(NULL, interfaceBottom->getRoughness());
+    EXPECT_TRUE(nullptr!=interfaceBottom);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interfaceBottom->getName());
+    EXPECT_EQ(nullptr, interfaceBottom->getRoughness());
     EXPECT_EQ(layer0.getMaterial()->getName(), interfaceBottom->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer1.getMaterial()->getName(), interfaceBottom->getLayerBottom()->getMaterial()->getName());
 
     //Bottom interface
     const LayerInterface * interfaceTop = mLayerClone->getLayerBottomInterface(2);
-    EXPECT_TRUE(NULL!=interfaceTop);
-    EXPECT_EQ("LayerInterface",interfaceTop->getName());
-    EXPECT_EQ(NULL, interfaceTop->getRoughness());
+    EXPECT_TRUE(nullptr!=interfaceTop);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interfaceTop->getName());
+    EXPECT_EQ(nullptr, interfaceTop->getRoughness());
     EXPECT_EQ(layer2.getMaterial()->getName(), interfaceTop->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer3.getMaterial()->getName(), interfaceTop->getLayerBottom()->getMaterial()->getName());
 
     //null interface
     const LayerInterface * interfaceTopNull = mLayerClone->getLayerTopInterface(0);
-    EXPECT_TRUE(NULL==interfaceTopNull);
+    EXPECT_TRUE(nullptr==interfaceTopNull);
 
     const LayerInterface * interfaceBottomNull = mLayerClone->getLayerBottomInterface(3);
-    EXPECT_TRUE(NULL==interfaceBottomNull);
+    EXPECT_TRUE(nullptr==interfaceBottomNull);
 
     delete mLayerClone;
 }
 
-
 TEST_F(MultiLayerTest, CloneInvertB)
 {
     MultiLayer mLayer;
@@ -329,7 +325,7 @@ TEST_F(MultiLayerTest, CloneInvertB)
     MultiLayer * mLayerClone = mLayer.cloneInvertB();
 
     //check properties
-    EXPECT_EQ("MultiLayer", mLayerClone->getName());
+    EXPECT_EQ(BornAgain::MultiLayerType, mLayerClone->getName());
     EXPECT_EQ(0.0,mLayerClone->getCrossCorrLength());
     EXPECT_EQ(size_t(4), mLayerClone->getNumberOfLayers());
     EXPECT_EQ(size_t(3), mLayerClone->getNumberOfInterfaces());
@@ -348,69 +344,69 @@ TEST_F(MultiLayerTest, CloneInvertB)
 
     //check individual layer
     const Layer * layerCopy0 = mLayerClone->getLayer(0);
-    EXPECT_EQ(layer0.getName()+"_inv", layerCopy0->getName());
+    EXPECT_EQ(layer0.getName(), layerCopy0->getName());
     EXPECT_EQ(layer0.getThickness(), layerCopy0->getThickness());
     EXPECT_EQ(layer0.getMaterial()->getName(), layerCopy0->getMaterial()->getName());
 
     const Layer * layerCopy1 = mLayerClone->getLayer(1);
-    EXPECT_EQ(layer1.getName()+"_inv", layerCopy1->getName());
+    EXPECT_EQ(layer1.getName(), layerCopy1->getName());
     EXPECT_EQ(layer1.getThickness(), layerCopy1->getThickness());
     EXPECT_EQ(layer1.getMaterial()->getName(), layerCopy1->getMaterial()->getName());
 
     const Layer * layerCopy2 = mLayerClone->getLayer(2);
-    EXPECT_EQ(layer2.getName()+"_inv", layerCopy2->getName());
+    EXPECT_EQ(layer2.getName(), layerCopy2->getName());
     EXPECT_EQ(layer2.getThickness(), layerCopy2->getThickness());
     EXPECT_EQ(layer2.getMaterial()->getName(), layerCopy2->getMaterial()->getName());
 
     const Layer * layerCopy3 = mLayerClone->getLayer(3);
-    EXPECT_EQ(layer3.getName()+"_inv", layerCopy3->getName());
+    EXPECT_EQ(layer3.getName(), layerCopy3->getName());
     EXPECT_EQ(layer3.getThickness(), layerCopy3->getThickness());
     EXPECT_EQ(layer3.getMaterial()->getName(), layerCopy3->getMaterial()->getName());
 
     //check interfaces
     const LayerInterface * interface0 = mLayerClone->getLayerInterface(0);
-    EXPECT_TRUE(NULL!=interface0);
-    EXPECT_EQ("LayerInterface",interface0->getName());
-    EXPECT_EQ(NULL, interface0->getRoughness());
+    EXPECT_TRUE(nullptr!=interface0);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interface0->getName());
+    EXPECT_EQ(nullptr, interface0->getRoughness());
     EXPECT_EQ(layer0.getMaterial()->getName(), interface0->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer1.getMaterial()->getName(), interface0->getLayerBottom()->getMaterial()->getName());
 
     const LayerInterface * interface1 = mLayerClone->getLayerInterface(1);
-    EXPECT_TRUE(NULL!=interface1);
-    EXPECT_EQ("LayerInterface",interface1->getName());
-    EXPECT_EQ(NULL, interface1->getRoughness());
+    EXPECT_TRUE(nullptr!=interface1);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interface1->getName());
+    EXPECT_EQ(nullptr, interface1->getRoughness());
     EXPECT_EQ(layer1.getMaterial()->getName(), interface1->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer2.getMaterial()->getName(), interface1->getLayerBottom()->getMaterial()->getName());
 
     const LayerInterface * interface2 = mLayerClone->getLayerInterface(2);
-    EXPECT_TRUE(NULL!=interface2);
-    EXPECT_EQ("LayerInterface",interface2->getName());
-    EXPECT_EQ(NULL, interface2->getRoughness());
+    EXPECT_TRUE(nullptr!=interface2);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interface2->getName());
+    EXPECT_EQ(nullptr, interface2->getRoughness());
     EXPECT_EQ(layer2.getMaterial()->getName(), interface2->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer3.getMaterial()->getName(), interface2->getLayerBottom()->getMaterial()->getName());
 
     //top interface
     const LayerInterface * interfaceBottom = mLayerClone->getLayerTopInterface(1);
-    EXPECT_TRUE(NULL!=interfaceBottom);
-    EXPECT_EQ("LayerInterface",interfaceBottom->getName());
-    EXPECT_EQ(NULL, interfaceBottom->getRoughness());
+    EXPECT_TRUE(nullptr!=interfaceBottom);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interfaceBottom->getName());
+    EXPECT_EQ(nullptr, interfaceBottom->getRoughness());
     EXPECT_EQ(layer0.getMaterial()->getName(), interfaceBottom->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer1.getMaterial()->getName(), interfaceBottom->getLayerBottom()->getMaterial()->getName());
 
     //Bottom interface
     const LayerInterface * interfaceTop = mLayerClone->getLayerBottomInterface(2);
-    EXPECT_TRUE(NULL!=interfaceTop);
-    EXPECT_EQ("LayerInterface",interfaceTop->getName());
-    EXPECT_EQ(NULL, interfaceTop->getRoughness());
+    EXPECT_TRUE(nullptr!=interfaceTop);
+    EXPECT_EQ(BornAgain::LayerInterfaceType, interfaceTop->getName());
+    EXPECT_EQ(nullptr, interfaceTop->getRoughness());
     EXPECT_EQ(layer2.getMaterial()->getName(), interfaceTop->getLayerTop()->getMaterial()->getName());
     EXPECT_EQ(layer3.getMaterial()->getName(), interfaceTop->getLayerBottom()->getMaterial()->getName());
 
     //null interface
     const LayerInterface * interfaceTopNull = mLayerClone->getLayerTopInterface(0);
-    EXPECT_TRUE(NULL==interfaceTopNull);
+    EXPECT_TRUE(nullptr==interfaceTopNull);
 
     const LayerInterface * interfaceBottomNull = mLayerClone->getLayerBottomInterface(3);
-    EXPECT_TRUE(NULL==interfaceBottomNull);
+    EXPECT_TRUE(nullptr==interfaceBottomNull);
 
     delete mLayerClone;
 }
@@ -440,14 +436,13 @@ TEST_F(MultiLayerTest, WithRoughness)
     const LayerRoughness * roughness1 = interface1->getRoughness();
 
     EXPECT_TRUE(roughness0);
-    EXPECT_EQ(NULL, roughness1);
+    EXPECT_EQ(nullptr, roughness1);
 
     EXPECT_EQ(1.1, roughness0->getSigma());
     EXPECT_EQ(-7.3, roughness0->getHurstParameter());
     EXPECT_EQ(0.1, roughness0->getLatteralCorrLength());
 }
 
-
 TEST_F(MultiLayerTest, CloneWithRoughness)
 {
     MultiLayer mLayer;
@@ -489,7 +484,6 @@ TEST_F(MultiLayerTest, CloneWithRoughness)
     delete mLayerClone;
 }
 
-
 TEST_F(MultiLayerTest, CloneInvertBWithRoughness)
 {
     MultiLayer mLayer;
@@ -556,7 +550,6 @@ TEST_F(MultiLayerTest, WithMagneticMaterial)
     EXPECT_TRUE(mLayer.containsMagneticMaterial());
 }
 
-
 TEST_F(MultiLayerTest, CloneWithMagneticMaterial)
 {
     MultiLayer mLayer;
@@ -578,7 +571,6 @@ TEST_F(MultiLayerTest, CloneWithMagneticMaterial)
     delete mLayerClone;
 }
 
-
 TEST_F(MultiLayerTest, CloneInvertBMagneticMaterial)
 {
     MultiLayer mLayer;
@@ -601,7 +593,6 @@ TEST_F(MultiLayerTest, CloneInvertBMagneticMaterial)
     delete mLayerClone;
 }
 
-
 TEST_F(MultiLayerTest, MultiLayerCompositeTest)
 {
     MultiLayer mLayer;
@@ -635,11 +626,11 @@ TEST_F(MultiLayerTest, MultiLayerCompositeTest)
         if(counter%2 == 1)
         {
             LayerInterface *interface = dynamic_cast<LayerInterface *>(sample);
-            EXPECT_TRUE(NULL != interface);
+            EXPECT_TRUE(nullptr != interface);
             interface_buffer.push_back(interface);
         } else {
             Layer *layer = dynamic_cast<Layer *>(sample);
-            EXPECT_TRUE(NULL != layer);
+            EXPECT_TRUE(nullptr != layer);
             layer_buffer.push_back(layer);
         }
         counter++;
@@ -652,24 +643,18 @@ TEST_F(MultiLayerTest, MultiLayerCompositeTest)
     for(size_t i=0; i<interface_buffer.size(); ++i) {
         EXPECT_EQ( double((i+1)*10), interface_buffer[i]->getLayerBottom()->getThickness());
     }
-
 }
 
 /*
-
 index_0
 -----------------  0.0
 index_1
 -----------------  -10.0
 index_2
-
 -----------------  -30.0
 index_3
-
-
 -----------------  -60.0
 index_4
-
 */
 
 TEST_F(MultiLayerTest, MultiLayerZtoIndex)
@@ -698,8 +683,6 @@ TEST_F(MultiLayerTest, MultiLayerZtoIndex)
     EXPECT_EQ(3, multilayer.zToLayerIndex(-31.0));
     EXPECT_EQ(3, multilayer.zToLayerIndex(-60.0));
     EXPECT_EQ(4, multilayer.zToLayerIndex(-61.0));
-
 }
 
-
 #endif
diff --git a/Tests/UnitTests/TestCore/ParticleLayoutTest.h b/Tests/UnitTests/TestCore/ParticleLayoutTest.h
index 50f0368f139e9cc74d62a3be8695e6fdd52c8420..61d3ac3e39df4344c585f38297d5771fdc2181c6 100644
--- a/Tests/UnitTests/TestCore/ParticleLayoutTest.h
+++ b/Tests/UnitTests/TestCore/ParticleLayoutTest.h
@@ -8,58 +8,51 @@ class ParticleLayoutTest : public :: testing :: Test {
 
 protected:
     ParticleLayoutTest(){}
-    virtual ~ParticleLayoutTest(){}
-
 };
 
-
 TEST_F(ParticleLayoutTest, ParticleLayoutInitial)
 {
     ParticleLayout particleDecoration;
 
-    EXPECT_EQ("ParticleLayout", particleDecoration.getName());
+    EXPECT_EQ(BornAgain::ParticleLayoutType, particleDecoration.getName());
     EXPECT_EQ(size_t(0), particleDecoration.getNumberOfParticles());
     EXPECT_EQ(size_t(0), particleDecoration.getNumberOfInterferenceFunctions());
 }
 
-
 TEST_F(ParticleLayoutTest, ParticleLayoutInitByValue)
 {
     Particle particle;
 
     ParticleLayout particleDecoration(particle, 2.0);
 
-    EXPECT_EQ("ParticleLayout", particleDecoration.getName());
+    EXPECT_EQ(BornAgain::ParticleLayoutType, particleDecoration.getName());
     EXPECT_EQ(size_t(1), particleDecoration.getNumberOfParticles());
     EXPECT_EQ(size_t(0), particleDecoration.getNumberOfInterferenceFunctions());
 
 
     const IAbstractParticle * p_particle = particleDecoration.getParticle(size_t(0));
-    EXPECT_TRUE(NULL!=p_particle);
+    EXPECT_TRUE(nullptr!=p_particle);
     EXPECT_EQ(2.0, particleDecoration.getAbundanceOfParticle(size_t(0)));
 
     EXPECT_EQ(size_t(0), particleDecoration.getNumberOfInterferenceFunctions());
-
 }
 
-
 TEST_F(ParticleLayoutTest, ParticleLayoutInitByRef)
 {
     Particle particle;
 
     ParticleLayout particleDecoration(particle, -2.0);
 
-    EXPECT_EQ("ParticleLayout", particleDecoration.getName());
+    EXPECT_EQ(BornAgain::ParticleLayoutType, particleDecoration.getName());
     EXPECT_EQ(size_t(1), particleDecoration.getNumberOfParticles());
     EXPECT_EQ(size_t(0), particleDecoration.getNumberOfInterferenceFunctions());
 
 
     const IAbstractParticle * p_particle = particleDecoration.getParticle(size_t(0));
-    EXPECT_TRUE(NULL!=p_particle);
+    EXPECT_TRUE(nullptr!=p_particle);
     EXPECT_EQ(-2.0, particleDecoration.getAbundanceOfParticle(size_t(0)));
 }
 
-
 TEST_F(ParticleLayoutTest, ParticleLayoutAddParticleInfo)
 {
     ParticleLayout particleDecoration;
@@ -75,15 +68,14 @@ TEST_F(ParticleLayoutTest, ParticleLayoutAddParticleInfo)
     EXPECT_EQ(size_t(2), particleDecoration.getNumberOfParticles());
 
     const IAbstractParticle * p_particle = particleDecoration.getParticle(size_t(0));
-    EXPECT_TRUE(NULL!=p_particle);
+    EXPECT_TRUE(nullptr!=p_particle);
     EXPECT_EQ(-2.0, particleDecoration.getAbundanceOfParticle(size_t(0)));
 
     const IAbstractParticle * p_particle2 = particleDecoration.getParticle(size_t(1));
-    EXPECT_TRUE(NULL!=p_particle2);
+    EXPECT_TRUE(nullptr!=p_particle2);
     EXPECT_EQ(0.1, particleDecoration.getAbundanceOfParticle(size_t(1)));
 }
 
-
 TEST_F(ParticleLayoutTest, ParticleLayoutAddParticle)
 {
     ParticleLayout particleDecoration;
@@ -104,23 +96,22 @@ TEST_F(ParticleLayoutTest, ParticleLayoutAddParticle)
     EXPECT_EQ(size_t(4), particleDecoration.getNumberOfParticles());
 
     const IAbstractParticle * p_particle1 = particleDecoration.getParticle(size_t(0));
-    EXPECT_TRUE(NULL!=p_particle1);
+    EXPECT_TRUE(nullptr!=p_particle1);
     EXPECT_EQ(1.0, particleDecoration.getAbundanceOfParticle(size_t(0)));
 
     const IAbstractParticle * p_particle2 = particleDecoration.getParticle(size_t(1));
-    EXPECT_TRUE(NULL!=p_particle2);
+    EXPECT_TRUE(nullptr!=p_particle2);
     EXPECT_EQ(2.2, particleDecoration.getAbundanceOfParticle(size_t(1)));
 
     const IAbstractParticle * p_particle3 = particleDecoration.getParticle(size_t(2));
-    EXPECT_TRUE(NULL!=p_particle3);
+    EXPECT_TRUE(nullptr!=p_particle3);
     EXPECT_EQ(1.0, particleDecoration.getAbundanceOfParticle(size_t(2)));
 
     const IAbstractParticle * p_particle4 = particleDecoration.getParticle(size_t(3));
-    EXPECT_TRUE(NULL!=p_particle4);
+    EXPECT_TRUE(nullptr!=p_particle4);
     EXPECT_EQ(-4.2, particleDecoration.getAbundanceOfParticle(size_t(3)));
 }
 
-
 TEST_F(ParticleLayoutTest, ParticleLayoutAbundanceFraction)
 {
     ParticleLayout particleDecoration;
@@ -146,7 +137,6 @@ TEST_F(ParticleLayoutTest, ParticleLayoutAbundanceFraction)
     EXPECT_EQ(4.0, particleDecoration.getAbundanceOfParticle(size_t(3)));
 }
 
-
 TEST_F(ParticleLayoutTest, ParticleLayoutClone)
 {
     ParticleLayout particleDecoration;
@@ -174,36 +164,35 @@ TEST_F(ParticleLayoutTest, ParticleLayoutClone)
 
     ParticleLayout * clone = particleDecoration.clone();
 
-    EXPECT_EQ("ParticleLayout", clone->getName());
+    EXPECT_EQ(BornAgain::ParticleLayoutType, clone->getName());
 
     const IAbstractParticle * p_particle1 = clone->getParticle(size_t(0));
-    EXPECT_TRUE(NULL!=p_particle1);
+    EXPECT_TRUE(nullptr!=p_particle1);
     EXPECT_EQ(1.0, particleDecoration.getAbundanceOfParticle(size_t(0)));
 
     const IAbstractParticle * p_particle2 = clone->getParticle(size_t(1));
-    EXPECT_TRUE(NULL!=p_particle2);
+    EXPECT_TRUE(nullptr!=p_particle2);
     EXPECT_EQ(2.0, particleDecoration.getAbundanceOfParticle(size_t(1)));
 
     const IAbstractParticle * p_particle3 = clone->getParticle(size_t(2));
-    EXPECT_TRUE(NULL!=p_particle3);
+    EXPECT_TRUE(nullptr!=p_particle3);
     EXPECT_EQ(1.0, particleDecoration.getAbundanceOfParticle(size_t(2)));
 
     const IAbstractParticle * p_particle4 = clone->getParticle(size_t(3));
-    EXPECT_TRUE(NULL!=p_particle4);
+    EXPECT_TRUE(nullptr!=p_particle4);
     EXPECT_EQ(4.0, particleDecoration.getAbundanceOfParticle(size_t(3)));
 
     const IAbstractParticle * p_particle5 = clone->getParticle(size_t(4));
-    EXPECT_TRUE(NULL!=p_particle5);
+    EXPECT_TRUE(nullptr!=p_particle5);
     EXPECT_EQ(0.0, particleDecoration.getAbundanceOfParticle(size_t(4)));
 
     EXPECT_EQ(size_t(3), clone->getNumberOfInterferenceFunctions());
     EXPECT_EQ(size_t(3), clone->getInterferenceFunctions().size());
-    EXPECT_TRUE(NULL!=clone->getInterferenceFunction(size_t(0)));
-    EXPECT_TRUE(NULL!=clone->getInterferenceFunction(size_t(1)));
-    EXPECT_TRUE(NULL!=clone->getInterferenceFunction(size_t(2)));
+    EXPECT_TRUE(nullptr!=clone->getInterferenceFunction(size_t(0)));
+    EXPECT_TRUE(nullptr!=clone->getInterferenceFunction(size_t(1)));
+    EXPECT_TRUE(nullptr!=clone->getInterferenceFunction(size_t(2)));
 }
 
-
 TEST_F(ParticleLayoutTest, ParticleLayoutCloneInvertB)
 {
     ParticleLayout particleDecoration;
@@ -239,36 +228,35 @@ TEST_F(ParticleLayoutTest, ParticleLayoutCloneInvertB)
 
     ParticleLayout * clone = particleDecoration.cloneInvertB();
 
-    EXPECT_EQ("ParticleLayout_inv", clone->getName());
+    EXPECT_EQ(BornAgain::ParticleLayoutType, clone->getName());
 
     const IAbstractParticle * p_particle1 = clone->getParticle(size_t(0));
-    EXPECT_TRUE(NULL!=p_particle1);
+    EXPECT_TRUE(nullptr!=p_particle1);
     EXPECT_EQ(1.0, particleDecoration.getAbundanceOfParticle(size_t(0)));
 
     const IAbstractParticle * p_particle2 = clone->getParticle(size_t(1));
-    EXPECT_TRUE(NULL!=p_particle2);
+    EXPECT_TRUE(nullptr!=p_particle2);
     EXPECT_EQ(2.0, particleDecoration.getAbundanceOfParticle(size_t(1)));
 
     const IAbstractParticle * p_particle3 = clone->getParticle(size_t(2));
-    EXPECT_TRUE(NULL!=p_particle3);
+    EXPECT_TRUE(nullptr!=p_particle3);
     EXPECT_EQ(1.0, particleDecoration.getAbundanceOfParticle(size_t(2)));
 
     const IAbstractParticle * p_particle4 = clone->getParticle(size_t(3));
-    EXPECT_TRUE(NULL!=p_particle4);
+    EXPECT_TRUE(nullptr!=p_particle4);
     EXPECT_EQ(4.0, particleDecoration.getAbundanceOfParticle(size_t(3)));
 
     const IAbstractParticle * p_particle5 = clone->getParticle(size_t(4));
-    EXPECT_TRUE(NULL!=p_particle5);
+    EXPECT_TRUE(nullptr!=p_particle5);
     EXPECT_EQ(0.0, particleDecoration.getAbundanceOfParticle(size_t(4)));
 
     EXPECT_EQ(size_t(3), clone->getNumberOfInterferenceFunctions());
     EXPECT_EQ(size_t(3), clone->getInterferenceFunctions().size());
-    EXPECT_TRUE(NULL!=clone->getInterferenceFunction(size_t(0)));
-    EXPECT_TRUE(NULL!=clone->getInterferenceFunction(size_t(1)));
-    EXPECT_TRUE(NULL!=clone->getInterferenceFunction(size_t(2)));
+    EXPECT_TRUE(nullptr!=clone->getInterferenceFunction(size_t(0)));
+    EXPECT_TRUE(nullptr!=clone->getInterferenceFunction(size_t(1)));
+    EXPECT_TRUE(nullptr!=clone->getInterferenceFunction(size_t(2)));
 }
 
-
 TEST_F(ParticleLayoutTest, ParticleLayoutInterferenceFunction)
 {
     ParticleLayout particleDecoration;
@@ -279,10 +267,9 @@ TEST_F(ParticleLayoutTest, ParticleLayoutInterferenceFunction)
 
     EXPECT_EQ(size_t(3), particleDecoration.getNumberOfInterferenceFunctions());
     EXPECT_EQ(size_t(3), particleDecoration.getInterferenceFunctions().size());
-    EXPECT_TRUE(NULL!=particleDecoration.getInterferenceFunction(size_t(0)));
-    EXPECT_TRUE(NULL!=particleDecoration.getInterferenceFunction(size_t(1)));
-    EXPECT_TRUE(NULL!=particleDecoration.getInterferenceFunction(size_t(2)));
+    EXPECT_TRUE(nullptr!=particleDecoration.getInterferenceFunction(size_t(0)));
+    EXPECT_TRUE(nullptr!=particleDecoration.getInterferenceFunction(size_t(1)));
+    EXPECT_TRUE(nullptr!=particleDecoration.getInterferenceFunction(size_t(2)));
 }
 
-
 #endif // PARTICLELAYOUTTEST_H
diff --git a/Tests/UnitTests/TestCore/ScalarSpecularInfoMapTest.h b/Tests/UnitTests/TestCore/ScalarSpecularInfoMapTest.h
index 7ac36fc12361305608202bffc58de53b6bba2409..c8b2ecdcb15c0fb8f1247566ee164bbb30ef4663 100644
--- a/Tests/UnitTests/TestCore/ScalarSpecularInfoMapTest.h
+++ b/Tests/UnitTests/TestCore/ScalarSpecularInfoMapTest.h
@@ -41,7 +41,7 @@ TEST_F(ScalarSpecularInfoMapTest, getCoefficients)
                 map.getOutCoefficients(1.0, 1.0, 2.0*Units::PI));
     complex_t R0 = complex_t(0.1750375, -0.0222467);
     complex_t lambda0 = complex_t(0.841471, 0.0);
-    EXPECT_TRUE(NULL != P_rt_coeffs.get());
+    EXPECT_TRUE(nullptr != P_rt_coeffs.get());
 
     EXPECT_EQ(0.0, P_rt_coeffs->T1plus()(0));
     EXPECT_EQ(0.0, P_rt_coeffs->T1plus()(1));
diff --git a/Tests/UnitTests/TestCore/SpecularSimulationTest.h b/Tests/UnitTests/TestCore/SpecularSimulationTest.h
index d277749567651b0050edb7b8f4bddab0c5a59b78..40c9f48481ab6205af7cf689c81e7e1d7ff3edaf 100644
--- a/Tests/UnitTests/TestCore/SpecularSimulationTest.h
+++ b/Tests/UnitTests/TestCore/SpecularSimulationTest.h
@@ -44,9 +44,9 @@ TEST_F(SpecularSimulationTest, InitialState)
 {
     SpecularSimulation sim;
     ASSERT_THROW( sim.runSimulation(), Exceptions::ClassInitializationException);
-    EXPECT_EQ(NULL, sim.getAlphaAxis());
-    EXPECT_EQ(NULL, sim.getSample());
-    EXPECT_EQ(NULL, sim.getSampleBuilder().get());
+    EXPECT_EQ(nullptr, sim.getAlphaAxis());
+    EXPECT_EQ(nullptr, sim.getSample());
+    EXPECT_EQ(nullptr, sim.getSampleBuilder().get());
     ASSERT_THROW( sim.getScalarR(0), Exceptions::ClassInitializationException);
     ASSERT_THROW( sim.getScalarT(0), Exceptions::ClassInitializationException);
     ASSERT_THROW( sim.getScalarKz(0), Exceptions::ClassInitializationException);
@@ -58,9 +58,9 @@ TEST_F(SpecularSimulationTest, CloneOfEmpty)
 
     SpecularSimulation *clone = sim.clone();
     ASSERT_THROW( clone->runSimulation(), Exceptions::ClassInitializationException);
-    EXPECT_EQ(NULL, clone->getAlphaAxis());
-    EXPECT_EQ(NULL, clone->getSample());
-    EXPECT_EQ(NULL, clone->getSampleBuilder().get());
+    EXPECT_EQ(nullptr, clone->getAlphaAxis());
+    EXPECT_EQ(nullptr, clone->getSample());
+    EXPECT_EQ(nullptr, clone->getSampleBuilder().get());
     ASSERT_THROW( clone->getScalarR(0), Exceptions::ClassInitializationException);
     ASSERT_THROW( clone->getScalarT(0), Exceptions::ClassInitializationException);
     ASSERT_THROW( clone->getScalarKz(0), Exceptions::ClassInitializationException);