diff --git a/Core/PythonAPI/PythonCoreExposer.h b/Core/PythonAPI/PythonCoreExposer.h
deleted file mode 100644
index 8deea227a5badeae433899cc116e0d7bcf1c255b..0000000000000000000000000000000000000000
--- a/Core/PythonAPI/PythonCoreExposer.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// ************************************************************************** //
-//
-//  BornAgain: simulate and fit scattering at grazing incidence
-//
-//! @file      PythonAPI/inc/PythonCoreExposer.h
-//! @brief     Helpers for automatic PythonAPI generation
-//!
-//! @homepage  http://apps.jcns.fz-juelich.de/BornAgain
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2013
-//! @authors   Scientific Computing Group at MLZ Garching
-//! @authors   C. Durniak, G. Pospelov, W. Van Herck, J. Wuttke
-//
-// ************************************************************************** //
-
-#ifndef PYTHONCOREEXPOSER_H
-#define PYTHONCOREEXPOSER_H
-
-#include "Types.h"
-#include "BasicVector3D.h"
-#include "IFormFactor.h"
-#include "OutputData.h"
-#include "ISampleBuilder.h"
-#include "FTDistributions.h"
-#include "RealParameterWrapper.h"
-
-//! this is special namespace to help Py++ generate correct names
-namespace pyplusplus {
-    namespace aliases {
-        using namespace Geometry;
-        typedef BasicVector3D<double > kvector_t;
-        typedef std::vector<kvector_t > vector_kvector_t;
-        typedef BasicVector3D<std::complex<double> > cvector_t;
-        typedef std::vector<cvector_t > vector_cvector_t;
-        typedef std::vector<IFormFactor *> vector_IFormFactorPtr_t;
-        typedef OutputData<double > IntensityData;
-        typedef std::vector<int > vector_integer_t;
-        typedef std::vector<unsigned long int > vector_longinteger_t;
-        typedef std::vector<complex_t> vector_complex_t;
-        typedef std::vector<std::string> vector_string_t;
-        typedef std::vector<RealParameterWrapper> vector_realparameter_t;
-//        typedef std::vector<ParameterSample> vector_ParameterSample_t;
-        typedef std::vector<double> vdouble1d_t;
-        typedef std::vector<vdouble1d_t> vdouble2d_t;
-    }
-}
-
-//! helper function to set value via subscript operator from python
-template <class Self, class Key, class Value>
-void pyplusplus_setitem(Self& self, Key const& key, Value const& value)
-{
-    self[key] = value;
-}
-
-//! functions to help Py++ with template instantiation
-namespace pyplusplus {
-    inline size_t pyplusplus_boost_kvector() { return sizeof(pyplusplus::aliases::kvector_t); }
-    inline size_t pyplusplus_boost_vectorof_kvector() { return sizeof(pyplusplus::aliases::vector_kvector_t); }
-    inline size_t pyplusplus_boost_cvector() { return sizeof(pyplusplus::aliases::cvector_t); }
-    inline size_t pyplusplus_boost_vectorof_cvector() { return sizeof(pyplusplus::aliases::vector_cvector_t); }
-    inline size_t pyplusplus_boost_vector_integer() { return sizeof(pyplusplus::aliases::vector_integer_t); }
-    inline size_t pyplusplus_boost_vector_longinteger() { return sizeof(pyplusplus::aliases::vector_longinteger_t); }
-    inline size_t pyplusplus_boost_intensity_data() { return sizeof(pyplusplus::aliases::IntensityData); }
-    inline size_t pyplusplus_boost_vector_complex() { return sizeof(pyplusplus::aliases::vector_complex_t); }
-    inline size_t pyplusplus_boost_vector_string() { return sizeof(pyplusplus::aliases::vector_string_t); }
-    inline size_t pyplusplus_boost_vector_realparameter() { return sizeof(pyplusplus::aliases::vector_realparameter_t); }
-//    inline size_t pyplusplus_boost_vector_ParameterSample() { return sizeof(pyplusplus::aliases::vector_ParameterSample_t); }
-    inline size_t pyplusplus_boost_vector_vdouble2d_t() { return sizeof(pyplusplus::aliases::vdouble2d_t); }
-}
-
-#endif // PYTHONCOREEXPOSER_H
-
-
diff --git a/dev-tools/swig/libBornAgainCore.i b/dev-tools/swig/libBornAgainCore.i
index 9809a85ce6f0c0b6fe116a4a450a36655320adc2..c6f5613619909ac530bb5750b2f445870d206440 100644
--- a/dev-tools/swig/libBornAgainCore.i
+++ b/dev-tools/swig/libBornAgainCore.i
@@ -18,12 +18,6 @@
  //%feature("director");
 %feature("autodoc");
 
-
-
-
-
-
-
 /**/
 %include "stdint.i"
 %include "std_complex.i"
@@ -31,7 +25,6 @@
 %include "std_vector.i"
 %include "std_shared_ptr.i"
 
-
 %include "doxygen_core.i"
 
 %include "warnings.i"
@@ -42,8 +35,6 @@
  // include the list of smart pointers (common between Core and Fit)
 %include "shared_pointers.i"
 
-
-// from PythonCoreExposer.h
 %template(vdouble1d_t) std::vector<double>;
 %template(vdouble2d_t) std::vector< std::vector<double> >;
 %template(vector_integer_t) std::vector<int >;
@@ -51,9 +42,6 @@
 %template(vector_complex_t) std::vector< std::complex<double> >;
 %template(vector_string_t) std::vector<std::string>;
 
-
-
-
 #define SWIG_FILE_WITH_INIT
 
 %{
@@ -70,17 +58,13 @@
 #define GCC_DIAG_OFF(x)  
 #define GCC_DIAG_ON(x) 
 
-
-
 #ifndef BORNAGAIN_PYTHON
 #define BORNAGAIN_PYTHON
 #endif
 
-
 %import "WinDllMacros.h"
 
 %{
-
 #include "AttLimits.h"
 #include "BAVersion.h"
 #include "BasicVector3D.h"
@@ -200,7 +184,8 @@
 #include "RectangularDetector.h"
 #include "ResolutionFunction2DGaussian.h"
 #include "Rotations.h"
-#include "ISelectionRule.h"
+#include "SampleBuilderFactory.h"
+#include "SimulationRegistry.h"
 #include "Simulation.h"
 #include "SimulationParameters.h"
 #include "SpecularSimulation.h"
@@ -211,37 +196,16 @@
 #include "Units.h"
 #include "VariableBinAxis.h"
 #include "WavevectorInfo.h"
-
-#include "SampleBuilderFactory.h"
-#include "SimulationRegistry.h"
-
 %}
 
-
-
-
 // import headers to be exported to Python interace.
 // Note that the order of inclusion matters, as base classes must be imported before derived classes
 
 %include "AttLimits.h"
 %include "ICloneable.h"
-
 %include "INamed.h"
-
-
-//typedef INamedTemplate<void> INamed;
-//typedef INamedTemplate<int> INamedShared;
-
- //%include "INamedShared.h"
-
 %include "IParameterized.h"
 
-
-
-//typedef IParameterized<void> IParamet
-
- //%include "IParameterizedShared.h"
-
 %include "BAVersion.h"
 %include "BasicVector3D.h"
 
@@ -276,16 +240,13 @@
 %include "ICompositeSample.h"
 %include "IClusteredParticles.h"
 %include "Crystal.h"
-
 %include "Distributions.h"
 %include "Ellipse.h"
 %include "FTDecayFunctions.h"
 %include "FTDistributions.h"
 %include "FixedBinAxis.h"
-
 %include "IFormFactor.h"
 %template(vector_IFormFactorPtr_t) std::vector<IFormFactor *>;
-
 %include "IFormFactorBorn.h"
 %include "IFormFactorDecorator.h"
 %include "FormFactorAnisoPyramid.h"
@@ -322,35 +283,26 @@
 %include "FormFactorTruncatedSphere.h"
 %include "FormFactorTruncatedSpheroid.h"
 %include "FormFactorWeighted.h"
-
 %include "Simulation.h"
 %include "SimulationParameters.h"
 %include "GISASSimulation.h"
-
 %include "IHistogram.h"
 %include "Histogram1D.h"
 %include "Histogram2D.h"
-
 %include "IMaterial.h"
 %include "HomogeneousMaterial.h"
 %include "HomogeneousMagneticMaterial.h"
-
 %include "IDetector2D.h"
 %include "IDetectorResolution.h"
 %include "Distributions.h"   
 %include "FTDecayFunctions.h"
-
 %include "IInterferenceFunction.h"
 %include "ILayout.h"
-
 %include "IObserver.h"
-
 %include "IParticle.h"
 %include "IResolutionFunction2D.h"
 %include "Rotations.h"
-
 %include "ISelectionRule.h"
-
 %include "ISingleton.h"
 %include "Instrument.h"
 %include "IntensityDataFunctions.h"
@@ -365,7 +317,6 @@
 %include "InterferenceFunction2DLattice.h"
 %include "InterferenceFunction2DParaCrystal.h"
 %include "InterferenceFunctionNone.h"
-
 %include "IPixelMap.h"
 %include "SphericalDetector.h"
 %include "IsGISAXSDetector.h"
@@ -373,7 +324,6 @@
 %include "Lattice1DParameters.h"
 %include "Lattice2DParameters.h"
 %include "Layer.h"
-
 %include "IRoughness.h"
 %include "LayerRoughness.h"
 %include "Line.h"
@@ -382,10 +332,8 @@
 %include "MessageService.h"
 %include "MultiLayer.h"
 %include "OffSpecSimulation.h"
-
 %include "OutputData.h"
 %template(IntensityData) OutputData<double >;
-
 %include "OutputDataFunctions.h"
 %include "ParameterDistribution.h"
 %include "ParameterPool.h"
@@ -401,14 +349,7 @@
 %include "ResolutionFunction2DGaussian.h"
 %include "Rotations.h"
 %include "ISelectionRule.h"
-
 %include "SpecularSimulation.h"
-
 %include "ThreadInfo.h"
-
-
 %include "SampleBuilderFactory.h"
 %include "SimulationRegistry.h"
-
-
-