diff --git a/Core/Fitting/FitObjective.h b/Core/Fitting/FitObjective.h
index 2f8ea35ef186efeba115032b2bdf1b32ee37e81b..d8fef6cf17883e868797ba84b7dea2920fbb01c9 100644
--- a/Core/Fitting/FitObjective.h
+++ b/Core/Fitting/FitObjective.h
@@ -15,6 +15,7 @@
 #ifndef BORNAGAIN_CORE_FITTING_FITOBJECTIVE_H
 #define BORNAGAIN_CORE_FITTING_FITOBJECTIVE_H
 
+#ifndef USER_API
 #include "Core/Fitting/IterationInfo.h"
 #include "Core/Fitting/SimDataPair.h"
 #include "Device/Data/ArrayUtils.h"
@@ -130,7 +131,7 @@ public:
     bool isFirstIteration() const;
 
     void setObjectiveMetric(std::unique_ptr<ObjectiveMetric> metric);
-#endif // USER_API
+#endif // SWIG
 
 private:
     typedef std::vector<double> (SimDataPair::*DataPairAccessor)() const;
@@ -144,3 +145,4 @@ private:
 };
 
 #endif // BORNAGAIN_CORE_FITTING_FITOBJECTIVE_H
+#endif // USER_API
diff --git a/Doc/Doxygen/user/mainpage.md b/Doc/Doxygen/user/mainpage.md
index 6e210cda4cf3a79c9fedf6a52c646b91c1e19d6e..b7814c61ec45ac5860db14575af042f5fc177be1 100644
--- a/Doc/Doxygen/user/mainpage.md
+++ b/Doc/Doxygen/user/mainpage.md
@@ -48,17 +48,6 @@ Fitting routines
 </ul>
 <br>
 
-Here is a list of additional classes from internal API.
-<ul>
-<li> \ref simulation_internal "ISimulation and instrument internals" <br>
-<li> \ref samples_internal "Samples internals" <br>
-<li> \ref materials_internal "Materials internals" <br>
-<li> \ref formfactors_internal "Form factors internals" <br>
-<li> \ref distribution_internal "Distribution function internals"
-<li> \ref tools_internal "Tools internals" <br>
-<li> \ref fitting_internal "Fitting internals" <br>
-</ul>
-
 </div>
 
 ### See also
diff --git a/Fit/Minimizer/MinimizerCatalog.h b/Fit/Minimizer/MinimizerCatalog.h
index d8632c8a8e02a8c44ff6f17506f733c06803c177..1bcd38051d0d889e13eafd2b4f9b35b6f30b383f 100644
--- a/Fit/Minimizer/MinimizerCatalog.h
+++ b/Fit/Minimizer/MinimizerCatalog.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_FIT_MINIMIZER_MINIMIZERCATALOG_H
 #define BORNAGAIN_FIT_MINIMIZER_MINIMIZERCATALOG_H
 
@@ -53,3 +54,4 @@ private:
 };
 
 #endif // BORNAGAIN_FIT_MINIMIZER_MINIMIZERCATALOG_H
+#endif // USER_API
diff --git a/Sample/Material/WavevectorInfo.h b/Sample/Material/WavevectorInfo.h
index f3e8ebae92830420614f68d947694ad13ff41383..3c66ae495f8d3b5ce57f06fc209ae7a695ed283a 100644
--- a/Sample/Material/WavevectorInfo.h
+++ b/Sample/Material/WavevectorInfo.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_MATERIAL_WAVEVECTORINFO_H
 #define BORNAGAIN_SAMPLE_MATERIAL_WAVEVECTORINFO_H
 
@@ -44,3 +45,4 @@ private:
 };
 
 #endif // BORNAGAIN_SAMPLE_MATERIAL_WAVEVECTORINFO_H
+#endif // USER_API
diff --git a/Sample/Particle/FormFactorWeighted.h b/Sample/Particle/FormFactorWeighted.h
index ed1f726bcf8c1345cc782edf9b178f666b9895d4..e3839e898c6bfe599af40159016382f305578b16 100644
--- a/Sample/Particle/FormFactorWeighted.h
+++ b/Sample/Particle/FormFactorWeighted.h
@@ -12,6 +12,7 @@
 //
 //  ************************************************************************************************
 
+#ifndef USER_API
 #ifndef BORNAGAIN_SAMPLE_PARTICLE_FORMFACTORWEIGHTED_H
 #define BORNAGAIN_SAMPLE_PARTICLE_FORMFACTORWEIGHTED_H
 
@@ -57,3 +58,4 @@ protected:
 };
 
 #endif // BORNAGAIN_SAMPLE_PARTICLE_FORMFACTORWEIGHTED_H
+#endif // USER_API