diff --git a/Base/Axis/IAxis.h b/Base/Axis/IAxis.h
index f4ba5bf2186e587853d7130b6ff48dac95409ff3..dc2ea39316e6626d62e3df51e971499c550af785 100644
--- a/Base/Axis/IAxis.h
+++ b/Base/Axis/IAxis.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_BASE_AXIS_IAXIS_H
 #define BORNAGAIN_BASE_AXIS_IAXIS_H
 
@@ -100,3 +101,4 @@ inline bool HaveSameNameAndShape(const IAxis& left, const IAxis& right) {
 }
 
 #endif // BORNAGAIN_BASE_AXIS_IAXIS_H
+#endif // USER_API
diff --git a/Base/Pixel/IPixel.h b/Base/Pixel/IPixel.h
index b5bcb66b90affddc363cea42d3c765959d6cb851..53b1c8c7678a94a25d5df390eec7223fc15f940f 100644
--- a/Base/Pixel/IPixel.h
+++ b/Base/Pixel/IPixel.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_BASE_PIXEL_IPIXEL_H
 #define BORNAGAIN_BASE_PIXEL_IPIXEL_H
 
@@ -33,3 +34,4 @@ public:
 };
 
 #endif // BORNAGAIN_BASE_PIXEL_IPIXEL_H
+#endif // USER_API
diff --git a/Base/Types/ICloneable.h b/Base/Types/ICloneable.h
index 825a117feb02e30331d98d71412c515fa57087a1..e11a528ca1325a69ef36ae651d5818c8881ed284 100644
--- a/Base/Types/ICloneable.h
+++ b/Base/Types/ICloneable.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_BASE_TYPES_ICLONEABLE_H
 #define BORNAGAIN_BASE_TYPES_ICLONEABLE_H
 
@@ -34,3 +35,4 @@ public:
 };
 
 #endif // BORNAGAIN_BASE_TYPES_ICLONEABLE_H
+#endif // USER_API
diff --git a/Base/Utils/IFactory.h b/Base/Utils/IFactory.h
index eddb30bdc91bc8024bc8b08316c8a201a207bc23..d10c93076ca2243e95b6a051f5f0b6de228a63e4 100644
--- a/Base/Utils/IFactory.h
+++ b/Base/Utils/IFactory.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_BASE_UTILS_IFACTORY_H
 #define BORNAGAIN_BASE_UTILS_IFACTORY_H
 
@@ -74,3 +75,4 @@ template <class T> T* create_new() {
 }
 
 #endif // BORNAGAIN_BASE_UTILS_IFACTORY_H
+#endif // USER_API
diff --git a/Core/Computation/IBackground.h b/Core/Computation/IBackground.h
index 1a932bfd16dea9da6a328602e458399dfda8ba49..73e2f88ea6fa8731cbc3da26be9f719ac9de04e0 100644
--- a/Core/Computation/IBackground.h
+++ b/Core/Computation/IBackground.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_CORE_COMPUTATION_IBACKGROUND_H
 #define BORNAGAIN_CORE_COMPUTATION_IBACKGROUND_H
 
@@ -32,3 +33,4 @@ public:
 };
 
 #endif // BORNAGAIN_CORE_COMPUTATION_IBACKGROUND_H
+#endif // USER_API
diff --git a/Core/Residual/IChiSquaredModule.h b/Core/Residual/IChiSquaredModule.h
index 4c3e0df12aa8e4bada96ea46fce9a62b7cf7ca70..7beda9b879e4c05250320458813b8ad4a3ca48e3 100644
--- a/Core/Residual/IChiSquaredModule.h
+++ b/Core/Residual/IChiSquaredModule.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_DEVICE_INSTRUMENT_ICHISQUAREDMODULE_H
 #define BORNAGAIN_DEVICE_INSTRUMENT_ICHISQUAREDMODULE_H
 
@@ -54,3 +55,4 @@ protected:
 };
 
 #endif // BORNAGAIN_DEVICE_INSTRUMENT_ICHISQUAREDMODULE_H
+#endif // USER_API
diff --git a/Core/Residual/IIntensityFunction.h b/Core/Residual/IIntensityFunction.h
index b025b882f9af413a40061af2d57a8374f26f0e10..4fbe8077738249d2f38527821b58c6877007bd0a 100644
--- a/Core/Residual/IIntensityFunction.h
+++ b/Core/Residual/IIntensityFunction.h
@@ -13,6 +13,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_DEVICE_INTENSITY_IINTENSITYFUNCTION_H
 #define BORNAGAIN_DEVICE_INTENSITY_IINTENSITYFUNCTION_H
 
@@ -45,3 +46,4 @@ public:
 };
 
 #endif // BORNAGAIN_DEVICE_INTENSITY_IINTENSITYFUNCTION_H
+#endif // USER_API
diff --git a/Core/Scan/ISpecularScan.h b/Core/Scan/ISpecularScan.h
index c3b0fe4971ed9bf3a2859bc3ce4b52f0e237418d..24e01d65517a3ddccf207be95ee4dc6ee2f37468 100644
--- a/Core/Scan/ISpecularScan.h
+++ b/Core/Scan/ISpecularScan.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_CORE_SCAN_ISPECULARSCAN_H
 #define BORNAGAIN_CORE_SCAN_ISPECULARSCAN_H
 
@@ -58,3 +59,4 @@ public:
 };
 
 #endif // BORNAGAIN_CORE_SCAN_ISPECULARSCAN_H
+#endif // USER_API
diff --git a/Core/Simulation/ISimulation.h b/Core/Simulation/ISimulation.h
index f88b535bbb2c4a6321f4a1a7bf0a900d38af4085..89d9ea501524ff60eb8f0a5c62f05238cf5d35da 100644
--- a/Core/Simulation/ISimulation.h
+++ b/Core/Simulation/ISimulation.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_CORE_SIMULATION_ISIMULATION_H
 #define BORNAGAIN_CORE_SIMULATION_ISIMULATION_H
 
@@ -158,3 +159,4 @@ private:
 };
 
 #endif // BORNAGAIN_CORE_SIMULATION_ISIMULATION_H
+#endif // USER_API
diff --git a/Core/Simulation/ISimulation2D.h b/Core/Simulation/ISimulation2D.h
index e97dfa2369d66ebba3e7ad427020e7d36b3e58e6..2c04c936e76729422719c040de25bf0a58a902c0 100644
--- a/Core/Simulation/ISimulation2D.h
+++ b/Core/Simulation/ISimulation2D.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_CORE_SIMULATION_ISIMULATION2D_H
 #define BORNAGAIN_CORE_SIMULATION_ISIMULATION2D_H
 
@@ -98,3 +99,4 @@ private:
 };
 
 #endif // BORNAGAIN_CORE_SIMULATION_ISIMULATION2D_H
+#endif // USER_API
diff --git a/Device/Beam/IFootprintFactor.h b/Device/Beam/IFootprintFactor.h
index 6196537593f678c2bf5710cf3b1589cddc679453..8e7741039ae5619e3a702a233deab68059935cf2 100644
--- a/Device/Beam/IFootprintFactor.h
+++ b/Device/Beam/IFootprintFactor.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_DEVICE_BEAM_IFOOTPRINTFACTOR_H
 #define BORNAGAIN_DEVICE_BEAM_IFOOTPRINTFACTOR_H
 
@@ -48,3 +49,4 @@ private:
 };
 
 #endif // BORNAGAIN_DEVICE_BEAM_IFOOTPRINTFACTOR_H
+#endif // USER_API
diff --git a/Device/Detector/IDetector.h b/Device/Detector/IDetector.h
index d7cb234e595f6db65a70eadd996c1dfd3a8374d5..40594deb0ca4a651f17d0332a9bddc1dd3cf735f 100644
--- a/Device/Detector/IDetector.h
+++ b/Device/Detector/IDetector.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_DEVICE_DETECTOR_IDETECTOR_H
 #define BORNAGAIN_DEVICE_DETECTOR_IDETECTOR_H
 
@@ -116,3 +117,4 @@ private:
 };
 
 #endif // BORNAGAIN_DEVICE_DETECTOR_IDETECTOR_H
+#endif // USER_API
diff --git a/Device/Detector/IDetector2D.h b/Device/Detector/IDetector2D.h
index b6863a731de988b359a02191972560cbfdf14ea2..1f3e769ab38de972efb94d409d5f7126d354979b 100644
--- a/Device/Detector/IDetector2D.h
+++ b/Device/Detector/IDetector2D.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_DEVICE_DETECTOR_IDETECTOR2D_H
 #define BORNAGAIN_DEVICE_DETECTOR_IDETECTOR2D_H
 
@@ -87,3 +88,4 @@ private:
 };
 
 #endif // BORNAGAIN_DEVICE_DETECTOR_IDETECTOR2D_H
+#endif // USER_API
diff --git a/Device/Histo/IHistogram.h b/Device/Histo/IHistogram.h
index 373039e8b6d3c976ee0e70e8a21cdf36da0522ae..d941c42183e7d1eee7487abcfd74d66a869a87f5 100644
--- a/Device/Histo/IHistogram.h
+++ b/Device/Histo/IHistogram.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_DEVICE_HISTO_IHISTOGRAM_H
 #define BORNAGAIN_DEVICE_HISTO_IHISTOGRAM_H
 
@@ -193,3 +194,4 @@ protected:
 };
 
 #endif // BORNAGAIN_DEVICE_HISTO_IHISTOGRAM_H
+#endif // USER_API
diff --git a/Device/Mask/IShape2D.h b/Device/Mask/IShape2D.h
index 282648bf736f08c9c29036f9ebf62a0da87e818f..319064c1429b7e41822341c836dcf1a97619fb3c 100644
--- a/Device/Mask/IShape2D.h
+++ b/Device/Mask/IShape2D.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_DEVICE_MASK_ISHAPE2D_H
 #define BORNAGAIN_DEVICE_MASK_ISHAPE2D_H
 
@@ -48,3 +49,4 @@ private:
 };
 
 #endif // BORNAGAIN_DEVICE_MASK_ISHAPE2D_H
+#endif // USER_API
diff --git a/Device/Resolution/IDetectorResolution.h b/Device/Resolution/IDetectorResolution.h
index 2159167891a1e8300dee089f6625e753834adc81..8552b761b0d66dc99bf4131816f2ba0402c023cf 100644
--- a/Device/Resolution/IDetectorResolution.h
+++ b/Device/Resolution/IDetectorResolution.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_DEVICE_RESOLUTION_IDETECTORRESOLUTION_H
 #define BORNAGAIN_DEVICE_RESOLUTION_IDETECTORRESOLUTION_H
 
@@ -35,3 +36,4 @@ public:
 };
 
 #endif // BORNAGAIN_DEVICE_RESOLUTION_IDETECTORRESOLUTION_H
+#endif // USER_API
diff --git a/Device/Resolution/IResolutionFunction2D.h b/Device/Resolution/IResolutionFunction2D.h
index 32f2b4d0ef3b3681a4a96ece5988aba567deff89..e61f1f05d56121418c9879a4e014f7dbb54a9e65 100644
--- a/Device/Resolution/IResolutionFunction2D.h
+++ b/Device/Resolution/IResolutionFunction2D.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_DEVICE_RESOLUTION_IRESOLUTIONFUNCTION2D_H
 #define BORNAGAIN_DEVICE_RESOLUTION_IRESOLUTIONFUNCTION2D_H
 
@@ -33,3 +34,4 @@ public:
 };
 
 #endif // BORNAGAIN_DEVICE_RESOLUTION_IRESOLUTIONFUNCTION2D_H
+#endif // USER_API
diff --git a/Param/Base/IComponent.h b/Param/Base/IComponent.h
index 6a7ad257346d659bd942c8143ad44dabcf6a2e50..4ab5e70c653845abce08940f58a548863b1cd42c 100644
--- a/Param/Base/IComponent.h
+++ b/Param/Base/IComponent.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_PARAM_BASE_ICOMPONENT_H
 #define BORNAGAIN_PARAM_BASE_ICOMPONENT_H
 
@@ -23,3 +24,4 @@ public:
 };
 
 #endif // BORNAGAIN_PARAM_BASE_ICOMPONENT_H
+#endif // USER_API
diff --git a/Param/Base/IParameter.h b/Param/Base/IParameter.h
index 59b09db18cab03f2aee808b9a3ceaf55315a5202..289ef88824a9365a870dd7c060bba6db065ec0d5 100644
--- a/Param/Base/IParameter.h
+++ b/Param/Base/IParameter.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_PARAM_BASE_IPARAMETER_H
 #define BORNAGAIN_PARAM_BASE_IPARAMETER_H
 
@@ -71,3 +72,4 @@ template <class T> bool IParameter<T>::hasSameData(const IParameter<T>& other) {
 }
 
 #endif // BORNAGAIN_PARAM_BASE_IPARAMETER_H
+#endif // USER_API
diff --git a/Param/Base/IParametricComponent.h b/Param/Base/IParametricComponent.h
index 6e8be06d038e005af022085f22bbb87cd0ad35e6..3b551706e1f065f16caae39ea98337538ea02b90 100644
--- a/Param/Base/IParametricComponent.h
+++ b/Param/Base/IParametricComponent.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_PARAM_BASE_IPARAMETRICCOMPONENT_H
 #define BORNAGAIN_PARAM_BASE_IPARAMETRICCOMPONENT_H
 
@@ -74,3 +75,4 @@ private:
 };
 
 #endif // BORNAGAIN_PARAM_BASE_IPARAMETRICCOMPONENT_H
+#endif // USER_API
diff --git a/Param/Node/INode.h b/Param/Node/INode.h
index cf85f9d5434d671eb88f7629afa0056ff32c32e3..b8113b2129bf891d3bf74dbe0782129944ff8c36 100644
--- a/Param/Node/INode.h
+++ b/Param/Node/INode.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_PARAM_NODE_INODE_H
 #define BORNAGAIN_PARAM_NODE_INODE_H
 
@@ -128,3 +129,4 @@ inline std::vector<const INode*>& operator<<(std::vector<const INode*>&& v_node,
 }
 
 #endif // BORNAGAIN_PARAM_NODE_INODE_H
+#endif // USER_API
diff --git a/Param/Node/INodeVisitor.h b/Param/Node/INodeVisitor.h
index 72146de4c769662439dfae95a22e31164e8dfb20..310cbaafcd8a1a62ea95fe210fb0153bb5db3d9c 100644
--- a/Param/Node/INodeVisitor.h
+++ b/Param/Node/INodeVisitor.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_PARAM_NODE_INODEVISITOR_H
 #define BORNAGAIN_PARAM_NODE_INODEVISITOR_H
 
@@ -280,3 +281,4 @@ private:
 };
 
 #endif // BORNAGAIN_PARAM_NODE_INODEVISITOR_H
+#endif // USER_API
diff --git a/Sample/Aggregate/IInterferenceFunction.h b/Sample/Aggregate/IInterferenceFunction.h
index 5571ed969a49737706d4231524ca8fe82df26b09..4ac2a77190f7790b615ca408b9357da061bd2da4 100644
--- a/Sample/Aggregate/IInterferenceFunction.h
+++ b/Sample/Aggregate/IInterferenceFunction.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_AGGREGATE_IINTERFERENCEFUNCTION_H
 #define BORNAGAIN_SAMPLE_AGGREGATE_IINTERFERENCEFUNCTION_H
 
@@ -58,3 +59,4 @@ protected:
 };
 
 #endif // BORNAGAIN_SAMPLE_AGGREGATE_IINTERFERENCEFUNCTION_H
+#endif // USER_API
diff --git a/Sample/Correlations/IPeakShape.h b/Sample/Correlations/IPeakShape.h
index c7883472151b42637408ce8978464431a8673be7..e835d301efe0b00011e64d0928a472f3ffb37dd3 100644
--- a/Sample/Correlations/IPeakShape.h
+++ b/Sample/Correlations/IPeakShape.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_CORRELATIONS_IPEAKSHAPE_H
 #define BORNAGAIN_SAMPLE_CORRELATIONS_IPEAKSHAPE_H
 
@@ -187,3 +188,4 @@ private:
 };
 
 #endif // BORNAGAIN_SAMPLE_CORRELATIONS_IPEAKSHAPE_H
+#endif // USER_API
diff --git a/Sample/HardParticle/IFormFactorPolyhedron.h b/Sample/HardParticle/IFormFactorPolyhedron.h
index 9ac8dc0c94cf6daec31a486a232d104682c67a40..cee435daf89cd538384095f88b2c40be8c1f8050 100644
--- a/Sample/HardParticle/IFormFactorPolyhedron.h
+++ b/Sample/HardParticle/IFormFactorPolyhedron.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPOLYHEDRON_H
 #define BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPOLYHEDRON_H
 
@@ -52,3 +53,4 @@ private:
 };
 
 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPOLYHEDRON_H
+#endif // USER_API
diff --git a/Sample/HardParticle/IFormFactorPrism.h b/Sample/HardParticle/IFormFactorPrism.h
index 701fb7d0f234551bf7ef306955e2b8871a07a619..715ea431f971c950050f783f32bdaf70929439be 100644
--- a/Sample/HardParticle/IFormFactorPrism.h
+++ b/Sample/HardParticle/IFormFactorPrism.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPRISM_H
 #define BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPRISM_H
 
@@ -44,3 +45,4 @@ private:
 };
 
 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_IFORMFACTORPRISM_H
+#endif // USER_API
diff --git a/Sample/HardParticle/IProfileRipple.h b/Sample/HardParticle/IProfileRipple.h
index 26f6e09c59f84e7ffb478f82fb180589ce85da68..d69d71d217eb3243f7f488b274787474522e5d87 100644
--- a/Sample/HardParticle/IProfileRipple.h
+++ b/Sample/HardParticle/IProfileRipple.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_HARDPARTICLE_IPROFILERIPPLE_H
 #define BORNAGAIN_SAMPLE_HARDPARTICLE_IPROFILERIPPLE_H
 
@@ -80,3 +81,4 @@ private:
 };
 
 #endif // BORNAGAIN_SAMPLE_HARDPARTICLE_IPROFILERIPPLE_H
+#endif // USER_API
diff --git a/Sample/Lattice/ISelectionRule.h b/Sample/Lattice/ISelectionRule.h
index b4bcbf708c2e5cf1e4a8f4ec395f5122c604e583..d716fcbdba014433a35401af11af2f12e5dc782e 100644
--- a/Sample/Lattice/ISelectionRule.h
+++ b/Sample/Lattice/ISelectionRule.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_LATTICE_ISELECTIONRULE_H
 #define BORNAGAIN_SAMPLE_LATTICE_ISELECTIONRULE_H
 
@@ -58,3 +59,4 @@ inline bool SimpleSelectionRule::coordinateSelected(const ivector_t& coordinate)
 }
 
 #endif // BORNAGAIN_SAMPLE_LATTICE_ISELECTIONRULE_H
+#endif // USER_API
diff --git a/Sample/Particle/IAbstractParticle.h b/Sample/Particle/IAbstractParticle.h
index 15bfeb2b36d320e26f685f664de74d5636077ad4..3b6c21690ef0582d6b13023a49927876502dd4ed 100644
--- a/Sample/Particle/IAbstractParticle.h
+++ b/Sample/Particle/IAbstractParticle.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_PARTICLE_IABSTRACTPARTICLE_H
 #define BORNAGAIN_SAMPLE_PARTICLE_IABSTRACTPARTICLE_H
 
@@ -53,3 +54,4 @@ protected:
 };
 
 #endif // BORNAGAIN_SAMPLE_PARTICLE_IABSTRACTPARTICLE_H
+#endif // USER_API
diff --git a/Sample/Particle/IParticle.h b/Sample/Particle/IParticle.h
index 1629dea65f5ab7711c7b2887776c027eb04c1de6..a50727ce437e6ccaa385aac7c9b6a68823970979 100644
--- a/Sample/Particle/IParticle.h
+++ b/Sample/Particle/IParticle.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_PARTICLE_IPARTICLE_H
 #define BORNAGAIN_SAMPLE_PARTICLE_IPARTICLE_H
 
@@ -95,3 +96,4 @@ protected:
 };
 
 #endif // BORNAGAIN_SAMPLE_PARTICLE_IPARTICLE_H
+#endif // USER_API
diff --git a/Sample/SampleBuilderEngine/ISampleBuilder.h b/Sample/SampleBuilderEngine/ISampleBuilder.h
index 5ec57d8535783c32b6fdf84b449de78f262efccf..06383918222c49fbf4ec6e83ec32ac4dbde227a1 100644
--- a/Sample/SampleBuilderEngine/ISampleBuilder.h
+++ b/Sample/SampleBuilderEngine/ISampleBuilder.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_SAMPLEBUILDERENGINE_ISAMPLEBUILDER_H
 #define BORNAGAIN_SAMPLE_SAMPLEBUILDERENGINE_ISAMPLEBUILDER_H
 
@@ -34,3 +35,4 @@ public:
 };
 
 #endif // BORNAGAIN_SAMPLE_SAMPLEBUILDERENGINE_ISAMPLEBUILDER_H
+#endif // USER_API
diff --git a/Sample/Scattering/IBornFF.h b/Sample/Scattering/IBornFF.h
index 3860b1e031eb85079a48113a5ca6fd57d086441b..78f1ff42cb32b0c3266a41743f4698ee87e51779 100644
--- a/Sample/Scattering/IBornFF.h
+++ b/Sample/Scattering/IBornFF.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_SCATTERING_IBORNFF_H
 #define BORNAGAIN_SAMPLE_SCATTERING_IBORNFF_H
 
@@ -87,3 +88,4 @@ protected:
 };
 
 #endif // BORNAGAIN_SAMPLE_SCATTERING_IBORNFF_H
+#endif // USER_API
diff --git a/Sample/Scattering/IFormFactor.h b/Sample/Scattering/IFormFactor.h
index df4c67ecaaa7ba61d0744f44f57c51e0bf2c8841..bff0f273333afec1b535b47af5c88be46bc8fa00 100644
--- a/Sample/Scattering/IFormFactor.h
+++ b/Sample/Scattering/IFormFactor.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_SCATTERING_IFORMFACTOR_H
 #define BORNAGAIN_SAMPLE_SCATTERING_IFORMFACTOR_H
 
@@ -88,3 +89,4 @@ protected:
 };
 
 #endif // BORNAGAIN_SAMPLE_SCATTERING_IFORMFACTOR_H
+#endif // USER_API
diff --git a/Sample/Scattering/IFormFactorDecorator.h b/Sample/Scattering/IFormFactorDecorator.h
index 908f0cb1d37729ec4cc0156928565958fd6141f0..e5d8ad306432a9363f6a86f3b5d7215caec32047 100644
--- a/Sample/Scattering/IFormFactorDecorator.h
+++ b/Sample/Scattering/IFormFactorDecorator.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_SCATTERING_IFORMFACTORDECORATOR_H
 #define BORNAGAIN_SAMPLE_SCATTERING_IFORMFACTORDECORATOR_H
 
@@ -50,3 +51,4 @@ protected:
 };
 
 #endif // BORNAGAIN_SAMPLE_SCATTERING_IFORMFACTORDECORATOR_H
+#endif // USER_API
diff --git a/Sample/Scattering/ISampleNode.h b/Sample/Scattering/ISampleNode.h
index 831a2cd2fce5f40f721832efd306d4cc082f2235..e52c1cad136f4156133b7aa58d2faf0bdc70b51e 100644
--- a/Sample/Scattering/ISampleNode.h
+++ b/Sample/Scattering/ISampleNode.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_SCATTERING_ISAMPLENODE_H
 #define BORNAGAIN_SAMPLE_SCATTERING_ISAMPLENODE_H
 
@@ -43,3 +44,4 @@ public:
 };
 
 #endif // BORNAGAIN_SAMPLE_SCATTERING_ISAMPLENODE_H
+#endif // USER_API
diff --git a/auto/Wrap/doxygenCore.i b/auto/Wrap/doxygenCore.i
index cbd4b3d46715a07b86e92ae2b273087768d292ea..e3146e9007ac9bc782a3ce5a28992d4fd24d770e 100644
--- a/auto/Wrap/doxygenCore.i
+++ b/auto/Wrap/doxygenCore.i
@@ -1343,119 +1343,6 @@ C++ includes: MaterialKeyHandler.h
 ";
 
 
-// File: classMatrixRTCoefficients__v1.xml
-%feature("docstring") MatrixRTCoefficients_v1 "
-
-Specular reflection and transmission coefficients in a layer in case of 2x2 matrix interactions between the layers and the scattered particle.
-
-C++ includes: MatrixRTCoefficients_v1.h
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::MatrixRTCoefficients_v1 "MatrixRTCoefficients_v1::MatrixRTCoefficients_v1()
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::~MatrixRTCoefficients_v1 "virtual MatrixRTCoefficients_v1::~MatrixRTCoefficients_v1()
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::clone "MatrixRTCoefficients_v1 * MatrixRTCoefficients_v1::clone() const
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::T1plus "Eigen::Vector2cd MatrixRTCoefficients_v1::T1plus() const
-
-The following functions return the transmitted and reflected amplitudes for different incoming beam polarizations and eigenmodes 
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::R1plus "Eigen::Vector2cd MatrixRTCoefficients_v1::R1plus() const
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::T2plus "Eigen::Vector2cd MatrixRTCoefficients_v1::T2plus() const
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::R2plus "Eigen::Vector2cd MatrixRTCoefficients_v1::R2plus() const
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::T1min "Eigen::Vector2cd MatrixRTCoefficients_v1::T1min() const
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::R1min "Eigen::Vector2cd MatrixRTCoefficients_v1::R1min() const
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::T2min "Eigen::Vector2cd MatrixRTCoefficients_v1::T2min() const
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::R2min "Eigen::Vector2cd MatrixRTCoefficients_v1::R2min() const
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::getKz "virtual Eigen::Vector2cd MatrixRTCoefficients_v1::getKz() const
-
-Returns z-part of the two wavevector eigenmodes. 
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::calculateTRMatrices "void MatrixRTCoefficients_v1::calculateTRMatrices()
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::calculateTRWithoutMagnetization "void MatrixRTCoefficients_v1::calculateTRWithoutMagnetization()
-";
-
-%feature("docstring")  MatrixRTCoefficients_v1::initializeBottomLayerPhiPsi "void MatrixRTCoefficients_v1::initializeBottomLayerPhiPsi()
-";
-
-
-// File: classMatrixRTCoefficients__v2.xml
-%feature("docstring") MatrixRTCoefficients_v2 "
-
-Specular reflection and transmission coefficients in a layer in case of magnetic interactions between the scattered particle and the layer.
-
-C++ includes: MatrixRTCoefficients_v2.h
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::MatrixRTCoefficients_v2 "MatrixRTCoefficients_v2::MatrixRTCoefficients_v2(double kz_sign, Eigen::Vector2cd eigenvalues, kvector_t b)
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::MatrixRTCoefficients_v2 "MatrixRTCoefficients_v2::MatrixRTCoefficients_v2(const MatrixRTCoefficients_v2 &other)
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::~MatrixRTCoefficients_v2 "MatrixRTCoefficients_v2::~MatrixRTCoefficients_v2() override
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::clone "MatrixRTCoefficients_v2 * MatrixRTCoefficients_v2::clone() const override
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::T1plus "Eigen::Vector2cd MatrixRTCoefficients_v2::T1plus() const override
-
-The following functions return the transmitted and reflected amplitudes for different incoming beam polarizations and eigenmodes 
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::R1plus "Eigen::Vector2cd MatrixRTCoefficients_v2::R1plus() const override
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::T2plus "Eigen::Vector2cd MatrixRTCoefficients_v2::T2plus() const override
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::R2plus "Eigen::Vector2cd MatrixRTCoefficients_v2::R2plus() const override
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::T1min "Eigen::Vector2cd MatrixRTCoefficients_v2::T1min() const override
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::R1min "Eigen::Vector2cd MatrixRTCoefficients_v2::R1min() const override
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::T2min "Eigen::Vector2cd MatrixRTCoefficients_v2::T2min() const override
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::R2min "Eigen::Vector2cd MatrixRTCoefficients_v2::R2min() const override
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::getKz "Eigen::Vector2cd MatrixRTCoefficients_v2::getKz() const override
-
-Returns z-part of the two wavevector eigenmodes. 
-";
-
-%feature("docstring")  MatrixRTCoefficients_v2::getReflectionMatrix "Eigen::Matrix2cd MatrixRTCoefficients_v2::getReflectionMatrix() const override
-";
-
-
 // File: classMPISimulation.xml
 %feature("docstring") MPISimulation "";
 
@@ -2121,44 +2008,6 @@ C++ includes: SpecularComputationTerm.h
 ";
 
 
-// File: classSpecularMagneticStrategy__v1.xml
-%feature("docstring") SpecularMagneticStrategy_v1 "
-
-Implements the matrix formalism for the calculation of wave amplitudes of the coherent wave solution in a multilayer with magnetization.
-
-C++ includes: SpecularMagneticStrategy_v1.h
-";
-
-%feature("docstring")  SpecularMagneticStrategy_v1::Execute "ISpecularStrategy::coeffs_t SpecularMagneticStrategy_v1::Execute(const std::vector< Slice > &slices, const kvector_t &k) const
-
-Computes refraction angle reflection/transmission coefficients for given sliced multilayer and wavevector k 
-";
-
-%feature("docstring")  SpecularMagneticStrategy_v1::Execute "ISpecularStrategy::coeffs_t SpecularMagneticStrategy_v1::Execute(const std::vector< Slice > &slices, const std::vector< complex_t > &kz) const
-";
-
-
-// File: classSpecularMagneticStrategy__v2.xml
-%feature("docstring") SpecularMagneticStrategy_v2 "
-
-Implements the magnetic Fresnel computation without roughness
-
-Implements the matrix formalism for the calculation of wave amplitudes of the coherent wave solution in a multilayer with magnetization. For a detailed description see internal document \"Polarized Specular Reflectometry\"
-
-C++ includes: SpecularMagneticStrategy_v2.h
-";
-
-%feature("docstring")  SpecularMagneticStrategy_v2::Execute "ISpecularStrategy::coeffs_t SpecularMagneticStrategy_v2::Execute(const std::vector< Slice > &slices, const kvector_t &k) const
-
-Computes refraction angle reflection/transmission coefficients for given sliced multilayer and wavevector k 
-";
-
-%feature("docstring")  SpecularMagneticStrategy_v2::Execute "ISpecularStrategy::coeffs_t SpecularMagneticStrategy_v2::Execute(const std::vector< Slice > &slices, const std::vector< complex_t > &kz) const
-
-Computes refraction angle reflection/transmission coefficients for given sliced multilayer and a set of kz projections corresponding to each slice 
-";
-
-
 // File: classSpecularMatrixTerm.xml
 %feature("docstring") SpecularMatrixTerm "
 
@@ -2428,12 +2277,6 @@ C++ includes: VarianceFunctions.h
 ";
 
 
-// File: namespace_0d101.xml
-
-
-// File: namespace_0d107.xml
-
-
 // File: namespace_0d15.xml
 
 
@@ -2458,25 +2301,22 @@ C++ includes: VarianceFunctions.h
 // File: namespace_0d60.xml
 
 
-// File: namespace_0d64.xml
-
+// File: namespace_0d70.xml
 
-// File: namespace_0d66.xml
 
+// File: namespace_0d75.xml
 
-// File: namespace_0d68.xml
 
+// File: namespace_0d77.xml
 
-// File: namespace_0d78.xml
 
+// File: namespace_0d81.xml
 
-// File: namespace_0d83.xml
 
+// File: namespace_0d91.xml
 
-// File: namespace_0d85.xml
 
-
-// File: namespace_0d89.xml
+// File: namespace_0d93.xml
 
 
 // File: namespace_0d99.xml
@@ -3022,30 +2862,6 @@ Helper factory function to use in  GISASSimulation. Depending on the type of det
 // File: SimDataPair_8h.xml
 
 
-// File: MatrixRTCoefficients__v1_8cpp.xml
-
-
-// File: MatrixRTCoefficients__v1_8h.xml
-
-
-// File: MatrixRTCoefficients__v2_8cpp.xml
-
-
-// File: MatrixRTCoefficients__v2_8h.xml
-
-
-// File: SpecularMagneticStrategy__v1_8cpp.xml
-
-
-// File: SpecularMagneticStrategy__v1_8h.xml
-
-
-// File: SpecularMagneticStrategy__v2_8cpp.xml
-
-
-// File: SpecularMagneticStrategy__v2_8h.xml
-
-
 // File: ChiSquaredModule_8cpp.xml
 
 
@@ -3178,9 +2994,6 @@ Helper factory function to use in  GISASSimulation. Depending on the type of det
 // File: dir_4470199ae7eb44153ffe31d163ed0f28.xml
 
 
-// File: dir_bd39ec89b96ad8d1385770847b662047.xml
-
-
 // File: dir_bfeb1e458a74587b0ec5055179ee8176.xml
 
 
diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i
index 495c2a37b9bbd7876a635047ed84422787889c42..f3966bd3db5ec507b6452b120fa1eff7abcbbe75 100644
--- a/auto/Wrap/doxygenDevice.i
+++ b/auto/Wrap/doxygenDevice.i
@@ -2804,7 +2804,7 @@ Returns true if area defined by two bins is inside or on border of polygon (more
 // File: namespace_0d69.xml
 
 
-// File: namespace_0d96.xml
+// File: namespace_0d94.xml
 
 
 // File: namespaceArrayUtils.xml
@@ -3007,9 +3007,6 @@ Returns sum of relative differences between each pair of elements: (a, b) -> 2*a
 ";
 
 
-// File: namespacePyArrayImport.xml
-
-
 // File: Beam_8cpp.xml
 
 
@@ -3241,12 +3238,6 @@ make Swappable
 // File: Instrument_8h.xml
 
 
-// File: PyArrayImportUtils_8cpp.xml
-
-
-// File: PyArrayImportUtils_8h.xml
-
-
 // File: Ellipse_8cpp.xml
 
 
diff --git a/auto/Wrap/doxygenParam.i b/auto/Wrap/doxygenParam.i
index a68ced9d3c587e56437e8069d98d5e3ebfb91199..527a3363a94232170232bdd53b2446960c052681 100644
--- a/auto/Wrap/doxygenParam.i
+++ b/auto/Wrap/doxygenParam.i
@@ -457,7 +457,7 @@ Returns a vector of children.
 
 %feature("docstring")  INode::progeny "std::vector< const INode * > INode::progeny() const
 
-Returns a vector of all descendents. 
+Returns a vector of all descendants. 
 ";
 
 %feature("docstring")  INode::setParent "void INode::setParent(const INode *newParent)
@@ -1494,7 +1494,7 @@ C++ includes: Unit.h
 // File: namespaceNodeUtils.xml
 %feature("docstring")  NodeUtils::progenyPlus "std::vector< std::tuple< const INode *, int, const INode * > > NodeUtils::progenyPlus(const INode *node, int level=0)
 
-Returns a vector of triples (descendent, depth, parent) 
+Returns a vector of triples (descendant, depth, parent) 
 ";
 
 %feature("docstring")  NodeUtils::nodeToString "std::string NodeUtils::nodeToString(const INode *node)
diff --git a/auto/Wrap/libBornAgainParam.py b/auto/Wrap/libBornAgainParam.py
index 276bcb5386e7fa3b0c01822866439985778bcb53..c71d60fdac9749296a5da6866f771410c9606da8 100644
--- a/auto/Wrap/libBornAgainParam.py
+++ b/auto/Wrap/libBornAgainParam.py
@@ -3257,7 +3257,7 @@ class INode(IParametricComponent):
         progeny(INode self) -> swig_dummy_type_const_inode_vector
         std::vector< const INode * > INode::progeny() const
 
-        Returns a vector of all descendents. 
+        Returns a vector of all descendants. 
 
         """
         return _libBornAgainParam.INode_progeny(self)
diff --git a/auto/Wrap/libBornAgainParam_wrap.cpp b/auto/Wrap/libBornAgainParam_wrap.cpp
index 85144395c3277514a7c79c5424adc9d25d884cf5..2a796b58236968c7b86f9192350fd47479105853 100644
--- a/auto/Wrap/libBornAgainParam_wrap.cpp
+++ b/auto/Wrap/libBornAgainParam_wrap.cpp
@@ -51231,7 +51231,7 @@ static PyMethodDef SwigMethods[] = {
 		"INode_progeny(INode self) -> swig_dummy_type_const_inode_vector\n"
 		"std::vector< const INode * > INode::progeny() const\n"
 		"\n"
-		"Returns a vector of all descendents. \n"
+		"Returns a vector of all descendants. \n"
 		"\n"
 		""},
 	 { "INode_setParent", _wrap_INode_setParent, METH_VARARGS, "\n"