diff --git a/Core/Algorithms/inc/DWBASimulation.h b/Core/Algorithms/inc/DWBASimulation.h
index 918109e3f97801e8b5058138e153a6a2965e256f..2bdb79c9b32d1001ad09588624d9e00cd3eadaf7 100644
--- a/Core/Algorithms/inc/DWBASimulation.h
+++ b/Core/Algorithms/inc/DWBASimulation.h
@@ -49,12 +49,12 @@ class DWBASimulation : public ISimulation
     //! Returns output data containing calculated polarized intensity.
     const OutputData<Eigen::Matrix2d>& getPolarizedDWBAIntensity() const
     { return *mp_polarization_output; }
-#endif
 
     //! Indicates if polarized output data is present
     bool hasPolarizedOutputData() const {
         return mp_polarization_output!=0;
     }
+#endif
 
     //! Adds intensity to current dwba intensity
     void addDWBAIntensity(const OutputData<double>& data_to_add)
diff --git a/Core/Algorithms/inc/Instrument.h b/Core/Algorithms/inc/Instrument.h
index 0850af240faa53e43e3b3cb5bc2cbe023ce94bed..f71a946f2bb3beb74b5e265c6d14666a3bc1346f 100644
--- a/Core/Algorithms/inc/Instrument.h
+++ b/Core/Algorithms/inc/Instrument.h
@@ -75,9 +75,11 @@ class BA_CORE_API_ Instrument : public IParameterized
     //! Adds parameters from local pool to external pool and call recursion over direct children
     virtual std::string addParametersToExternalPool(std::string path, ParameterPool *external_pool, int copy_number=-1) const;
 
+#ifndef GCCXML_SKIP_THIS
     //! normalize a detector image
     void normalize(OutputData<double> *p_intensity,
             OutputData<Eigen::Matrix2d> *p_polarized_intensity = 0) const;
+#endif
 
  protected:
     //! Registers some class members for later access via parameter pool
diff --git a/Core/Algorithms/inc/Simulation.h b/Core/Algorithms/inc/Simulation.h
index 6bdeda3da883514195d0e1e1ab77f1f318c4cad2..b6c0ac17bac3aef31d20b80ded84e0cf3ea6dbc3 100644
--- a/Core/Algorithms/inc/Simulation.h
+++ b/Core/Algorithms/inc/Simulation.h
@@ -69,10 +69,12 @@ class BA_CORE_API_ Simulation : public IParameterized, public ICloneable
     OutputData<double>* getOutputDataClone() const
     { return m_intensity_map.clone(); }
 
+#ifndef GCCXML_SKIP_THIS
     //! Returns polarized intensity map
     const OutputData<Eigen::Matrix2d>* getPolarizedOutputData() const {
         return &m_polarization_output;
     }
+#endif
 
     //! Sets the instrument containing beam and detector information
     void setInstrument(const Instrument& instrument);
diff --git a/Core/PythonAPI/inc/__call_policies.pypp.hpp b/Core/PythonAPI/inc/__call_policies.pypp.hpp
index e5f8bb6a1bf0725c4072ca511a85c0b091532890..b31e20b5413618a6720f6151c07ec0cfd0729a62 100644
--- a/Core/PythonAPI/inc/__call_policies.pypp.hpp
+++ b/Core/PythonAPI/inc/__call_policies.pypp.hpp
@@ -73,7 +73,7 @@ struct make_addressof_holder{
             return bpl::detail::none();
         }
         else{
-            boost::uint32_t addressof_p = reinterpret_cast< boost::uint32_t >( p );
+            size_t addressof_p = size_t( p );
             bpl::object p_address( addressof_p );
             return bpl::incref( p_address.ptr() );
         }
@@ -152,6 +152,11 @@ struct as_tuple_impl{
         MemoryManager::deallocate_array( arr );
         return bpl::incref( bpl::tuple( list_ ).ptr() );
     }
+
+    static PyTypeObject const *get_pytype(){
+        return &PyTuple_Type;
+    }
+
 };
 
 }
diff --git a/Core/PythonAPI/src/Beam.pypp.cpp b/Core/PythonAPI/src/Beam.pypp.cpp
index 3f33465d84b2a505d8f19270191efe8c70078949..99d3cc39bd7029f7f838aa74cae1ca6615e11a63 100644
--- a/Core/PythonAPI/src/Beam.pypp.cpp
+++ b/Core/PythonAPI/src/Beam.pypp.cpp
@@ -35,11 +35,11 @@ struct Beam_wrapper : Beam, bp::wrapper< Beam > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -47,11 +47,11 @@ struct Beam_wrapper : Beam, bp::wrapper< Beam > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -59,11 +59,11 @@ struct Beam_wrapper : Beam, bp::wrapper< Beam > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -71,11 +71,11 @@ struct Beam_wrapper : Beam, bp::wrapper< Beam > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -102,11 +102,11 @@ struct Beam_wrapper : Beam, bp::wrapper< Beam > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -114,11 +114,11 @@ struct Beam_wrapper : Beam, bp::wrapper< Beam > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
diff --git a/Core/PythonAPI/src/Crystal.pypp.cpp b/Core/PythonAPI/src/Crystal.pypp.cpp
index 37b50908229174695002b636918674e93050683d..1f9d16c358db9802749e47039d75278637ce081b 100644
--- a/Core/PythonAPI/src/Crystal.pypp.cpp
+++ b/Core/PythonAPI/src/Crystal.pypp.cpp
@@ -28,47 +28,35 @@ struct Crystal_wrapper : Crystal, bp::wrapper< Crystal > {
     virtual ::Crystal * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->Crystal::clone(  );
+        }
     }
     
-    
     ::Crystal * default_clone(  ) const  {
         return Crystal::clone( );
     }
 
-    virtual ::IFormFactor * createTotalFormFactor( ::IFormFactor const & meso_crystal_form_factor, ::complex_t ambient_refractive_index ) const  {
-        if( bp::override func_createTotalFormFactor = this->get_override( "createTotalFormFactor" ) )
-            return func_createTotalFormFactor( boost::ref(meso_crystal_form_factor), ambient_refractive_index );
-        else
-            return this->Crystal::createTotalFormFactor( boost::ref(meso_crystal_form_factor), ambient_refractive_index );
-    }
-    
-    
-    ::IFormFactor * default_createTotalFormFactor( ::IFormFactor const & meso_crystal_form_factor, ::complex_t ambient_refractive_index ) const  {
-        return Crystal::createTotalFormFactor( boost::ref(meso_crystal_form_factor), ambient_refractive_index );
-    }
-
-    virtual void setAmbientRefractiveIndex( ::complex_t refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( refractive_index );
-        else
-            this->Crystal::setAmbientRefractiveIndex( refractive_index );
+    virtual ::Crystal * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->Crystal::cloneInvertB(  );
+        }
     }
     
-    
-    void default_setAmbientRefractiveIndex( ::complex_t refractive_index ) {
-        Crystal::setAmbientRefractiveIndex( refractive_index );
+    ::Crystal * default_cloneInvertB(  ) const  {
+        return Crystal::cloneInvertB( );
     }
 
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -76,11 +64,11 @@ struct Crystal_wrapper : Crystal, bp::wrapper< Crystal > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -88,11 +76,11 @@ struct Crystal_wrapper : Crystal, bp::wrapper< Crystal > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -100,11 +88,11 @@ struct Crystal_wrapper : Crystal, bp::wrapper< Crystal > {
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -112,11 +100,11 @@ struct Crystal_wrapper : Crystal, bp::wrapper< Crystal > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -124,11 +112,11 @@ struct Crystal_wrapper : Crystal, bp::wrapper< Crystal > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -155,11 +143,11 @@ struct Crystal_wrapper : Crystal, bp::wrapper< Crystal > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -167,24 +155,24 @@ struct Crystal_wrapper : Crystal, bp::wrapper< Crystal > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -208,26 +196,25 @@ void register_Crystal_class(){
                 , bp::return_value_policy< bp::manage_new_object >() );
         
         }
-        { //::Crystal::createBasis
+        { //::Crystal::cloneInvertB
         
-            typedef ::Particle * ( ::Crystal::*createBasis_function_type )(  ) const;
+            typedef ::Crystal * ( ::Crystal::*cloneInvertB_function_type )(  ) const;
+            typedef ::Crystal * ( Crystal_wrapper::*default_cloneInvertB_function_type )(  ) const;
             
             Crystal_exposer.def( 
-                "createBasis"
-                , createBasis_function_type( &::Crystal::createBasis )
-                , bp::return_value_policy< bp::manage_new_object >() );
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::Crystal::cloneInvertB)
+                , default_cloneInvertB_function_type(&Crystal_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
         
         }
-        { //::Crystal::createTotalFormFactor
+        { //::Crystal::createBasis
         
-            typedef ::IFormFactor * ( ::Crystal::*createTotalFormFactor_function_type )( ::IFormFactor const &,::complex_t ) const;
-            typedef ::IFormFactor * ( Crystal_wrapper::*default_createTotalFormFactor_function_type )( ::IFormFactor const &,::complex_t ) const;
+            typedef ::Particle * ( ::Crystal::*createBasis_function_type )(  ) const;
             
             Crystal_exposer.def( 
-                "createTotalFormFactor"
-                , createTotalFormFactor_function_type(&::Crystal::createTotalFormFactor)
-                , default_createTotalFormFactor_function_type(&Crystal_wrapper::default_createTotalFormFactor)
-                , ( bp::arg("meso_crystal_form_factor"), bp::arg("ambient_refractive_index") )
+                "createBasis"
+                , createBasis_function_type( &::Crystal::createBasis )
                 , bp::return_value_policy< bp::manage_new_object >() );
         
         }
@@ -249,18 +236,6 @@ void register_Crystal_class(){
                 , getLatticeBasis_function_type( &::Crystal::getLatticeBasis )
                 , bp::return_value_policy< bp::reference_existing_object >() );
         
-        }
-        { //::Crystal::setAmbientRefractiveIndex
-        
-            typedef void ( ::Crystal::*setAmbientRefractiveIndex_function_type )( ::complex_t ) ;
-            typedef void ( Crystal_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t ) ;
-            
-            Crystal_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::Crystal::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&Crystal_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::Crystal::setDWFactor
         
@@ -376,8 +351,8 @@ void register_Crystal_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( Crystal_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( Crystal_wrapper::*default_size_function_type )(  ) const;
             
             Crystal_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/Detector.pypp.cpp b/Core/PythonAPI/src/Detector.pypp.cpp
index add6a2a0e22ed26add69553641dd7f37577c1ec2..17c52c99368ca4464f26779411000f1a37275fb8 100644
--- a/Core/PythonAPI/src/Detector.pypp.cpp
+++ b/Core/PythonAPI/src/Detector.pypp.cpp
@@ -35,11 +35,11 @@ struct Detector_wrapper : Detector, bp::wrapper< Detector > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -47,11 +47,11 @@ struct Detector_wrapper : Detector, bp::wrapper< Detector > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -59,11 +59,11 @@ struct Detector_wrapper : Detector, bp::wrapper< Detector > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -71,11 +71,11 @@ struct Detector_wrapper : Detector, bp::wrapper< Detector > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -102,11 +102,11 @@ struct Detector_wrapper : Detector, bp::wrapper< Detector > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -114,11 +114,11 @@ struct Detector_wrapper : Detector, bp::wrapper< Detector > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -143,7 +143,7 @@ void register_Detector_class(){
         }
         { //::Detector::getAxis
         
-            typedef ::IAxis const & ( ::Detector::*getAxis_function_type )( ::std::size_t ) const;
+            typedef ::IAxis const & ( ::Detector::*getAxis_function_type )( ::size_t ) const;
             
             Detector_exposer.def( 
                 "getAxis"
@@ -164,7 +164,7 @@ void register_Detector_class(){
         }
         { //::Detector::getDimension
         
-            typedef ::std::size_t ( ::Detector::*getDimension_function_type )(  ) const;
+            typedef ::size_t ( ::Detector::*getDimension_function_type )(  ) const;
             
             Detector_exposer.def( 
                 "getDimension"
diff --git a/Core/PythonAPI/src/FTDistribution2DCauchy.pypp.cpp b/Core/PythonAPI/src/FTDistribution2DCauchy.pypp.cpp
index be52bad15dfe4a43e31d27390ef89a33328bd77b..ca3f64b351588b81c7b02a08af7ee0162895b335 100644
--- a/Core/PythonAPI/src/FTDistribution2DCauchy.pypp.cpp
+++ b/Core/PythonAPI/src/FTDistribution2DCauchy.pypp.cpp
@@ -35,11 +35,11 @@ struct FTDistribution2DCauchy_wrapper : FTDistribution2DCauchy, bp::wrapper< FTD
     virtual ::FTDistribution2DCauchy * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FTDistribution2DCauchy::clone(  );
+        }
     }
     
-    
     ::FTDistribution2DCauchy * default_clone(  ) const  {
         return FTDistribution2DCauchy::clone( );
     }
@@ -47,11 +47,11 @@ struct FTDistribution2DCauchy_wrapper : FTDistribution2DCauchy, bp::wrapper< FTD
     virtual double evaluate( double qx, double qy ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( qx, qy );
-        else
+        else{
             return this->FTDistribution2DCauchy::evaluate( qx, qy );
+        }
     }
     
-    
     double default_evaluate( double qx, double qy ) const  {
         return FTDistribution2DCauchy::evaluate( qx, qy );
     }
@@ -59,11 +59,11 @@ struct FTDistribution2DCauchy_wrapper : FTDistribution2DCauchy, bp::wrapper< FTD
     virtual void transformToStarBasis( double qX, double qY, double alpha, double a, double b, double & qa, double & qb ) const  {
         if( bp::override func_transformToStarBasis = this->get_override( "transformToStarBasis" ) )
             func_transformToStarBasis( qX, qY, alpha, a, b, qa, qb );
-        else
+        else{
             this->FTDistribution2DCauchy::transformToStarBasis( qX, qY, alpha, a, b, qa, qb );
+        }
     }
     
-    
     void default_transformToStarBasis( double qX, double qY, double alpha, double a, double b, double & qa, double & qb ) const  {
         FTDistribution2DCauchy::transformToStarBasis( qX, qY, alpha, a, b, qa, qb );
     }
@@ -71,11 +71,11 @@ struct FTDistribution2DCauchy_wrapper : FTDistribution2DCauchy, bp::wrapper< FTD
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -83,11 +83,11 @@ struct FTDistribution2DCauchy_wrapper : FTDistribution2DCauchy, bp::wrapper< FTD
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -95,11 +95,11 @@ struct FTDistribution2DCauchy_wrapper : FTDistribution2DCauchy, bp::wrapper< FTD
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -107,11 +107,11 @@ struct FTDistribution2DCauchy_wrapper : FTDistribution2DCauchy, bp::wrapper< FTD
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -138,11 +138,11 @@ struct FTDistribution2DCauchy_wrapper : FTDistribution2DCauchy, bp::wrapper< FTD
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -150,11 +150,11 @@ struct FTDistribution2DCauchy_wrapper : FTDistribution2DCauchy, bp::wrapper< FTD
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
diff --git a/Core/PythonAPI/src/FormFactorBox.pypp.cpp b/Core/PythonAPI/src/FormFactorBox.pypp.cpp
index a3643a1bf3f80306783db1ac7b20ff269c76ef97..4cfb36c1642108f22acb8681d4e48cbed300bfdf 100644
--- a/Core/PythonAPI/src/FormFactorBox.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorBox.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual ::FormFactorBox * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorBox::clone(  );
+        }
     }
     
-    
     ::FormFactorBox * default_clone(  ) const  {
         return FormFactorBox::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorBox::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorBox::evaluate_for_q( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorBox::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorBox::getHeight( );
     }
@@ -64,11 +64,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorBox::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorBox::getNumberOfStochasticParameters( );
     }
@@ -76,11 +76,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->FormFactorBox::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return FormFactorBox::getRadius( );
     }
@@ -88,11 +88,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->FormFactorBox::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return FormFactorBox::getVolume( );
     }
@@ -100,11 +100,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -112,35 +112,47 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -148,11 +160,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -160,11 +172,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -172,11 +184,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -184,11 +196,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -212,26 +224,14 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -239,11 +239,11 @@ struct FormFactorBox_wrapper : FormFactorBox, bp::wrapper< FormFactorBox > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -354,11 +354,23 @@ void register_FormFactorBox_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorBox_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorBox_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorBox_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorBox_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorBox_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorBox_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorBox_exposer.def( 
                 "createDistributedFormFactors"
@@ -435,18 +447,6 @@ void register_FormFactorBox_class(){
                 , default_registerParameter_function_type( &FormFactorBox_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorBox_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorBox_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorBox_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorCone.pypp.cpp b/Core/PythonAPI/src/FormFactorCone.pypp.cpp
index e5f97db0a86af3ca61f1bca747e734aa98467ed6..7812713ccc58949254ac49a15bb41ab35cc97842 100644
--- a/Core/PythonAPI/src/FormFactorCone.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorCone.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual ::FormFactorCone * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorCone::clone(  );
+        }
     }
     
-    
     ::FormFactorCone * default_clone(  ) const  {
         return FormFactorCone::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorCone::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorCone::getHeight( );
     }
@@ -52,11 +52,11 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorCone::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorCone::getNumberOfStochasticParameters( );
     }
@@ -64,11 +64,11 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -76,35 +76,47 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -112,11 +124,11 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -124,11 +136,11 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -136,11 +148,11 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -148,11 +160,11 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -160,11 +172,11 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -172,11 +184,11 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -200,26 +212,14 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -227,11 +227,11 @@ struct FormFactorCone_wrapper : FormFactorCone, bp::wrapper< FormFactorCone > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -299,11 +299,23 @@ void register_FormFactorCone_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorCone_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorCone_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorCone_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorCone_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorCone_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorCone_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorCone_exposer.def( 
                 "createDistributedFormFactors"
@@ -402,18 +414,6 @@ void register_FormFactorCone_class(){
                 , default_registerParameter_function_type( &FormFactorCone_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorCone_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorCone_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorCone_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorCrystal.pypp.cpp b/Core/PythonAPI/src/FormFactorCrystal.pypp.cpp
index d6f2d8bf00f3089a5c8fe805da3d42a3d1b30b22..ee061f23c5ccb3b6bc0a9ee9d4affa4101cd1c53 100644
--- a/Core/PythonAPI/src/FormFactorCrystal.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorCrystal.pypp.cpp
@@ -18,21 +18,14 @@ namespace bp = boost::python;
 
 struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCrystal > {
 
-    FormFactorCrystal_wrapper(::Crystal const & p_crystal, ::IFormFactor const & meso_crystal_form_factor, ::complex_t const & ambient_refractive_index )
-    : FormFactorCrystal( boost::ref(p_crystal), boost::ref(meso_crystal_form_factor), boost::ref(ambient_refractive_index) )
-      , bp::wrapper< FormFactorCrystal >(){
-        // constructor
-    
-    }
-
     virtual ::FormFactorCrystal * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorCrystal::clone(  );
+        }
     }
     
-    
     ::FormFactorCrystal * default_clone(  ) const  {
         return FormFactorCrystal::clone( );
     }
@@ -40,11 +33,11 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->FormFactorCrystal::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return FormFactorCrystal::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -52,11 +45,11 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorCrystal::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorCrystal::evaluate_for_q( boost::ref(q) );
     }
@@ -64,35 +57,23 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->FormFactorCrystal::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return FormFactorCrystal::getVolume( );
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->FormFactorCrystal::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        FormFactorCrystal::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -100,35 +81,47 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -136,11 +129,11 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -148,11 +141,11 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->IFormFactor::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return IFormFactor::getHeight( );
     }
@@ -160,11 +153,11 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->IFormFactor::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return IFormFactor::getNumberOfStochasticParameters( );
     }
@@ -172,11 +165,11 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -184,11 +177,11 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -196,11 +189,11 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -227,11 +220,11 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -239,11 +232,11 @@ struct FormFactorCrystal_wrapper : FormFactorCrystal, bp::wrapper< FormFactorCry
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -254,7 +247,7 @@ void register_FormFactorCrystal_class(){
 
     { //::FormFactorCrystal
         typedef bp::class_< FormFactorCrystal_wrapper, bp::bases< IFormFactorBorn >, boost::noncopyable > FormFactorCrystal_exposer_t;
-        FormFactorCrystal_exposer_t FormFactorCrystal_exposer = FormFactorCrystal_exposer_t( "FormFactorCrystal", bp::init< Crystal const &, IFormFactor const &, complex_t const & >(( bp::arg("p_crystal"), bp::arg("meso_crystal_form_factor"), bp::arg("ambient_refractive_index") )) );
+        FormFactorCrystal_exposer_t FormFactorCrystal_exposer = FormFactorCrystal_exposer_t( "FormFactorCrystal", bp::no_init );
         bp::scope FormFactorCrystal_scope( FormFactorCrystal_exposer );
         { //::FormFactorCrystal::clone
         
@@ -302,18 +295,6 @@ void register_FormFactorCrystal_class(){
                 , getVolume_function_type(&::FormFactorCrystal::getVolume)
                 , default_getVolume_function_type(&FormFactorCrystal_wrapper::default_getVolume) );
         
-        }
-        { //::FormFactorCrystal::setAmbientRefractiveIndex
-        
-            typedef void ( ::FormFactorCrystal::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorCrystal_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorCrystal_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::FormFactorCrystal::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorCrystal_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::areParametersChanged
         
@@ -336,11 +317,23 @@ void register_FormFactorCrystal_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorCrystal_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorCrystal_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorCrystal_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorCrystal_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorCrystal_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorCrystal_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorCrystal_exposer.def( 
                 "createDistributedFormFactors"
diff --git a/Core/PythonAPI/src/FormFactorCylinder.pypp.cpp b/Core/PythonAPI/src/FormFactorCylinder.pypp.cpp
index ce750263c4306cabb0045702b7476352aba4a0a1..2f4ad9eb452efc2caf1abc24d147c700d28931b7 100644
--- a/Core/PythonAPI/src/FormFactorCylinder.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorCylinder.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual ::FormFactorCylinder * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorCylinder::clone(  );
+        }
     }
     
-    
     ::FormFactorCylinder * default_clone(  ) const  {
         return FormFactorCylinder::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorCylinder::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorCylinder::evaluate_for_q( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorCylinder::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorCylinder::getHeight( );
     }
@@ -64,11 +64,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorCylinder::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorCylinder::getNumberOfStochasticParameters( );
     }
@@ -76,11 +76,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->FormFactorCylinder::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return FormFactorCylinder::getRadius( );
     }
@@ -88,11 +88,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual void setHeight( double height ) {
         if( bp::override func_setHeight = this->get_override( "setHeight" ) )
             func_setHeight( height );
-        else
+        else{
             this->FormFactorCylinder::setHeight( height );
+        }
     }
     
-    
     void default_setHeight( double height ) {
         FormFactorCylinder::setHeight( height );
     }
@@ -100,11 +100,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual void setRadius( double radius ) {
         if( bp::override func_setRadius = this->get_override( "setRadius" ) )
             func_setRadius( radius );
-        else
+        else{
             this->FormFactorCylinder::setRadius( radius );
+        }
     }
     
-    
     void default_setRadius( double radius ) {
         FormFactorCylinder::setRadius( radius );
     }
@@ -112,11 +112,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -124,35 +124,47 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -160,11 +172,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -172,11 +184,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -184,11 +196,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -196,11 +208,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -208,11 +220,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -236,26 +248,14 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -263,11 +263,11 @@ struct FormFactorCylinder_wrapper : FormFactorCylinder, bp::wrapper< FormFactorC
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -382,11 +382,23 @@ void register_FormFactorCylinder_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorCylinder_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorCylinder_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorCylinder_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorCylinder_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorCylinder_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorCylinder_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorCylinder_exposer.def( 
                 "createDistributedFormFactors"
@@ -474,18 +486,6 @@ void register_FormFactorCylinder_class(){
                 , default_registerParameter_function_type( &FormFactorCylinder_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorCylinder_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorCylinder_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorCylinder_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorDecoratorDebyeWaller.pypp.cpp b/Core/PythonAPI/src/FormFactorDecoratorDebyeWaller.pypp.cpp
index a9290c97f690ff0e9cc67c7c5189870d0b30a9c1..78e0cc193fdb6b2034228c8732b8a6683710711b 100644
--- a/Core/PythonAPI/src/FormFactorDecoratorDebyeWaller.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorDecoratorDebyeWaller.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual ::FormFactorDecoratorDebyeWaller * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorDecoratorDebyeWaller::clone(  );
+        }
     }
     
-    
     ::FormFactorDecoratorDebyeWaller * default_clone(  ) const  {
         return FormFactorDecoratorDebyeWaller::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->FormFactorDecoratorDebyeWaller::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return FormFactorDecoratorDebyeWaller::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -52,11 +52,11 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorDecoratorDebyeWaller::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorDecoratorDebyeWaller::getNumberOfStochasticParameters( );
     }
@@ -64,11 +64,11 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -76,35 +76,47 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -112,11 +124,11 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -124,11 +136,11 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->IFormFactorDecorator::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return IFormFactorDecorator::getHeight( );
     }
@@ -136,11 +148,11 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactorDecorator::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactorDecorator::getRadius( );
     }
@@ -148,11 +160,11 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorDecorator::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorDecorator::getVolume( );
     }
@@ -160,11 +172,11 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -172,11 +184,11 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -200,26 +212,14 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactorDecorator::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactorDecorator::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -227,11 +227,11 @@ struct FormFactorDecoratorDebyeWaller_wrapper : FormFactorDecoratorDebyeWaller,
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -300,11 +300,23 @@ void register_FormFactorDecoratorDebyeWaller_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorDecoratorDebyeWaller_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorDecoratorDebyeWaller_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorDecoratorDebyeWaller_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorDecoratorDebyeWaller_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorDecoratorDebyeWaller_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorDecoratorDebyeWaller_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorDecoratorDebyeWaller_exposer.def( 
                 "createDistributedFormFactors"
@@ -402,18 +414,6 @@ void register_FormFactorDecoratorDebyeWaller_class(){
                 , default_registerParameter_function_type( &FormFactorDecoratorDebyeWaller_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactorDecorator::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactorDecorator::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorDecoratorDebyeWaller_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorDecoratorDebyeWaller_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactorDecorator::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorDecoratorDebyeWaller_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorEllipsoid.pypp.cpp b/Core/PythonAPI/src/FormFactorEllipsoid.pypp.cpp
index 88377ca81112c4ef6dd9f182ecdbed7d325b2953..4007fad4e8e15b33adb23b8db070167cb2270198 100644
--- a/Core/PythonAPI/src/FormFactorEllipsoid.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorEllipsoid.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual ::FormFactorEllipsoid * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorEllipsoid::clone(  );
+        }
     }
     
-    
     ::FormFactorEllipsoid * default_clone(  ) const  {
         return FormFactorEllipsoid::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorEllipsoid::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorEllipsoid::evaluate_for_q( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorEllipsoid::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorEllipsoid::getHeight( );
     }
@@ -64,11 +64,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorEllipsoid::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorEllipsoid::getNumberOfStochasticParameters( );
     }
@@ -76,11 +76,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->FormFactorEllipsoid::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return FormFactorEllipsoid::getRadius( );
     }
@@ -88,11 +88,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->FormFactorEllipsoid::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return FormFactorEllipsoid::getVolume( );
     }
@@ -100,11 +100,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -112,35 +112,47 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -148,11 +160,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -160,11 +172,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -172,11 +184,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -184,11 +196,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -212,26 +224,14 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -239,11 +239,11 @@ struct FormFactorEllipsoid_wrapper : FormFactorEllipsoid, bp::wrapper< FormFacto
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -354,11 +354,23 @@ void register_FormFactorEllipsoid_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorEllipsoid_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorEllipsoid_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorEllipsoid_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorEllipsoid_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorEllipsoid_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorEllipsoid_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorEllipsoid_exposer.def( 
                 "createDistributedFormFactors"
@@ -435,18 +447,6 @@ void register_FormFactorEllipsoid_class(){
                 , default_registerParameter_function_type( &FormFactorEllipsoid_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorEllipsoid_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorEllipsoid_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorEllipsoid_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorFullSphere.pypp.cpp b/Core/PythonAPI/src/FormFactorFullSphere.pypp.cpp
index c9008d5ea61eac4dcd7f611a93040920cda59462..c8d27dcbb49ab63466ac73f94e43da5bc5bcc865 100644
--- a/Core/PythonAPI/src/FormFactorFullSphere.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorFullSphere.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual ::FormFactorFullSphere * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorFullSphere::clone(  );
+        }
     }
     
-    
     ::FormFactorFullSphere * default_clone(  ) const  {
         return FormFactorFullSphere::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorFullSphere::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorFullSphere::evaluate_for_q( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorFullSphere::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorFullSphere::getHeight( );
     }
@@ -64,11 +64,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorFullSphere::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorFullSphere::getNumberOfStochasticParameters( );
     }
@@ -76,11 +76,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->FormFactorFullSphere::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return FormFactorFullSphere::getRadius( );
     }
@@ -88,11 +88,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual void setRadius( double radius ) {
         if( bp::override func_setRadius = this->get_override( "setRadius" ) )
             func_setRadius( radius );
-        else
+        else{
             this->FormFactorFullSphere::setRadius( radius );
+        }
     }
     
-    
     void default_setRadius( double radius ) {
         FormFactorFullSphere::setRadius( radius );
     }
@@ -100,11 +100,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -112,35 +112,47 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -148,11 +160,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -160,11 +172,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -172,11 +184,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -184,11 +196,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -196,11 +208,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -224,26 +236,14 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -251,11 +251,11 @@ struct FormFactorFullSphere_wrapper : FormFactorFullSphere, bp::wrapper< FormFac
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -358,11 +358,23 @@ void register_FormFactorFullSphere_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorFullSphere_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorFullSphere_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorFullSphere_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorFullSphere_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorFullSphere_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorFullSphere_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorFullSphere_exposer.def( 
                 "createDistributedFormFactors"
@@ -450,18 +462,6 @@ void register_FormFactorFullSphere_class(){
                 , default_registerParameter_function_type( &FormFactorFullSphere_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorFullSphere_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorFullSphere_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorFullSphere_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorFullSpheroid.pypp.cpp b/Core/PythonAPI/src/FormFactorFullSpheroid.pypp.cpp
index 1926d5551047b240b863177a3a5a5c7e27e744dd..c8f959233fcee461230aad3a599ea1aa73596c7a 100644
--- a/Core/PythonAPI/src/FormFactorFullSpheroid.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorFullSpheroid.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual ::FormFactorFullSpheroid * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorFullSpheroid::clone(  );
+        }
     }
     
-    
     ::FormFactorFullSpheroid * default_clone(  ) const  {
         return FormFactorFullSpheroid::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorFullSpheroid::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorFullSpheroid::getHeight( );
     }
@@ -52,11 +52,11 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorFullSpheroid::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorFullSpheroid::getNumberOfStochasticParameters( );
     }
@@ -64,11 +64,11 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -76,35 +76,47 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -112,11 +124,11 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -124,11 +136,11 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -136,11 +148,11 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -148,11 +160,11 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -160,11 +172,11 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -172,11 +184,11 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -200,26 +212,14 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -227,11 +227,11 @@ struct FormFactorFullSpheroid_wrapper : FormFactorFullSpheroid, bp::wrapper< For
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -299,11 +299,23 @@ void register_FormFactorFullSpheroid_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorFullSpheroid_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorFullSpheroid_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorFullSpheroid_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorFullSpheroid_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorFullSpheroid_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorFullSpheroid_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorFullSpheroid_exposer.def( 
                 "createDistributedFormFactors"
@@ -402,18 +414,6 @@ void register_FormFactorFullSpheroid_class(){
                 , default_registerParameter_function_type( &FormFactorFullSpheroid_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorFullSpheroid_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorFullSpheroid_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorFullSpheroid_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorGauss.pypp.cpp b/Core/PythonAPI/src/FormFactorGauss.pypp.cpp
index f92617c15fe21ae8726dde8cef5136ea9b92eb70..654931461a99f7e83e4288aa1fb124f7c6f85f07 100644
--- a/Core/PythonAPI/src/FormFactorGauss.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorGauss.pypp.cpp
@@ -35,11 +35,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual ::FormFactorGauss * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorGauss::clone(  );
+        }
     }
     
-    
     ::FormFactorGauss * default_clone(  ) const  {
         return FormFactorGauss::clone( );
     }
@@ -47,11 +47,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorGauss::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorGauss::evaluate_for_q( boost::ref(q) );
     }
@@ -59,11 +59,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorGauss::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorGauss::getNumberOfStochasticParameters( );
     }
@@ -71,11 +71,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -83,35 +83,47 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -119,11 +131,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -131,11 +143,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -143,11 +155,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->IFormFactor::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return IFormFactor::getHeight( );
     }
@@ -155,11 +167,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -167,11 +179,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -179,11 +191,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -191,11 +203,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -219,26 +231,14 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -246,11 +246,11 @@ struct FormFactorGauss_wrapper : FormFactorGauss, bp::wrapper< FormFactorGauss >
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -320,11 +320,23 @@ void register_FormFactorGauss_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorGauss_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorGauss_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorGauss_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorGauss_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorGauss_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorGauss_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorGauss_exposer.def( 
                 "createDistributedFormFactors"
@@ -434,18 +446,6 @@ void register_FormFactorGauss_class(){
                 , default_registerParameter_function_type( &FormFactorGauss_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorGauss_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorGauss_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorGauss_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorHemiSpheroid.pypp.cpp b/Core/PythonAPI/src/FormFactorHemiSpheroid.pypp.cpp
index 0acfca84ef23da568c70a4baa5b275095f44e49b..da829336c44def37b521b05827e5d33c4d0139eb 100644
--- a/Core/PythonAPI/src/FormFactorHemiSpheroid.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorHemiSpheroid.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual ::FormFactorHemiSpheroid * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorHemiSpheroid::clone(  );
+        }
     }
     
-    
     ::FormFactorHemiSpheroid * default_clone(  ) const  {
         return FormFactorHemiSpheroid::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorHemiSpheroid::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorHemiSpheroid::getHeight( );
     }
@@ -52,11 +52,11 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorHemiSpheroid::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorHemiSpheroid::getNumberOfStochasticParameters( );
     }
@@ -64,11 +64,11 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -76,35 +76,47 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -112,11 +124,11 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -124,11 +136,11 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -136,11 +148,11 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -148,11 +160,11 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -160,11 +172,11 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -172,11 +184,11 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -200,26 +212,14 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -227,11 +227,11 @@ struct FormFactorHemiSpheroid_wrapper : FormFactorHemiSpheroid, bp::wrapper< For
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -299,11 +299,23 @@ void register_FormFactorHemiSpheroid_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorHemiSpheroid_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorHemiSpheroid_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorHemiSpheroid_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorHemiSpheroid_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorHemiSpheroid_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorHemiSpheroid_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorHemiSpheroid_exposer.def( 
                 "createDistributedFormFactors"
@@ -402,18 +414,6 @@ void register_FormFactorHemiSpheroid_class(){
                 , default_registerParameter_function_type( &FormFactorHemiSpheroid_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorHemiSpheroid_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorHemiSpheroid_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorHemiSpheroid_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorLorentz.pypp.cpp b/Core/PythonAPI/src/FormFactorLorentz.pypp.cpp
index d4a7bc78283203dea81d37756973cbc23d0f8e19..69552f832fa51908886f0ce4ab0ebd744cff8658 100644
--- a/Core/PythonAPI/src/FormFactorLorentz.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorLorentz.pypp.cpp
@@ -35,11 +35,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual ::FormFactorLorentz * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorLorentz::clone(  );
+        }
     }
     
-    
     ::FormFactorLorentz * default_clone(  ) const  {
         return FormFactorLorentz::clone( );
     }
@@ -47,11 +47,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorLorentz::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorLorentz::evaluate_for_q( boost::ref(q) );
     }
@@ -59,11 +59,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorLorentz::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorLorentz::getNumberOfStochasticParameters( );
     }
@@ -71,11 +71,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -83,35 +83,47 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -119,11 +131,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -131,11 +143,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -143,11 +155,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->IFormFactor::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return IFormFactor::getHeight( );
     }
@@ -155,11 +167,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -167,11 +179,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -179,11 +191,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -191,11 +203,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -219,26 +231,14 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -246,11 +246,11 @@ struct FormFactorLorentz_wrapper : FormFactorLorentz, bp::wrapper< FormFactorLor
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -320,11 +320,23 @@ void register_FormFactorLorentz_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorLorentz_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorLorentz_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorLorentz_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorLorentz_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorLorentz_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorLorentz_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorLorentz_exposer.def( 
                 "createDistributedFormFactors"
@@ -434,18 +446,6 @@ void register_FormFactorLorentz_class(){
                 , default_registerParameter_function_type( &FormFactorLorentz_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorLorentz_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorLorentz_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorLorentz_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorParallelepiped.pypp.cpp b/Core/PythonAPI/src/FormFactorParallelepiped.pypp.cpp
index 5de2f5cb5f071c200393e5ee2609599ff25c0970..f86d420b8d9a8302b30d6a67b181412fa66fd1a7 100644
--- a/Core/PythonAPI/src/FormFactorParallelepiped.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorParallelepiped.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual ::FormFactorParallelepiped * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorParallelepiped::clone(  );
+        }
     }
     
-    
     ::FormFactorParallelepiped * default_clone(  ) const  {
         return FormFactorParallelepiped::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorParallelepiped::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorParallelepiped::evaluate_for_q( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorParallelepiped::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorParallelepiped::getHeight( );
     }
@@ -64,11 +64,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorParallelepiped::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorParallelepiped::getNumberOfStochasticParameters( );
     }
@@ -76,11 +76,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->FormFactorParallelepiped::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return FormFactorParallelepiped::getRadius( );
     }
@@ -88,11 +88,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->FormFactorParallelepiped::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return FormFactorParallelepiped::getVolume( );
     }
@@ -100,11 +100,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -112,35 +112,47 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -148,11 +160,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -160,11 +172,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -172,11 +184,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -184,11 +196,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -212,26 +224,14 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -239,11 +239,11 @@ struct FormFactorParallelepiped_wrapper : FormFactorParallelepiped, bp::wrapper<
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -345,11 +345,23 @@ void register_FormFactorParallelepiped_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorParallelepiped_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorParallelepiped_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorParallelepiped_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorParallelepiped_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorParallelepiped_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorParallelepiped_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorParallelepiped_exposer.def( 
                 "createDistributedFormFactors"
@@ -426,18 +438,6 @@ void register_FormFactorParallelepiped_class(){
                 , default_registerParameter_function_type( &FormFactorParallelepiped_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorParallelepiped_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorParallelepiped_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorParallelepiped_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorPrism3.pypp.cpp b/Core/PythonAPI/src/FormFactorPrism3.pypp.cpp
index 3efb0ec276e07de1ca3aa1fa384955de4f2ca97b..2830f3e6654d1f9cd761d892bd61eb4492dbb2ec 100644
--- a/Core/PythonAPI/src/FormFactorPrism3.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorPrism3.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual ::FormFactorPrism3 * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorPrism3::clone(  );
+        }
     }
     
-    
     ::FormFactorPrism3 * default_clone(  ) const  {
         return FormFactorPrism3::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorPrism3::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorPrism3::evaluate_for_q( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual double getHalfSide(  ) const  {
         if( bp::override func_getHalfSide = this->get_override( "getHalfSide" ) )
             return func_getHalfSide(  );
-        else
+        else{
             return this->FormFactorPrism3::getHalfSide(  );
+        }
     }
     
-    
     double default_getHalfSide(  ) const  {
         return FormFactorPrism3::getHalfSide( );
     }
@@ -64,11 +64,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorPrism3::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorPrism3::getHeight( );
     }
@@ -76,11 +76,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorPrism3::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorPrism3::getNumberOfStochasticParameters( );
     }
@@ -88,11 +88,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual void setHalfSide( double half_side ) {
         if( bp::override func_setHalfSide = this->get_override( "setHalfSide" ) )
             func_setHalfSide( half_side );
-        else
+        else{
             this->FormFactorPrism3::setHalfSide( half_side );
+        }
     }
     
-    
     void default_setHalfSide( double half_side ) {
         FormFactorPrism3::setHalfSide( half_side );
     }
@@ -100,11 +100,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual void setHeight( double height ) {
         if( bp::override func_setHeight = this->get_override( "setHeight" ) )
             func_setHeight( height );
-        else
+        else{
             this->FormFactorPrism3::setHeight( height );
+        }
     }
     
-    
     void default_setHeight( double height ) {
         FormFactorPrism3::setHeight( height );
     }
@@ -112,11 +112,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -124,35 +124,47 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -160,11 +172,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -172,11 +184,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -184,11 +196,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -196,11 +208,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -208,11 +220,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -220,11 +232,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -248,26 +260,14 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -275,11 +275,11 @@ struct FormFactorPrism3_wrapper : FormFactorPrism3, bp::wrapper< FormFactorPrism
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -394,11 +394,23 @@ void register_FormFactorPrism3_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorPrism3_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorPrism3_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorPrism3_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorPrism3_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorPrism3_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorPrism3_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorPrism3_exposer.def( 
                 "createDistributedFormFactors"
@@ -497,18 +509,6 @@ void register_FormFactorPrism3_class(){
                 , default_registerParameter_function_type( &FormFactorPrism3_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorPrism3_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorPrism3_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorPrism3_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorPrism6.pypp.cpp b/Core/PythonAPI/src/FormFactorPrism6.pypp.cpp
index 882734cabc8d952183bac101b48b4fadff570e0a..c7448a98fca7057be382d972145f2f1f47929f87 100644
--- a/Core/PythonAPI/src/FormFactorPrism6.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorPrism6.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual ::FormFactorPrism6 * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorPrism6::clone(  );
+        }
     }
     
-    
     ::FormFactorPrism6 * default_clone(  ) const  {
         return FormFactorPrism6::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorPrism6::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorPrism6::evaluate_for_q( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorPrism6::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorPrism6::getHeight( );
     }
@@ -64,11 +64,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorPrism6::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorPrism6::getNumberOfStochasticParameters( );
     }
@@ -76,11 +76,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -88,35 +88,47 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -124,11 +136,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -136,11 +148,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -148,11 +160,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -160,11 +172,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -172,11 +184,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -184,11 +196,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -212,26 +224,14 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -239,11 +239,11 @@ struct FormFactorPrism6_wrapper : FormFactorPrism6, bp::wrapper< FormFactorPrism
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -323,11 +323,23 @@ void register_FormFactorPrism6_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorPrism6_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorPrism6_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorPrism6_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorPrism6_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorPrism6_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorPrism6_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorPrism6_exposer.def( 
                 "createDistributedFormFactors"
@@ -426,18 +438,6 @@ void register_FormFactorPrism6_class(){
                 , default_registerParameter_function_type( &FormFactorPrism6_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorPrism6_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorPrism6_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorPrism6_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorPyramid.pypp.cpp b/Core/PythonAPI/src/FormFactorPyramid.pypp.cpp
index f8cd556d3d20619ef237a661974e3b6d228c23eb..a2729ffcebd5eee41a42e6f6f798a9d6219cfacb 100644
--- a/Core/PythonAPI/src/FormFactorPyramid.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorPyramid.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual ::FormFactorPyramid * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorPyramid::clone(  );
+        }
     }
     
-    
     ::FormFactorPyramid * default_clone(  ) const  {
         return FormFactorPyramid::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorPyramid::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorPyramid::evaluate_for_q( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual double getAlpha(  ) const  {
         if( bp::override func_getAlpha = this->get_override( "getAlpha" ) )
             return func_getAlpha(  );
-        else
+        else{
             return this->FormFactorPyramid::getAlpha(  );
+        }
     }
     
-    
     double default_getAlpha(  ) const  {
         return FormFactorPyramid::getAlpha( );
     }
@@ -64,11 +64,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual double getHalfSide(  ) const  {
         if( bp::override func_getHalfSide = this->get_override( "getHalfSide" ) )
             return func_getHalfSide(  );
-        else
+        else{
             return this->FormFactorPyramid::getHalfSide(  );
+        }
     }
     
-    
     double default_getHalfSide(  ) const  {
         return FormFactorPyramid::getHalfSide( );
     }
@@ -76,11 +76,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorPyramid::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorPyramid::getHeight( );
     }
@@ -88,11 +88,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorPyramid::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorPyramid::getNumberOfStochasticParameters( );
     }
@@ -100,11 +100,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual void setAlpha( double alpha ) {
         if( bp::override func_setAlpha = this->get_override( "setAlpha" ) )
             func_setAlpha( alpha );
-        else
+        else{
             this->FormFactorPyramid::setAlpha( alpha );
+        }
     }
     
-    
     void default_setAlpha( double alpha ) {
         FormFactorPyramid::setAlpha( alpha );
     }
@@ -112,11 +112,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual void setHalfSide( double half_side ) {
         if( bp::override func_setHalfSide = this->get_override( "setHalfSide" ) )
             func_setHalfSide( half_side );
-        else
+        else{
             this->FormFactorPyramid::setHalfSide( half_side );
+        }
     }
     
-    
     void default_setHalfSide( double half_side ) {
         FormFactorPyramid::setHalfSide( half_side );
     }
@@ -124,11 +124,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual void setHeight( double height ) {
         if( bp::override func_setHeight = this->get_override( "setHeight" ) )
             func_setHeight( height );
-        else
+        else{
             this->FormFactorPyramid::setHeight( height );
+        }
     }
     
-    
     void default_setHeight( double height ) {
         FormFactorPyramid::setHeight( height );
     }
@@ -136,11 +136,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -148,35 +148,47 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -184,11 +196,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -196,11 +208,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -208,11 +220,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -220,11 +232,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -232,11 +244,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -244,11 +256,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -272,26 +284,14 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -299,11 +299,11 @@ struct FormFactorPyramid_wrapper : FormFactorPyramid, bp::wrapper< FormFactorPyr
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -441,11 +441,23 @@ void register_FormFactorPyramid_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorPyramid_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorPyramid_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorPyramid_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorPyramid_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorPyramid_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorPyramid_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorPyramid_exposer.def( 
                 "createDistributedFormFactors"
@@ -544,18 +556,6 @@ void register_FormFactorPyramid_class(){
                 , default_registerParameter_function_type( &FormFactorPyramid_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorPyramid_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorPyramid_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorPyramid_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorSphere.pypp.cpp b/Core/PythonAPI/src/FormFactorSphere.pypp.cpp
index 94b4105bb4b1f96ad7f0c39e7c8cd084c4cab841..5291f63e3abdce667499733802ea96469270c640 100644
--- a/Core/PythonAPI/src/FormFactorSphere.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorSphere.pypp.cpp
@@ -28,11 +28,11 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual ::FormFactorSphere * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorSphere::clone(  );
+        }
     }
     
-    
     ::FormFactorSphere * default_clone(  ) const  {
         return FormFactorSphere::clone( );
     }
@@ -40,11 +40,11 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorSphere::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorSphere::getHeight( );
     }
@@ -52,11 +52,11 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorSphere::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorSphere::getNumberOfStochasticParameters( );
     }
@@ -64,11 +64,11 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -76,35 +76,47 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -112,11 +124,11 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -124,11 +136,11 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -136,11 +148,11 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -148,11 +160,11 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -160,11 +172,11 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -172,11 +184,11 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -200,26 +212,14 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -227,11 +227,11 @@ struct FormFactorSphere_wrapper : FormFactorSphere, bp::wrapper< FormFactorSpher
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -299,11 +299,23 @@ void register_FormFactorSphere_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorSphere_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorSphere_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorSphere_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorSphere_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorSphere_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorSphere_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorSphere_exposer.def( 
                 "createDistributedFormFactors"
@@ -402,18 +414,6 @@ void register_FormFactorSphere_class(){
                 , default_registerParameter_function_type( &FormFactorSphere_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorSphere_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorSphere_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorSphere_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/FormFactorSphereGaussianRadius.pypp.cpp b/Core/PythonAPI/src/FormFactorSphereGaussianRadius.pypp.cpp
index 70b1b762ca772a14eb02336ab1e4c985a30b2169..dcc3c5f984d3d7b028603ced7ce629ce0d2a668f 100644
--- a/Core/PythonAPI/src/FormFactorSphereGaussianRadius.pypp.cpp
+++ b/Core/PythonAPI/src/FormFactorSphereGaussianRadius.pypp.cpp
@@ -28,35 +28,35 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual ::FormFactorSphereGaussianRadius * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->FormFactorSphereGaussianRadius::clone(  );
+        }
     }
     
-    
     ::FormFactorSphereGaussianRadius * default_clone(  ) const  {
         return FormFactorSphereGaussianRadius::clone( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->FormFactorSphereGaussianRadius::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         FormFactorSphereGaussianRadius::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::complex_t evaluate_for_q( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate_for_q = this->get_override( "evaluate_for_q" ) )
             return func_evaluate_for_q( boost::ref(q) );
-        else
+        else{
             return this->FormFactorSphereGaussianRadius::evaluate_for_q( boost::ref(q) );
+        }
     }
     
-    
     ::complex_t default_evaluate_for_q( ::cvector_t const & q ) const  {
         return FormFactorSphereGaussianRadius::evaluate_for_q( boost::ref(q) );
     }
@@ -64,11 +64,11 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->FormFactorSphereGaussianRadius::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return FormFactorSphereGaussianRadius::getHeight( );
     }
@@ -76,11 +76,11 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->FormFactorSphereGaussianRadius::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return FormFactorSphereGaussianRadius::getNumberOfStochasticParameters( );
     }
@@ -88,11 +88,11 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->FormFactorSphereGaussianRadius::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return FormFactorSphereGaussianRadius::isDistributedFormFactor( );
     }
@@ -100,11 +100,11 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -112,23 +112,35 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -136,11 +148,11 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -148,11 +160,11 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -160,11 +172,11 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -172,11 +184,11 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -184,11 +196,11 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -212,26 +224,14 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -239,11 +239,11 @@ struct FormFactorSphereGaussianRadius_wrapper : FormFactorSphereGaussianRadius,
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -270,8 +270,8 @@ void register_FormFactorSphereGaussianRadius_class(){
         }
         { //::FormFactorSphereGaussianRadius::createDistributedFormFactors
         
-            typedef void ( ::FormFactorSphereGaussianRadius::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( FormFactorSphereGaussianRadius_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::FormFactorSphereGaussianRadius::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( FormFactorSphereGaussianRadius_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             FormFactorSphereGaussianRadius_exposer.def( 
                 "createDistributedFormFactors"
@@ -347,6 +347,18 @@ void register_FormFactorSphereGaussianRadius_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&FormFactorSphereGaussianRadius_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( FormFactorSphereGaussianRadius_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            FormFactorSphereGaussianRadius_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&FormFactorSphereGaussianRadius_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IParameterized::createParameterTree
         
@@ -426,18 +438,6 @@ void register_FormFactorSphereGaussianRadius_class(){
                 , default_registerParameter_function_type( &FormFactorSphereGaussianRadius_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( FormFactorSphereGaussianRadius_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            FormFactorSphereGaussianRadius_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&FormFactorSphereGaussianRadius_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/HomogeneousMaterial.pypp.cpp b/Core/PythonAPI/src/HomogeneousMaterial.pypp.cpp
index 32898d24d9ed868cadcb3bcec250949217bb68ce..06f588de9a2b24cf671b35b0e07d64dee9f8ddfb 100644
--- a/Core/PythonAPI/src/HomogeneousMaterial.pypp.cpp
+++ b/Core/PythonAPI/src/HomogeneousMaterial.pypp.cpp
@@ -37,15 +37,27 @@ struct HomogeneousMaterial_wrapper : HomogeneousMaterial, bp::wrapper< Homogeneo
     
     }
 
-    virtual bool isScalarMaterial(  ) {
+    virtual ::complex_t getRefractiveIndex(  ) const  {
+        if( bp::override func_getRefractiveIndex = this->get_override( "getRefractiveIndex" ) )
+            return func_getRefractiveIndex(  );
+        else{
+            return this->HomogeneousMaterial::getRefractiveIndex(  );
+        }
+    }
+    
+    ::complex_t default_getRefractiveIndex(  ) const  {
+        return HomogeneousMaterial::getRefractiveIndex( );
+    }
+
+    virtual bool isScalarMaterial(  ) const  {
         if( bp::override func_isScalarMaterial = this->get_override( "isScalarMaterial" ) )
             return func_isScalarMaterial(  );
-        else
+        else{
             return this->IMaterial::isScalarMaterial(  );
+        }
     }
     
-    
-    bool default_isScalarMaterial(  ) {
+    bool default_isScalarMaterial(  ) const  {
         return IMaterial::isScalarMaterial( );
     }
 
@@ -61,10 +73,12 @@ void register_HomogeneousMaterial_class(){
         { //::HomogeneousMaterial::getRefractiveIndex
         
             typedef ::complex_t ( ::HomogeneousMaterial::*getRefractiveIndex_function_type )(  ) const;
+            typedef ::complex_t ( HomogeneousMaterial_wrapper::*default_getRefractiveIndex_function_type )(  ) const;
             
             HomogeneousMaterial_exposer.def( 
                 "getRefractiveIndex"
-                , getRefractiveIndex_function_type( &::HomogeneousMaterial::getRefractiveIndex ) );
+                , getRefractiveIndex_function_type(&::HomogeneousMaterial::getRefractiveIndex)
+                , default_getRefractiveIndex_function_type(&HomogeneousMaterial_wrapper::default_getRefractiveIndex) );
         
         }
         { //::HomogeneousMaterial::setRefractiveIndex
@@ -79,8 +93,8 @@ void register_HomogeneousMaterial_class(){
         }
         { //::IMaterial::isScalarMaterial
         
-            typedef bool ( ::IMaterial::*isScalarMaterial_function_type )(  ) ;
-            typedef bool ( HomogeneousMaterial_wrapper::*default_isScalarMaterial_function_type )(  ) ;
+            typedef bool ( ::IMaterial::*isScalarMaterial_function_type )(  ) const;
+            typedef bool ( HomogeneousMaterial_wrapper::*default_isScalarMaterial_function_type )(  ) const;
             
             HomogeneousMaterial_exposer.def( 
                 "isScalarMaterial"
diff --git a/Core/PythonAPI/src/IAxis.pypp.cpp b/Core/PythonAPI/src/IAxis.pypp.cpp
index 9c689bebe60a4d93f9e856aaab898a9a45e5c2d3..a6c9c35dcd98aa69f39a992fe63304b54e7adf7c 100644
--- a/Core/PythonAPI/src/IAxis.pypp.cpp
+++ b/Core/PythonAPI/src/IAxis.pypp.cpp
@@ -33,12 +33,12 @@ struct IAxis_wrapper : IAxis, bp::wrapper< IAxis > {
         return func_createDoubleBinSize(  );
     }
 
-    virtual ::std::size_t findClosestIndex( double value ) const {
+    virtual ::size_t findClosestIndex( double value ) const {
         bp::override func_findClosestIndex = this->get_override( "findClosestIndex" );
         return func_findClosestIndex( value );
     }
 
-    virtual ::Bin1D getBin( ::std::size_t index ) const {
+    virtual ::Bin1D getBin( ::size_t index ) const {
         bp::override func_getBin = this->get_override( "getBin" );
         return func_getBin( index );
     }
@@ -53,12 +53,12 @@ struct IAxis_wrapper : IAxis, bp::wrapper< IAxis > {
         return func_getMin(  );
     }
 
-    virtual ::std::size_t getSize(  ) const {
+    virtual ::size_t getSize(  ) const {
         bp::override func_getSize = this->get_override( "getSize" );
         return func_getSize(  );
     }
 
-    virtual double operator[]( ::std::size_t index ) const {
+    virtual double operator[]( ::size_t index ) const {
         bp::override func___getitem__ = this->get_override( "__getitem__" );
         return func___getitem__( index );
     }
@@ -93,7 +93,7 @@ void register_IAxis_class(){
         }
         { //::IAxis::findClosestIndex
         
-            typedef ::std::size_t ( ::IAxis::*findClosestIndex_function_type )( double ) const;
+            typedef ::size_t ( ::IAxis::*findClosestIndex_function_type )( double ) const;
             
             IAxis_exposer.def( 
                 "findClosestIndex"
@@ -103,7 +103,7 @@ void register_IAxis_class(){
         }
         { //::IAxis::getBin
         
-            typedef ::Bin1D ( ::IAxis::*getBin_function_type )( ::std::size_t ) const;
+            typedef ::Bin1D ( ::IAxis::*getBin_function_type )( ::size_t ) const;
             
             IAxis_exposer.def( 
                 "getBin"
@@ -140,7 +140,7 @@ void register_IAxis_class(){
         }
         { //::IAxis::getSize
         
-            typedef ::std::size_t ( ::IAxis::*getSize_function_type )(  ) const;
+            typedef ::size_t ( ::IAxis::*getSize_function_type )(  ) const;
             
             IAxis_exposer.def( 
                 "getSize"
@@ -149,7 +149,7 @@ void register_IAxis_class(){
         }
         { //::IAxis::operator[]
         
-            typedef double ( ::IAxis::*__getitem___function_type )( ::std::size_t ) const;
+            typedef double ( ::IAxis::*__getitem___function_type )( ::size_t ) const;
             
             IAxis_exposer.def( 
                 "__getitem__"
diff --git a/Core/PythonAPI/src/IClusteredParticles.pypp.cpp b/Core/PythonAPI/src/IClusteredParticles.pypp.cpp
index 7c4807fc9a013da2e23dfb5c3057dc9953e06d23..9a4aefb66a31fe48917e286d67564f36182cb319 100644
--- a/Core/PythonAPI/src/IClusteredParticles.pypp.cpp
+++ b/Core/PythonAPI/src/IClusteredParticles.pypp.cpp
@@ -28,30 +28,30 @@ struct IClusteredParticles_wrapper : IClusteredParticles, bp::wrapper< IClustere
     virtual ::IClusteredParticles * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->IClusteredParticles::clone(  );
+        }
     }
     
-    
     ::IClusteredParticles * default_clone(  ) const  {
         return IClusteredParticles::clone( );
     }
 
-    virtual ::IFormFactor * createTotalFormFactor( ::IFormFactor const & meso_crystal_form_factor, ::complex_t ambient_refractive_index ) const  {
-        if( bp::override func_createTotalFormFactor = this->get_override( "createTotalFormFactor" ) )
-            return func_createTotalFormFactor( boost::ref(meso_crystal_form_factor), ambient_refractive_index );
-        else
-            return this->IClusteredParticles::createTotalFormFactor( boost::ref(meso_crystal_form_factor), ambient_refractive_index );
+    virtual ::IClusteredParticles * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->IClusteredParticles::cloneInvertB(  );
+        }
     }
     
-    
-    ::IFormFactor * default_createTotalFormFactor( ::IFormFactor const & meso_crystal_form_factor, ::complex_t ambient_refractive_index ) const  {
-        return IClusteredParticles::createTotalFormFactor( boost::ref(meso_crystal_form_factor), ambient_refractive_index );
+    ::IClusteredParticles * default_cloneInvertB(  ) const  {
+        return IClusteredParticles::cloneInvertB( );
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t refractive_index ){
-        bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" );
-        func_setAmbientRefractiveIndex( refractive_index );
+    virtual void setAmbientMaterial( ::IMaterial const * p_ambient_material ){
+        bp::override func_setAmbientMaterial = this->get_override( "setAmbientMaterial" );
+        func_setAmbientMaterial( boost::python::ptr(p_ambient_material) );
     }
 
     virtual void accept( ::ISampleVisitor * p_visitor ) const {
@@ -62,11 +62,11 @@ struct IClusteredParticles_wrapper : IClusteredParticles, bp::wrapper< IClustere
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -74,11 +74,11 @@ struct IClusteredParticles_wrapper : IClusteredParticles, bp::wrapper< IClustere
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -86,11 +86,11 @@ struct IClusteredParticles_wrapper : IClusteredParticles, bp::wrapper< IClustere
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -98,11 +98,11 @@ struct IClusteredParticles_wrapper : IClusteredParticles, bp::wrapper< IClustere
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -110,11 +110,11 @@ struct IClusteredParticles_wrapper : IClusteredParticles, bp::wrapper< IClustere
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -122,11 +122,11 @@ struct IClusteredParticles_wrapper : IClusteredParticles, bp::wrapper< IClustere
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -153,11 +153,11 @@ struct IClusteredParticles_wrapper : IClusteredParticles, bp::wrapper< IClustere
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -165,24 +165,24 @@ struct IClusteredParticles_wrapper : IClusteredParticles, bp::wrapper< IClustere
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -206,27 +206,26 @@ void register_IClusteredParticles_class(){
                 , bp::return_value_policy< bp::manage_new_object >() );
         
         }
-        { //::IClusteredParticles::createTotalFormFactor
+        { //::IClusteredParticles::cloneInvertB
         
-            typedef ::IFormFactor * ( ::IClusteredParticles::*createTotalFormFactor_function_type )( ::IFormFactor const &,::complex_t ) const;
-            typedef ::IFormFactor * ( IClusteredParticles_wrapper::*default_createTotalFormFactor_function_type )( ::IFormFactor const &,::complex_t ) const;
+            typedef ::IClusteredParticles * ( ::IClusteredParticles::*cloneInvertB_function_type )(  ) const;
+            typedef ::IClusteredParticles * ( IClusteredParticles_wrapper::*default_cloneInvertB_function_type )(  ) const;
             
             IClusteredParticles_exposer.def( 
-                "createTotalFormFactor"
-                , createTotalFormFactor_function_type(&::IClusteredParticles::createTotalFormFactor)
-                , default_createTotalFormFactor_function_type(&IClusteredParticles_wrapper::default_createTotalFormFactor)
-                , ( bp::arg("meso_crystal_form_factor"), bp::arg("ambient_refractive_index") )
-                , bp::return_value_policy< bp::manage_new_object >() );
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::IClusteredParticles::cloneInvertB)
+                , default_cloneInvertB_function_type(&IClusteredParticles_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
         
         }
-        { //::IClusteredParticles::setAmbientRefractiveIndex
+        { //::IClusteredParticles::setAmbientMaterial
         
-            typedef void ( ::IClusteredParticles::*setAmbientRefractiveIndex_function_type )( ::complex_t ) ;
+            typedef void ( ::IClusteredParticles::*setAmbientMaterial_function_type )( ::IMaterial const * ) ;
             
             IClusteredParticles_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , bp::pure_virtual( setAmbientRefractiveIndex_function_type(&::IClusteredParticles::setAmbientRefractiveIndex) )
-                , ( bp::arg("refractive_index") ) );
+                "setAmbientMaterial"
+                , bp::pure_virtual( setAmbientMaterial_function_type(&::IClusteredParticles::setAmbientMaterial) )
+                , ( bp::arg("p_ambient_material") ) );
         
         }
         { //::ISample::accept
@@ -343,8 +342,8 @@ void register_IClusteredParticles_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( IClusteredParticles_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( IClusteredParticles_wrapper::*default_size_function_type )(  ) const;
             
             IClusteredParticles_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/ICompositeSample.pypp.cpp b/Core/PythonAPI/src/ICompositeSample.pypp.cpp
index 17e9d6af8fd5238035d80f17020d7ae5e775ad49..79bf076925d202b6ca7b1e6329581bf285f9dc99 100644
--- a/Core/PythonAPI/src/ICompositeSample.pypp.cpp
+++ b/Core/PythonAPI/src/ICompositeSample.pypp.cpp
@@ -28,11 +28,11 @@ struct ICompositeSample_wrapper : ICompositeSample, bp::wrapper< ICompositeSampl
     virtual ::ICompositeSample * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->ICompositeSample::clone(  );
+        }
     }
     
-    
     ::ICompositeSample * default_clone(  ) const  {
         return ICompositeSample::clone( );
     }
@@ -40,11 +40,11 @@ struct ICompositeSample_wrapper : ICompositeSample, bp::wrapper< ICompositeSampl
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -52,24 +52,24 @@ struct ICompositeSample_wrapper : ICompositeSample, bp::wrapper< ICompositeSampl
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -81,11 +81,11 @@ struct ICompositeSample_wrapper : ICompositeSample, bp::wrapper< ICompositeSampl
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -93,23 +93,35 @@ struct ICompositeSample_wrapper : ICompositeSample, bp::wrapper< ICompositeSampl
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -117,11 +129,11 @@ struct ICompositeSample_wrapper : ICompositeSample, bp::wrapper< ICompositeSampl
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -148,11 +160,11 @@ struct ICompositeSample_wrapper : ICompositeSample, bp::wrapper< ICompositeSampl
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -160,11 +172,11 @@ struct ICompositeSample_wrapper : ICompositeSample, bp::wrapper< ICompositeSampl
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -251,8 +263,8 @@ void register_ICompositeSample_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( ICompositeSample_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( ICompositeSample_wrapper::*default_size_function_type )(  ) const;
             
             ICompositeSample_exposer.def( 
                 "size"
@@ -291,6 +303,18 @@ void register_ICompositeSample_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&ICompositeSample_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( ICompositeSample_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            ICompositeSample_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&ICompositeSample_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IParameterized::createParameterTree
         
diff --git a/Core/PythonAPI/src/IDecoration.pypp.cpp b/Core/PythonAPI/src/IDecoration.pypp.cpp
index 8d170d9acdaf20505cdcb877f4176dfded964a2d..cd54d0b128e7c7a3c0b97356b8d4e31d30bf3a63 100644
--- a/Core/PythonAPI/src/IDecoration.pypp.cpp
+++ b/Core/PythonAPI/src/IDecoration.pypp.cpp
@@ -30,7 +30,12 @@ struct IDecoration_wrapper : IDecoration, bp::wrapper< IDecoration > {
         return func_clone(  );
     }
 
-    virtual double getAbundanceFractionOfParticle( ::std::size_t index ) const {
+    virtual ::IDecoration * cloneInvertB(  ) const {
+        bp::override func_cloneInvertB = this->get_override( "cloneInvertB" );
+        return func_cloneInvertB(  );
+    }
+
+    virtual double getAbundanceFractionOfParticle( ::size_t index ) const {
         bp::override func_getAbundanceFractionOfParticle = this->get_override( "getAbundanceFractionOfParticle" );
         return func_getAbundanceFractionOfParticle( index );
     }
@@ -40,24 +45,24 @@ struct IDecoration_wrapper : IDecoration, bp::wrapper< IDecoration > {
         return func_getInterferenceFunctions(  );
     }
 
-    virtual ::std::size_t getNumberOfInterferenceFunctions(  ) const  {
+    virtual ::size_t getNumberOfInterferenceFunctions(  ) const  {
         if( bp::override func_getNumberOfInterferenceFunctions = this->get_override( "getNumberOfInterferenceFunctions" ) )
             return func_getNumberOfInterferenceFunctions(  );
-        else
+        else{
             return this->IDecoration::getNumberOfInterferenceFunctions(  );
+        }
     }
     
-    
-    ::std::size_t default_getNumberOfInterferenceFunctions(  ) const  {
+    ::size_t default_getNumberOfInterferenceFunctions(  ) const  {
         return IDecoration::getNumberOfInterferenceFunctions( );
     }
 
-    virtual ::std::size_t getNumberOfParticles(  ) const {
+    virtual ::size_t getNumberOfParticles(  ) const {
         bp::override func_getNumberOfParticles = this->get_override( "getNumberOfParticles" );
         return func_getNumberOfParticles(  );
     }
 
-    virtual ::ParticleInfo const * getParticleInfo( ::std::size_t index ) const {
+    virtual ::ParticleInfo const * getParticleInfo( ::size_t index ) const {
         bp::override func_getParticleInfo = this->get_override( "getParticleInfo" );
         return func_getParticleInfo( index );
     }
@@ -70,11 +75,11 @@ struct IDecoration_wrapper : IDecoration, bp::wrapper< IDecoration > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -82,11 +87,11 @@ struct IDecoration_wrapper : IDecoration, bp::wrapper< IDecoration > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -94,11 +99,11 @@ struct IDecoration_wrapper : IDecoration, bp::wrapper< IDecoration > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -106,11 +111,11 @@ struct IDecoration_wrapper : IDecoration, bp::wrapper< IDecoration > {
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -118,11 +123,11 @@ struct IDecoration_wrapper : IDecoration, bp::wrapper< IDecoration > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -130,11 +135,11 @@ struct IDecoration_wrapper : IDecoration, bp::wrapper< IDecoration > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -161,11 +166,11 @@ struct IDecoration_wrapper : IDecoration, bp::wrapper< IDecoration > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -173,24 +178,24 @@ struct IDecoration_wrapper : IDecoration, bp::wrapper< IDecoration > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -211,10 +216,20 @@ void register_IDecoration_class(){
                 , bp::pure_virtual( clone_function_type(&::IDecoration::clone) )
                 , bp::return_value_policy< bp::manage_new_object >() );
         
+        }
+        { //::IDecoration::cloneInvertB
+        
+            typedef ::IDecoration * ( ::IDecoration::*cloneInvertB_function_type )(  ) const;
+            
+            IDecoration_exposer.def( 
+                "cloneInvertB"
+                , bp::pure_virtual( cloneInvertB_function_type(&::IDecoration::cloneInvertB) )
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IDecoration::getAbundanceFractionOfParticle
         
-            typedef double ( ::IDecoration::*getAbundanceFractionOfParticle_function_type )( ::std::size_t ) const;
+            typedef double ( ::IDecoration::*getAbundanceFractionOfParticle_function_type )( ::size_t ) const;
             
             IDecoration_exposer.def( 
                 "getAbundanceFractionOfParticle"
@@ -233,8 +248,8 @@ void register_IDecoration_class(){
         }
         { //::IDecoration::getNumberOfInterferenceFunctions
         
-            typedef ::std::size_t ( ::IDecoration::*getNumberOfInterferenceFunctions_function_type )(  ) const;
-            typedef ::std::size_t ( IDecoration_wrapper::*default_getNumberOfInterferenceFunctions_function_type )(  ) const;
+            typedef ::size_t ( ::IDecoration::*getNumberOfInterferenceFunctions_function_type )(  ) const;
+            typedef ::size_t ( IDecoration_wrapper::*default_getNumberOfInterferenceFunctions_function_type )(  ) const;
             
             IDecoration_exposer.def( 
                 "getNumberOfInterferenceFunctions"
@@ -244,7 +259,7 @@ void register_IDecoration_class(){
         }
         { //::IDecoration::getNumberOfParticles
         
-            typedef ::std::size_t ( ::IDecoration::*getNumberOfParticles_function_type )(  ) const;
+            typedef ::size_t ( ::IDecoration::*getNumberOfParticles_function_type )(  ) const;
             
             IDecoration_exposer.def( 
                 "getNumberOfParticles"
@@ -253,7 +268,7 @@ void register_IDecoration_class(){
         }
         { //::IDecoration::getParticleInfo
         
-            typedef ::ParticleInfo const * ( ::IDecoration::*getParticleInfo_function_type )( ::std::size_t ) const;
+            typedef ::ParticleInfo const * ( ::IDecoration::*getParticleInfo_function_type )( ::size_t ) const;
             
             IDecoration_exposer.def( 
                 "getParticleInfo"
@@ -395,8 +410,8 @@ void register_IDecoration_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( IDecoration_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( IDecoration_wrapper::*default_size_function_type )(  ) const;
             
             IDecoration_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/IDetectorResolution.pypp.cpp b/Core/PythonAPI/src/IDetectorResolution.pypp.cpp
index 7451a416c7a46025799d38a0569b2d700f51867c..7332b764f3c96f324096ae7816ce40f921942ec6 100644
--- a/Core/PythonAPI/src/IDetectorResolution.pypp.cpp
+++ b/Core/PythonAPI/src/IDetectorResolution.pypp.cpp
@@ -38,11 +38,11 @@ struct IDetectorResolution_wrapper : IDetectorResolution, bp::wrapper< IDetector
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -50,11 +50,11 @@ struct IDetectorResolution_wrapper : IDetectorResolution, bp::wrapper< IDetector
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -62,11 +62,11 @@ struct IDetectorResolution_wrapper : IDetectorResolution, bp::wrapper< IDetector
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -74,11 +74,11 @@ struct IDetectorResolution_wrapper : IDetectorResolution, bp::wrapper< IDetector
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -105,11 +105,11 @@ struct IDetectorResolution_wrapper : IDetectorResolution, bp::wrapper< IDetector
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -117,11 +117,11 @@ struct IDetectorResolution_wrapper : IDetectorResolution, bp::wrapper< IDetector
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
diff --git a/Core/PythonAPI/src/IFTDistribution2D.pypp.cpp b/Core/PythonAPI/src/IFTDistribution2D.pypp.cpp
index 8fbe7b360e91d804e8752bde9e71e80da7b9377c..3e0819da07dff38e9cb126774ff42b0c637c1898 100644
--- a/Core/PythonAPI/src/IFTDistribution2D.pypp.cpp
+++ b/Core/PythonAPI/src/IFTDistribution2D.pypp.cpp
@@ -43,11 +43,11 @@ struct IFTDistribution2D_wrapper : IFTDistribution2D, bp::wrapper< IFTDistributi
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -55,11 +55,11 @@ struct IFTDistribution2D_wrapper : IFTDistribution2D, bp::wrapper< IFTDistributi
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -67,11 +67,11 @@ struct IFTDistribution2D_wrapper : IFTDistribution2D, bp::wrapper< IFTDistributi
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -79,11 +79,11 @@ struct IFTDistribution2D_wrapper : IFTDistribution2D, bp::wrapper< IFTDistributi
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -110,11 +110,11 @@ struct IFTDistribution2D_wrapper : IFTDistribution2D, bp::wrapper< IFTDistributi
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -122,11 +122,11 @@ struct IFTDistribution2D_wrapper : IFTDistribution2D, bp::wrapper< IFTDistributi
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
diff --git a/Core/PythonAPI/src/IFormFactor.pypp.cpp b/Core/PythonAPI/src/IFormFactor.pypp.cpp
index f5e55493e536cdb7925bbe53753b090568065b55..7a91b6b9785ff4e645b97beedb2372f670216e1e 100644
--- a/Core/PythonAPI/src/IFormFactor.pypp.cpp
+++ b/Core/PythonAPI/src/IFormFactor.pypp.cpp
@@ -30,15 +30,15 @@ struct IFormFactor_wrapper : IFormFactor, bp::wrapper< IFormFactor > {
         return func_clone(  );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
@@ -50,11 +50,11 @@ struct IFormFactor_wrapper : IFormFactor, bp::wrapper< IFormFactor > {
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->IFormFactor::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return IFormFactor::getHeight( );
     }
@@ -62,11 +62,11 @@ struct IFormFactor_wrapper : IFormFactor, bp::wrapper< IFormFactor > {
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->IFormFactor::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return IFormFactor::getNumberOfStochasticParameters( );
     }
@@ -74,11 +74,11 @@ struct IFormFactor_wrapper : IFormFactor, bp::wrapper< IFormFactor > {
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -86,11 +86,11 @@ struct IFormFactor_wrapper : IFormFactor, bp::wrapper< IFormFactor > {
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactor::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactor::getVolume( );
     }
@@ -98,35 +98,23 @@ struct IFormFactor_wrapper : IFormFactor, bp::wrapper< IFormFactor > {
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -134,23 +122,35 @@ struct IFormFactor_wrapper : IFormFactor, bp::wrapper< IFormFactor > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -158,11 +158,11 @@ struct IFormFactor_wrapper : IFormFactor, bp::wrapper< IFormFactor > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -170,11 +170,11 @@ struct IFormFactor_wrapper : IFormFactor, bp::wrapper< IFormFactor > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -201,11 +201,11 @@ struct IFormFactor_wrapper : IFormFactor, bp::wrapper< IFormFactor > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -213,11 +213,11 @@ struct IFormFactor_wrapper : IFormFactor, bp::wrapper< IFormFactor > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -242,8 +242,8 @@ void register_IFormFactor_class(){
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( IFormFactor_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( IFormFactor_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             IFormFactor_exposer.def( 
                 "createDistributedFormFactors"
@@ -317,18 +317,6 @@ void register_IFormFactor_class(){
                 , isDistributedFormFactor_function_type(&::IFormFactor::isDistributedFormFactor)
                 , default_isDistributedFormFactor_function_type(&IFormFactor_wrapper::default_isDistributedFormFactor) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( IFormFactor_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            IFormFactor_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&IFormFactor_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::areParametersChanged
         
@@ -351,6 +339,18 @@ void register_IFormFactor_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&IFormFactor_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( IFormFactor_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            IFormFactor_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&IFormFactor_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IParameterized::createParameterTree
         
diff --git a/Core/PythonAPI/src/IFormFactorBorn.pypp.cpp b/Core/PythonAPI/src/IFormFactorBorn.pypp.cpp
index 9e66b678aef3414e8e5a795edb874d4370fb7259..1696e4110c52e8fc05b0cd359d58088fde87defc 100644
--- a/Core/PythonAPI/src/IFormFactorBorn.pypp.cpp
+++ b/Core/PythonAPI/src/IFormFactorBorn.pypp.cpp
@@ -33,11 +33,11 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
     virtual ::complex_t evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
-        else
+        else{
             return this->IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
+        }
     }
     
-    
     ::complex_t default_evaluate( ::cvector_t const & k_i, ::Bin1DCVector const & k_f_bin, double alpha_i, double alpha_f ) const  {
         return IFormFactorBorn::evaluate( boost::ref(k_i), boost::ref(k_f_bin), alpha_i, alpha_f );
     }
@@ -50,11 +50,11 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorBorn::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorBorn::getVolume( );
     }
@@ -62,11 +62,11 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -74,35 +74,47 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -110,11 +122,11 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -122,11 +134,11 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->IFormFactor::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return IFormFactor::getHeight( );
     }
@@ -134,11 +146,11 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->IFormFactor::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return IFormFactor::getNumberOfStochasticParameters( );
     }
@@ -146,11 +158,11 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactor::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactor::getRadius( );
     }
@@ -158,11 +170,11 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -170,11 +182,11 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -198,26 +210,14 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
         }
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactor::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -225,11 +225,11 @@ struct IFormFactorBorn_wrapper : IFormFactorBorn, bp::wrapper< IFormFactorBorn >
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -306,11 +306,23 @@ void register_IFormFactorBorn_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&IFormFactorBorn_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( IFormFactorBorn_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            IFormFactorBorn_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&IFormFactorBorn_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( IFormFactorBorn_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( IFormFactorBorn_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             IFormFactorBorn_exposer.def( 
                 "createDistributedFormFactors"
@@ -408,18 +420,6 @@ void register_IFormFactorBorn_class(){
                 , default_registerParameter_function_type( &IFormFactorBorn_wrapper::default_registerParameter )
                 , ( bp::arg("inst"), bp::arg("name"), bp::arg("parpointer") ) );
         
-        }
-        { //::IFormFactor::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactor::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( IFormFactorBorn_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            IFormFactorBorn_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactor::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&IFormFactorBorn_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::setParameterValue
         
diff --git a/Core/PythonAPI/src/IFormFactorDecorator.pypp.cpp b/Core/PythonAPI/src/IFormFactorDecorator.pypp.cpp
index 3d7b478e1677a320733e5db2d1a8912cb967c090..71fd9f8af4c5882c8070baaee9f93fd9cedfd845 100644
--- a/Core/PythonAPI/src/IFormFactorDecorator.pypp.cpp
+++ b/Core/PythonAPI/src/IFormFactorDecorator.pypp.cpp
@@ -26,11 +26,11 @@ struct IFormFactorDecorator_wrapper : IFormFactorDecorator, bp::wrapper< IFormFa
     virtual double getHeight(  ) const  {
         if( bp::override func_getHeight = this->get_override( "getHeight" ) )
             return func_getHeight(  );
-        else
+        else{
             return this->IFormFactorDecorator::getHeight(  );
+        }
     }
     
-    
     double default_getHeight(  ) const  {
         return IFormFactorDecorator::getHeight( );
     }
@@ -38,11 +38,11 @@ struct IFormFactorDecorator_wrapper : IFormFactorDecorator, bp::wrapper< IFormFa
     virtual double getRadius(  ) const  {
         if( bp::override func_getRadius = this->get_override( "getRadius" ) )
             return func_getRadius(  );
-        else
+        else{
             return this->IFormFactorDecorator::getRadius(  );
+        }
     }
     
-    
     double default_getRadius(  ) const  {
         return IFormFactorDecorator::getRadius( );
     }
@@ -50,35 +50,23 @@ struct IFormFactorDecorator_wrapper : IFormFactorDecorator, bp::wrapper< IFormFa
     virtual double getVolume(  ) const  {
         if( bp::override func_getVolume = this->get_override( "getVolume" ) )
             return func_getVolume(  );
-        else
+        else{
             return this->IFormFactorDecorator::getVolume(  );
+        }
     }
     
-    
     double default_getVolume(  ) const  {
         return IFormFactorDecorator::getVolume( );
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( boost::ref(refractive_index) );
-        else
-            this->IFormFactorDecorator::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t const & refractive_index ) {
-        IFormFactorDecorator::setAmbientRefractiveIndex( boost::ref(refractive_index) );
-    }
-
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -86,35 +74,47 @@ struct IFormFactorDecorator_wrapper : IFormFactorDecorator, bp::wrapper< IFormFa
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
-    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
+    virtual void createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         if( bp::override func_createDistributedFormFactors = this->get_override( "createDistributedFormFactors" ) )
             func_createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
-        else
+        else{
             this->IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
+        }
     }
     
-    
-    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::std::size_t nbr_samples ) const  {
+    void default_createDistributedFormFactors( ::std::vector< IFormFactor* > & form_factors, ::std::vector< double > & probabilities, ::size_t nbr_samples ) const  {
         IFormFactor::createDistributedFormFactors( boost::ref(form_factors), boost::ref(probabilities), nbr_samples );
     }
 
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -127,11 +127,11 @@ struct IFormFactorDecorator_wrapper : IFormFactorDecorator, bp::wrapper< IFormFa
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -139,11 +139,11 @@ struct IFormFactorDecorator_wrapper : IFormFactorDecorator, bp::wrapper< IFormFa
     virtual int getNumberOfStochasticParameters(  ) const  {
         if( bp::override func_getNumberOfStochasticParameters = this->get_override( "getNumberOfStochasticParameters" ) )
             return func_getNumberOfStochasticParameters(  );
-        else
+        else{
             return this->IFormFactor::getNumberOfStochasticParameters(  );
+        }
     }
     
-    
     int default_getNumberOfStochasticParameters(  ) const  {
         return IFormFactor::getNumberOfStochasticParameters( );
     }
@@ -151,11 +151,11 @@ struct IFormFactorDecorator_wrapper : IFormFactorDecorator, bp::wrapper< IFormFa
     virtual bool isDistributedFormFactor(  ) const  {
         if( bp::override func_isDistributedFormFactor = this->get_override( "isDistributedFormFactor" ) )
             return func_isDistributedFormFactor(  );
-        else
+        else{
             return this->IFormFactor::isDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_isDistributedFormFactor(  ) const  {
         return IFormFactor::isDistributedFormFactor( );
     }
@@ -163,11 +163,11 @@ struct IFormFactorDecorator_wrapper : IFormFactorDecorator, bp::wrapper< IFormFa
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -194,11 +194,11 @@ struct IFormFactorDecorator_wrapper : IFormFactorDecorator, bp::wrapper< IFormFa
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -206,11 +206,11 @@ struct IFormFactorDecorator_wrapper : IFormFactorDecorator, bp::wrapper< IFormFa
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -265,18 +265,6 @@ void register_IFormFactorDecorator_class(){
                 , getVolume_function_type(&::IFormFactorDecorator::getVolume)
                 , default_getVolume_function_type(&IFormFactorDecorator_wrapper::default_getVolume) );
         
-        }
-        { //::IFormFactorDecorator::setAmbientRefractiveIndex
-        
-            typedef void ( ::IFormFactorDecorator::*setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            typedef void ( IFormFactorDecorator_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t const & ) ;
-            
-            IFormFactorDecorator_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::IFormFactorDecorator::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&IFormFactorDecorator_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::areParametersChanged
         
@@ -299,11 +287,23 @@ void register_IFormFactorDecorator_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&IFormFactorDecorator_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( IFormFactorDecorator_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            IFormFactorDecorator_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&IFormFactorDecorator_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IFormFactor::createDistributedFormFactors
         
-            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
-            typedef void ( IFormFactorDecorator_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::std::size_t ) const;
+            typedef void ( ::IFormFactor::*createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
+            typedef void ( IFormFactorDecorator_wrapper::*default_createDistributedFormFactors_function_type )( ::std::vector< IFormFactor* > &,::std::vector< double > &,::size_t ) const;
             
             IFormFactorDecorator_exposer.def( 
                 "createDistributedFormFactors"
diff --git a/Core/PythonAPI/src/IInterferenceFunction.pypp.cpp b/Core/PythonAPI/src/IInterferenceFunction.pypp.cpp
index 67cc3315898a4ae82425bfca96822c2fc3e429e7..9cf760032b669f3cd6b8c23c0284452d334a4379 100644
--- a/Core/PythonAPI/src/IInterferenceFunction.pypp.cpp
+++ b/Core/PythonAPI/src/IInterferenceFunction.pypp.cpp
@@ -38,11 +38,11 @@ struct IInterferenceFunction_wrapper : IInterferenceFunction, bp::wrapper< IInte
     virtual double getKappa(  ) const  {
         if( bp::override func_getKappa = this->get_override( "getKappa" ) )
             return func_getKappa(  );
-        else
+        else{
             return this->IInterferenceFunction::getKappa(  );
+        }
     }
     
-    
     double default_getKappa(  ) const  {
         return IInterferenceFunction::getKappa( );
     }
@@ -50,11 +50,11 @@ struct IInterferenceFunction_wrapper : IInterferenceFunction, bp::wrapper< IInte
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -62,23 +62,35 @@ struct IInterferenceFunction_wrapper : IInterferenceFunction, bp::wrapper< IInte
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -86,11 +98,11 @@ struct IInterferenceFunction_wrapper : IInterferenceFunction, bp::wrapper< IInte
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -98,11 +110,11 @@ struct IInterferenceFunction_wrapper : IInterferenceFunction, bp::wrapper< IInte
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -129,11 +141,11 @@ struct IInterferenceFunction_wrapper : IInterferenceFunction, bp::wrapper< IInte
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -141,11 +153,11 @@ struct IInterferenceFunction_wrapper : IInterferenceFunction, bp::wrapper< IInte
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -210,6 +222,18 @@ void register_IInterferenceFunction_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&IInterferenceFunction_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( IInterferenceFunction_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            IInterferenceFunction_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&IInterferenceFunction_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IParameterized::createParameterTree
         
diff --git a/Core/PythonAPI/src/IMaterial.pypp.cpp b/Core/PythonAPI/src/IMaterial.pypp.cpp
index 42e8ded401e2d309403d0db3d6168fdb1d3b7dd1..4dad5ef7bd2d4bed36c6bfc1ec5a8383396dba92 100644
--- a/Core/PythonAPI/src/IMaterial.pypp.cpp
+++ b/Core/PythonAPI/src/IMaterial.pypp.cpp
@@ -30,15 +30,27 @@ struct IMaterial_wrapper : IMaterial, bp::wrapper< IMaterial > {
     
     }
 
-    virtual bool isScalarMaterial(  ) {
+    virtual ::complex_t getRefractiveIndex(  ) const  {
+        if( bp::override func_getRefractiveIndex = this->get_override( "getRefractiveIndex" ) )
+            return func_getRefractiveIndex(  );
+        else{
+            return this->IMaterial::getRefractiveIndex(  );
+        }
+    }
+    
+    ::complex_t default_getRefractiveIndex(  ) const  {
+        return IMaterial::getRefractiveIndex( );
+    }
+
+    virtual bool isScalarMaterial(  ) const  {
         if( bp::override func_isScalarMaterial = this->get_override( "isScalarMaterial" ) )
             return func_isScalarMaterial(  );
-        else
+        else{
             return this->IMaterial::isScalarMaterial(  );
+        }
     }
     
-    
-    bool default_isScalarMaterial(  ) {
+    bool default_isScalarMaterial(  ) const  {
         return IMaterial::isScalarMaterial( );
     }
 
@@ -50,10 +62,21 @@ void register_IMaterial_class(){
         typedef bp::class_< IMaterial_wrapper > IMaterial_exposer_t;
         IMaterial_exposer_t IMaterial_exposer = IMaterial_exposer_t( "IMaterial", bp::init< std::string const & >(( bp::arg("name") )) );
         bp::scope IMaterial_scope( IMaterial_exposer );
+        { //::IMaterial::getRefractiveIndex
+        
+            typedef ::complex_t ( ::IMaterial::*getRefractiveIndex_function_type )(  ) const;
+            typedef ::complex_t ( IMaterial_wrapper::*default_getRefractiveIndex_function_type )(  ) const;
+            
+            IMaterial_exposer.def( 
+                "getRefractiveIndex"
+                , getRefractiveIndex_function_type(&::IMaterial::getRefractiveIndex)
+                , default_getRefractiveIndex_function_type(&IMaterial_wrapper::default_getRefractiveIndex) );
+        
+        }
         { //::IMaterial::isScalarMaterial
         
-            typedef bool ( ::IMaterial::*isScalarMaterial_function_type )(  ) ;
-            typedef bool ( IMaterial_wrapper::*default_isScalarMaterial_function_type )(  ) ;
+            typedef bool ( ::IMaterial::*isScalarMaterial_function_type )(  ) const;
+            typedef bool ( IMaterial_wrapper::*default_isScalarMaterial_function_type )(  ) const;
             
             IMaterial_exposer.def( 
                 "isScalarMaterial"
diff --git a/Core/PythonAPI/src/IParameterized.pypp.cpp b/Core/PythonAPI/src/IParameterized.pypp.cpp
index 270c7cda80a8a579dbb61a4e11335012fb7a3c01..5c6ebffeeede8ce3c0ae7380a7806a6c458d4b5b 100644
--- a/Core/PythonAPI/src/IParameterized.pypp.cpp
+++ b/Core/PythonAPI/src/IParameterized.pypp.cpp
@@ -42,11 +42,11 @@ struct IParameterized_wrapper : IParameterized, bp::wrapper< IParameterized > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -54,11 +54,11 @@ struct IParameterized_wrapper : IParameterized, bp::wrapper< IParameterized > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -66,11 +66,11 @@ struct IParameterized_wrapper : IParameterized, bp::wrapper< IParameterized > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -78,11 +78,11 @@ struct IParameterized_wrapper : IParameterized, bp::wrapper< IParameterized > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -109,11 +109,11 @@ struct IParameterized_wrapper : IParameterized, bp::wrapper< IParameterized > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -121,11 +121,11 @@ struct IParameterized_wrapper : IParameterized, bp::wrapper< IParameterized > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
diff --git a/Core/PythonAPI/src/IResolutionFunction2D.pypp.cpp b/Core/PythonAPI/src/IResolutionFunction2D.pypp.cpp
index 2b51f7601e0f640ec3e5a2c08b71b321bf9662fc..41b775dc6300d331c48bd8883a0c05ff65e7c393 100644
--- a/Core/PythonAPI/src/IResolutionFunction2D.pypp.cpp
+++ b/Core/PythonAPI/src/IResolutionFunction2D.pypp.cpp
@@ -38,11 +38,11 @@ struct IResolutionFunction2D_wrapper : IResolutionFunction2D, bp::wrapper< IReso
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -50,11 +50,11 @@ struct IResolutionFunction2D_wrapper : IResolutionFunction2D, bp::wrapper< IReso
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -62,11 +62,11 @@ struct IResolutionFunction2D_wrapper : IResolutionFunction2D, bp::wrapper< IReso
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -74,11 +74,11 @@ struct IResolutionFunction2D_wrapper : IResolutionFunction2D, bp::wrapper< IReso
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -105,11 +105,11 @@ struct IResolutionFunction2D_wrapper : IResolutionFunction2D, bp::wrapper< IReso
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -117,11 +117,11 @@ struct IResolutionFunction2D_wrapper : IResolutionFunction2D, bp::wrapper< IReso
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
diff --git a/Core/PythonAPI/src/ISample.pypp.cpp b/Core/PythonAPI/src/ISample.pypp.cpp
index d4ce7319abddc927f846afe14a3169b0634ccdc0..250a3bc52a16a973a80843d1b9891ced0b3e317c 100644
--- a/Core/PythonAPI/src/ISample.pypp.cpp
+++ b/Core/PythonAPI/src/ISample.pypp.cpp
@@ -33,23 +33,35 @@ struct ISample_wrapper : ISample, bp::wrapper< ISample > {
     virtual ::ISample * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->ISample::clone(  );
+        }
     }
     
-    
     ::ISample * default_clone(  ) const  {
         return ISample::clone( );
     }
 
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -57,11 +69,11 @@ struct ISample_wrapper : ISample, bp::wrapper< ISample > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -69,11 +81,11 @@ struct ISample_wrapper : ISample, bp::wrapper< ISample > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -81,11 +93,11 @@ struct ISample_wrapper : ISample, bp::wrapper< ISample > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -93,11 +105,11 @@ struct ISample_wrapper : ISample, bp::wrapper< ISample > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -124,11 +136,11 @@ struct ISample_wrapper : ISample, bp::wrapper< ISample > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -136,11 +148,11 @@ struct ISample_wrapper : ISample, bp::wrapper< ISample > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -174,6 +186,18 @@ void register_ISample_class(){
                 , default_clone_function_type(&ISample_wrapper::default_clone)
                 , bp::return_value_policy< bp::manage_new_object >() );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( ISample_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            ISample_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&ISample_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::ISample::getCompositeSample
         
diff --git a/Core/PythonAPI/src/ISampleBuilder.pypp.cpp b/Core/PythonAPI/src/ISampleBuilder.pypp.cpp
index 1860511271975d9d6d065c12991e8a613bcd9c7f..48973a8d6aef66c0db0cb3851104b14058e89232 100644
--- a/Core/PythonAPI/src/ISampleBuilder.pypp.cpp
+++ b/Core/PythonAPI/src/ISampleBuilder.pypp.cpp
@@ -35,11 +35,11 @@ struct ISampleBuilder_wrapper : ISampleBuilder, bp::wrapper< ISampleBuilder > {
     virtual ::ISample * buildSample(  ) const  {
         if( bp::override func_buildSample = this->get_override( "buildSample" ) )
             return func_buildSample(  );
-        else
+        else{
             return this->ISampleBuilder::buildSample(  );
+        }
     }
     
-    
     ::ISample * default_buildSample(  ) const  {
         return ISampleBuilder::buildSample( );
     }
@@ -47,11 +47,11 @@ struct ISampleBuilder_wrapper : ISampleBuilder, bp::wrapper< ISampleBuilder > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -59,11 +59,11 @@ struct ISampleBuilder_wrapper : ISampleBuilder, bp::wrapper< ISampleBuilder > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -71,11 +71,11 @@ struct ISampleBuilder_wrapper : ISampleBuilder, bp::wrapper< ISampleBuilder > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -83,11 +83,11 @@ struct ISampleBuilder_wrapper : ISampleBuilder, bp::wrapper< ISampleBuilder > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -114,11 +114,11 @@ struct ISampleBuilder_wrapper : ISampleBuilder, bp::wrapper< ISampleBuilder > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -126,11 +126,11 @@ struct ISampleBuilder_wrapper : ISampleBuilder, bp::wrapper< ISampleBuilder > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
diff --git a/Core/PythonAPI/src/ITransform3D.pypp.cpp b/Core/PythonAPI/src/ITransform3D.pypp.cpp
index 73595141dca75b64ce7574e31783857907e4b635..445f4162c984c5e9f1c62900d48de7b04ffcd6be 100644
--- a/Core/PythonAPI/src/ITransform3D.pypp.cpp
+++ b/Core/PythonAPI/src/ITransform3D.pypp.cpp
@@ -33,11 +33,11 @@ struct ITransform3D_wrapper : Geometry::ITransform3D, bp::wrapper< Geometry::ITr
     virtual void print( ::std::ostream & ostr ) const  {
         if( bp::override func_print = this->get_override( "print" ) )
             func_print( boost::ref(ostr) );
-        else
+        else{
             this->Geometry::ITransform3D::print( boost::ref(ostr) );
+        }
     }
     
-    
     void default_print( ::std::ostream & ostr ) const  {
         Geometry::ITransform3D::print( boost::ref(ostr) );
     }
diff --git a/Core/PythonAPI/src/Instrument.pypp.cpp b/Core/PythonAPI/src/Instrument.pypp.cpp
index c167a95becc465b754412db9de86832982d426ee..5bfa2f37bcfc2743da0d415230f711da9b666968 100644
--- a/Core/PythonAPI/src/Instrument.pypp.cpp
+++ b/Core/PythonAPI/src/Instrument.pypp.cpp
@@ -35,11 +35,11 @@ struct Instrument_wrapper : Instrument, bp::wrapper< Instrument > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -47,11 +47,11 @@ struct Instrument_wrapper : Instrument, bp::wrapper< Instrument > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -59,11 +59,11 @@ struct Instrument_wrapper : Instrument, bp::wrapper< Instrument > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -71,11 +71,11 @@ struct Instrument_wrapper : Instrument, bp::wrapper< Instrument > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -102,11 +102,11 @@ struct Instrument_wrapper : Instrument, bp::wrapper< Instrument > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -114,11 +114,11 @@ struct Instrument_wrapper : Instrument, bp::wrapper< Instrument > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -152,7 +152,7 @@ void register_Instrument_class(){
         }
         { //::Instrument::getDetectorAxis
         
-            typedef ::IAxis const & ( ::Instrument::*getDetectorAxis_function_type )( ::std::size_t ) const;
+            typedef ::IAxis const & ( ::Instrument::*getDetectorAxis_function_type )( ::size_t ) const;
             
             Instrument_exposer.def( 
                 "getDetectorAxis"
@@ -163,7 +163,7 @@ void register_Instrument_class(){
         }
         { //::Instrument::getDetectorDimension
         
-            typedef ::std::size_t ( ::Instrument::*getDetectorDimension_function_type )(  ) const;
+            typedef ::size_t ( ::Instrument::*getDetectorDimension_function_type )(  ) const;
             
             Instrument_exposer.def( 
                 "getDetectorDimension"
@@ -221,7 +221,7 @@ void register_Instrument_class(){
         }
         { //::Instrument::setDetectorParameters
         
-            typedef void ( ::Instrument::*setDetectorParameters_function_type )( ::std::size_t,double,double,::std::size_t,double,double,bool ) ;
+            typedef void ( ::Instrument::*setDetectorParameters_function_type )( ::size_t,double,double,::size_t,double,double,bool ) ;
             
             Instrument_exposer.def( 
                 "setDetectorParameters"
diff --git a/Core/PythonAPI/src/InterferenceFunction1DParaCrystal.pypp.cpp b/Core/PythonAPI/src/InterferenceFunction1DParaCrystal.pypp.cpp
index bb54ede72996c1fe26b15cff2031ff24a08b5565..f5d3ee564de993775ea1b4559080245a5153b785 100644
--- a/Core/PythonAPI/src/InterferenceFunction1DParaCrystal.pypp.cpp
+++ b/Core/PythonAPI/src/InterferenceFunction1DParaCrystal.pypp.cpp
@@ -28,11 +28,11 @@ struct InterferenceFunction1DParaCrystal_wrapper : InterferenceFunction1DParaCry
     virtual ::InterferenceFunction1DParaCrystal * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->InterferenceFunction1DParaCrystal::clone(  );
+        }
     }
     
-    
     ::InterferenceFunction1DParaCrystal * default_clone(  ) const  {
         return InterferenceFunction1DParaCrystal::clone( );
     }
@@ -40,11 +40,11 @@ struct InterferenceFunction1DParaCrystal_wrapper : InterferenceFunction1DParaCry
     virtual double evaluate( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(q) );
-        else
+        else{
             return this->InterferenceFunction1DParaCrystal::evaluate( boost::ref(q) );
+        }
     }
     
-    
     double default_evaluate( ::cvector_t const & q ) const  {
         return InterferenceFunction1DParaCrystal::evaluate( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct InterferenceFunction1DParaCrystal_wrapper : InterferenceFunction1DParaCry
     virtual double getKappa(  ) const  {
         if( bp::override func_getKappa = this->get_override( "getKappa" ) )
             return func_getKappa(  );
-        else
+        else{
             return this->InterferenceFunction1DParaCrystal::getKappa(  );
+        }
     }
     
-    
     double default_getKappa(  ) const  {
         return InterferenceFunction1DParaCrystal::getKappa( );
     }
@@ -64,11 +64,11 @@ struct InterferenceFunction1DParaCrystal_wrapper : InterferenceFunction1DParaCry
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -76,23 +76,35 @@ struct InterferenceFunction1DParaCrystal_wrapper : InterferenceFunction1DParaCry
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -100,11 +112,11 @@ struct InterferenceFunction1DParaCrystal_wrapper : InterferenceFunction1DParaCry
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -112,11 +124,11 @@ struct InterferenceFunction1DParaCrystal_wrapper : InterferenceFunction1DParaCry
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -143,11 +155,11 @@ struct InterferenceFunction1DParaCrystal_wrapper : InterferenceFunction1DParaCry
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -155,11 +167,11 @@ struct InterferenceFunction1DParaCrystal_wrapper : InterferenceFunction1DParaCry
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -248,6 +260,18 @@ void register_InterferenceFunction1DParaCrystal_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&InterferenceFunction1DParaCrystal_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( InterferenceFunction1DParaCrystal_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            InterferenceFunction1DParaCrystal_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&InterferenceFunction1DParaCrystal_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IParameterized::createParameterTree
         
diff --git a/Core/PythonAPI/src/InterferenceFunction2DLattice.pypp.cpp b/Core/PythonAPI/src/InterferenceFunction2DLattice.pypp.cpp
index b057a7e2f721429ef31acff4bc8bccd4bf6e36a1..bb05e39b1b5e9a39ee9c2789f583e8cac2ba3b21 100644
--- a/Core/PythonAPI/src/InterferenceFunction2DLattice.pypp.cpp
+++ b/Core/PythonAPI/src/InterferenceFunction2DLattice.pypp.cpp
@@ -28,11 +28,11 @@ struct InterferenceFunction2DLattice_wrapper : InterferenceFunction2DLattice, bp
     virtual ::InterferenceFunction2DLattice * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->InterferenceFunction2DLattice::clone(  );
+        }
     }
     
-    
     ::InterferenceFunction2DLattice * default_clone(  ) const  {
         return InterferenceFunction2DLattice::clone( );
     }
@@ -40,11 +40,11 @@ struct InterferenceFunction2DLattice_wrapper : InterferenceFunction2DLattice, bp
     virtual double evaluate( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(q) );
-        else
+        else{
             return this->InterferenceFunction2DLattice::evaluate( boost::ref(q) );
+        }
     }
     
-    
     double default_evaluate( ::cvector_t const & q ) const  {
         return InterferenceFunction2DLattice::evaluate( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct InterferenceFunction2DLattice_wrapper : InterferenceFunction2DLattice, bp
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -64,23 +64,35 @@ struct InterferenceFunction2DLattice_wrapper : InterferenceFunction2DLattice, bp
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -88,11 +100,11 @@ struct InterferenceFunction2DLattice_wrapper : InterferenceFunction2DLattice, bp
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -100,11 +112,11 @@ struct InterferenceFunction2DLattice_wrapper : InterferenceFunction2DLattice, bp
     virtual double getKappa(  ) const  {
         if( bp::override func_getKappa = this->get_override( "getKappa" ) )
             return func_getKappa(  );
-        else
+        else{
             return this->IInterferenceFunction::getKappa(  );
+        }
     }
     
-    
     double default_getKappa(  ) const  {
         return IInterferenceFunction::getKappa( );
     }
@@ -112,11 +124,11 @@ struct InterferenceFunction2DLattice_wrapper : InterferenceFunction2DLattice, bp
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -143,11 +155,11 @@ struct InterferenceFunction2DLattice_wrapper : InterferenceFunction2DLattice, bp
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -155,11 +167,11 @@ struct InterferenceFunction2DLattice_wrapper : InterferenceFunction2DLattice, bp
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -227,6 +239,18 @@ void register_InterferenceFunction2DLattice_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&InterferenceFunction2DLattice_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( InterferenceFunction2DLattice_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            InterferenceFunction2DLattice_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&InterferenceFunction2DLattice_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IParameterized::createParameterTree
         
diff --git a/Core/PythonAPI/src/InterferenceFunction2DParaCrystal.pypp.cpp b/Core/PythonAPI/src/InterferenceFunction2DParaCrystal.pypp.cpp
index df78aa4576414e523427c385a4b522aca8b5ce71..156d1e720c67ec42680b615dc2c1f974db67e987 100644
--- a/Core/PythonAPI/src/InterferenceFunction2DParaCrystal.pypp.cpp
+++ b/Core/PythonAPI/src/InterferenceFunction2DParaCrystal.pypp.cpp
@@ -28,11 +28,11 @@ struct InterferenceFunction2DParaCrystal_wrapper : InterferenceFunction2DParaCry
     virtual ::InterferenceFunction2DParaCrystal * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->InterferenceFunction2DParaCrystal::clone(  );
+        }
     }
     
-    
     ::InterferenceFunction2DParaCrystal * default_clone(  ) const  {
         return InterferenceFunction2DParaCrystal::clone( );
     }
@@ -40,11 +40,11 @@ struct InterferenceFunction2DParaCrystal_wrapper : InterferenceFunction2DParaCry
     virtual double evaluate( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(q) );
-        else
+        else{
             return this->InterferenceFunction2DParaCrystal::evaluate( boost::ref(q) );
+        }
     }
     
-    
     double default_evaluate( ::cvector_t const & q ) const  {
         return InterferenceFunction2DParaCrystal::evaluate( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct InterferenceFunction2DParaCrystal_wrapper : InterferenceFunction2DParaCry
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -64,23 +64,35 @@ struct InterferenceFunction2DParaCrystal_wrapper : InterferenceFunction2DParaCry
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -88,11 +100,11 @@ struct InterferenceFunction2DParaCrystal_wrapper : InterferenceFunction2DParaCry
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -100,11 +112,11 @@ struct InterferenceFunction2DParaCrystal_wrapper : InterferenceFunction2DParaCry
     virtual double getKappa(  ) const  {
         if( bp::override func_getKappa = this->get_override( "getKappa" ) )
             return func_getKappa(  );
-        else
+        else{
             return this->IInterferenceFunction::getKappa(  );
+        }
     }
     
-    
     double default_getKappa(  ) const  {
         return IInterferenceFunction::getKappa( );
     }
@@ -112,11 +124,11 @@ struct InterferenceFunction2DParaCrystal_wrapper : InterferenceFunction2DParaCry
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -143,11 +155,11 @@ struct InterferenceFunction2DParaCrystal_wrapper : InterferenceFunction2DParaCry
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -155,11 +167,11 @@ struct InterferenceFunction2DParaCrystal_wrapper : InterferenceFunction2DParaCry
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -269,6 +281,18 @@ void register_InterferenceFunction2DParaCrystal_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&InterferenceFunction2DParaCrystal_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( InterferenceFunction2DParaCrystal_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            InterferenceFunction2DParaCrystal_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&InterferenceFunction2DParaCrystal_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IParameterized::createParameterTree
         
diff --git a/Core/PythonAPI/src/InterferenceFunctionNone.pypp.cpp b/Core/PythonAPI/src/InterferenceFunctionNone.pypp.cpp
index e9e20855c4cc957e8c55de168b824761325485d6..9e36ca1e3c466782c69952a9921e35c80f53d5d8 100644
--- a/Core/PythonAPI/src/InterferenceFunctionNone.pypp.cpp
+++ b/Core/PythonAPI/src/InterferenceFunctionNone.pypp.cpp
@@ -28,11 +28,11 @@ struct InterferenceFunctionNone_wrapper : InterferenceFunctionNone, bp::wrapper<
     virtual ::InterferenceFunctionNone * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->InterferenceFunctionNone::clone(  );
+        }
     }
     
-    
     ::InterferenceFunctionNone * default_clone(  ) const  {
         return InterferenceFunctionNone::clone( );
     }
@@ -40,11 +40,11 @@ struct InterferenceFunctionNone_wrapper : InterferenceFunctionNone, bp::wrapper<
     virtual double evaluate( ::cvector_t const & q ) const  {
         if( bp::override func_evaluate = this->get_override( "evaluate" ) )
             return func_evaluate( boost::ref(q) );
-        else
+        else{
             return this->InterferenceFunctionNone::evaluate( boost::ref(q) );
+        }
     }
     
-    
     double default_evaluate( ::cvector_t const & q ) const  {
         return InterferenceFunctionNone::evaluate( boost::ref(q) );
     }
@@ -52,11 +52,11 @@ struct InterferenceFunctionNone_wrapper : InterferenceFunctionNone, bp::wrapper<
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -64,23 +64,35 @@ struct InterferenceFunctionNone_wrapper : InterferenceFunctionNone, bp::wrapper<
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -88,11 +100,11 @@ struct InterferenceFunctionNone_wrapper : InterferenceFunctionNone, bp::wrapper<
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -100,11 +112,11 @@ struct InterferenceFunctionNone_wrapper : InterferenceFunctionNone, bp::wrapper<
     virtual double getKappa(  ) const  {
         if( bp::override func_getKappa = this->get_override( "getKappa" ) )
             return func_getKappa(  );
-        else
+        else{
             return this->IInterferenceFunction::getKappa(  );
+        }
     }
     
-    
     double default_getKappa(  ) const  {
         return IInterferenceFunction::getKappa( );
     }
@@ -112,11 +124,11 @@ struct InterferenceFunctionNone_wrapper : InterferenceFunctionNone, bp::wrapper<
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -143,11 +155,11 @@ struct InterferenceFunctionNone_wrapper : InterferenceFunctionNone, bp::wrapper<
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -155,11 +167,11 @@ struct InterferenceFunctionNone_wrapper : InterferenceFunctionNone, bp::wrapper<
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -217,6 +229,18 @@ void register_InterferenceFunctionNone_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&InterferenceFunctionNone_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( InterferenceFunctionNone_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            InterferenceFunctionNone_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&InterferenceFunctionNone_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IParameterized::createParameterTree
         
diff --git a/Core/PythonAPI/src/LatticeBasis.pypp.cpp b/Core/PythonAPI/src/LatticeBasis.pypp.cpp
index 81553b8c7c1eea9b5c88f411baf94e3ef4b2661c..421279556680af60d9d55284e7e42e0ae5474f4a 100644
--- a/Core/PythonAPI/src/LatticeBasis.pypp.cpp
+++ b/Core/PythonAPI/src/LatticeBasis.pypp.cpp
@@ -28,11 +28,11 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -40,11 +40,11 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -52,11 +52,11 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -64,11 +64,11 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -76,11 +76,11 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -88,11 +88,11 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual ::IMaterial const * getMaterial(  ) const  {
         if( bp::override func_getMaterial = this->get_override( "getMaterial" ) )
             return func_getMaterial(  );
-        else
+        else{
             return this->Particle::getMaterial(  );
+        }
     }
     
-    
     ::IMaterial const * default_getMaterial(  ) const  {
         return Particle::getMaterial( );
     }
@@ -100,11 +100,11 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual ::complex_t getRefractiveIndex(  ) const  {
         if( bp::override func_getRefractiveIndex = this->get_override( "getRefractiveIndex" ) )
             return func_getRefractiveIndex(  );
-        else
+        else{
             return this->Particle::getRefractiveIndex(  );
+        }
     }
     
-    
     ::complex_t default_getRefractiveIndex(  ) const  {
         return Particle::getRefractiveIndex( );
     }
@@ -112,11 +112,11 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual ::IFormFactor const * getSimpleFormFactor(  ) const  {
         if( bp::override func_getSimpleFormFactor = this->get_override( "getSimpleFormFactor" ) )
             return func_getSimpleFormFactor(  );
-        else
+        else{
             return this->Particle::getSimpleFormFactor(  );
+        }
     }
     
-    
     ::IFormFactor const * default_getSimpleFormFactor(  ) const  {
         return Particle::getSimpleFormFactor( );
     }
@@ -124,11 +124,11 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual bool hasDistributedFormFactor(  ) const  {
         if( bp::override func_hasDistributedFormFactor = this->get_override( "hasDistributedFormFactor" ) )
             return func_hasDistributedFormFactor(  );
-        else
+        else{
             return this->Particle::hasDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_hasDistributedFormFactor(  ) const  {
         return Particle::hasDistributedFormFactor( );
     }
@@ -136,11 +136,11 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -167,11 +167,11 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -179,24 +179,24 @@ struct LatticeBasis_wrapper : LatticeBasis, bp::wrapper< LatticeBasis > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -368,8 +368,8 @@ void register_LatticeBasis_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( LatticeBasis_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( LatticeBasis_wrapper::*default_size_function_type )(  ) const;
             
             LatticeBasis_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/Layer.pypp.cpp b/Core/PythonAPI/src/Layer.pypp.cpp
index 15af12defea7ad0ec6f2c4472def32981e59942e..ce8309a99c55deca74e3fa54a6700387263192d3 100644
--- a/Core/PythonAPI/src/Layer.pypp.cpp
+++ b/Core/PythonAPI/src/Layer.pypp.cpp
@@ -49,23 +49,35 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual ::Layer * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->Layer::clone(  );
+        }
     }
     
-    
     ::Layer * default_clone(  ) const  {
         return Layer::clone( );
     }
 
+    virtual ::Layer * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->Layer::cloneInvertB(  );
+        }
+    }
+    
+    ::Layer * default_cloneInvertB(  ) const  {
+        return Layer::cloneInvertB( );
+    }
+
     virtual ::IDecoration const * getDecoration(  ) const  {
         if( bp::override func_getDecoration = this->get_override( "getDecoration" ) )
             return func_getDecoration(  );
-        else
+        else{
             return this->Layer::getDecoration(  );
+        }
     }
     
-    
     ::IDecoration const * default_getDecoration(  ) const  {
         return Layer::getDecoration( );
     }
@@ -73,11 +85,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual ::IMaterial const * getMaterial(  ) const  {
         if( bp::override func_getMaterial = this->get_override( "getMaterial" ) )
             return func_getMaterial(  );
-        else
+        else{
             return this->Layer::getMaterial(  );
+        }
     }
     
-    
     ::IMaterial const * default_getMaterial(  ) const  {
         return Layer::getMaterial( );
     }
@@ -85,11 +97,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual ::complex_t getRefractiveIndex(  ) const  {
         if( bp::override func_getRefractiveIndex = this->get_override( "getRefractiveIndex" ) )
             return func_getRefractiveIndex(  );
-        else
+        else{
             return this->Layer::getRefractiveIndex(  );
+        }
     }
     
-    
     ::complex_t default_getRefractiveIndex(  ) const  {
         return Layer::getRefractiveIndex( );
     }
@@ -97,11 +109,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual double getThickness(  ) const  {
         if( bp::override func_getThickness = this->get_override( "getThickness" ) )
             return func_getThickness(  );
-        else
+        else{
             return this->Layer::getThickness(  );
+        }
     }
     
-    
     double default_getThickness(  ) const  {
         return Layer::getThickness( );
     }
@@ -109,11 +121,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual double getTotalParticleSurfaceDensity(  ) const  {
         if( bp::override func_getTotalParticleSurfaceDensity = this->get_override( "getTotalParticleSurfaceDensity" ) )
             return func_getTotalParticleSurfaceDensity(  );
-        else
+        else{
             return this->Layer::getTotalParticleSurfaceDensity(  );
+        }
     }
     
-    
     double default_getTotalParticleSurfaceDensity(  ) const  {
         return Layer::getTotalParticleSurfaceDensity( );
     }
@@ -121,11 +133,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual void setDecoration( ::IDecoration const & decoration ) {
         if( bp::override func_setDecoration = this->get_override( "setDecoration" ) )
             func_setDecoration( boost::ref(decoration) );
-        else
+        else{
             this->Layer::setDecoration( boost::ref(decoration) );
+        }
     }
     
-    
     void default_setDecoration( ::IDecoration const & decoration ) {
         Layer::setDecoration( boost::ref(decoration) );
     }
@@ -133,11 +145,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual void setMaterial( ::IMaterial const * material ) {
         if( bp::override func_setMaterial = this->get_override( "setMaterial" ) )
             func_setMaterial( boost::python::ptr(material) );
-        else
+        else{
             this->Layer::setMaterial( boost::python::ptr(material) );
+        }
     }
     
-    
     void default_setMaterial( ::IMaterial const * material ) {
         Layer::setMaterial( boost::python::ptr(material) );
     }
@@ -145,11 +157,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual void setMaterial( ::IMaterial const * material, double thickness ) {
         if( bp::override func_setMaterial = this->get_override( "setMaterial" ) )
             func_setMaterial( boost::python::ptr(material), thickness );
-        else
+        else{
             this->Layer::setMaterial( boost::python::ptr(material), thickness );
+        }
     }
     
-    
     void default_setMaterial( ::IMaterial const * material, double thickness ) {
         Layer::setMaterial( boost::python::ptr(material), thickness );
     }
@@ -157,11 +169,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual void setThickness( double thickness ) {
         if( bp::override func_setThickness = this->get_override( "setThickness" ) )
             func_setThickness( thickness );
-        else
+        else{
             this->Layer::setThickness( thickness );
+        }
     }
     
-    
     void default_setThickness( double thickness ) {
         Layer::setThickness( thickness );
     }
@@ -169,11 +181,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -181,11 +193,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -193,11 +205,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -205,11 +217,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -217,11 +229,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -229,11 +241,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -260,11 +272,11 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -272,24 +284,24 @@ struct Layer_wrapper : Layer, bp::wrapper< Layer > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -315,6 +327,18 @@ void register_Layer_class(){
                 , default_clone_function_type(&Layer_wrapper::default_clone)
                 , bp::return_value_policy< bp::manage_new_object >() );
         
+        }
+        { //::Layer::cloneInvertB
+        
+            typedef ::Layer * ( ::Layer::*cloneInvertB_function_type )(  ) const;
+            typedef ::Layer * ( Layer_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            Layer_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::Layer::cloneInvertB)
+                , default_cloneInvertB_function_type(&Layer_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::Layer::getDecoration
         
@@ -525,8 +549,8 @@ void register_Layer_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( Layer_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( Layer_wrapper::*default_size_function_type )(  ) const;
             
             Layer_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/LayerInterface.pypp.cpp b/Core/PythonAPI/src/LayerInterface.pypp.cpp
index eefc2d00c61120952cf8780bbb985e37eab1f3a5..96a7acf5a2bd9888d4e92b1b0b76991a877ce4e9 100644
--- a/Core/PythonAPI/src/LayerInterface.pypp.cpp
+++ b/Core/PythonAPI/src/LayerInterface.pypp.cpp
@@ -21,11 +21,11 @@ struct LayerInterface_wrapper : LayerInterface, bp::wrapper< LayerInterface > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -33,11 +33,11 @@ struct LayerInterface_wrapper : LayerInterface, bp::wrapper< LayerInterface > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -45,23 +45,35 @@ struct LayerInterface_wrapper : LayerInterface, bp::wrapper< LayerInterface > {
     virtual ::ICompositeSample * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->ICompositeSample::clone(  );
+        }
     }
     
-    
     ::ICompositeSample * default_clone(  ) const  {
         return ICompositeSample::clone( );
     }
 
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -69,11 +81,11 @@ struct LayerInterface_wrapper : LayerInterface, bp::wrapper< LayerInterface > {
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -81,11 +93,11 @@ struct LayerInterface_wrapper : LayerInterface, bp::wrapper< LayerInterface > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -93,11 +105,11 @@ struct LayerInterface_wrapper : LayerInterface, bp::wrapper< LayerInterface > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -124,11 +136,11 @@ struct LayerInterface_wrapper : LayerInterface, bp::wrapper< LayerInterface > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -136,24 +148,24 @@ struct LayerInterface_wrapper : LayerInterface, bp::wrapper< LayerInterface > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -238,6 +250,18 @@ void register_LayerInterface_class(){
                 , default_clone_function_type(&LayerInterface_wrapper::default_clone)
                 , bp::return_value_policy< bp::manage_new_object >() );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( LayerInterface_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            LayerInterface_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&LayerInterface_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IParameterized::createParameterTree
         
@@ -321,8 +345,8 @@ void register_LayerInterface_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( LayerInterface_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( LayerInterface_wrapper::*default_size_function_type )(  ) const;
             
             LayerInterface_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/LayerRoughness.pypp.cpp b/Core/PythonAPI/src/LayerRoughness.pypp.cpp
index 9d820f21cca127abaaa0acf2946946a97bbba92e..1cbdaaaca9fb28a14cd98948494bfdb126107f98 100644
--- a/Core/PythonAPI/src/LayerRoughness.pypp.cpp
+++ b/Core/PythonAPI/src/LayerRoughness.pypp.cpp
@@ -35,11 +35,11 @@ struct LayerRoughness_wrapper : LayerRoughness, bp::wrapper< LayerRoughness > {
     virtual ::LayerRoughness * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->LayerRoughness::clone(  );
+        }
     }
     
-    
     ::LayerRoughness * default_clone(  ) const  {
         return LayerRoughness::clone( );
     }
@@ -47,11 +47,11 @@ struct LayerRoughness_wrapper : LayerRoughness, bp::wrapper< LayerRoughness > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -59,23 +59,35 @@ struct LayerRoughness_wrapper : LayerRoughness, bp::wrapper< LayerRoughness > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
+    virtual ::ISample * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ISample::cloneInvertB(  );
+        }
+    }
+    
+    ::ISample * default_cloneInvertB(  ) const  {
+        return ISample::cloneInvertB( );
+    }
+
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -83,11 +95,11 @@ struct LayerRoughness_wrapper : LayerRoughness, bp::wrapper< LayerRoughness > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ISample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ISample::getCompositeSample( );
     }
@@ -95,11 +107,11 @@ struct LayerRoughness_wrapper : LayerRoughness, bp::wrapper< LayerRoughness > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -126,11 +138,11 @@ struct LayerRoughness_wrapper : LayerRoughness, bp::wrapper< LayerRoughness > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -138,11 +150,11 @@ struct LayerRoughness_wrapper : LayerRoughness, bp::wrapper< LayerRoughness > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -266,6 +278,18 @@ void register_LayerRoughness_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&LayerRoughness_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ISample::cloneInvertB
+        
+            typedef ::ISample * ( ::ISample::*cloneInvertB_function_type )(  ) const;
+            typedef ::ISample * ( LayerRoughness_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            LayerRoughness_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ISample::cloneInvertB)
+                , default_cloneInvertB_function_type(&LayerRoughness_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IParameterized::createParameterTree
         
diff --git a/Core/PythonAPI/src/MaterialManager.pypp.cpp b/Core/PythonAPI/src/MaterialManager.pypp.cpp
index 945dc8ba821332a0bda3b314684e4647c3369fd8..9ef5d0ccca1f4f470aaaf24c1592f90ae4ef048a 100644
--- a/Core/PythonAPI/src/MaterialManager.pypp.cpp
+++ b/Core/PythonAPI/src/MaterialManager.pypp.cpp
@@ -29,6 +29,28 @@ void register_MaterialManager_class(){
                 , deleteMaterial_function_type( &::MaterialManager::deleteMaterial )
                 , ( bp::arg("name") ) );
         
+        }
+        { //::MaterialManager::getHomogeneousMagneticMaterial
+        
+            typedef ::IMaterial const * ( *getHomogeneousMagneticMaterial_function_type )( ::std::string const &,::complex_t const &,::kvector_t const & );
+            
+            MaterialManager_exposer.def( 
+                "getHomogeneousMagneticMaterial"
+                , getHomogeneousMagneticMaterial_function_type( &::MaterialManager::getHomogeneousMagneticMaterial )
+                , ( bp::arg("name"), bp::arg("refractive_index"), bp::arg("magnetic_field") )
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
+        }
+        { //::MaterialManager::getHomogeneousMagneticMaterial
+        
+            typedef ::IMaterial const * ( *getHomogeneousMagneticMaterial_function_type )( ::std::string const &,double,double,::kvector_t const & );
+            
+            MaterialManager_exposer.def( 
+                "getHomogeneousMagneticMaterial"
+                , getHomogeneousMagneticMaterial_function_type( &::MaterialManager::getHomogeneousMagneticMaterial )
+                , ( bp::arg("name"), bp::arg("refractive_index_delta"), bp::arg("refractive_index_beta"), bp::arg("magnetic_field") )
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::MaterialManager::getHomogeneousMaterial
         
@@ -51,6 +73,17 @@ void register_MaterialManager_class(){
                 , ( bp::arg("name"), bp::arg("refractive_index_delta"), bp::arg("refractive_index_beta") )
                 , bp::return_value_policy< bp::reference_existing_object >() );
         
+        }
+        { //::MaterialManager::getInvertedMaterial
+        
+            typedef ::IMaterial const * ( *getInvertedMaterial_function_type )( ::std::string const & );
+            
+            MaterialManager_exposer.def( 
+                "getInvertedMaterial"
+                , getInvertedMaterial_function_type( &::MaterialManager::getInvertedMaterial )
+                , ( bp::arg("name") )
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::MaterialManager::getMaterial
         
@@ -92,7 +125,9 @@ void register_MaterialManager_class(){
                 , ( bp::arg("name"), bp::arg("index") ) );
         
         }
+        MaterialManager_exposer.staticmethod( "getHomogeneousMagneticMaterial" );
         MaterialManager_exposer.staticmethod( "getHomogeneousMaterial" );
+        MaterialManager_exposer.staticmethod( "getInvertedMaterial" );
         MaterialManager_exposer.staticmethod( "getMaterial" );
         MaterialManager_exposer.staticmethod( "getNumberOfMaterials" );
     }
diff --git a/Core/PythonAPI/src/MesoCrystal.pypp.cpp b/Core/PythonAPI/src/MesoCrystal.pypp.cpp
index eb450bccfd90cb1fa45b59c5cfac7ce2fdf3ce46..2b6f5d10559a8b6f03b92ee8cc30977ac6a03534 100644
--- a/Core/PythonAPI/src/MesoCrystal.pypp.cpp
+++ b/Core/PythonAPI/src/MesoCrystal.pypp.cpp
@@ -28,11 +28,11 @@ struct MesoCrystal_wrapper : MesoCrystal, bp::wrapper< MesoCrystal > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -40,11 +40,11 @@ struct MesoCrystal_wrapper : MesoCrystal, bp::wrapper< MesoCrystal > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -52,11 +52,11 @@ struct MesoCrystal_wrapper : MesoCrystal, bp::wrapper< MesoCrystal > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -64,11 +64,11 @@ struct MesoCrystal_wrapper : MesoCrystal, bp::wrapper< MesoCrystal > {
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -76,11 +76,11 @@ struct MesoCrystal_wrapper : MesoCrystal, bp::wrapper< MesoCrystal > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -88,11 +88,11 @@ struct MesoCrystal_wrapper : MesoCrystal, bp::wrapper< MesoCrystal > {
     virtual ::IMaterial const * getMaterial(  ) const  {
         if( bp::override func_getMaterial = this->get_override( "getMaterial" ) )
             return func_getMaterial(  );
-        else
+        else{
             return this->Particle::getMaterial(  );
+        }
     }
     
-    
     ::IMaterial const * default_getMaterial(  ) const  {
         return Particle::getMaterial( );
     }
@@ -100,11 +100,11 @@ struct MesoCrystal_wrapper : MesoCrystal, bp::wrapper< MesoCrystal > {
     virtual ::complex_t getRefractiveIndex(  ) const  {
         if( bp::override func_getRefractiveIndex = this->get_override( "getRefractiveIndex" ) )
             return func_getRefractiveIndex(  );
-        else
+        else{
             return this->Particle::getRefractiveIndex(  );
+        }
     }
     
-    
     ::complex_t default_getRefractiveIndex(  ) const  {
         return Particle::getRefractiveIndex( );
     }
@@ -112,11 +112,11 @@ struct MesoCrystal_wrapper : MesoCrystal, bp::wrapper< MesoCrystal > {
     virtual bool hasDistributedFormFactor(  ) const  {
         if( bp::override func_hasDistributedFormFactor = this->get_override( "hasDistributedFormFactor" ) )
             return func_hasDistributedFormFactor(  );
-        else
+        else{
             return this->Particle::hasDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_hasDistributedFormFactor(  ) const  {
         return Particle::hasDistributedFormFactor( );
     }
@@ -124,11 +124,11 @@ struct MesoCrystal_wrapper : MesoCrystal, bp::wrapper< MesoCrystal > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -155,11 +155,11 @@ struct MesoCrystal_wrapper : MesoCrystal, bp::wrapper< MesoCrystal > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -167,24 +167,24 @@ struct MesoCrystal_wrapper : MesoCrystal, bp::wrapper< MesoCrystal > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -334,8 +334,8 @@ void register_MesoCrystal_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( MesoCrystal_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( MesoCrystal_wrapper::*default_size_function_type )(  ) const;
             
             MesoCrystal_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/MultiLayer.pypp.cpp b/Core/PythonAPI/src/MultiLayer.pypp.cpp
index 92f25ce0a99fce40f1561180bbf21c9e5aad23df..858975dc40e460b956ec3baef5cf705f106bc5f5 100644
--- a/Core/PythonAPI/src/MultiLayer.pypp.cpp
+++ b/Core/PythonAPI/src/MultiLayer.pypp.cpp
@@ -28,23 +28,35 @@ struct MultiLayer_wrapper : MultiLayer, bp::wrapper< MultiLayer > {
     virtual ::MultiLayer * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->MultiLayer::clone(  );
+        }
     }
     
-    
     ::MultiLayer * default_clone(  ) const  {
         return MultiLayer::clone( );
     }
 
+    virtual ::MultiLayer * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->MultiLayer::cloneInvertB(  );
+        }
+    }
+    
+    ::MultiLayer * default_cloneInvertB(  ) const  {
+        return MultiLayer::cloneInvertB( );
+    }
+
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -52,11 +64,11 @@ struct MultiLayer_wrapper : MultiLayer, bp::wrapper< MultiLayer > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -64,11 +76,11 @@ struct MultiLayer_wrapper : MultiLayer, bp::wrapper< MultiLayer > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -76,11 +88,11 @@ struct MultiLayer_wrapper : MultiLayer, bp::wrapper< MultiLayer > {
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -88,11 +100,11 @@ struct MultiLayer_wrapper : MultiLayer, bp::wrapper< MultiLayer > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -100,11 +112,11 @@ struct MultiLayer_wrapper : MultiLayer, bp::wrapper< MultiLayer > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -131,11 +143,11 @@ struct MultiLayer_wrapper : MultiLayer, bp::wrapper< MultiLayer > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -143,24 +155,24 @@ struct MultiLayer_wrapper : MultiLayer, bp::wrapper< MultiLayer > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -212,6 +224,18 @@ void register_MultiLayer_class(){
                 , default_clone_function_type(&MultiLayer_wrapper::default_clone)
                 , bp::return_value_policy< bp::manage_new_object >() );
         
+        }
+        { //::MultiLayer::cloneInvertB
+        
+            typedef ::MultiLayer * ( ::MultiLayer::*cloneInvertB_function_type )(  ) const;
+            typedef ::MultiLayer * ( MultiLayer_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            MultiLayer_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::MultiLayer::cloneInvertB)
+                , default_cloneInvertB_function_type(&MultiLayer_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::MultiLayer::getCrossCorrLength
         
@@ -224,7 +248,7 @@ void register_MultiLayer_class(){
         }
         { //::MultiLayer::getCrossCorrSpectralFun
         
-            typedef double ( ::MultiLayer::*getCrossCorrSpectralFun_function_type )( ::kvector_t const &,::std::size_t,::std::size_t ) const;
+            typedef double ( ::MultiLayer::*getCrossCorrSpectralFun_function_type )( ::kvector_t const &,::size_t,::size_t ) const;
             
             MultiLayer_exposer.def( 
                 "getCrossCorrSpectralFun"
@@ -234,7 +258,7 @@ void register_MultiLayer_class(){
         }
         { //::MultiLayer::getLayer
         
-            typedef ::Layer const * ( ::MultiLayer::*getLayer_function_type )( ::std::size_t ) const;
+            typedef ::Layer const * ( ::MultiLayer::*getLayer_function_type )( ::size_t ) const;
             
             MultiLayer_exposer.def( 
                 "getLayer"
@@ -245,7 +269,7 @@ void register_MultiLayer_class(){
         }
         { //::MultiLayer::getLayerBottomInterface
         
-            typedef ::LayerInterface const * ( ::MultiLayer::*getLayerBottomInterface_function_type )( ::std::size_t ) const;
+            typedef ::LayerInterface const * ( ::MultiLayer::*getLayerBottomInterface_function_type )( ::size_t ) const;
             
             MultiLayer_exposer.def( 
                 "getLayerBottomInterface"
@@ -256,7 +280,7 @@ void register_MultiLayer_class(){
         }
         { //::MultiLayer::getLayerBottomZ
         
-            typedef double ( ::MultiLayer::*getLayerBottomZ_function_type )( ::std::size_t ) const;
+            typedef double ( ::MultiLayer::*getLayerBottomZ_function_type )( ::size_t ) const;
             
             MultiLayer_exposer.def( 
                 "getLayerBottomZ"
@@ -266,7 +290,7 @@ void register_MultiLayer_class(){
         }
         { //::MultiLayer::getLayerInterface
         
-            typedef ::LayerInterface const * ( ::MultiLayer::*getLayerInterface_function_type )( ::std::size_t ) const;
+            typedef ::LayerInterface const * ( ::MultiLayer::*getLayerInterface_function_type )( ::size_t ) const;
             
             MultiLayer_exposer.def( 
                 "getLayerInterface"
@@ -277,7 +301,7 @@ void register_MultiLayer_class(){
         }
         { //::MultiLayer::getLayerThickness
         
-            typedef double ( ::MultiLayer::*getLayerThickness_function_type )( ::std::size_t ) const;
+            typedef double ( ::MultiLayer::*getLayerThickness_function_type )( ::size_t ) const;
             
             MultiLayer_exposer.def( 
                 "getLayerThickness"
@@ -287,7 +311,7 @@ void register_MultiLayer_class(){
         }
         { //::MultiLayer::getLayerTopInterface
         
-            typedef ::LayerInterface const * ( ::MultiLayer::*getLayerTopInterface_function_type )( ::std::size_t ) const;
+            typedef ::LayerInterface const * ( ::MultiLayer::*getLayerTopInterface_function_type )( ::size_t ) const;
             
             MultiLayer_exposer.def( 
                 "getLayerTopInterface"
@@ -298,7 +322,7 @@ void register_MultiLayer_class(){
         }
         { //::MultiLayer::getNumberOfInterfaces
         
-            typedef ::std::size_t ( ::MultiLayer::*getNumberOfInterfaces_function_type )(  ) const;
+            typedef ::size_t ( ::MultiLayer::*getNumberOfInterfaces_function_type )(  ) const;
             
             MultiLayer_exposer.def( 
                 "getNumberOfInterfaces"
@@ -307,7 +331,7 @@ void register_MultiLayer_class(){
         }
         { //::MultiLayer::getNumberOfLayers
         
-            typedef ::std::size_t ( ::MultiLayer::*getNumberOfLayers_function_type )(  ) const;
+            typedef ::size_t ( ::MultiLayer::*getNumberOfLayers_function_type )(  ) const;
             
             MultiLayer_exposer.def( 
                 "getNumberOfLayers"
@@ -326,7 +350,7 @@ void register_MultiLayer_class(){
         }
         { //::MultiLayer::setLayerThickness
         
-            typedef void ( ::MultiLayer::*setLayerThickness_function_type )( ::std::size_t,double ) ;
+            typedef void ( ::MultiLayer::*setLayerThickness_function_type )( ::size_t,double ) ;
             
             MultiLayer_exposer.def( 
                 "setLayerThickness"
@@ -438,8 +462,8 @@ void register_MultiLayer_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( MultiLayer_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( MultiLayer_wrapper::*default_size_function_type )(  ) const;
             
             MultiLayer_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/ParameterPool.pypp.cpp b/Core/PythonAPI/src/ParameterPool.pypp.cpp
index 88a890adef42f8d7457b59117ee8e8606bba2a3c..914cffcceb87c743ab97a780af190e5900711dce 100644
--- a/Core/PythonAPI/src/ParameterPool.pypp.cpp
+++ b/Core/PythonAPI/src/ParameterPool.pypp.cpp
@@ -26,11 +26,11 @@ struct ParameterPool_wrapper : ParameterPool, bp::wrapper< ParameterPool > {
     virtual ::ParameterPool * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->ParameterPool::clone(  );
+        }
     }
     
-    
     ::ParameterPool * default_clone(  ) const  {
         return ParameterPool::clone( );
     }
@@ -127,7 +127,7 @@ void register_ParameterPool_class(){
         }
         { //::ParameterPool::size
         
-            typedef ::std::size_t ( ::ParameterPool::*size_function_type )(  ) const;
+            typedef ::size_t ( ::ParameterPool::*size_function_type )(  ) const;
             
             ParameterPool_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/Particle.pypp.cpp b/Core/PythonAPI/src/Particle.pypp.cpp
index ffabc1fb52384276de639164967eb2ad133080bd..36d659ff1fe186673334c3d7b8973c7b8f661fe5 100644
--- a/Core/PythonAPI/src/Particle.pypp.cpp
+++ b/Core/PythonAPI/src/Particle.pypp.cpp
@@ -25,8 +25,8 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     
     }
 
-    Particle_wrapper(::IMaterial const * material, ::IFormFactor const & form_factor )
-    : Particle( boost::python::ptr(material), boost::ref(form_factor) )
+    Particle_wrapper(::IMaterial const * p_material, ::IFormFactor const & form_factor )
+    : Particle( boost::python::ptr(p_material), boost::ref(form_factor) )
       , bp::wrapper< Particle >(){
         // constructor
     
@@ -35,23 +35,35 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual ::Particle * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->Particle::clone(  );
+        }
     }
     
-    
     ::Particle * default_clone(  ) const  {
         return Particle::clone( );
     }
 
+    virtual ::Particle * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->Particle::cloneInvertB(  );
+        }
+    }
+    
+    ::Particle * default_cloneInvertB(  ) const  {
+        return Particle::cloneInvertB( );
+    }
+
     virtual ::IFormFactor * createFormFactor(  ) const  {
         if( bp::override func_createFormFactor = this->get_override( "createFormFactor" ) )
             return func_createFormFactor(  );
-        else
+        else{
             return this->Particle::createFormFactor(  );
+        }
     }
     
-    
     ::IFormFactor * default_createFormFactor(  ) const  {
         return Particle::createFormFactor( );
     }
@@ -59,11 +71,11 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual ::IMaterial const * getMaterial(  ) const  {
         if( bp::override func_getMaterial = this->get_override( "getMaterial" ) )
             return func_getMaterial(  );
-        else
+        else{
             return this->Particle::getMaterial(  );
+        }
     }
     
-    
     ::IMaterial const * default_getMaterial(  ) const  {
         return Particle::getMaterial( );
     }
@@ -71,11 +83,11 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual ::complex_t getRefractiveIndex(  ) const  {
         if( bp::override func_getRefractiveIndex = this->get_override( "getRefractiveIndex" ) )
             return func_getRefractiveIndex(  );
-        else
+        else{
             return this->Particle::getRefractiveIndex(  );
+        }
     }
     
-    
     ::complex_t default_getRefractiveIndex(  ) const  {
         return Particle::getRefractiveIndex( );
     }
@@ -83,11 +95,11 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual ::IFormFactor const * getSimpleFormFactor(  ) const  {
         if( bp::override func_getSimpleFormFactor = this->get_override( "getSimpleFormFactor" ) )
             return func_getSimpleFormFactor(  );
-        else
+        else{
             return this->Particle::getSimpleFormFactor(  );
+        }
     }
     
-    
     ::IFormFactor const * default_getSimpleFormFactor(  ) const  {
         return Particle::getSimpleFormFactor( );
     }
@@ -95,35 +107,23 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual bool hasDistributedFormFactor(  ) const  {
         if( bp::override func_hasDistributedFormFactor = this->get_override( "hasDistributedFormFactor" ) )
             return func_hasDistributedFormFactor(  );
-        else
+        else{
             return this->Particle::hasDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_hasDistributedFormFactor(  ) const  {
         return Particle::hasDistributedFormFactor( );
     }
 
-    virtual void setAmbientRefractiveIndex( ::complex_t refractive_index ) {
-        if( bp::override func_setAmbientRefractiveIndex = this->get_override( "setAmbientRefractiveIndex" ) )
-            func_setAmbientRefractiveIndex( refractive_index );
-        else
-            this->Particle::setAmbientRefractiveIndex( refractive_index );
-    }
-    
-    
-    void default_setAmbientRefractiveIndex( ::complex_t refractive_index ) {
-        Particle::setAmbientRefractiveIndex( refractive_index );
-    }
-
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -131,11 +131,11 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -143,11 +143,11 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -155,11 +155,11 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -167,11 +167,11 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -179,11 +179,11 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -210,11 +210,11 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -222,24 +222,24 @@ struct Particle_wrapper : Particle, bp::wrapper< Particle > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -251,7 +251,7 @@ void register_Particle_class(){
         typedef bp::class_< Particle_wrapper, bp::bases< ICompositeSample >, boost::noncopyable > Particle_exposer_t;
         Particle_exposer_t Particle_exposer = Particle_exposer_t( "Particle", bp::init< >() );
         bp::scope Particle_scope( Particle_exposer );
-        Particle_exposer.def( bp::init< IMaterial const *, IFormFactor const & >(( bp::arg("material"), bp::arg("form_factor") )) );
+        Particle_exposer.def( bp::init< IMaterial const *, IFormFactor const & >(( bp::arg("p_material"), bp::arg("form_factor") )) );
         { //::Particle::clone
         
             typedef ::Particle * ( ::Particle::*clone_function_type )(  ) const;
@@ -263,6 +263,18 @@ void register_Particle_class(){
                 , default_clone_function_type(&Particle_wrapper::default_clone)
                 , bp::return_value_policy< bp::manage_new_object >() );
         
+        }
+        { //::Particle::cloneInvertB
+        
+            typedef ::Particle * ( ::Particle::*cloneInvertB_function_type )(  ) const;
+            typedef ::Particle * ( Particle_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            Particle_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::Particle::cloneInvertB)
+                , default_cloneInvertB_function_type(&Particle_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::Particle::createFormFactor
         
@@ -321,18 +333,6 @@ void register_Particle_class(){
                 , hasDistributedFormFactor_function_type(&::Particle::hasDistributedFormFactor)
                 , default_hasDistributedFormFactor_function_type(&Particle_wrapper::default_hasDistributedFormFactor) );
         
-        }
-        { //::Particle::setAmbientRefractiveIndex
-        
-            typedef void ( ::Particle::*setAmbientRefractiveIndex_function_type )( ::complex_t ) ;
-            typedef void ( Particle_wrapper::*default_setAmbientRefractiveIndex_function_type )( ::complex_t ) ;
-            
-            Particle_exposer.def( 
-                "setAmbientRefractiveIndex"
-                , setAmbientRefractiveIndex_function_type(&::Particle::setAmbientRefractiveIndex)
-                , default_setAmbientRefractiveIndex_function_type(&Particle_wrapper::default_setAmbientRefractiveIndex)
-                , ( bp::arg("refractive_index") ) );
-        
         }
         { //::IParameterized::areParametersChanged
         
@@ -438,8 +438,8 @@ void register_Particle_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( Particle_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( Particle_wrapper::*default_size_function_type )(  ) const;
             
             Particle_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/ParticleCoreShell.pypp.cpp b/Core/PythonAPI/src/ParticleCoreShell.pypp.cpp
index cc837ff38e9618e73967cd88494215f55983f751..6eaaa702d38b7b57905ac67c26e42cdfce30f776 100644
--- a/Core/PythonAPI/src/ParticleCoreShell.pypp.cpp
+++ b/Core/PythonAPI/src/ParticleCoreShell.pypp.cpp
@@ -28,11 +28,11 @@ struct ParticleCoreShell_wrapper : ParticleCoreShell, bp::wrapper< ParticleCoreS
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -40,11 +40,11 @@ struct ParticleCoreShell_wrapper : ParticleCoreShell, bp::wrapper< ParticleCoreS
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -52,11 +52,11 @@ struct ParticleCoreShell_wrapper : ParticleCoreShell, bp::wrapper< ParticleCoreS
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -64,11 +64,11 @@ struct ParticleCoreShell_wrapper : ParticleCoreShell, bp::wrapper< ParticleCoreS
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -76,11 +76,11 @@ struct ParticleCoreShell_wrapper : ParticleCoreShell, bp::wrapper< ParticleCoreS
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -88,11 +88,11 @@ struct ParticleCoreShell_wrapper : ParticleCoreShell, bp::wrapper< ParticleCoreS
     virtual ::IMaterial const * getMaterial(  ) const  {
         if( bp::override func_getMaterial = this->get_override( "getMaterial" ) )
             return func_getMaterial(  );
-        else
+        else{
             return this->Particle::getMaterial(  );
+        }
     }
     
-    
     ::IMaterial const * default_getMaterial(  ) const  {
         return Particle::getMaterial( );
     }
@@ -100,11 +100,11 @@ struct ParticleCoreShell_wrapper : ParticleCoreShell, bp::wrapper< ParticleCoreS
     virtual ::complex_t getRefractiveIndex(  ) const  {
         if( bp::override func_getRefractiveIndex = this->get_override( "getRefractiveIndex" ) )
             return func_getRefractiveIndex(  );
-        else
+        else{
             return this->Particle::getRefractiveIndex(  );
+        }
     }
     
-    
     ::complex_t default_getRefractiveIndex(  ) const  {
         return Particle::getRefractiveIndex( );
     }
@@ -112,11 +112,11 @@ struct ParticleCoreShell_wrapper : ParticleCoreShell, bp::wrapper< ParticleCoreS
     virtual bool hasDistributedFormFactor(  ) const  {
         if( bp::override func_hasDistributedFormFactor = this->get_override( "hasDistributedFormFactor" ) )
             return func_hasDistributedFormFactor(  );
-        else
+        else{
             return this->Particle::hasDistributedFormFactor(  );
+        }
     }
     
-    
     bool default_hasDistributedFormFactor(  ) const  {
         return Particle::hasDistributedFormFactor( );
     }
@@ -124,11 +124,11 @@ struct ParticleCoreShell_wrapper : ParticleCoreShell, bp::wrapper< ParticleCoreS
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -155,11 +155,11 @@ struct ParticleCoreShell_wrapper : ParticleCoreShell, bp::wrapper< ParticleCoreS
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -167,24 +167,24 @@ struct ParticleCoreShell_wrapper : ParticleCoreShell, bp::wrapper< ParticleCoreS
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -334,8 +334,8 @@ void register_ParticleCoreShell_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( ParticleCoreShell_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( ParticleCoreShell_wrapper::*default_size_function_type )(  ) const;
             
             ParticleCoreShell_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/ParticleDecoration.pypp.cpp b/Core/PythonAPI/src/ParticleDecoration.pypp.cpp
index 8c36b9d269ea680dbbaafe18f5ff8adfb0f18ab5..798ba76674f8412a96fd68d7f151eb0c8fad2f77 100644
--- a/Core/PythonAPI/src/ParticleDecoration.pypp.cpp
+++ b/Core/PythonAPI/src/ParticleDecoration.pypp.cpp
@@ -28,83 +28,95 @@ struct ParticleDecoration_wrapper : ParticleDecoration, bp::wrapper< ParticleDec
     virtual ::ParticleDecoration * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->ParticleDecoration::clone(  );
+        }
     }
     
-    
     ::ParticleDecoration * default_clone(  ) const  {
         return ParticleDecoration::clone( );
     }
 
-    virtual double getAbundanceFractionOfParticle( ::std::size_t index ) const  {
+    virtual ::ParticleDecoration * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ParticleDecoration::cloneInvertB(  );
+        }
+    }
+    
+    ::ParticleDecoration * default_cloneInvertB(  ) const  {
+        return ParticleDecoration::cloneInvertB( );
+    }
+
+    virtual double getAbundanceFractionOfParticle( ::size_t index ) const  {
         if( bp::override func_getAbundanceFractionOfParticle = this->get_override( "getAbundanceFractionOfParticle" ) )
             return func_getAbundanceFractionOfParticle( index );
-        else
+        else{
             return this->ParticleDecoration::getAbundanceFractionOfParticle( index );
+        }
     }
     
-    
-    double default_getAbundanceFractionOfParticle( ::std::size_t index ) const  {
+    double default_getAbundanceFractionOfParticle( ::size_t index ) const  {
         return ParticleDecoration::getAbundanceFractionOfParticle( index );
     }
 
     virtual ::SafePointerVector< IInterferenceFunction > getInterferenceFunctions(  ) const  {
         if( bp::override func_getInterferenceFunctions = this->get_override( "getInterferenceFunctions" ) )
             return func_getInterferenceFunctions(  );
-        else
+        else{
             return this->ParticleDecoration::getInterferenceFunctions(  );
+        }
     }
     
-    
     ::SafePointerVector< IInterferenceFunction > default_getInterferenceFunctions(  ) const  {
         return ParticleDecoration::getInterferenceFunctions( );
     }
 
-    virtual ::std::size_t getNumberOfInterferenceFunctions(  ) const  {
+    virtual ::size_t getNumberOfInterferenceFunctions(  ) const  {
         if( bp::override func_getNumberOfInterferenceFunctions = this->get_override( "getNumberOfInterferenceFunctions" ) )
             return func_getNumberOfInterferenceFunctions(  );
-        else
+        else{
             return this->ParticleDecoration::getNumberOfInterferenceFunctions(  );
+        }
     }
     
-    
-    ::std::size_t default_getNumberOfInterferenceFunctions(  ) const  {
+    ::size_t default_getNumberOfInterferenceFunctions(  ) const  {
         return ParticleDecoration::getNumberOfInterferenceFunctions( );
     }
 
-    virtual ::std::size_t getNumberOfParticles(  ) const  {
+    virtual ::size_t getNumberOfParticles(  ) const  {
         if( bp::override func_getNumberOfParticles = this->get_override( "getNumberOfParticles" ) )
             return func_getNumberOfParticles(  );
-        else
+        else{
             return this->ParticleDecoration::getNumberOfParticles(  );
+        }
     }
     
-    
-    ::std::size_t default_getNumberOfParticles(  ) const  {
+    ::size_t default_getNumberOfParticles(  ) const  {
         return ParticleDecoration::getNumberOfParticles( );
     }
 
-    virtual ::ParticleInfo const * getParticleInfo( ::std::size_t index ) const  {
+    virtual ::ParticleInfo const * getParticleInfo( ::size_t index ) const  {
         if( bp::override func_getParticleInfo = this->get_override( "getParticleInfo" ) )
             return func_getParticleInfo( index );
-        else
+        else{
             return this->ParticleDecoration::getParticleInfo( index );
+        }
     }
     
-    
-    ::ParticleInfo const * default_getParticleInfo( ::std::size_t index ) const  {
+    ::ParticleInfo const * default_getParticleInfo( ::size_t index ) const  {
         return ParticleDecoration::getParticleInfo( index );
     }
 
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -112,11 +124,11 @@ struct ParticleDecoration_wrapper : ParticleDecoration, bp::wrapper< ParticleDec
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -124,11 +136,11 @@ struct ParticleDecoration_wrapper : ParticleDecoration, bp::wrapper< ParticleDec
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -136,11 +148,11 @@ struct ParticleDecoration_wrapper : ParticleDecoration, bp::wrapper< ParticleDec
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -148,11 +160,11 @@ struct ParticleDecoration_wrapper : ParticleDecoration, bp::wrapper< ParticleDec
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -160,11 +172,11 @@ struct ParticleDecoration_wrapper : ParticleDecoration, bp::wrapper< ParticleDec
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -191,11 +203,11 @@ struct ParticleDecoration_wrapper : ParticleDecoration, bp::wrapper< ParticleDec
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -203,24 +215,24 @@ struct ParticleDecoration_wrapper : ParticleDecoration, bp::wrapper< ParticleDec
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -283,11 +295,23 @@ void register_ParticleDecoration_class(){
                 , default_clone_function_type(&ParticleDecoration_wrapper::default_clone)
                 , bp::return_value_policy< bp::manage_new_object >() );
         
+        }
+        { //::ParticleDecoration::cloneInvertB
+        
+            typedef ::ParticleDecoration * ( ::ParticleDecoration::*cloneInvertB_function_type )(  ) const;
+            typedef ::ParticleDecoration * ( ParticleDecoration_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            ParticleDecoration_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ParticleDecoration::cloneInvertB)
+                , default_cloneInvertB_function_type(&ParticleDecoration_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::ParticleDecoration::getAbundanceFractionOfParticle
         
-            typedef double ( ::ParticleDecoration::*getAbundanceFractionOfParticle_function_type )( ::std::size_t ) const;
-            typedef double ( ParticleDecoration_wrapper::*default_getAbundanceFractionOfParticle_function_type )( ::std::size_t ) const;
+            typedef double ( ::ParticleDecoration::*getAbundanceFractionOfParticle_function_type )( ::size_t ) const;
+            typedef double ( ParticleDecoration_wrapper::*default_getAbundanceFractionOfParticle_function_type )( ::size_t ) const;
             
             ParticleDecoration_exposer.def( 
                 "getAbundanceFractionOfParticle"
@@ -298,7 +322,7 @@ void register_ParticleDecoration_class(){
         }
         { //::ParticleDecoration::getInterferenceFunction
         
-            typedef ::IInterferenceFunction const * ( ::ParticleDecoration::*getInterferenceFunction_function_type )( ::std::size_t ) const;
+            typedef ::IInterferenceFunction const * ( ::ParticleDecoration::*getInterferenceFunction_function_type )( ::size_t ) const;
             
             ParticleDecoration_exposer.def( 
                 "getInterferenceFunction"
@@ -320,8 +344,8 @@ void register_ParticleDecoration_class(){
         }
         { //::ParticleDecoration::getNumberOfInterferenceFunctions
         
-            typedef ::std::size_t ( ::ParticleDecoration::*getNumberOfInterferenceFunctions_function_type )(  ) const;
-            typedef ::std::size_t ( ParticleDecoration_wrapper::*default_getNumberOfInterferenceFunctions_function_type )(  ) const;
+            typedef ::size_t ( ::ParticleDecoration::*getNumberOfInterferenceFunctions_function_type )(  ) const;
+            typedef ::size_t ( ParticleDecoration_wrapper::*default_getNumberOfInterferenceFunctions_function_type )(  ) const;
             
             ParticleDecoration_exposer.def( 
                 "getNumberOfInterferenceFunctions"
@@ -331,8 +355,8 @@ void register_ParticleDecoration_class(){
         }
         { //::ParticleDecoration::getNumberOfParticles
         
-            typedef ::std::size_t ( ::ParticleDecoration::*getNumberOfParticles_function_type )(  ) const;
-            typedef ::std::size_t ( ParticleDecoration_wrapper::*default_getNumberOfParticles_function_type )(  ) const;
+            typedef ::size_t ( ::ParticleDecoration::*getNumberOfParticles_function_type )(  ) const;
+            typedef ::size_t ( ParticleDecoration_wrapper::*default_getNumberOfParticles_function_type )(  ) const;
             
             ParticleDecoration_exposer.def( 
                 "getNumberOfParticles"
@@ -342,8 +366,8 @@ void register_ParticleDecoration_class(){
         }
         { //::ParticleDecoration::getParticleInfo
         
-            typedef ::ParticleInfo const * ( ::ParticleDecoration::*getParticleInfo_function_type )( ::std::size_t ) const;
-            typedef ::ParticleInfo const * ( ParticleDecoration_wrapper::*default_getParticleInfo_function_type )( ::std::size_t ) const;
+            typedef ::ParticleInfo const * ( ::ParticleDecoration::*getParticleInfo_function_type )( ::size_t ) const;
+            typedef ::ParticleInfo const * ( ParticleDecoration_wrapper::*default_getParticleInfo_function_type )( ::size_t ) const;
             
             ParticleDecoration_exposer.def( 
                 "getParticleInfo"
@@ -457,8 +481,8 @@ void register_ParticleDecoration_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( ParticleDecoration_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( ParticleDecoration_wrapper::*default_size_function_type )(  ) const;
             
             ParticleDecoration_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/ParticleInfo.pypp.cpp b/Core/PythonAPI/src/ParticleInfo.pypp.cpp
index 60727de0adcaae18eb118663763c763fff2ec97d..3f868ed18fd18001d6c4b0952e4851bad31b0516 100644
--- a/Core/PythonAPI/src/ParticleInfo.pypp.cpp
+++ b/Core/PythonAPI/src/ParticleInfo.pypp.cpp
@@ -35,23 +35,35 @@ struct ParticleInfo_wrapper : ParticleInfo, bp::wrapper< ParticleInfo > {
     virtual ::ParticleInfo * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->ParticleInfo::clone(  );
+        }
     }
     
-    
     ::ParticleInfo * default_clone(  ) const  {
         return ParticleInfo::clone( );
     }
 
+    virtual ::ParticleInfo * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ParticleInfo::cloneInvertB(  );
+        }
+    }
+    
+    ::ParticleInfo * default_cloneInvertB(  ) const  {
+        return ParticleInfo::cloneInvertB( );
+    }
+
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -59,11 +71,11 @@ struct ParticleInfo_wrapper : ParticleInfo, bp::wrapper< ParticleInfo > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -71,11 +83,11 @@ struct ParticleInfo_wrapper : ParticleInfo, bp::wrapper< ParticleInfo > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -83,11 +95,11 @@ struct ParticleInfo_wrapper : ParticleInfo, bp::wrapper< ParticleInfo > {
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -95,11 +107,11 @@ struct ParticleInfo_wrapper : ParticleInfo, bp::wrapper< ParticleInfo > {
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -107,11 +119,11 @@ struct ParticleInfo_wrapper : ParticleInfo, bp::wrapper< ParticleInfo > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -138,11 +150,11 @@ struct ParticleInfo_wrapper : ParticleInfo, bp::wrapper< ParticleInfo > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -150,24 +162,24 @@ struct ParticleInfo_wrapper : ParticleInfo, bp::wrapper< ParticleInfo > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -191,6 +203,18 @@ void register_ParticleInfo_class(){
                 , default_clone_function_type(&ParticleInfo_wrapper::default_clone)
                 , bp::return_value_policy< bp::manage_new_object >() );
         
+        }
+        { //::ParticleInfo::cloneInvertB
+        
+            typedef ::ParticleInfo * ( ::ParticleInfo::*cloneInvertB_function_type )(  ) const;
+            typedef ::ParticleInfo * ( ParticleInfo_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            ParticleInfo_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ParticleInfo::cloneInvertB)
+                , default_cloneInvertB_function_type(&ParticleInfo_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::ParticleInfo::getAbundance
         
@@ -363,8 +387,8 @@ void register_ParticleInfo_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( ParticleInfo_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( ParticleInfo_wrapper::*default_size_function_type )(  ) const;
             
             ParticleInfo_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/PositionParticleInfo.pypp.cpp b/Core/PythonAPI/src/PositionParticleInfo.pypp.cpp
index 36adfaf26e3dd39db9e87528d65d52177d7622c1..991067d65da4d8b7c7e0b597b050f34084caa0c3 100644
--- a/Core/PythonAPI/src/PositionParticleInfo.pypp.cpp
+++ b/Core/PythonAPI/src/PositionParticleInfo.pypp.cpp
@@ -35,11 +35,11 @@ struct PositionParticleInfo_wrapper : PositionParticleInfo, bp::wrapper< Positio
     virtual ::PositionParticleInfo * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->PositionParticleInfo::clone(  );
+        }
     }
     
-    
     ::PositionParticleInfo * default_clone(  ) const  {
         return PositionParticleInfo::clone( );
     }
@@ -47,11 +47,11 @@ struct PositionParticleInfo_wrapper : PositionParticleInfo, bp::wrapper< Positio
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -59,23 +59,35 @@ struct PositionParticleInfo_wrapper : PositionParticleInfo, bp::wrapper< Positio
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
 
+    virtual ::ParticleInfo * cloneInvertB(  ) const  {
+        if( bp::override func_cloneInvertB = this->get_override( "cloneInvertB" ) )
+            return func_cloneInvertB(  );
+        else{
+            return this->ParticleInfo::cloneInvertB(  );
+        }
+    }
+    
+    ::ParticleInfo * default_cloneInvertB(  ) const  {
+        return ParticleInfo::cloneInvertB( );
+    }
+
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -83,11 +95,11 @@ struct PositionParticleInfo_wrapper : PositionParticleInfo, bp::wrapper< Positio
     virtual ::ICompositeSample * getCompositeSample(  ) {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample * default_getCompositeSample(  ) {
         return ICompositeSample::getCompositeSample( );
     }
@@ -95,11 +107,11 @@ struct PositionParticleInfo_wrapper : PositionParticleInfo, bp::wrapper< Positio
     virtual ::ICompositeSample const * getCompositeSample(  ) const  {
         if( bp::override func_getCompositeSample = this->get_override( "getCompositeSample" ) )
             return func_getCompositeSample(  );
-        else
+        else{
             return this->ICompositeSample::getCompositeSample(  );
+        }
     }
     
-    
     ::ICompositeSample const * default_getCompositeSample(  ) const  {
         return ICompositeSample::getCompositeSample( );
     }
@@ -107,11 +119,11 @@ struct PositionParticleInfo_wrapper : PositionParticleInfo, bp::wrapper< Positio
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -138,11 +150,11 @@ struct PositionParticleInfo_wrapper : PositionParticleInfo, bp::wrapper< Positio
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -150,24 +162,24 @@ struct PositionParticleInfo_wrapper : PositionParticleInfo, bp::wrapper< Positio
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
 
-    virtual ::std::size_t size(  ) const  {
+    virtual ::size_t size(  ) const  {
         if( bp::override func_size = this->get_override( "size" ) )
             return func_size(  );
-        else
+        else{
             return this->ICompositeSample::size(  );
+        }
     }
     
-    
-    ::std::size_t default_size(  ) const  {
+    ::size_t default_size(  ) const  {
         return ICompositeSample::size( );
     }
 
@@ -242,6 +254,18 @@ void register_PositionParticleInfo_class(){
                 , clearParameterPool_function_type(&::IParameterized::clearParameterPool)
                 , default_clearParameterPool_function_type(&PositionParticleInfo_wrapper::default_clearParameterPool) );
         
+        }
+        { //::ParticleInfo::cloneInvertB
+        
+            typedef ::ParticleInfo * ( ::ParticleInfo::*cloneInvertB_function_type )(  ) const;
+            typedef ::ParticleInfo * ( PositionParticleInfo_wrapper::*default_cloneInvertB_function_type )(  ) const;
+            
+            PositionParticleInfo_exposer.def( 
+                "cloneInvertB"
+                , cloneInvertB_function_type(&::ParticleInfo::cloneInvertB)
+                , default_cloneInvertB_function_type(&PositionParticleInfo_wrapper::default_cloneInvertB)
+                , bp::return_value_policy< bp::reference_existing_object >() );
+        
         }
         { //::IParameterized::createParameterTree
         
@@ -325,8 +349,8 @@ void register_PositionParticleInfo_class(){
         }
         { //::ICompositeSample::size
         
-            typedef ::std::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
-            typedef ::std::size_t ( PositionParticleInfo_wrapper::*default_size_function_type )(  ) const;
+            typedef ::size_t ( ::ICompositeSample::*size_function_type )(  ) const;
+            typedef ::size_t ( PositionParticleInfo_wrapper::*default_size_function_type )(  ) const;
             
             PositionParticleInfo_exposer.def( 
                 "size"
diff --git a/Core/PythonAPI/src/PythonModule.cpp b/Core/PythonAPI/src/PythonModule.cpp
index 4fcc2fff62a0335cd417aee12dd9c9ed99e8851f..eae618f07d371d766940a53f489048d706196b93 100644
--- a/Core/PythonAPI/src/PythonModule.cpp
+++ b/Core/PythonAPI/src/PythonModule.cpp
@@ -3,91 +3,91 @@
 #include "numpy/arrayobject.h"
 // the order of 3 guys above is important
 
-#include "RotateZ_3D.pypp.h" 
-#include "IFTDistribution2D.pypp.h" 
-#include "Detector.pypp.h" 
-#include "LatticeBasis.pypp.h" 
-#include "ParticleCoreShell.pypp.h" 
 #include "Beam.pypp.h" 
-#include "Lattice.pypp.h" 
+#include "Bin1D.pypp.h" 
+#include "Bin1DCVector.pypp.h" 
+#include "Crystal.pypp.h" 
+#include "Detector.pypp.h" 
+#include "FTDistribution2DCauchy.pypp.h" 
+#include "FormFactorBox.pypp.h" 
+#include "FormFactorCone.pypp.h" 
+#include "FormFactorCrystal.pypp.h" 
 #include "FormFactorCylinder.pypp.h" 
-#include "ICloneable.pypp.h" 
-#include "StochasticSampledParameter.pypp.h" 
+#include "FormFactorDecoratorDebyeWaller.pypp.h" 
+#include "FormFactorEllipsoid.pypp.h" 
+#include "FormFactorFullSphere.pypp.h" 
+#include "FormFactorFullSpheroid.pypp.h" 
+#include "FormFactorGauss.pypp.h" 
+#include "FormFactorHemiSpheroid.pypp.h" 
+#include "FormFactorLorentz.pypp.h" 
+#include "FormFactorParallelepiped.pypp.h" 
+#include "FormFactorPrism3.pypp.h" 
+#include "FormFactorPrism6.pypp.h" 
+#include "FormFactorPyramid.pypp.h" 
+#include "FormFactorSphere.pypp.h" 
+#include "FormFactorSphereGaussianRadius.pypp.h" 
 #include "HomogeneousMaterial.pypp.h" 
-#include "vector_integer_t.pypp.h" 
 #include "IAxis.pypp.h" 
-#include "Layer.pypp.h" 
+#include "ICloneable.pypp.h" 
+#include "IClusteredParticles.pypp.h" 
+#include "ICompositeSample.pypp.h" 
+#include "IDecoration.pypp.h" 
+#include "IDetectorResolution.pypp.h" 
+#include "IFTDistribution2D.pypp.h" 
 #include "IFormFactor.pypp.h" 
-#include "FormFactorParallelepiped.pypp.h" 
-#include "RealParameterWrapper.pypp.h" 
-#include "MaterialManager.pypp.h" 
-#include "ResolutionFunction2DSimple.pypp.h" 
-#include "SimulationParameters.pypp.h" 
-#include "FormFactorGauss.pypp.h" 
-#include "FormFactorFullSpheroid.pypp.h" 
-#include "PythonInterface_global_variables.pypp.h" 
+#include "IFormFactorBorn.pypp.h" 
+#include "IFormFactorDecorator.pypp.h" 
+#include "IInterferenceFunction.pypp.h" 
+#include "IMaterial.pypp.h" 
+#include "IParameterized.pypp.h" 
+#include "IResolutionFunction2D.pypp.h" 
+#include "ISample.pypp.h" 
 #include "ISampleBuilder.pypp.h" 
-#include "StochasticParameter_t.pypp.h" 
-#include "StochasticDoubleGaussian.pypp.h" 
-#include "FormFactorPrism6.pypp.h" 
+#include "ISelectionRule.pypp.h" 
+#include "ITransform3D.pypp.h" 
+#include "Instrument.pypp.h" 
+#include "InterferenceFunction1DParaCrystal.pypp.h" 
 #include "InterferenceFunction2DLattice.pypp.h" 
-#include "FormFactorPyramid.pypp.h" 
-#include "FormFactorBox.pypp.h" 
-#include "IResolutionFunction2D.pypp.h" 
-#include "IFormFactorBorn.pypp.h" 
+#include "InterferenceFunction2DParaCrystal.pypp.h" 
+#include "InterferenceFunctionNone.pypp.h" 
+#include "Lattice.pypp.h" 
+#include "Lattice2DIFParameters.pypp.h" 
+#include "LatticeBasis.pypp.h" 
+#include "Layer.pypp.h" 
+#include "LayerInterface.pypp.h" 
+#include "LayerRoughness.pypp.h" 
+#include "MaterialManager.pypp.h" 
+#include "MesoCrystal.pypp.h" 
 #include "MultiLayer.pypp.h" 
-#include "ITransform3D.pypp.h" 
-#include "ParticleDecoration.pypp.h" 
-#include "IDecoration.pypp.h" 
-#include "FTDistribution2DCauchy.pypp.h" 
-#include "ICompositeSample.pypp.h" 
-#include "cvector_t.pypp.h" 
+#include "OutputDataIOFactory.pypp.h" 
 #include "ParameterPool.pypp.h" 
 #include "Particle.pypp.h" 
-#include "FormFactorCone.pypp.h" 
-#include "FormFactorPrism3.pypp.h" 
-#include "InterferenceFunction2DParaCrystal.pypp.h" 
-#include "vdouble1d_t.pypp.h" 
-#include "MesoCrystal.pypp.h" 
-#include "RotateY_3D.pypp.h" 
-#include "FormFactorDecoratorDebyeWaller.pypp.h" 
-#include "vector_IFormFactorPtr_t.pypp.h" 
-#include "IMaterial.pypp.h" 
-#include "IFormFactorDecorator.pypp.h" 
-#include "Instrument.pypp.h" 
-#include "IDetectorResolution.pypp.h" 
-#include "ISelectionRule.pypp.h" 
-#include "Bin1D.pypp.h" 
+#include "ParticleBuilder.pypp.h" 
+#include "ParticleCoreShell.pypp.h" 
+#include "ParticleDecoration.pypp.h" 
 #include "ParticleInfo.pypp.h" 
-#include "vector_longinteger_t.pypp.h" 
-#include "FormFactorHemiSpheroid.pypp.h" 
-#include "LayerInterface.pypp.h" 
-#include "FormFactorFullSphere.pypp.h" 
 #include "PositionParticleInfo.pypp.h" 
-#include "LayerRoughness.pypp.h" 
-#include "FormFactorCrystal.pypp.h" 
-#include "IParameterized.pypp.h" 
-#include "Bin1DCVector.pypp.h" 
-#include "StochasticDoubleGate.pypp.h" 
-#include "IClusteredParticles.pypp.h" 
-#include "IInterferenceFunction.pypp.h" 
+#include "PythonInterface_free_functions.pypp.h" 
+#include "PythonInterface_global_variables.pypp.h" 
+#include "RealParameterWrapper.pypp.h" 
+#include "ResolutionFunction2DSimple.pypp.h" 
+#include "RotateY_3D.pypp.h" 
+#include "RotateZ_3D.pypp.h" 
 #include "SimpleSelectionRule.pypp.h" 
+#include "Simulation.pypp.h" 
+#include "SimulationParameters.pypp.h" 
+#include "StochasticDoubleGate.pypp.h" 
+#include "StochasticDoubleGaussian.pypp.h" 
+#include "StochasticParameter_t.pypp.h" 
+#include "StochasticSampledParameter.pypp.h" 
+#include "cvector_t.pypp.h" 
+#include "kvector_t.pypp.h" 
 #include "ndimdata_t.pypp.h" 
-#include "FormFactorLorentz.pypp.h" 
-#include "OutputDataIOFactory.pypp.h" 
+#include "vdouble1d_t.pypp.h" 
+#include "vector_IFormFactorPtr_t.pypp.h" 
+#include "vector_integer_t.pypp.h" 
 #include "vector_kvector_t.pypp.h" 
-#include "InterferenceFunction1DParaCrystal.pypp.h" 
-#include "InterferenceFunctionNone.pypp.h" 
-#include "Crystal.pypp.h" 
-#include "PythonInterface_free_functions.pypp.h" 
-#include "kvector_t.pypp.h" 
-#include "FormFactorEllipsoid.pypp.h" 
-#include "Simulation.pypp.h" 
-#include "ISample.pypp.h" 
-#include "ParticleBuilder.pypp.h" 
-#include "FormFactorSphereGaussianRadius.pypp.h" 
-#include "Lattice2DIFParameters.pypp.h" 
-#include "FormFactorSphere.pypp.h" 
+#include "vector_longinteger_t.pypp.h" 
 #include "__call_policies.pypp.hpp" 
 #include "__convenience.pypp.hpp" 
 
diff --git a/Core/PythonAPI/src/ResolutionFunction2DSimple.pypp.cpp b/Core/PythonAPI/src/ResolutionFunction2DSimple.pypp.cpp
index ee1d7a797f57d200e23305cd031ec408cb794191..c607587eab0ffd99e151b0118fc973e1cf0132c8 100644
--- a/Core/PythonAPI/src/ResolutionFunction2DSimple.pypp.cpp
+++ b/Core/PythonAPI/src/ResolutionFunction2DSimple.pypp.cpp
@@ -28,11 +28,11 @@ struct ResolutionFunction2DSimple_wrapper : ResolutionFunction2DSimple, bp::wrap
     virtual ::ResolutionFunction2DSimple * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->ResolutionFunction2DSimple::clone(  );
+        }
     }
     
-    
     ::ResolutionFunction2DSimple * default_clone(  ) const  {
         return ResolutionFunction2DSimple::clone( );
     }
@@ -40,11 +40,11 @@ struct ResolutionFunction2DSimple_wrapper : ResolutionFunction2DSimple, bp::wrap
     virtual double evaluateCDF( double x, double y ) const  {
         if( bp::override func_evaluateCDF = this->get_override( "evaluateCDF" ) )
             return func_evaluateCDF( x, y );
-        else
+        else{
             return this->ResolutionFunction2DSimple::evaluateCDF( x, y );
+        }
     }
     
-    
     double default_evaluateCDF( double x, double y ) const  {
         return ResolutionFunction2DSimple::evaluateCDF( x, y );
     }
@@ -52,11 +52,11 @@ struct ResolutionFunction2DSimple_wrapper : ResolutionFunction2DSimple, bp::wrap
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -64,11 +64,11 @@ struct ResolutionFunction2DSimple_wrapper : ResolutionFunction2DSimple, bp::wrap
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -76,11 +76,11 @@ struct ResolutionFunction2DSimple_wrapper : ResolutionFunction2DSimple, bp::wrap
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -88,11 +88,11 @@ struct ResolutionFunction2DSimple_wrapper : ResolutionFunction2DSimple, bp::wrap
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -119,11 +119,11 @@ struct ResolutionFunction2DSimple_wrapper : ResolutionFunction2DSimple, bp::wrap
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -131,11 +131,11 @@ struct ResolutionFunction2DSimple_wrapper : ResolutionFunction2DSimple, bp::wrap
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
diff --git a/Core/PythonAPI/src/RotateY_3D.pypp.cpp b/Core/PythonAPI/src/RotateY_3D.pypp.cpp
index a82637d4c36c3fa80bfc6f9416549f80f307987a..6e5f4d29836e4457b904e226a981e7b3026df602 100644
--- a/Core/PythonAPI/src/RotateY_3D.pypp.cpp
+++ b/Core/PythonAPI/src/RotateY_3D.pypp.cpp
@@ -33,11 +33,11 @@ struct RotateY_3D_wrapper : Geometry::RotateY_3D, bp::wrapper< Geometry::RotateY
     virtual void print( ::std::ostream & ostr ) const  {
         if( bp::override func_print = this->get_override( "print" ) )
             func_print( boost::ref(ostr) );
-        else
+        else{
             this->Geometry::RotateY_3D::print( boost::ref(ostr) );
+        }
     }
     
-    
     void default_print( ::std::ostream & ostr ) const  {
         Geometry::RotateY_3D::print( boost::ref(ostr) );
     }
diff --git a/Core/PythonAPI/src/RotateZ_3D.pypp.cpp b/Core/PythonAPI/src/RotateZ_3D.pypp.cpp
index e494b3136a38ebc4932bf7ba25844e088f12d5fb..659a51c1edbabe49952091a365e69788ea4664a8 100644
--- a/Core/PythonAPI/src/RotateZ_3D.pypp.cpp
+++ b/Core/PythonAPI/src/RotateZ_3D.pypp.cpp
@@ -33,11 +33,11 @@ struct RotateZ_3D_wrapper : Geometry::RotateZ_3D, bp::wrapper< Geometry::RotateZ
     virtual void print( ::std::ostream & ostr ) const  {
         if( bp::override func_print = this->get_override( "print" ) )
             func_print( boost::ref(ostr) );
-        else
+        else{
             this->Geometry::RotateZ_3D::print( boost::ref(ostr) );
+        }
     }
     
-    
     void default_print( ::std::ostream & ostr ) const  {
         Geometry::RotateZ_3D::print( boost::ref(ostr) );
     }
diff --git a/Core/PythonAPI/src/SimpleSelectionRule.pypp.cpp b/Core/PythonAPI/src/SimpleSelectionRule.pypp.cpp
index b66737013bbb60b02e5b57ca8a9ffcc1cd795f14..cb07c7da7f228d0ed0627c2ad86dc6ba479e1229 100644
--- a/Core/PythonAPI/src/SimpleSelectionRule.pypp.cpp
+++ b/Core/PythonAPI/src/SimpleSelectionRule.pypp.cpp
@@ -33,11 +33,11 @@ struct SimpleSelectionRule_wrapper : SimpleSelectionRule, bp::wrapper< SimpleSel
     virtual ::SimpleSelectionRule * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->SimpleSelectionRule::clone(  );
+        }
     }
     
-    
     ::SimpleSelectionRule * default_clone(  ) const  {
         return SimpleSelectionRule::clone( );
     }
@@ -45,11 +45,11 @@ struct SimpleSelectionRule_wrapper : SimpleSelectionRule, bp::wrapper< SimpleSel
     virtual bool coordinateSelected( ::IndexVector3D const & coordinate ) const  {
         if( bp::override func_coordinateSelected = this->get_override( "coordinateSelected" ) )
             return func_coordinateSelected( boost::ref(coordinate) );
-        else
+        else{
             return this->SimpleSelectionRule::coordinateSelected( boost::ref(coordinate) );
+        }
     }
     
-    
     bool default_coordinateSelected( ::IndexVector3D const & coordinate ) const  {
         return SimpleSelectionRule::coordinateSelected( boost::ref(coordinate) );
     }
diff --git a/Core/PythonAPI/src/Simulation.pypp.cpp b/Core/PythonAPI/src/Simulation.pypp.cpp
index 2162615cf1b3cedd5b72ff79461d735b6f8d7916..06913279a46d7bdde04d59f3ee12c2ce295853b1 100644
--- a/Core/PythonAPI/src/Simulation.pypp.cpp
+++ b/Core/PythonAPI/src/Simulation.pypp.cpp
@@ -28,11 +28,11 @@ struct Simulation_wrapper : Simulation, bp::wrapper< Simulation > {
     virtual ::Simulation * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->Simulation::clone(  );
+        }
     }
     
-    
     ::Simulation * default_clone(  ) const  {
         return Simulation::clone( );
     }
@@ -40,11 +40,11 @@ struct Simulation_wrapper : Simulation, bp::wrapper< Simulation > {
     virtual bool areParametersChanged(  ) {
         if( bp::override func_areParametersChanged = this->get_override( "areParametersChanged" ) )
             return func_areParametersChanged(  );
-        else
+        else{
             return this->IParameterized::areParametersChanged(  );
+        }
     }
     
-    
     bool default_areParametersChanged(  ) {
         return IParameterized::areParametersChanged( );
     }
@@ -52,11 +52,11 @@ struct Simulation_wrapper : Simulation, bp::wrapper< Simulation > {
     virtual void clearParameterPool(  ) {
         if( bp::override func_clearParameterPool = this->get_override( "clearParameterPool" ) )
             func_clearParameterPool(  );
-        else
+        else{
             this->IParameterized::clearParameterPool(  );
+        }
     }
     
-    
     void default_clearParameterPool(  ) {
         IParameterized::clearParameterPool( );
     }
@@ -64,11 +64,11 @@ struct Simulation_wrapper : Simulation, bp::wrapper< Simulation > {
     virtual ::ParameterPool * createParameterTree(  ) const  {
         if( bp::override func_createParameterTree = this->get_override( "createParameterTree" ) )
             return func_createParameterTree(  );
-        else
+        else{
             return this->IParameterized::createParameterTree(  );
+        }
     }
     
-    
     ::ParameterPool * default_createParameterTree(  ) const  {
         return IParameterized::createParameterTree( );
     }
@@ -76,11 +76,11 @@ struct Simulation_wrapper : Simulation, bp::wrapper< Simulation > {
     virtual void printParameters(  ) const  {
         if( bp::override func_printParameters = this->get_override( "printParameters" ) )
             func_printParameters(  );
-        else
+        else{
             this->IParameterized::printParameters(  );
+        }
     }
     
-    
     void default_printParameters(  ) const  {
         IParameterized::printParameters( );
     }
@@ -107,11 +107,11 @@ struct Simulation_wrapper : Simulation, bp::wrapper< Simulation > {
     virtual bool setParameterValue( ::std::string const & name, double value ) {
         if( bp::override func_setParameterValue = this->get_override( "setParameterValue" ) )
             return func_setParameterValue( name, value );
-        else
+        else{
             return this->IParameterized::setParameterValue( name, value );
+        }
     }
     
-    
     bool default_setParameterValue( ::std::string const & name, double value ) {
         return IParameterized::setParameterValue( name, value );
     }
@@ -119,11 +119,11 @@ struct Simulation_wrapper : Simulation, bp::wrapper< Simulation > {
     virtual void setParametersAreChanged(  ) {
         if( bp::override func_setParametersAreChanged = this->get_override( "setParametersAreChanged" ) )
             func_setParametersAreChanged(  );
-        else
+        else{
             this->IParameterized::setParametersAreChanged(  );
+        }
     }
     
-    
     void default_setParametersAreChanged(  ) {
         IParameterized::setParametersAreChanged( );
     }
@@ -226,7 +226,7 @@ void register_Simulation_class(){
         }
         { //::Simulation::runSimulationElement
         
-            typedef void ( ::Simulation::*runSimulationElement_function_type )( ::std::size_t ) ;
+            typedef void ( ::Simulation::*runSimulationElement_function_type )( ::size_t ) ;
             
             Simulation_exposer.def( 
                 "runSimulationElement"
@@ -266,7 +266,7 @@ void register_Simulation_class(){
         }
         { //::Simulation::setDetectorParameters
         
-            typedef void ( ::Simulation::*setDetectorParameters_function_type )( ::std::size_t,double,double,::std::size_t,double,double,bool ) ;
+            typedef void ( ::Simulation::*setDetectorParameters_function_type )( ::size_t,double,double,::size_t,double,double,bool ) ;
             
             Simulation_exposer.def( 
                 "setDetectorParameters"
diff --git a/Core/PythonAPI/src/StochasticDoubleGate.pypp.cpp b/Core/PythonAPI/src/StochasticDoubleGate.pypp.cpp
index a2c2e6ca95bf639e8c92a7e2947e72283af1c1eb..ea0d2bcc00b58e26f953ab1f8c5b8d497e51565b 100644
--- a/Core/PythonAPI/src/StochasticDoubleGate.pypp.cpp
+++ b/Core/PythonAPI/src/StochasticDoubleGate.pypp.cpp
@@ -26,11 +26,11 @@ struct StochasticDoubleGate_wrapper : StochasticDoubleGate, bp::wrapper< Stochas
     virtual ::StochasticDoubleGate * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->StochasticDoubleGate::clone(  );
+        }
     }
     
-    
     ::StochasticDoubleGate * default_clone(  ) const  {
         return StochasticDoubleGate::clone( );
     }
@@ -38,11 +38,11 @@ struct StochasticDoubleGate_wrapper : StochasticDoubleGate, bp::wrapper< Stochas
     virtual double getFWHM(  ) const  {
         if( bp::override func_getFWHM = this->get_override( "getFWHM" ) )
             return func_getFWHM(  );
-        else
+        else{
             return this->StochasticDoubleGate::getFWHM(  );
+        }
     }
     
-    
     double default_getFWHM(  ) const  {
         return StochasticDoubleGate::getFWHM( );
     }
@@ -50,11 +50,11 @@ struct StochasticDoubleGate_wrapper : StochasticDoubleGate, bp::wrapper< Stochas
     virtual double probabilityDensity( double value ) const  {
         if( bp::override func_probabilityDensity = this->get_override( "probabilityDensity" ) )
             return func_probabilityDensity( value );
-        else
+        else{
             return this->StochasticDoubleGate::probabilityDensity( value );
+        }
     }
     
-    
     double default_probabilityDensity( double value ) const  {
         return StochasticDoubleGate::probabilityDensity( value );
     }
@@ -62,11 +62,11 @@ struct StochasticDoubleGate_wrapper : StochasticDoubleGate, bp::wrapper< Stochas
     virtual void setToRandom(  ) {
         if( bp::override func_setToRandom = this->get_override( "setToRandom" ) )
             func_setToRandom(  );
-        else
+        else{
             this->StochasticDoubleGate::setToRandom(  );
+        }
     }
     
-    
     void default_setToRandom(  ) {
         StochasticDoubleGate::setToRandom( );
     }
@@ -74,11 +74,11 @@ struct StochasticDoubleGate_wrapper : StochasticDoubleGate, bp::wrapper< Stochas
     virtual double getRandom(  ) {
         if( bp::override func_getRandom = this->get_override( "getRandom" ) )
             return func_getRandom(  );
-        else
+        else{
             return this->StochasticParameter< double >::getRandom(  );
+        }
     }
     
-    
     double default_getRandom(  ) {
         return StochasticParameter< double >::getRandom( );
     }
@@ -86,11 +86,11 @@ struct StochasticDoubleGate_wrapper : StochasticDoubleGate, bp::wrapper< Stochas
     virtual void setToAverage(  ) {
         if( bp::override func_setToAverage = this->get_override( "setToAverage" ) )
             func_setToAverage(  );
-        else
+        else{
             this->StochasticParameter< double >::setToAverage(  );
+        }
     }
     
-    
     void default_setToAverage(  ) {
         StochasticParameter< double >::setToAverage( );
     }
diff --git a/Core/PythonAPI/src/StochasticDoubleGaussian.pypp.cpp b/Core/PythonAPI/src/StochasticDoubleGaussian.pypp.cpp
index ec0bb290500ff2041944e8335e9be278491390af..820e29c3e451eda7af03306e5dd63852ca7c9913 100644
--- a/Core/PythonAPI/src/StochasticDoubleGaussian.pypp.cpp
+++ b/Core/PythonAPI/src/StochasticDoubleGaussian.pypp.cpp
@@ -26,11 +26,11 @@ struct StochasticDoubleGaussian_wrapper : StochasticDoubleGaussian, bp::wrapper<
     virtual ::StochasticDoubleGaussian * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->StochasticDoubleGaussian::clone(  );
+        }
     }
     
-    
     ::StochasticDoubleGaussian * default_clone(  ) const  {
         return StochasticDoubleGaussian::clone( );
     }
@@ -38,11 +38,11 @@ struct StochasticDoubleGaussian_wrapper : StochasticDoubleGaussian, bp::wrapper<
     virtual double getFWHM(  ) const  {
         if( bp::override func_getFWHM = this->get_override( "getFWHM" ) )
             return func_getFWHM(  );
-        else
+        else{
             return this->StochasticDoubleGaussian::getFWHM(  );
+        }
     }
     
-    
     double default_getFWHM(  ) const  {
         return StochasticDoubleGaussian::getFWHM( );
     }
@@ -50,11 +50,11 @@ struct StochasticDoubleGaussian_wrapper : StochasticDoubleGaussian, bp::wrapper<
     virtual double probabilityDensity( double value ) const  {
         if( bp::override func_probabilityDensity = this->get_override( "probabilityDensity" ) )
             return func_probabilityDensity( value );
-        else
+        else{
             return this->StochasticDoubleGaussian::probabilityDensity( value );
+        }
     }
     
-    
     double default_probabilityDensity( double value ) const  {
         return StochasticDoubleGaussian::probabilityDensity( value );
     }
@@ -62,11 +62,11 @@ struct StochasticDoubleGaussian_wrapper : StochasticDoubleGaussian, bp::wrapper<
     virtual void setToRandom(  ) {
         if( bp::override func_setToRandom = this->get_override( "setToRandom" ) )
             func_setToRandom(  );
-        else
+        else{
             this->StochasticDoubleGaussian::setToRandom(  );
+        }
     }
     
-    
     void default_setToRandom(  ) {
         StochasticDoubleGaussian::setToRandom( );
     }
@@ -74,11 +74,11 @@ struct StochasticDoubleGaussian_wrapper : StochasticDoubleGaussian, bp::wrapper<
     virtual double getRandom(  ) {
         if( bp::override func_getRandom = this->get_override( "getRandom" ) )
             return func_getRandom(  );
-        else
+        else{
             return this->StochasticParameter< double >::getRandom(  );
+        }
     }
     
-    
     double default_getRandom(  ) {
         return StochasticParameter< double >::getRandom( );
     }
@@ -86,11 +86,11 @@ struct StochasticDoubleGaussian_wrapper : StochasticDoubleGaussian, bp::wrapper<
     virtual void setToAverage(  ) {
         if( bp::override func_setToAverage = this->get_override( "setToAverage" ) )
             func_setToAverage(  );
-        else
+        else{
             this->StochasticParameter< double >::setToAverage(  );
+        }
     }
     
-    
     void default_setToAverage(  ) {
         StochasticParameter< double >::setToAverage( );
     }
diff --git a/Core/PythonAPI/src/StochasticParameter_t.pypp.cpp b/Core/PythonAPI/src/StochasticParameter_t.pypp.cpp
index e6cd435ac44605b2a56bb0a5ef8f60d430c7f15d..1c7f4060708c9de5ed217052a0046dc0d45ae2ba 100644
--- a/Core/PythonAPI/src/StochasticParameter_t.pypp.cpp
+++ b/Core/PythonAPI/src/StochasticParameter_t.pypp.cpp
@@ -31,11 +31,11 @@ struct StochasticParameter_less__double__greater__wrapper : StochasticParameter<
     virtual double getFWHM(  ) const  {
         if( bp::override func_getFWHM = this->get_override( "getFWHM" ) )
             return func_getFWHM(  );
-        else
+        else{
             return this->StochasticParameter< double >::getFWHM(  );
+        }
     }
     
-    
     double default_getFWHM(  ) const  {
         return StochasticParameter< double >::getFWHM( );
     }
@@ -43,11 +43,11 @@ struct StochasticParameter_less__double__greater__wrapper : StochasticParameter<
     virtual double getRandom(  ) {
         if( bp::override func_getRandom = this->get_override( "getRandom" ) )
             return func_getRandom(  );
-        else
+        else{
             return this->StochasticParameter< double >::getRandom(  );
+        }
     }
     
-    
     double default_getRandom(  ) {
         return StochasticParameter< double >::getRandom( );
     }
@@ -60,11 +60,11 @@ struct StochasticParameter_less__double__greater__wrapper : StochasticParameter<
     virtual void setToAverage(  ) {
         if( bp::override func_setToAverage = this->get_override( "setToAverage" ) )
             func_setToAverage(  );
-        else
+        else{
             this->StochasticParameter< double >::setToAverage(  );
+        }
     }
     
-    
     void default_setToAverage(  ) {
         StochasticParameter< double >::setToAverage( );
     }
diff --git a/Core/PythonAPI/src/StochasticSampledParameter.pypp.cpp b/Core/PythonAPI/src/StochasticSampledParameter.pypp.cpp
index 6868e315885f63e6e03aec579237a42e2dde5cfc..26fc062960c37ebca48c2c814e930d4a27534734 100644
--- a/Core/PythonAPI/src/StochasticSampledParameter.pypp.cpp
+++ b/Core/PythonAPI/src/StochasticSampledParameter.pypp.cpp
@@ -16,14 +16,14 @@ namespace bp = boost::python;
 
 struct StochasticSampledParameter_wrapper : StochasticSampledParameter, bp::wrapper< StochasticSampledParameter > {
 
-    StochasticSampledParameter_wrapper(::StochasticParameter< double > const & par, ::std::size_t nbins, double xmin, double xmax )
+    StochasticSampledParameter_wrapper(::StochasticParameter< double > const & par, ::size_t nbins, double xmin, double xmax )
     : StochasticSampledParameter( boost::ref(par), nbins, xmin, xmax )
       , bp::wrapper< StochasticSampledParameter >(){
         // constructor
     
     }
 
-    StochasticSampledParameter_wrapper(::StochasticParameter< double > const & par, ::std::size_t nbins, int nfwhm=3 )
+    StochasticSampledParameter_wrapper(::StochasticParameter< double > const & par, ::size_t nbins, int nfwhm=3 )
     : StochasticSampledParameter( boost::ref(par), nbins, nfwhm )
       , bp::wrapper< StochasticSampledParameter >(){
         // constructor
@@ -33,11 +33,11 @@ struct StochasticSampledParameter_wrapper : StochasticSampledParameter, bp::wrap
     virtual ::StochasticSampledParameter * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->StochasticSampledParameter::clone(  );
+        }
     }
     
-    
     ::StochasticSampledParameter * default_clone(  ) const  {
         return StochasticSampledParameter::clone( );
     }
@@ -45,11 +45,11 @@ struct StochasticSampledParameter_wrapper : StochasticSampledParameter, bp::wrap
     virtual double probabilityDensity( double value ) const  {
         if( bp::override func_probabilityDensity = this->get_override( "probabilityDensity" ) )
             return func_probabilityDensity( value );
-        else
+        else{
             return this->StochasticSampledParameter::probabilityDensity( value );
+        }
     }
     
-    
     double default_probabilityDensity( double value ) const  {
         return StochasticSampledParameter::probabilityDensity( value );
     }
@@ -57,11 +57,11 @@ struct StochasticSampledParameter_wrapper : StochasticSampledParameter, bp::wrap
     virtual void setToRandom(  ) {
         if( bp::override func_setToRandom = this->get_override( "setToRandom" ) )
             func_setToRandom(  );
-        else
+        else{
             this->StochasticSampledParameter::setToRandom(  );
+        }
     }
     
-    
     void default_setToRandom(  ) {
         StochasticSampledParameter::setToRandom( );
     }
@@ -69,11 +69,11 @@ struct StochasticSampledParameter_wrapper : StochasticSampledParameter, bp::wrap
     virtual double getFWHM(  ) const  {
         if( bp::override func_getFWHM = this->get_override( "getFWHM" ) )
             return func_getFWHM(  );
-        else
+        else{
             return this->StochasticParameter< double >::getFWHM(  );
+        }
     }
     
-    
     double default_getFWHM(  ) const  {
         return StochasticParameter< double >::getFWHM( );
     }
@@ -81,11 +81,11 @@ struct StochasticSampledParameter_wrapper : StochasticSampledParameter, bp::wrap
     virtual double getRandom(  ) {
         if( bp::override func_getRandom = this->get_override( "getRandom" ) )
             return func_getRandom(  );
-        else
+        else{
             return this->StochasticParameter< double >::getRandom(  );
+        }
     }
     
-    
     double default_getRandom(  ) {
         return StochasticParameter< double >::getRandom( );
     }
@@ -93,11 +93,11 @@ struct StochasticSampledParameter_wrapper : StochasticSampledParameter, bp::wrap
     virtual void setToAverage(  ) {
         if( bp::override func_setToAverage = this->get_override( "setToAverage" ) )
             func_setToAverage(  );
-        else
+        else{
             this->StochasticParameter< double >::setToAverage(  );
+        }
     }
     
-    
     void default_setToAverage(  ) {
         StochasticParameter< double >::setToAverage( );
     }
@@ -108,9 +108,9 @@ void register_StochasticSampledParameter_class(){
 
     { //::StochasticSampledParameter
         typedef bp::class_< StochasticSampledParameter_wrapper, bp::bases< StochasticParameter< double > >, boost::noncopyable > StochasticSampledParameter_exposer_t;
-        StochasticSampledParameter_exposer_t StochasticSampledParameter_exposer = StochasticSampledParameter_exposer_t( "StochasticSampledParameter", bp::init< StochasticParameter< double > const &, std::size_t, double, double >(( bp::arg("par"), bp::arg("nbins"), bp::arg("xmin"), bp::arg("xmax") )) );
+        StochasticSampledParameter_exposer_t StochasticSampledParameter_exposer = StochasticSampledParameter_exposer_t( "StochasticSampledParameter", bp::init< StochasticParameter< double > const &, size_t, double, double >(( bp::arg("par"), bp::arg("nbins"), bp::arg("xmin"), bp::arg("xmax") )) );
         bp::scope StochasticSampledParameter_scope( StochasticSampledParameter_exposer );
-        StochasticSampledParameter_exposer.def( bp::init< StochasticParameter< double > const &, std::size_t, bp::optional< int > >(( bp::arg("par"), bp::arg("nbins"), bp::arg("nfwhm")=(int)(3) )) );
+        StochasticSampledParameter_exposer.def( bp::init< StochasticParameter< double > const &, size_t, bp::optional< int > >(( bp::arg("par"), bp::arg("nbins"), bp::arg("nfwhm")=(int)(3) )) );
         { //::StochasticSampledParameter::clone
         
             typedef ::StochasticSampledParameter * ( ::StochasticSampledParameter::*clone_function_type )(  ) const;
@@ -125,7 +125,7 @@ void register_StochasticSampledParameter_class(){
         }
         { //::StochasticSampledParameter::getBinValue
         
-            typedef double ( ::StochasticSampledParameter::*getBinValue_function_type )( ::std::size_t ) const;
+            typedef double ( ::StochasticSampledParameter::*getBinValue_function_type )( ::size_t ) const;
             
             StochasticSampledParameter_exposer.def( 
                 "getBinValue"
@@ -135,7 +135,7 @@ void register_StochasticSampledParameter_class(){
         }
         { //::StochasticSampledParameter::getNbins
         
-            typedef ::std::size_t ( ::StochasticSampledParameter::*getNbins_function_type )(  ) const;
+            typedef ::size_t ( ::StochasticSampledParameter::*getNbins_function_type )(  ) const;
             
             StochasticSampledParameter_exposer.def( 
                 "getNbins"
@@ -144,7 +144,7 @@ void register_StochasticSampledParameter_class(){
         }
         { //::StochasticSampledParameter::getNormalizedProbability
         
-            typedef double ( ::StochasticSampledParameter::*getNormalizedProbability_function_type )( ::std::size_t ) const;
+            typedef double ( ::StochasticSampledParameter::*getNormalizedProbability_function_type )( ::size_t ) const;
             
             StochasticSampledParameter_exposer.def( 
                 "getNormalizedProbability"
@@ -154,7 +154,7 @@ void register_StochasticSampledParameter_class(){
         }
         { //::StochasticSampledParameter::probabilityBinDensity
         
-            typedef double ( ::StochasticSampledParameter::*probabilityBinDensity_function_type )( ::std::size_t ) const;
+            typedef double ( ::StochasticSampledParameter::*probabilityBinDensity_function_type )( ::size_t ) const;
             
             StochasticSampledParameter_exposer.def( 
                 "probabilityBinDensity"
diff --git a/Core/PythonAPI/src/ndimdata_t.pypp.cpp b/Core/PythonAPI/src/ndimdata_t.pypp.cpp
index 15fcfc77c13c6ae1be9462dbbadc497093db8395..2553ec6532b3ed04b86e96555a9e1504ea4820eb 100644
--- a/Core/PythonAPI/src/ndimdata_t.pypp.cpp
+++ b/Core/PythonAPI/src/ndimdata_t.pypp.cpp
@@ -34,7 +34,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::addAxis
         
             typedef OutputData< double > exported_class_t;
-            typedef void ( exported_class_t::*addAxis_function_type )( ::std::string const &,::std::size_t,double,double ) ;
+            typedef void ( exported_class_t::*addAxis_function_type )( ::std::string const &,::size_t,double,double ) ;
             
             ndimdata_t_exposer.def( 
                 "addAxis"
@@ -87,7 +87,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::getAllocatedSize
         
             typedef OutputData< double > exported_class_t;
-            typedef ::std::size_t ( exported_class_t::*getAllocatedSize_function_type )(  ) const;
+            typedef ::size_t ( exported_class_t::*getAllocatedSize_function_type )(  ) const;
             
             ndimdata_t_exposer.def( 
                 "getAllocatedSize"
@@ -97,7 +97,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::getAxis
         
             typedef OutputData< double > exported_class_t;
-            typedef ::IAxis const * ( exported_class_t::*getAxis_function_type )( ::std::size_t ) const;
+            typedef ::IAxis const * ( exported_class_t::*getAxis_function_type )( ::size_t ) const;
             
             ndimdata_t_exposer.def( 
                 "getAxis"
@@ -121,7 +121,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::getAxisIndex
         
             typedef OutputData< double > exported_class_t;
-            typedef ::std::size_t ( exported_class_t::*getAxisIndex_function_type )( ::std::string const & ) const;
+            typedef ::size_t ( exported_class_t::*getAxisIndex_function_type )( ::std::string const & ) const;
             
             ndimdata_t_exposer.def( 
                 "getAxisIndex"
@@ -132,7 +132,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::getIndexOfAxis
         
             typedef OutputData< double > exported_class_t;
-            typedef ::std::size_t ( exported_class_t::*getIndexOfAxis_function_type )( ::std::string const &,::std::size_t ) const;
+            typedef ::size_t ( exported_class_t::*getIndexOfAxis_function_type )( ::std::string const &,::size_t ) const;
             
             ndimdata_t_exposer.def( 
                 "getIndexOfAxis"
@@ -143,7 +143,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::getRank
         
             typedef OutputData< double > exported_class_t;
-            typedef ::std::size_t ( exported_class_t::*getRank_function_type )(  ) const;
+            typedef ::size_t ( exported_class_t::*getRank_function_type )(  ) const;
             
             ndimdata_t_exposer.def( 
                 "getRank"
@@ -163,7 +163,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::getValueOfAxis
         
             typedef OutputData< double > exported_class_t;
-            typedef double ( exported_class_t::*getValueOfAxis_function_type )( ::std::string const &,::std::size_t ) const;
+            typedef double ( exported_class_t::*getValueOfAxis_function_type )( ::std::string const &,::size_t ) const;
             
             ndimdata_t_exposer.def( 
                 "getValueOfAxis"
@@ -200,7 +200,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::operator[]
         
             typedef OutputData< double > exported_class_t;
-            typedef double & ( exported_class_t::*__getitem___function_type )( ::std::size_t ) ;
+            typedef double & ( exported_class_t::*__getitem___function_type )( ::size_t ) ;
             
             ndimdata_t_exposer.def( 
                 "__getitem__"
@@ -212,7 +212,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::operator[]
         
             typedef OutputData< double > exported_class_t;
-            typedef double const & ( exported_class_t::*__getitem___function_type )( ::std::size_t ) const;
+            typedef double const & ( exported_class_t::*__getitem___function_type )( ::size_t ) const;
             
             ndimdata_t_exposer.def( 
                 "__getitem__"
@@ -267,7 +267,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::toCoordinate
         
             typedef OutputData< double > exported_class_t;
-            typedef int ( exported_class_t::*toCoordinate_function_type )( ::std::size_t,::std::size_t ) const;
+            typedef int ( exported_class_t::*toCoordinate_function_type )( ::size_t,::size_t ) const;
             
             ndimdata_t_exposer.def( 
                 "toCoordinate"
@@ -278,7 +278,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::toCoordinates
         
             typedef OutputData< double > exported_class_t;
-            typedef ::std::vector< int > ( exported_class_t::*toCoordinates_function_type )( ::std::size_t ) const;
+            typedef ::std::vector< int > ( exported_class_t::*toCoordinates_function_type )( ::size_t ) const;
             
             ndimdata_t_exposer.def( 
                 "toCoordinates"
@@ -289,7 +289,7 @@ void register_ndimdata_t_class(){
         { //::OutputData< double >::toIndex
         
             typedef OutputData< double > exported_class_t;
-            typedef ::std::size_t ( exported_class_t::*toIndex_function_type )( ::std::vector< int > ) const;
+            typedef ::size_t ( exported_class_t::*toIndex_function_type )( ::std::vector< int > ) const;
             
             ndimdata_t_exposer.def( 
                 "toIndex"
diff --git a/Core/Samples/inc/IClusteredParticles.h b/Core/Samples/inc/IClusteredParticles.h
index 13b2783b5a677ff5fa50492a9fc26ba3c10424af..745d82c89729b887f12668f93f9ada5cdf6df04d 100644
--- a/Core/Samples/inc/IClusteredParticles.h
+++ b/Core/Samples/inc/IClusteredParticles.h
@@ -51,7 +51,7 @@ public:
     //! ambient material
     //! The bulk content of the mesocrystal is encapsulated by the
     //! IClusteredParticles object itself
-   virtual IFormFactor *createTotalFormFactor(
+    virtual IFormFactor *createTotalFormFactor(
            const IFormFactor& meso_crystal_form_factor,
            const IMaterial *p_ambient_material) const
     {
diff --git a/Core/Samples/inc/LatticeBasis.h b/Core/Samples/inc/LatticeBasis.h
index 89a76be3fae5562b4e5da67f001f147486461568..d9e3e73fc0b196f1d09ab3bfd8452d9446ffe154 100644
--- a/Core/Samples/inc/LatticeBasis.h
+++ b/Core/Samples/inc/LatticeBasis.h
@@ -65,7 +65,7 @@ private:
     inline size_t check_index(size_t index) const { return index < m_positions_vector.size() ? index : throw OutOfBoundsException("LatticeBasis::check_index() -> Index is out of bounds"); }
 
     //! For internal use in cloneInvertB():
-    void addParticle(Particle *p_particle, std::vector<kvector_t > positions);
+    void addParticlePointer(Particle *p_particle, std::vector<kvector_t > positions);
 
     std::vector<Particle *> m_particles;
     std::vector<std::vector<kvector_t> > m_positions_vector;
diff --git a/Core/Samples/src/LatticeBasis.cpp b/Core/Samples/src/LatticeBasis.cpp
index c2bb8c46850181be1f21904a6f0f97c6b2e7440c..9f8bf8f8ca5b224c62600c87a65fe9fd6e983a53 100644
--- a/Core/Samples/src/LatticeBasis.cpp
+++ b/Core/Samples/src/LatticeBasis.cpp
@@ -60,7 +60,7 @@ LatticeBasis* LatticeBasis::cloneInvertB() const
 {
     LatticeBasis *p_new = new LatticeBasis();
     for (size_t index=0; index<m_particles.size(); ++index) {
-        p_new->addParticle(m_particles[index]->cloneInvertB(),
+        p_new->addParticlePointer(m_particles[index]->cloneInvertB(),
                 m_positions_vector[index]);
     }
     p_new->setName(getName() + "_inv");
@@ -114,7 +114,7 @@ std::vector<DiffuseParticleInfo *> LatticeBasis::createDiffuseParticleInfos() co
     return result;
 }
 
-void LatticeBasis::addParticle(Particle* p_particle,
+void LatticeBasis::addParticlePointer(Particle* p_particle,
         std::vector<kvector_t> positions)
 {
     registerChild(p_particle);
diff --git a/Core/Tools/inc/MathFunctions.h b/Core/Tools/inc/MathFunctions.h
index fa4ab8ed66dc93304adcef6ec42ec3680fea9701..1b9a43e11917e6ed7989d8ba5b6800d95a6d9bea 100644
--- a/Core/Tools/inc/MathFunctions.h
+++ b/Core/Tools/inc/MathFunctions.h
@@ -29,7 +29,9 @@
 #include "gsl/gsl_sf_expint.h"
 #include "gsl/gsl_integration.h"
 
+#ifndef GCCXML_SKIP_THIS
 #include <Eigen/Core>
+#endif
 
 //! Various mathematical functions.
 
@@ -87,7 +89,9 @@ complex_t FastCos(const complex_t &x);
 //! simultaneous complex sine and cosine calculations
 void FastSinCos(const complex_t &x, complex_t &xsin, complex_t &xcos);
 
+#ifndef GCCXML_SKIP_THIS
 Eigen::Matrix2d Norm(Eigen::Matrix2cd &M);
+#endif
 
 } // Namespace MathFunctions
 
@@ -187,6 +191,7 @@ inline void MathFunctions::FastSinCos(const complex_t &x,
     xcos = complex_t( cosa*coshb, -sina*sinhb );
 }
 
+#ifndef GCCXML_SKIP_THIS
 inline Eigen::Matrix2d MathFunctions::Norm(Eigen::Matrix2cd &M) {
     Eigen::Matrix2d result;
     result(0,0) = std::norm((complex_t)M(0,0));
@@ -195,6 +200,7 @@ inline Eigen::Matrix2d MathFunctions::Norm(Eigen::Matrix2cd &M) {
     result(1,1) = std::norm((complex_t)M(1,1));
     return result;
 }
+#endif
 
 #endif // MATHFUNCTIONS_H
 
diff --git a/Core/python_module.pri b/Core/python_module.pri
index cf37fe889d35b978fda134024cd45698a89b3003..9ac95670726e38b24425a3ca599162b89bf5b7ca 100644
--- a/Core/python_module.pri
+++ b/Core/python_module.pri
@@ -4,91 +4,91 @@ HEADERS +=  \
     PythonAPI/inc/PythonOutputData.h \ 
     PythonAPI/inc/PythonCoreExposer.h \ 
     PythonAPI/inc/PythonCoreList.h \ 
-    PythonAPI/inc/RotateZ_3D.pypp.h \
-    PythonAPI/inc/IFTDistribution2D.pypp.h \
-    PythonAPI/inc/Detector.pypp.h \
-    PythonAPI/inc/LatticeBasis.pypp.h \
-    PythonAPI/inc/ParticleCoreShell.pypp.h \
     PythonAPI/inc/Beam.pypp.h \
-    PythonAPI/inc/Lattice.pypp.h \
+    PythonAPI/inc/Bin1D.pypp.h \
+    PythonAPI/inc/Bin1DCVector.pypp.h \
+    PythonAPI/inc/Crystal.pypp.h \
+    PythonAPI/inc/Detector.pypp.h \
+    PythonAPI/inc/FTDistribution2DCauchy.pypp.h \
+    PythonAPI/inc/FormFactorBox.pypp.h \
+    PythonAPI/inc/FormFactorCone.pypp.h \
+    PythonAPI/inc/FormFactorCrystal.pypp.h \
     PythonAPI/inc/FormFactorCylinder.pypp.h \
-    PythonAPI/inc/ICloneable.pypp.h \
-    PythonAPI/inc/StochasticSampledParameter.pypp.h \
+    PythonAPI/inc/FormFactorDecoratorDebyeWaller.pypp.h \
+    PythonAPI/inc/FormFactorEllipsoid.pypp.h \
+    PythonAPI/inc/FormFactorFullSphere.pypp.h \
+    PythonAPI/inc/FormFactorFullSpheroid.pypp.h \
+    PythonAPI/inc/FormFactorGauss.pypp.h \
+    PythonAPI/inc/FormFactorHemiSpheroid.pypp.h \
+    PythonAPI/inc/FormFactorLorentz.pypp.h \
+    PythonAPI/inc/FormFactorParallelepiped.pypp.h \
+    PythonAPI/inc/FormFactorPrism3.pypp.h \
+    PythonAPI/inc/FormFactorPrism6.pypp.h \
+    PythonAPI/inc/FormFactorPyramid.pypp.h \
+    PythonAPI/inc/FormFactorSphere.pypp.h \
+    PythonAPI/inc/FormFactorSphereGaussianRadius.pypp.h \
     PythonAPI/inc/HomogeneousMaterial.pypp.h \
-    PythonAPI/inc/vector_integer_t.pypp.h \
     PythonAPI/inc/IAxis.pypp.h \
-    PythonAPI/inc/Layer.pypp.h \
+    PythonAPI/inc/ICloneable.pypp.h \
+    PythonAPI/inc/IClusteredParticles.pypp.h \
+    PythonAPI/inc/ICompositeSample.pypp.h \
+    PythonAPI/inc/IDecoration.pypp.h \
+    PythonAPI/inc/IDetectorResolution.pypp.h \
+    PythonAPI/inc/IFTDistribution2D.pypp.h \
     PythonAPI/inc/IFormFactor.pypp.h \
-    PythonAPI/inc/FormFactorParallelepiped.pypp.h \
-    PythonAPI/inc/RealParameterWrapper.pypp.h \
-    PythonAPI/inc/MaterialManager.pypp.h \
-    PythonAPI/inc/ResolutionFunction2DSimple.pypp.h \
-    PythonAPI/inc/SimulationParameters.pypp.h \
-    PythonAPI/inc/FormFactorGauss.pypp.h \
-    PythonAPI/inc/FormFactorFullSpheroid.pypp.h \
-    PythonAPI/inc/PythonInterface_global_variables.pypp.h \
+    PythonAPI/inc/IFormFactorBorn.pypp.h \
+    PythonAPI/inc/IFormFactorDecorator.pypp.h \
+    PythonAPI/inc/IInterferenceFunction.pypp.h \
+    PythonAPI/inc/IMaterial.pypp.h \
+    PythonAPI/inc/IParameterized.pypp.h \
+    PythonAPI/inc/IResolutionFunction2D.pypp.h \
+    PythonAPI/inc/ISample.pypp.h \
     PythonAPI/inc/ISampleBuilder.pypp.h \
-    PythonAPI/inc/StochasticParameter_t.pypp.h \
-    PythonAPI/inc/StochasticDoubleGaussian.pypp.h \
-    PythonAPI/inc/FormFactorPrism6.pypp.h \
+    PythonAPI/inc/ISelectionRule.pypp.h \
+    PythonAPI/inc/ITransform3D.pypp.h \
+    PythonAPI/inc/Instrument.pypp.h \
+    PythonAPI/inc/InterferenceFunction1DParaCrystal.pypp.h \
     PythonAPI/inc/InterferenceFunction2DLattice.pypp.h \
-    PythonAPI/inc/FormFactorPyramid.pypp.h \
-    PythonAPI/inc/FormFactorBox.pypp.h \
-    PythonAPI/inc/IResolutionFunction2D.pypp.h \
-    PythonAPI/inc/IFormFactorBorn.pypp.h \
+    PythonAPI/inc/InterferenceFunction2DParaCrystal.pypp.h \
+    PythonAPI/inc/InterferenceFunctionNone.pypp.h \
+    PythonAPI/inc/Lattice.pypp.h \
+    PythonAPI/inc/Lattice2DIFParameters.pypp.h \
+    PythonAPI/inc/LatticeBasis.pypp.h \
+    PythonAPI/inc/Layer.pypp.h \
+    PythonAPI/inc/LayerInterface.pypp.h \
+    PythonAPI/inc/LayerRoughness.pypp.h \
+    PythonAPI/inc/MaterialManager.pypp.h \
+    PythonAPI/inc/MesoCrystal.pypp.h \
     PythonAPI/inc/MultiLayer.pypp.h \
-    PythonAPI/inc/ITransform3D.pypp.h \
-    PythonAPI/inc/ParticleDecoration.pypp.h \
-    PythonAPI/inc/IDecoration.pypp.h \
-    PythonAPI/inc/FTDistribution2DCauchy.pypp.h \
-    PythonAPI/inc/ICompositeSample.pypp.h \
-    PythonAPI/inc/cvector_t.pypp.h \
+    PythonAPI/inc/OutputDataIOFactory.pypp.h \
     PythonAPI/inc/ParameterPool.pypp.h \
     PythonAPI/inc/Particle.pypp.h \
-    PythonAPI/inc/FormFactorCone.pypp.h \
-    PythonAPI/inc/FormFactorPrism3.pypp.h \
-    PythonAPI/inc/InterferenceFunction2DParaCrystal.pypp.h \
-    PythonAPI/inc/vdouble1d_t.pypp.h \
-    PythonAPI/inc/MesoCrystal.pypp.h \
-    PythonAPI/inc/RotateY_3D.pypp.h \
-    PythonAPI/inc/FormFactorDecoratorDebyeWaller.pypp.h \
-    PythonAPI/inc/vector_IFormFactorPtr_t.pypp.h \
-    PythonAPI/inc/IMaterial.pypp.h \
-    PythonAPI/inc/IFormFactorDecorator.pypp.h \
-    PythonAPI/inc/Instrument.pypp.h \
-    PythonAPI/inc/IDetectorResolution.pypp.h \
-    PythonAPI/inc/ISelectionRule.pypp.h \
-    PythonAPI/inc/Bin1D.pypp.h \
+    PythonAPI/inc/ParticleBuilder.pypp.h \
+    PythonAPI/inc/ParticleCoreShell.pypp.h \
+    PythonAPI/inc/ParticleDecoration.pypp.h \
     PythonAPI/inc/ParticleInfo.pypp.h \
-    PythonAPI/inc/vector_longinteger_t.pypp.h \
-    PythonAPI/inc/FormFactorHemiSpheroid.pypp.h \
-    PythonAPI/inc/LayerInterface.pypp.h \
-    PythonAPI/inc/FormFactorFullSphere.pypp.h \
     PythonAPI/inc/PositionParticleInfo.pypp.h \
-    PythonAPI/inc/LayerRoughness.pypp.h \
-    PythonAPI/inc/FormFactorCrystal.pypp.h \
-    PythonAPI/inc/IParameterized.pypp.h \
-    PythonAPI/inc/Bin1DCVector.pypp.h \
-    PythonAPI/inc/StochasticDoubleGate.pypp.h \
-    PythonAPI/inc/IClusteredParticles.pypp.h \
-    PythonAPI/inc/IInterferenceFunction.pypp.h \
+    PythonAPI/inc/PythonInterface_free_functions.pypp.h \
+    PythonAPI/inc/PythonInterface_global_variables.pypp.h \
+    PythonAPI/inc/RealParameterWrapper.pypp.h \
+    PythonAPI/inc/ResolutionFunction2DSimple.pypp.h \
+    PythonAPI/inc/RotateY_3D.pypp.h \
+    PythonAPI/inc/RotateZ_3D.pypp.h \
     PythonAPI/inc/SimpleSelectionRule.pypp.h \
+    PythonAPI/inc/Simulation.pypp.h \
+    PythonAPI/inc/SimulationParameters.pypp.h \
+    PythonAPI/inc/StochasticDoubleGate.pypp.h \
+    PythonAPI/inc/StochasticDoubleGaussian.pypp.h \
+    PythonAPI/inc/StochasticParameter_t.pypp.h \
+    PythonAPI/inc/StochasticSampledParameter.pypp.h \
+    PythonAPI/inc/cvector_t.pypp.h \
+    PythonAPI/inc/kvector_t.pypp.h \
     PythonAPI/inc/ndimdata_t.pypp.h \
-    PythonAPI/inc/FormFactorLorentz.pypp.h \
-    PythonAPI/inc/OutputDataIOFactory.pypp.h \
+    PythonAPI/inc/vdouble1d_t.pypp.h \
+    PythonAPI/inc/vector_IFormFactorPtr_t.pypp.h \
+    PythonAPI/inc/vector_integer_t.pypp.h \
     PythonAPI/inc/vector_kvector_t.pypp.h \
-    PythonAPI/inc/InterferenceFunction1DParaCrystal.pypp.h \
-    PythonAPI/inc/InterferenceFunctionNone.pypp.h \
-    PythonAPI/inc/Crystal.pypp.h \
-    PythonAPI/inc/PythonInterface_free_functions.pypp.h \
-    PythonAPI/inc/kvector_t.pypp.h \
-    PythonAPI/inc/FormFactorEllipsoid.pypp.h \
-    PythonAPI/inc/Simulation.pypp.h \
-    PythonAPI/inc/ISample.pypp.h \
-    PythonAPI/inc/ParticleBuilder.pypp.h \
-    PythonAPI/inc/FormFactorSphereGaussianRadius.pypp.h \
-    PythonAPI/inc/Lattice2DIFParameters.pypp.h \
-    PythonAPI/inc/FormFactorSphere.pypp.h \
+    PythonAPI/inc/vector_longinteger_t.pypp.h \
     PythonAPI/inc/__call_policies.pypp.hpp \
     PythonAPI/inc/__convenience.pypp.hpp 
 
@@ -97,91 +97,91 @@ SOURCES +=  \
     PythonAPI/src/PythonListConverter.cpp \ 
     PythonAPI/src/PythonOutputData.cpp \ 
     PythonAPI/src/PythonCoreExposer.cpp \ 
-    PythonAPI/src/ParticleCoreShell.pypp.cpp \
-    PythonAPI/src/kvector_t.pypp.cpp \
-    PythonAPI/src/vector_IFormFactorPtr_t.pypp.cpp \
-    PythonAPI/src/FormFactorSphere.pypp.cpp \
-    PythonAPI/src/FormFactorLorentz.pypp.cpp \
+    PythonAPI/src/Beam.pypp.cpp \
+    PythonAPI/src/Bin1D.pypp.cpp \
+    PythonAPI/src/Bin1DCVector.pypp.cpp \
+    PythonAPI/src/Crystal.pypp.cpp \
+    PythonAPI/src/Detector.pypp.cpp \
+    PythonAPI/src/FTDistribution2DCauchy.pypp.cpp \
+    PythonAPI/src/FormFactorBox.pypp.cpp \
+    PythonAPI/src/FormFactorCone.pypp.cpp \
+    PythonAPI/src/FormFactorCrystal.pypp.cpp \
     PythonAPI/src/FormFactorCylinder.pypp.cpp \
-    PythonAPI/src/ISelectionRule.pypp.cpp \
-    PythonAPI/src/InterferenceFunctionNone.pypp.cpp \
-    PythonAPI/src/IResolutionFunction2D.pypp.cpp \
-    PythonAPI/src/ITransform3D.pypp.cpp \
-    PythonAPI/src/Layer.pypp.cpp \
-    PythonAPI/src/Lattice2DIFParameters.pypp.cpp \
+    PythonAPI/src/FormFactorDecoratorDebyeWaller.pypp.cpp \
+    PythonAPI/src/FormFactorEllipsoid.pypp.cpp \
+    PythonAPI/src/FormFactorFullSphere.pypp.cpp \
+    PythonAPI/src/FormFactorFullSpheroid.pypp.cpp \
+    PythonAPI/src/FormFactorGauss.pypp.cpp \
+    PythonAPI/src/FormFactorHemiSpheroid.pypp.cpp \
+    PythonAPI/src/FormFactorLorentz.pypp.cpp \
     PythonAPI/src/FormFactorParallelepiped.pypp.cpp \
-    PythonAPI/src/ISample.pypp.cpp \
-    PythonAPI/src/MultiLayer.pypp.cpp \
+    PythonAPI/src/FormFactorPrism3.pypp.cpp \
     PythonAPI/src/FormFactorPrism6.pypp.cpp \
     PythonAPI/src/FormFactorPyramid.pypp.cpp \
+    PythonAPI/src/FormFactorSphere.pypp.cpp \
+    PythonAPI/src/FormFactorSphereGaussianRadius.pypp.cpp \
+    PythonAPI/src/HomogeneousMaterial.pypp.cpp \
     PythonAPI/src/IAxis.pypp.cpp \
-    PythonAPI/src/vdouble1d_t.pypp.cpp \
-    PythonAPI/src/IFormFactorDecorator.pypp.cpp \
-    PythonAPI/src/Bin1D.pypp.cpp \
-    PythonAPI/src/IParameterized.pypp.cpp \
-    PythonAPI/src/PythonInterface_global_variables.pypp.cpp \
-    PythonAPI/src/IInterferenceFunction.pypp.cpp \
-    PythonAPI/src/RealParameterWrapper.pypp.cpp \
-    PythonAPI/src/PythonInterface_free_functions.pypp.cpp \
-    PythonAPI/src/MesoCrystal.pypp.cpp \
-    PythonAPI/src/FormFactorCrystal.pypp.cpp \
-    PythonAPI/src/ISampleBuilder.pypp.cpp \
-    PythonAPI/src/StochasticSampledParameter.pypp.cpp \
-    PythonAPI/src/FormFactorFullSphere.pypp.cpp \
-    PythonAPI/src/StochasticParameter_t.pypp.cpp \
-    PythonAPI/src/SimpleSelectionRule.pypp.cpp \
-    PythonAPI/src/IDecoration.pypp.cpp \
-    PythonAPI/src/FTDistribution2DCauchy.pypp.cpp \
-    PythonAPI/src/IFTDistribution2D.pypp.cpp \
     PythonAPI/src/ICloneable.pypp.cpp \
-    PythonAPI/src/ParticleInfo.pypp.cpp \
-    PythonAPI/src/ParticleDecoration.pypp.cpp \
-    PythonAPI/src/FormFactorSphereGaussianRadius.pypp.cpp \
     PythonAPI/src/IClusteredParticles.pypp.cpp \
-    PythonAPI/src/Particle.pypp.cpp \
-    PythonAPI/src/Lattice.pypp.cpp \
-    PythonAPI/src/vector_longinteger_t.pypp.cpp \
+    PythonAPI/src/ICompositeSample.pypp.cpp \
+    PythonAPI/src/IDecoration.pypp.cpp \
+    PythonAPI/src/IDetectorResolution.pypp.cpp \
+    PythonAPI/src/IFTDistribution2D.pypp.cpp \
+    PythonAPI/src/IFormFactor.pypp.cpp \
+    PythonAPI/src/IFormFactorBorn.pypp.cpp \
+    PythonAPI/src/IFormFactorDecorator.pypp.cpp \
+    PythonAPI/src/IInterferenceFunction.pypp.cpp \
     PythonAPI/src/IMaterial.pypp.cpp \
+    PythonAPI/src/IParameterized.pypp.cpp \
+    PythonAPI/src/IResolutionFunction2D.pypp.cpp \
+    PythonAPI/src/ISample.pypp.cpp \
+    PythonAPI/src/ISampleBuilder.pypp.cpp \
+    PythonAPI/src/ISelectionRule.pypp.cpp \
+    PythonAPI/src/ITransform3D.pypp.cpp \
+    PythonAPI/src/Instrument.pypp.cpp \
+    PythonAPI/src/InterferenceFunction1DParaCrystal.pypp.cpp \
     PythonAPI/src/InterferenceFunction2DLattice.pypp.cpp \
-    PythonAPI/src/ResolutionFunction2DSimple.pypp.cpp \
-    PythonAPI/src/Detector.pypp.cpp \
-    PythonAPI/src/Bin1DCVector.pypp.cpp \
-    PythonAPI/src/HomogeneousMaterial.pypp.cpp \
-    PythonAPI/src/FormFactorHemiSpheroid.pypp.cpp \
-    PythonAPI/src/vector_integer_t.pypp.cpp \
-    PythonAPI/src/OutputDataIOFactory.pypp.cpp \
-    PythonAPI/src/ParameterPool.pypp.cpp \
     PythonAPI/src/InterferenceFunction2DParaCrystal.pypp.cpp \
-    PythonAPI/src/FormFactorCone.pypp.cpp \
-    PythonAPI/src/Simulation.pypp.cpp \
-    PythonAPI/src/FormFactorFullSpheroid.pypp.cpp \
+    PythonAPI/src/InterferenceFunctionNone.pypp.cpp \
+    PythonAPI/src/Lattice.pypp.cpp \
+    PythonAPI/src/Lattice2DIFParameters.pypp.cpp \
+    PythonAPI/src/LatticeBasis.pypp.cpp \
+    PythonAPI/src/Layer.pypp.cpp \
+    PythonAPI/src/LayerInterface.pypp.cpp \
+    PythonAPI/src/LayerRoughness.pypp.cpp \
     PythonAPI/src/MaterialManager.pypp.cpp \
+    PythonAPI/src/MesoCrystal.pypp.cpp \
+    PythonAPI/src/MultiLayer.pypp.cpp \
+    PythonAPI/src/OutputDataIOFactory.pypp.cpp \
+    PythonAPI/src/ParameterPool.pypp.cpp \
+    PythonAPI/src/Particle.pypp.cpp \
     PythonAPI/src/ParticleBuilder.pypp.cpp \
-    PythonAPI/src/Instrument.pypp.cpp \
-    PythonAPI/src/FormFactorGauss.pypp.cpp \
-    PythonAPI/src/FormFactorPrism3.pypp.cpp \
+    PythonAPI/src/ParticleCoreShell.pypp.cpp \
+    PythonAPI/src/ParticleDecoration.pypp.cpp \
+    PythonAPI/src/ParticleInfo.pypp.cpp \
     PythonAPI/src/PositionParticleInfo.pypp.cpp \
-    PythonAPI/src/ICompositeSample.pypp.cpp \
-    PythonAPI/src/ndimdata_t.pypp.cpp \
-    PythonAPI/src/Beam.pypp.cpp \
-    PythonAPI/src/FormFactorDecoratorDebyeWaller.pypp.cpp \
-    PythonAPI/src/IFormFactor.pypp.cpp \
-    PythonAPI/src/FormFactorBox.pypp.cpp \
-    PythonAPI/src/IDetectorResolution.pypp.cpp \
-    PythonAPI/src/RotateZ_3D.pypp.cpp \
-    PythonAPI/src/LayerInterface.pypp.cpp \
-    PythonAPI/src/InterferenceFunction1DParaCrystal.pypp.cpp \
+    PythonAPI/src/PythonInterface_free_functions.pypp.cpp \
+    PythonAPI/src/PythonInterface_global_variables.pypp.cpp \
+    PythonAPI/src/RealParameterWrapper.pypp.cpp \
+    PythonAPI/src/ResolutionFunction2DSimple.pypp.cpp \
     PythonAPI/src/RotateY_3D.pypp.cpp \
+    PythonAPI/src/RotateZ_3D.pypp.cpp \
+    PythonAPI/src/SimpleSelectionRule.pypp.cpp \
+    PythonAPI/src/Simulation.pypp.cpp \
+    PythonAPI/src/SimulationParameters.pypp.cpp \
     PythonAPI/src/StochasticDoubleGate.pypp.cpp \
+    PythonAPI/src/StochasticDoubleGaussian.pypp.cpp \
+    PythonAPI/src/StochasticParameter_t.pypp.cpp \
+    PythonAPI/src/StochasticSampledParameter.pypp.cpp \
     PythonAPI/src/cvector_t.pypp.cpp \
-    PythonAPI/src/SimulationParameters.pypp.cpp \
-    PythonAPI/src/IFormFactorBorn.pypp.cpp \
+    PythonAPI/src/kvector_t.pypp.cpp \
+    PythonAPI/src/ndimdata_t.pypp.cpp \
+    PythonAPI/src/vdouble1d_t.pypp.cpp \
+    PythonAPI/src/vector_IFormFactorPtr_t.pypp.cpp \
+    PythonAPI/src/vector_integer_t.pypp.cpp \
     PythonAPI/src/vector_kvector_t.pypp.cpp \
-    PythonAPI/src/FormFactorEllipsoid.pypp.cpp \
-    PythonAPI/src/LayerRoughness.pypp.cpp \
-    PythonAPI/src/LatticeBasis.pypp.cpp \
-    PythonAPI/src/StochasticDoubleGaussian.pypp.cpp \
-    PythonAPI/src/Crystal.pypp.cpp 
+    PythonAPI/src/vector_longinteger_t.pypp.cpp 
 
 INCLUDEPATH += ./PythonAPI/inc 
 DEPENDPATH  += ./PythonAPI/inc 
diff --git a/Fit/PythonAPI/src/AttLimits.pypp.cpp b/Fit/PythonAPI/src/AttLimits.pypp.cpp
index 9faa92236e7264e872e5aa990419aca05dc8b399..e9ebeee424eb2c646fdbec7c49aea06ddc19540b 100644
--- a/Fit/PythonAPI/src/AttLimits.pypp.cpp
+++ b/Fit/PythonAPI/src/AttLimits.pypp.cpp
@@ -33,11 +33,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual double getLowerLimit(  ) const  {
         if( bp::override func_getLowerLimit = this->get_override( "getLowerLimit" ) )
             return func_getLowerLimit(  );
-        else
+        else{
             return this->AttLimits::getLowerLimit(  );
+        }
     }
     
-    
     double default_getLowerLimit(  ) const  {
         return AttLimits::getLowerLimit( );
     }
@@ -45,11 +45,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual double getUpperLimit(  ) const  {
         if( bp::override func_getUpperLimit = this->get_override( "getUpperLimit" ) )
             return func_getUpperLimit(  );
-        else
+        else{
             return this->AttLimits::getUpperLimit(  );
+        }
     }
     
-    
     double default_getUpperLimit(  ) const  {
         return AttLimits::getUpperLimit( );
     }
@@ -57,11 +57,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual bool hasLowerAndUpperLimits(  ) const  {
         if( bp::override func_hasLowerAndUpperLimits = this->get_override( "hasLowerAndUpperLimits" ) )
             return func_hasLowerAndUpperLimits(  );
-        else
+        else{
             return this->AttLimits::hasLowerAndUpperLimits(  );
+        }
     }
     
-    
     bool default_hasLowerAndUpperLimits(  ) const  {
         return AttLimits::hasLowerAndUpperLimits( );
     }
@@ -69,11 +69,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual bool hasLowerLimit(  ) const  {
         if( bp::override func_hasLowerLimit = this->get_override( "hasLowerLimit" ) )
             return func_hasLowerLimit(  );
-        else
+        else{
             return this->AttLimits::hasLowerLimit(  );
+        }
     }
     
-    
     bool default_hasLowerLimit(  ) const  {
         return AttLimits::hasLowerLimit( );
     }
@@ -81,11 +81,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual bool hasUpperLimit(  ) const  {
         if( bp::override func_hasUpperLimit = this->get_override( "hasUpperLimit" ) )
             return func_hasUpperLimit(  );
-        else
+        else{
             return this->AttLimits::hasUpperLimit(  );
+        }
     }
     
-    
     bool default_hasUpperLimit(  ) const  {
         return AttLimits::hasUpperLimit( );
     }
@@ -93,11 +93,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual bool isFixed(  ) const  {
         if( bp::override func_isFixed = this->get_override( "isFixed" ) )
             return func_isFixed(  );
-        else
+        else{
             return this->AttLimits::isFixed(  );
+        }
     }
     
-    
     bool default_isFixed(  ) const  {
         return AttLimits::isFixed( );
     }
@@ -105,11 +105,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual void removeLimits(  ) {
         if( bp::override func_removeLimits = this->get_override( "removeLimits" ) )
             func_removeLimits(  );
-        else
+        else{
             this->AttLimits::removeLimits(  );
+        }
     }
     
-    
     void default_removeLimits(  ) {
         AttLimits::removeLimits( );
     }
@@ -117,11 +117,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual void removeLowerLimit(  ) {
         if( bp::override func_removeLowerLimit = this->get_override( "removeLowerLimit" ) )
             func_removeLowerLimit(  );
-        else
+        else{
             this->AttLimits::removeLowerLimit(  );
+        }
     }
     
-    
     void default_removeLowerLimit(  ) {
         AttLimits::removeLowerLimit( );
     }
@@ -129,11 +129,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual void removeUpperLimit(  ) {
         if( bp::override func_removeUpperLimit = this->get_override( "removeUpperLimit" ) )
             func_removeUpperLimit(  );
-        else
+        else{
             this->AttLimits::removeUpperLimit(  );
+        }
     }
     
-    
     void default_removeUpperLimit(  ) {
         AttLimits::removeUpperLimit( );
     }
@@ -141,11 +141,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual void setFixed( bool is_fixed ) {
         if( bp::override func_setFixed = this->get_override( "setFixed" ) )
             func_setFixed( is_fixed );
-        else
+        else{
             this->AttLimits::setFixed( is_fixed );
+        }
     }
     
-    
     void default_setFixed( bool is_fixed ) {
         AttLimits::setFixed( is_fixed );
     }
@@ -153,11 +153,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual void setLimits( double xmin, double xmax ) {
         if( bp::override func_setLimits = this->get_override( "setLimits" ) )
             func_setLimits( xmin, xmax );
-        else
+        else{
             this->AttLimits::setLimits( xmin, xmax );
+        }
     }
     
-    
     void default_setLimits( double xmin, double xmax ) {
         AttLimits::setLimits( xmin, xmax );
     }
@@ -165,11 +165,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual void setLowerLimit( double value ) {
         if( bp::override func_setLowerLimit = this->get_override( "setLowerLimit" ) )
             func_setLowerLimit( value );
-        else
+        else{
             this->AttLimits::setLowerLimit( value );
+        }
     }
     
-    
     void default_setLowerLimit( double value ) {
         AttLimits::setLowerLimit( value );
     }
@@ -177,11 +177,11 @@ struct AttLimits_wrapper : AttLimits, bp::wrapper< AttLimits > {
     virtual void setUpperLimit( double value ) {
         if( bp::override func_setUpperLimit = this->get_override( "setUpperLimit" ) )
             func_setUpperLimit( value );
-        else
+        else{
             this->AttLimits::setUpperLimit( value );
+        }
     }
     
-    
     void default_setUpperLimit( double value ) {
         AttLimits::setUpperLimit( value );
     }
diff --git a/Fit/PythonAPI/src/ChiSquaredModule.pypp.cpp b/Fit/PythonAPI/src/ChiSquaredModule.pypp.cpp
index b2e416fca359015f2890a5d361248bb319b20c11..85ec4492f73bcc75250442d5e346b3def2042761 100644
--- a/Fit/PythonAPI/src/ChiSquaredModule.pypp.cpp
+++ b/Fit/PythonAPI/src/ChiSquaredModule.pypp.cpp
@@ -33,11 +33,11 @@ struct ChiSquaredModule_wrapper : ChiSquaredModule, bp::wrapper< ChiSquaredModul
     virtual double calculateChiSquared(  ) {
         if( bp::override func_calculateChiSquared = this->get_override( "calculateChiSquared" ) )
             return func_calculateChiSquared(  );
-        else
+        else{
             return this->ChiSquaredModule::calculateChiSquared(  );
+        }
     }
     
-    
     double default_calculateChiSquared(  ) {
         return ChiSquaredModule::calculateChiSquared( );
     }
@@ -45,11 +45,11 @@ struct ChiSquaredModule_wrapper : ChiSquaredModule, bp::wrapper< ChiSquaredModul
     virtual ::ChiSquaredModule * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->ChiSquaredModule::clone(  );
+        }
     }
     
-    
     ::ChiSquaredModule * default_clone(  ) const  {
         return ChiSquaredModule::clone( );
     }
@@ -57,35 +57,35 @@ struct ChiSquaredModule_wrapper : ChiSquaredModule, bp::wrapper< ChiSquaredModul
     virtual ::OutputData< double > * createChi2DifferenceMap(  ) const  {
         if( bp::override func_createChi2DifferenceMap = this->get_override( "createChi2DifferenceMap" ) )
             return func_createChi2DifferenceMap(  );
-        else
+        else{
             return this->ChiSquaredModule::createChi2DifferenceMap(  );
+        }
     }
     
-    
     ::OutputData< double > * default_createChi2DifferenceMap(  ) const  {
         return ChiSquaredModule::createChi2DifferenceMap( );
     }
 
-    virtual double getResidualValue( ::std::size_t index ) const  {
+    virtual double getResidualValue( ::size_t index ) const  {
         if( bp::override func_getResidualValue = this->get_override( "getResidualValue" ) )
             return func_getResidualValue( index );
-        else
+        else{
             return this->ChiSquaredModule::getResidualValue( index );
+        }
     }
     
-    
-    double default_getResidualValue( ::std::size_t index ) const  {
+    double default_getResidualValue( ::size_t index ) const  {
         return ChiSquaredModule::getResidualValue( index );
     }
 
     virtual ::IFittingDataSelector const * getFittingDataSelector(  ) const  {
         if( bp::override func_getFittingDataSelector = this->get_override( "getFittingDataSelector" ) )
             return func_getFittingDataSelector(  );
-        else
+        else{
             return this->IChiSquaredModule::getFittingDataSelector(  );
+        }
     }
     
-    
     ::IFittingDataSelector const * default_getFittingDataSelector(  ) const  {
         return IChiSquaredModule::getFittingDataSelector( );
     }
@@ -93,11 +93,11 @@ struct ChiSquaredModule_wrapper : ChiSquaredModule, bp::wrapper< ChiSquaredModul
     virtual ::IIntensityFunction const * getIntensityFunction(  ) const  {
         if( bp::override func_getIntensityFunction = this->get_override( "getIntensityFunction" ) )
             return func_getIntensityFunction(  );
-        else
+        else{
             return this->IChiSquaredModule::getIntensityFunction(  );
+        }
     }
     
-    
     ::IIntensityFunction const * default_getIntensityFunction(  ) const  {
         return IChiSquaredModule::getIntensityFunction( );
     }
@@ -105,11 +105,11 @@ struct ChiSquaredModule_wrapper : ChiSquaredModule, bp::wrapper< ChiSquaredModul
     virtual ::IOutputDataNormalizer const * getOutputDataNormalizer(  ) const  {
         if( bp::override func_getOutputDataNormalizer = this->get_override( "getOutputDataNormalizer" ) )
             return func_getOutputDataNormalizer(  );
-        else
+        else{
             return this->IChiSquaredModule::getOutputDataNormalizer(  );
+        }
     }
     
-    
     ::IOutputDataNormalizer const * default_getOutputDataNormalizer(  ) const  {
         return IChiSquaredModule::getOutputDataNormalizer( );
     }
@@ -117,11 +117,11 @@ struct ChiSquaredModule_wrapper : ChiSquaredModule, bp::wrapper< ChiSquaredModul
     virtual ::IOutputDataNormalizer * getOutputDataNormalizer(  ) {
         if( bp::override func_getOutputDataNormalizer = this->get_override( "getOutputDataNormalizer" ) )
             return func_getOutputDataNormalizer(  );
-        else
+        else{
             return this->IChiSquaredModule::getOutputDataNormalizer(  );
+        }
     }
     
-    
     ::IOutputDataNormalizer * default_getOutputDataNormalizer(  ) {
         return IChiSquaredModule::getOutputDataNormalizer( );
     }
@@ -129,11 +129,11 @@ struct ChiSquaredModule_wrapper : ChiSquaredModule, bp::wrapper< ChiSquaredModul
     virtual void setFittingDataSelector( ::IFittingDataSelector const & selector ) {
         if( bp::override func_setFittingDataSelector = this->get_override( "setFittingDataSelector" ) )
             func_setFittingDataSelector( boost::ref(selector) );
-        else
+        else{
             this->IChiSquaredModule::setFittingDataSelector( boost::ref(selector) );
+        }
     }
     
-    
     void default_setFittingDataSelector( ::IFittingDataSelector const & selector ) {
         IChiSquaredModule::setFittingDataSelector( boost::ref(selector) );
     }
@@ -141,11 +141,11 @@ struct ChiSquaredModule_wrapper : ChiSquaredModule, bp::wrapper< ChiSquaredModul
     virtual void setIntensityFunction( ::IIntensityFunction const & intensity_function ) {
         if( bp::override func_setIntensityFunction = this->get_override( "setIntensityFunction" ) )
             func_setIntensityFunction( boost::ref(intensity_function) );
-        else
+        else{
             this->IChiSquaredModule::setIntensityFunction( boost::ref(intensity_function) );
+        }
     }
     
-    
     void default_setIntensityFunction( ::IIntensityFunction const & intensity_function ) {
         IChiSquaredModule::setIntensityFunction( boost::ref(intensity_function) );
     }
@@ -153,11 +153,11 @@ struct ChiSquaredModule_wrapper : ChiSquaredModule, bp::wrapper< ChiSquaredModul
     virtual void setOutputDataNormalizer( ::IOutputDataNormalizer const & data_normalizer ) {
         if( bp::override func_setOutputDataNormalizer = this->get_override( "setOutputDataNormalizer" ) )
             func_setOutputDataNormalizer( boost::ref(data_normalizer) );
-        else
+        else{
             this->IChiSquaredModule::setOutputDataNormalizer( boost::ref(data_normalizer) );
+        }
     }
     
-    
     void default_setOutputDataNormalizer( ::IOutputDataNormalizer const & data_normalizer ) {
         IChiSquaredModule::setOutputDataNormalizer( boost::ref(data_normalizer) );
     }
@@ -208,8 +208,8 @@ void register_ChiSquaredModule_class(){
         }
         { //::ChiSquaredModule::getResidualValue
         
-            typedef double ( ::ChiSquaredModule::*getResidualValue_function_type )( ::std::size_t ) const;
-            typedef double ( ChiSquaredModule_wrapper::*default_getResidualValue_function_type )( ::std::size_t ) const;
+            typedef double ( ::ChiSquaredModule::*getResidualValue_function_type )( ::size_t ) const;
+            typedef double ( ChiSquaredModule_wrapper::*default_getResidualValue_function_type )( ::size_t ) const;
             
             ChiSquaredModule_exposer.def( 
                 "getResidualValue"
diff --git a/Fit/PythonAPI/src/FitSuite.pypp.cpp b/Fit/PythonAPI/src/FitSuite.pypp.cpp
index 15b46b56cf11d8ca2b34c5980527c8ffeb4f4db8..d7d4ba051dfa20b45e02d8e546a232e2501d3c16 100644
--- a/Fit/PythonAPI/src/FitSuite.pypp.cpp
+++ b/Fit/PythonAPI/src/FitSuite.pypp.cpp
@@ -26,11 +26,11 @@ struct FitSuite_wrapper : FitSuite, bp::wrapper< FitSuite > {
     virtual void runFit(  ) {
         if( bp::override func_runFit = this->get_override( "runFit" ) )
             func_runFit(  );
-        else
+        else{
             this->FitSuite::runFit(  );
+        }
     }
     
-    
     void default_runFit(  ) {
         FitSuite::runFit( );
     }
@@ -96,7 +96,7 @@ void register_FitSuite_class(){
         }
         { //::FitSuite::getNCalls
         
-            typedef ::std::size_t ( ::FitSuite::*getNCalls_function_type )(  ) const;
+            typedef ::size_t ( ::FitSuite::*getNCalls_function_type )(  ) const;
             
             FitSuite_exposer.def( 
                 "getNCalls"
diff --git a/Fit/PythonAPI/src/IChiSquaredModule.pypp.cpp b/Fit/PythonAPI/src/IChiSquaredModule.pypp.cpp
index 2d8c14cad8db365d3eb2da910988874caa6c3c49..5952056df869de4fc60756008917ad0859e6a21c 100644
--- a/Fit/PythonAPI/src/IChiSquaredModule.pypp.cpp
+++ b/Fit/PythonAPI/src/IChiSquaredModule.pypp.cpp
@@ -41,11 +41,11 @@ struct IChiSquaredModule_wrapper : IChiSquaredModule, bp::wrapper< IChiSquaredMo
     virtual ::IFittingDataSelector const * getFittingDataSelector(  ) const  {
         if( bp::override func_getFittingDataSelector = this->get_override( "getFittingDataSelector" ) )
             return func_getFittingDataSelector(  );
-        else
+        else{
             return this->IChiSquaredModule::getFittingDataSelector(  );
+        }
     }
     
-    
     ::IFittingDataSelector const * default_getFittingDataSelector(  ) const  {
         return IChiSquaredModule::getFittingDataSelector( );
     }
@@ -53,11 +53,11 @@ struct IChiSquaredModule_wrapper : IChiSquaredModule, bp::wrapper< IChiSquaredMo
     virtual ::IIntensityFunction const * getIntensityFunction(  ) const  {
         if( bp::override func_getIntensityFunction = this->get_override( "getIntensityFunction" ) )
             return func_getIntensityFunction(  );
-        else
+        else{
             return this->IChiSquaredModule::getIntensityFunction(  );
+        }
     }
     
-    
     ::IIntensityFunction const * default_getIntensityFunction(  ) const  {
         return IChiSquaredModule::getIntensityFunction( );
     }
@@ -65,11 +65,11 @@ struct IChiSquaredModule_wrapper : IChiSquaredModule, bp::wrapper< IChiSquaredMo
     virtual ::IOutputDataNormalizer const * getOutputDataNormalizer(  ) const  {
         if( bp::override func_getOutputDataNormalizer = this->get_override( "getOutputDataNormalizer" ) )
             return func_getOutputDataNormalizer(  );
-        else
+        else{
             return this->IChiSquaredModule::getOutputDataNormalizer(  );
+        }
     }
     
-    
     ::IOutputDataNormalizer const * default_getOutputDataNormalizer(  ) const  {
         return IChiSquaredModule::getOutputDataNormalizer( );
     }
@@ -77,35 +77,35 @@ struct IChiSquaredModule_wrapper : IChiSquaredModule, bp::wrapper< IChiSquaredMo
     virtual ::IOutputDataNormalizer * getOutputDataNormalizer(  ) {
         if( bp::override func_getOutputDataNormalizer = this->get_override( "getOutputDataNormalizer" ) )
             return func_getOutputDataNormalizer(  );
-        else
+        else{
             return this->IChiSquaredModule::getOutputDataNormalizer(  );
+        }
     }
     
-    
     ::IOutputDataNormalizer * default_getOutputDataNormalizer(  ) {
         return IChiSquaredModule::getOutputDataNormalizer( );
     }
 
-    virtual double getResidualValue( ::std::size_t arg0 ) const  {
+    virtual double getResidualValue( ::size_t arg0 ) const  {
         if( bp::override func_getResidualValue = this->get_override( "getResidualValue" ) )
             return func_getResidualValue( arg0 );
-        else
+        else{
             return this->IChiSquaredModule::getResidualValue( arg0 );
+        }
     }
     
-    
-    double default_getResidualValue( ::std::size_t arg0 ) const  {
+    double default_getResidualValue( ::size_t arg0 ) const  {
         return IChiSquaredModule::getResidualValue( arg0 );
     }
 
     virtual void setFittingDataSelector( ::IFittingDataSelector const & selector ) {
         if( bp::override func_setFittingDataSelector = this->get_override( "setFittingDataSelector" ) )
             func_setFittingDataSelector( boost::ref(selector) );
-        else
+        else{
             this->IChiSquaredModule::setFittingDataSelector( boost::ref(selector) );
+        }
     }
     
-    
     void default_setFittingDataSelector( ::IFittingDataSelector const & selector ) {
         IChiSquaredModule::setFittingDataSelector( boost::ref(selector) );
     }
@@ -113,11 +113,11 @@ struct IChiSquaredModule_wrapper : IChiSquaredModule, bp::wrapper< IChiSquaredMo
     virtual void setIntensityFunction( ::IIntensityFunction const & intensity_function ) {
         if( bp::override func_setIntensityFunction = this->get_override( "setIntensityFunction" ) )
             func_setIntensityFunction( boost::ref(intensity_function) );
-        else
+        else{
             this->IChiSquaredModule::setIntensityFunction( boost::ref(intensity_function) );
+        }
     }
     
-    
     void default_setIntensityFunction( ::IIntensityFunction const & intensity_function ) {
         IChiSquaredModule::setIntensityFunction( boost::ref(intensity_function) );
     }
@@ -125,11 +125,11 @@ struct IChiSquaredModule_wrapper : IChiSquaredModule, bp::wrapper< IChiSquaredMo
     virtual void setOutputDataNormalizer( ::IOutputDataNormalizer const & data_normalizer ) {
         if( bp::override func_setOutputDataNormalizer = this->get_override( "setOutputDataNormalizer" ) )
             func_setOutputDataNormalizer( boost::ref(data_normalizer) );
-        else
+        else{
             this->IChiSquaredModule::setOutputDataNormalizer( boost::ref(data_normalizer) );
+        }
     }
     
-    
     void default_setOutputDataNormalizer( ::IOutputDataNormalizer const & data_normalizer ) {
         IChiSquaredModule::setOutputDataNormalizer( boost::ref(data_normalizer) );
     }
@@ -231,8 +231,8 @@ void register_IChiSquaredModule_class(){
         }
         { //::IChiSquaredModule::getResidualValue
         
-            typedef double ( ::IChiSquaredModule::*getResidualValue_function_type )( ::std::size_t ) const;
-            typedef double ( IChiSquaredModule_wrapper::*default_getResidualValue_function_type )( ::std::size_t ) const;
+            typedef double ( ::IChiSquaredModule::*getResidualValue_function_type )( ::size_t ) const;
+            typedef double ( IChiSquaredModule_wrapper::*default_getResidualValue_function_type )( ::size_t ) const;
             
             IChiSquaredModule_exposer.def( 
                 "getResidualValue"
diff --git a/Fit/PythonAPI/src/IMinimizer.pypp.cpp b/Fit/PythonAPI/src/IMinimizer.pypp.cpp
index 71eb0ec9621804aed1eee489710ed4b84f5d4e74..d93ae8bf65b4706aed797efc8586dd2d7f9e1ee1 100644
--- a/Fit/PythonAPI/src/IMinimizer.pypp.cpp
+++ b/Fit/PythonAPI/src/IMinimizer.pypp.cpp
@@ -26,83 +26,83 @@ struct IMinimizer_wrapper : IMinimizer, bp::wrapper< IMinimizer > {
     virtual void clear(  ) {
         if( bp::override func_clear = this->get_override( "clear" ) )
             func_clear(  );
-        else
+        else{
             this->IMinimizer::clear(  );
+        }
     }
     
-    
     void default_clear(  ) {
         IMinimizer::clear( );
     }
 
-    virtual double getErrorOfVariable( ::std::size_t index ) const  {
+    virtual double getErrorOfVariable( ::size_t index ) const  {
         if( bp::override func_getErrorOfVariable = this->get_override( "getErrorOfVariable" ) )
             return func_getErrorOfVariable( index );
-        else
+        else{
             return this->IMinimizer::getErrorOfVariable( index );
+        }
     }
     
-    
-    double default_getErrorOfVariable( ::std::size_t index ) const  {
+    double default_getErrorOfVariable( ::size_t index ) const  {
         return IMinimizer::getErrorOfVariable( index );
     }
 
     virtual double getMinValue(  ) const  {
         if( bp::override func_getMinValue = this->get_override( "getMinValue" ) )
             return func_getMinValue(  );
-        else
+        else{
             return this->IMinimizer::getMinValue(  );
+        }
     }
     
-    
     double default_getMinValue(  ) const  {
         return IMinimizer::getMinValue( );
     }
 
-    virtual ::std::size_t getNCalls(  ) const  {
+    virtual ::size_t getNCalls(  ) const  {
         if( bp::override func_getNCalls = this->get_override( "getNCalls" ) )
             return func_getNCalls(  );
-        else
+        else{
             return this->IMinimizer::getNCalls(  );
+        }
     }
     
-    
-    ::std::size_t default_getNCalls(  ) const  {
+    ::size_t default_getNCalls(  ) const  {
         return IMinimizer::getNCalls( );
     }
 
-    virtual ::std::size_t getNumberOfVariables(  ) const  {
+    virtual ::size_t getNumberOfVariables(  ) const  {
         if( bp::override func_getNumberOfVariables = this->get_override( "getNumberOfVariables" ) )
             return func_getNumberOfVariables(  );
-        else
+        else{
             return this->IMinimizer::getNumberOfVariables(  );
+        }
     }
     
-    
-    ::std::size_t default_getNumberOfVariables(  ) const  {
+    ::size_t default_getNumberOfVariables(  ) const  {
         return IMinimizer::getNumberOfVariables( );
     }
 
-    virtual double getValueOfVariableAtMinimum( ::std::size_t index ) const  {
+    virtual double getValueOfVariableAtMinimum( ::size_t index ) const  {
         if( bp::override func_getValueOfVariableAtMinimum = this->get_override( "getValueOfVariableAtMinimum" ) )
             return func_getValueOfVariableAtMinimum( index );
-        else
+        else{
             return this->IMinimizer::getValueOfVariableAtMinimum( index );
+        }
     }
     
-    
-    double default_getValueOfVariableAtMinimum( ::std::size_t index ) const  {
+    double default_getValueOfVariableAtMinimum( ::size_t index ) const  {
         return IMinimizer::getValueOfVariableAtMinimum( index );
     }
 
     virtual ::std::vector< double > getValueOfVariablesAtMinimum(  ) const  {
         if( bp::override func_getValueOfVariablesAtMinimum = this->get_override( "getValueOfVariablesAtMinimum" ) )
             return func_getValueOfVariablesAtMinimum(  );
-        else
+        else{
             return this->IMinimizer::getValueOfVariablesAtMinimum(  );
+        }
     }
     
-    
     ::std::vector< double > default_getValueOfVariablesAtMinimum(  ) const  {
         return IMinimizer::getValueOfVariablesAtMinimum( );
     }
@@ -115,11 +115,11 @@ struct IMinimizer_wrapper : IMinimizer, bp::wrapper< IMinimizer > {
     virtual void printResults(  ) const  {
         if( bp::override func_printResults = this->get_override( "printResults" ) )
             func_printResults(  );
-        else
+        else{
             this->IMinimizer::printResults(  );
+        }
     }
     
-    
     void default_printResults(  ) const  {
         IMinimizer::printResults( );
     }
@@ -127,11 +127,11 @@ struct IMinimizer_wrapper : IMinimizer, bp::wrapper< IMinimizer > {
     virtual void setOptions( ::std::string const & options ) {
         if( bp::override func_setOptions = this->get_override( "setOptions" ) )
             func_setOptions( options );
-        else
+        else{
             this->IMinimizer::setOptions( options );
+        }
     }
     
-    
     void default_setOptions( ::std::string const & options ) {
         IMinimizer::setOptions( options );
     }
@@ -139,11 +139,11 @@ struct IMinimizer_wrapper : IMinimizer, bp::wrapper< IMinimizer > {
     virtual void setParameters( ::FitSuiteParameters const & parameters ) {
         if( bp::override func_setParameters = this->get_override( "setParameters" ) )
             func_setParameters( boost::ref(parameters) );
-        else
+        else{
             this->IMinimizer::setParameters( boost::ref(parameters) );
+        }
     }
     
-    
     void default_setParameters( ::FitSuiteParameters const & parameters ) {
         IMinimizer::setParameters( boost::ref(parameters) );
     }
@@ -169,8 +169,8 @@ void register_IMinimizer_class(){
         }
         { //::IMinimizer::getErrorOfVariable
         
-            typedef double ( ::IMinimizer::*getErrorOfVariable_function_type )( ::std::size_t ) const;
-            typedef double ( IMinimizer_wrapper::*default_getErrorOfVariable_function_type )( ::std::size_t ) const;
+            typedef double ( ::IMinimizer::*getErrorOfVariable_function_type )( ::size_t ) const;
+            typedef double ( IMinimizer_wrapper::*default_getErrorOfVariable_function_type )( ::size_t ) const;
             
             IMinimizer_exposer.def( 
                 "getErrorOfVariable"
@@ -192,8 +192,8 @@ void register_IMinimizer_class(){
         }
         { //::IMinimizer::getNCalls
         
-            typedef ::std::size_t ( ::IMinimizer::*getNCalls_function_type )(  ) const;
-            typedef ::std::size_t ( IMinimizer_wrapper::*default_getNCalls_function_type )(  ) const;
+            typedef ::size_t ( ::IMinimizer::*getNCalls_function_type )(  ) const;
+            typedef ::size_t ( IMinimizer_wrapper::*default_getNCalls_function_type )(  ) const;
             
             IMinimizer_exposer.def( 
                 "getNCalls"
@@ -203,8 +203,8 @@ void register_IMinimizer_class(){
         }
         { //::IMinimizer::getNumberOfVariables
         
-            typedef ::std::size_t ( ::IMinimizer::*getNumberOfVariables_function_type )(  ) const;
-            typedef ::std::size_t ( IMinimizer_wrapper::*default_getNumberOfVariables_function_type )(  ) const;
+            typedef ::size_t ( ::IMinimizer::*getNumberOfVariables_function_type )(  ) const;
+            typedef ::size_t ( IMinimizer_wrapper::*default_getNumberOfVariables_function_type )(  ) const;
             
             IMinimizer_exposer.def( 
                 "getNumberOfVariables"
@@ -214,8 +214,8 @@ void register_IMinimizer_class(){
         }
         { //::IMinimizer::getValueOfVariableAtMinimum
         
-            typedef double ( ::IMinimizer::*getValueOfVariableAtMinimum_function_type )( ::std::size_t ) const;
-            typedef double ( IMinimizer_wrapper::*default_getValueOfVariableAtMinimum_function_type )( ::std::size_t ) const;
+            typedef double ( ::IMinimizer::*getValueOfVariableAtMinimum_function_type )( ::size_t ) const;
+            typedef double ( IMinimizer_wrapper::*default_getValueOfVariableAtMinimum_function_type )( ::size_t ) const;
             
             IMinimizer_exposer.def( 
                 "getValueOfVariableAtMinimum"
diff --git a/Fit/PythonAPI/src/ISquaredFunction.pypp.cpp b/Fit/PythonAPI/src/ISquaredFunction.pypp.cpp
index 03961fd42f54edf9f09a3ad4ce233f78b6345e0e..d3102be1a4b8578ccb595113353c8de045bf2187 100644
--- a/Fit/PythonAPI/src/ISquaredFunction.pypp.cpp
+++ b/Fit/PythonAPI/src/ISquaredFunction.pypp.cpp
@@ -31,11 +31,11 @@ struct ISquaredFunction_wrapper : ISquaredFunction, bp::wrapper< ISquaredFunctio
     virtual double calculateSquaredError( double real_value, double simulated_value=0.0 ) const  {
         if( bp::override func_calculateSquaredError = this->get_override( "calculateSquaredError" ) )
             return func_calculateSquaredError( real_value, simulated_value );
-        else
+        else{
             return this->ISquaredFunction::calculateSquaredError( real_value, simulated_value );
+        }
     }
     
-    
     double default_calculateSquaredError( double real_value, double simulated_value=0.0 ) const  {
         return ISquaredFunction::calculateSquaredError( real_value, simulated_value );
     }
diff --git a/Fit/PythonAPI/src/OutputDataNormalizer.pypp.cpp b/Fit/PythonAPI/src/OutputDataNormalizer.pypp.cpp
index e73f1c904aa56c1d756dddd015373eae70f6340c..1f174b834df98ba7427c89851fdabb962ea652c5 100644
--- a/Fit/PythonAPI/src/OutputDataNormalizer.pypp.cpp
+++ b/Fit/PythonAPI/src/OutputDataNormalizer.pypp.cpp
@@ -33,11 +33,11 @@ struct OutputDataNormalizer_wrapper : OutputDataNormalizer, bp::wrapper< OutputD
     virtual ::OutputDataNormalizer * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->OutputDataNormalizer::clone(  );
+        }
     }
     
-    
     ::OutputDataNormalizer * default_clone(  ) const  {
         return OutputDataNormalizer::clone( );
     }
@@ -45,11 +45,11 @@ struct OutputDataNormalizer_wrapper : OutputDataNormalizer, bp::wrapper< OutputD
     virtual ::OutputData< double > * createNormalizedData( ::OutputData< double > const & data ) const  {
         if( bp::override func_createNormalizedData = this->get_override( "createNormalizedData" ) )
             return func_createNormalizedData( boost::ref(data) );
-        else
+        else{
             return this->OutputDataNormalizer::createNormalizedData( boost::ref(data) );
+        }
     }
     
-    
     ::OutputData< double > * default_createNormalizedData( ::OutputData< double > const & data ) const  {
         return OutputDataNormalizer::createNormalizedData( boost::ref(data) );
     }
@@ -57,11 +57,11 @@ struct OutputDataNormalizer_wrapper : OutputDataNormalizer, bp::wrapper< OutputD
     virtual void setMaximumIntensity( double max_intensity ) {
         if( bp::override func_setMaximumIntensity = this->get_override( "setMaximumIntensity" ) )
             func_setMaximumIntensity( max_intensity );
-        else
+        else{
             this->OutputDataNormalizer::setMaximumIntensity( max_intensity );
+        }
     }
     
-    
     void default_setMaximumIntensity( double max_intensity ) {
         OutputDataNormalizer::setMaximumIntensity( max_intensity );
     }
diff --git a/Fit/PythonAPI/src/OutputDataSimpleNormalizer.pypp.cpp b/Fit/PythonAPI/src/OutputDataSimpleNormalizer.pypp.cpp
index 0bce6f350de766396e59c1525029ee93dd8f3714..70b59588290d8d49c637096863ec5648dc3965f9 100644
--- a/Fit/PythonAPI/src/OutputDataSimpleNormalizer.pypp.cpp
+++ b/Fit/PythonAPI/src/OutputDataSimpleNormalizer.pypp.cpp
@@ -33,11 +33,11 @@ struct OutputDataSimpleNormalizer_wrapper : OutputDataSimpleNormalizer, bp::wrap
     virtual ::OutputDataSimpleNormalizer * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->OutputDataSimpleNormalizer::clone(  );
+        }
     }
     
-    
     ::OutputDataSimpleNormalizer * default_clone(  ) const  {
         return OutputDataSimpleNormalizer::clone( );
     }
@@ -45,11 +45,11 @@ struct OutputDataSimpleNormalizer_wrapper : OutputDataSimpleNormalizer, bp::wrap
     virtual void setMaximumIntensity( double max_intensity ) {
         if( bp::override func_setMaximumIntensity = this->get_override( "setMaximumIntensity" ) )
             func_setMaximumIntensity( max_intensity );
-        else
+        else{
             this->OutputDataSimpleNormalizer::setMaximumIntensity( max_intensity );
+        }
     }
     
-    
     void default_setMaximumIntensity( double max_intensity ) {
         OutputDataSimpleNormalizer::setMaximumIntensity( max_intensity );
     }
@@ -57,11 +57,11 @@ struct OutputDataSimpleNormalizer_wrapper : OutputDataSimpleNormalizer, bp::wrap
     virtual ::OutputData< double > * createNormalizedData( ::OutputData< double > const & data ) const  {
         if( bp::override func_createNormalizedData = this->get_override( "createNormalizedData" ) )
             return func_createNormalizedData( boost::ref(data) );
-        else
+        else{
             return this->OutputDataNormalizer::createNormalizedData( boost::ref(data) );
+        }
     }
     
-    
     ::OutputData< double > * default_createNormalizedData( ::OutputData< double > const & data ) const  {
         return OutputDataNormalizer::createNormalizedData( boost::ref(data) );
     }
diff --git a/Fit/PythonAPI/src/PythonModule.cpp b/Fit/PythonAPI/src/PythonModule.cpp
index f91603a5761fd4464f4161e900b803ec09a80cb6..c07346ae29958b52dfa4432a5d92272c21403dcc 100644
--- a/Fit/PythonAPI/src/PythonModule.cpp
+++ b/Fit/PythonAPI/src/PythonModule.cpp
@@ -6,21 +6,21 @@ GCC_DIAG_OFF(missing-field-initializers);
 GCC_DIAG_ON(unused-parameter);
 GCC_DIAG_ON(missing-field-initializers);
 
-#include "SquaredFunctionWithGaussianError.pypp.h" 
-#include "OutputDataSimpleNormalizer.pypp.h" 
+#include "AttLimits.pypp.h" 
+#include "ChiSquaredModule.pypp.h" 
+#include "FitSuite.pypp.h" 
+#include "FitSuiteParameters.pypp.h" 
+#include "IChiSquaredModule.pypp.h" 
+#include "IMinimizer.pypp.h" 
+#include "IOutputDataNormalizer.pypp.h" 
 #include "ISquaredFunction.pypp.h" 
 #include "MinimizerFactory.pypp.h" 
 #include "OutputDataNormalizer.pypp.h" 
-#include "SquaredFunctionWithSystematicError.pypp.h" 
-#include "IOutputDataNormalizer.pypp.h" 
-#include "SquaredFunctionWhichOnlyWorks.pypp.h" 
-#include "IMinimizer.pypp.h" 
+#include "OutputDataSimpleNormalizer.pypp.h" 
 #include "SquaredFunctionDefault.pypp.h" 
-#include "ChiSquaredModule.pypp.h" 
-#include "FitSuite.pypp.h" 
-#include "AttLimits.pypp.h" 
-#include "IChiSquaredModule.pypp.h" 
-#include "FitSuiteParameters.pypp.h" 
+#include "SquaredFunctionWhichOnlyWorks.pypp.h" 
+#include "SquaredFunctionWithGaussianError.pypp.h" 
+#include "SquaredFunctionWithSystematicError.pypp.h" 
 
 BOOST_PYTHON_MODULE(libBornAgainFit){
 
diff --git a/Fit/PythonAPI/src/SquaredFunctionDefault.pypp.cpp b/Fit/PythonAPI/src/SquaredFunctionDefault.pypp.cpp
index 3b0b52c824aaccf828d36061a7c0a4ba77a587a3..24c1031d440dfb73a3a0f7df006e34d0ea02bb61 100644
--- a/Fit/PythonAPI/src/SquaredFunctionDefault.pypp.cpp
+++ b/Fit/PythonAPI/src/SquaredFunctionDefault.pypp.cpp
@@ -33,11 +33,11 @@ struct SquaredFunctionDefault_wrapper : SquaredFunctionDefault, bp::wrapper< Squ
     virtual double calculateSquaredDifference( double real_value, double simulated_value ) const  {
         if( bp::override func_calculateSquaredDifference = this->get_override( "calculateSquaredDifference" ) )
             return func_calculateSquaredDifference( real_value, simulated_value );
-        else
+        else{
             return this->SquaredFunctionDefault::calculateSquaredDifference( real_value, simulated_value );
+        }
     }
     
-    
     double default_calculateSquaredDifference( double real_value, double simulated_value ) const  {
         return SquaredFunctionDefault::calculateSquaredDifference( real_value, simulated_value );
     }
@@ -45,11 +45,11 @@ struct SquaredFunctionDefault_wrapper : SquaredFunctionDefault, bp::wrapper< Squ
     virtual double calculateSquaredError( double real_value, double arg1 ) const  {
         if( bp::override func_calculateSquaredError = this->get_override( "calculateSquaredError" ) )
             return func_calculateSquaredError( real_value, arg1 );
-        else
+        else{
             return this->SquaredFunctionDefault::calculateSquaredError( real_value, arg1 );
+        }
     }
     
-    
     double default_calculateSquaredError( double real_value, double arg1 ) const  {
         return SquaredFunctionDefault::calculateSquaredError( real_value, arg1 );
     }
@@ -57,11 +57,11 @@ struct SquaredFunctionDefault_wrapper : SquaredFunctionDefault, bp::wrapper< Squ
     virtual ::SquaredFunctionDefault * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->SquaredFunctionDefault::clone(  );
+        }
     }
     
-    
     ::SquaredFunctionDefault * default_clone(  ) const  {
         return SquaredFunctionDefault::clone( );
     }
diff --git a/Fit/PythonAPI/src/SquaredFunctionWhichOnlyWorks.pypp.cpp b/Fit/PythonAPI/src/SquaredFunctionWhichOnlyWorks.pypp.cpp
index 378918ee7ee2be818a1e7e61ee959902551042b7..bbb302b394a39e8dbddda31cd8b59120bf12a96c 100644
--- a/Fit/PythonAPI/src/SquaredFunctionWhichOnlyWorks.pypp.cpp
+++ b/Fit/PythonAPI/src/SquaredFunctionWhichOnlyWorks.pypp.cpp
@@ -33,11 +33,11 @@ struct SquaredFunctionWhichOnlyWorks_wrapper : SquaredFunctionWhichOnlyWorks, bp
     virtual double calculateSquaredDifference( double real_value, double simulated_value ) const  {
         if( bp::override func_calculateSquaredDifference = this->get_override( "calculateSquaredDifference" ) )
             return func_calculateSquaredDifference( real_value, simulated_value );
-        else
+        else{
             return this->SquaredFunctionWhichOnlyWorks::calculateSquaredDifference( real_value, simulated_value );
+        }
     }
     
-    
     double default_calculateSquaredDifference( double real_value, double simulated_value ) const  {
         return SquaredFunctionWhichOnlyWorks::calculateSquaredDifference( real_value, simulated_value );
     }
@@ -45,11 +45,11 @@ struct SquaredFunctionWhichOnlyWorks_wrapper : SquaredFunctionWhichOnlyWorks, bp
     virtual ::SquaredFunctionWhichOnlyWorks * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->SquaredFunctionWhichOnlyWorks::clone(  );
+        }
     }
     
-    
     ::SquaredFunctionWhichOnlyWorks * default_clone(  ) const  {
         return SquaredFunctionWhichOnlyWorks::clone( );
     }
@@ -57,11 +57,11 @@ struct SquaredFunctionWhichOnlyWorks_wrapper : SquaredFunctionWhichOnlyWorks, bp
     virtual double calculateSquaredError( double real_value, double simulated_value=0.0 ) const  {
         if( bp::override func_calculateSquaredError = this->get_override( "calculateSquaredError" ) )
             return func_calculateSquaredError( real_value, simulated_value );
-        else
+        else{
             return this->ISquaredFunction::calculateSquaredError( real_value, simulated_value );
+        }
     }
     
-    
     double default_calculateSquaredError( double real_value, double simulated_value=0.0 ) const  {
         return ISquaredFunction::calculateSquaredError( real_value, simulated_value );
     }
diff --git a/Fit/PythonAPI/src/SquaredFunctionWithGaussianError.pypp.cpp b/Fit/PythonAPI/src/SquaredFunctionWithGaussianError.pypp.cpp
index 6d869a72a869ab3957b46ac5c9d8a469bc25395d..87abc082ddab8fe0715b108485d9918c947bae3c 100644
--- a/Fit/PythonAPI/src/SquaredFunctionWithGaussianError.pypp.cpp
+++ b/Fit/PythonAPI/src/SquaredFunctionWithGaussianError.pypp.cpp
@@ -33,11 +33,11 @@ struct SquaredFunctionWithGaussianError_wrapper : SquaredFunctionWithGaussianErr
     virtual double calculateSquaredDifference( double real_value, double simulated_value ) const  {
         if( bp::override func_calculateSquaredDifference = this->get_override( "calculateSquaredDifference" ) )
             return func_calculateSquaredDifference( real_value, simulated_value );
-        else
+        else{
             return this->SquaredFunctionWithGaussianError::calculateSquaredDifference( real_value, simulated_value );
+        }
     }
     
-    
     double default_calculateSquaredDifference( double real_value, double simulated_value ) const  {
         return SquaredFunctionWithGaussianError::calculateSquaredDifference( real_value, simulated_value );
     }
@@ -45,11 +45,11 @@ struct SquaredFunctionWithGaussianError_wrapper : SquaredFunctionWithGaussianErr
     virtual double calculateSquaredError( double arg0, double arg1 ) const  {
         if( bp::override func_calculateSquaredError = this->get_override( "calculateSquaredError" ) )
             return func_calculateSquaredError( arg0, arg1 );
-        else
+        else{
             return this->SquaredFunctionWithGaussianError::calculateSquaredError( arg0, arg1 );
+        }
     }
     
-    
     double default_calculateSquaredError( double arg0, double arg1 ) const  {
         return SquaredFunctionWithGaussianError::calculateSquaredError( arg0, arg1 );
     }
@@ -57,11 +57,11 @@ struct SquaredFunctionWithGaussianError_wrapper : SquaredFunctionWithGaussianErr
     virtual ::SquaredFunctionWithGaussianError * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->SquaredFunctionWithGaussianError::clone(  );
+        }
     }
     
-    
     ::SquaredFunctionWithGaussianError * default_clone(  ) const  {
         return SquaredFunctionWithGaussianError::clone( );
     }
diff --git a/Fit/PythonAPI/src/SquaredFunctionWithSystematicError.pypp.cpp b/Fit/PythonAPI/src/SquaredFunctionWithSystematicError.pypp.cpp
index 37b0378963542325d24c0bfba602a6189dff1f24..1129f605a5790a1f9349c749d78ddce6dd9e3e5d 100644
--- a/Fit/PythonAPI/src/SquaredFunctionWithSystematicError.pypp.cpp
+++ b/Fit/PythonAPI/src/SquaredFunctionWithSystematicError.pypp.cpp
@@ -33,11 +33,11 @@ struct SquaredFunctionWithSystematicError_wrapper : SquaredFunctionWithSystemati
     virtual double calculateSquaredDifference( double real_value, double simulated_value ) const  {
         if( bp::override func_calculateSquaredDifference = this->get_override( "calculateSquaredDifference" ) )
             return func_calculateSquaredDifference( real_value, simulated_value );
-        else
+        else{
             return this->SquaredFunctionWithSystematicError::calculateSquaredDifference( real_value, simulated_value );
+        }
     }
     
-    
     double default_calculateSquaredDifference( double real_value, double simulated_value ) const  {
         return SquaredFunctionWithSystematicError::calculateSquaredDifference( real_value, simulated_value );
     }
@@ -45,11 +45,11 @@ struct SquaredFunctionWithSystematicError_wrapper : SquaredFunctionWithSystemati
     virtual double calculateSquaredError( double real_value, double simulated_value=0.0 ) const  {
         if( bp::override func_calculateSquaredError = this->get_override( "calculateSquaredError" ) )
             return func_calculateSquaredError( real_value, simulated_value );
-        else
+        else{
             return this->SquaredFunctionWithSystematicError::calculateSquaredError( real_value, simulated_value );
+        }
     }
     
-    
     double default_calculateSquaredError( double real_value, double simulated_value=0.0 ) const  {
         return SquaredFunctionWithSystematicError::calculateSquaredError( real_value, simulated_value );
     }
@@ -57,11 +57,11 @@ struct SquaredFunctionWithSystematicError_wrapper : SquaredFunctionWithSystemati
     virtual ::SquaredFunctionWithSystematicError * clone(  ) const  {
         if( bp::override func_clone = this->get_override( "clone" ) )
             return func_clone(  );
-        else
+        else{
             return this->SquaredFunctionWithSystematicError::clone(  );
+        }
     }
     
-    
     ::SquaredFunctionWithSystematicError * default_clone(  ) const  {
         return SquaredFunctionWithSystematicError::clone( );
     }
diff --git a/Fit/python_module.pri b/Fit/python_module.pri
index c6699b4472f92e150b919e96b62663199e61d56f..c12606a3c3329b794180f574274794b23b94bf55 100644
--- a/Fit/python_module.pri
+++ b/Fit/python_module.pri
@@ -1,39 +1,39 @@
 HEADERS +=  \ 
     PythonAPI/inc/PythonFitExposer.h \ 
     PythonAPI/inc/PythonFitList.h \ 
-    PythonAPI/inc/SquaredFunctionWithGaussianError.pypp.h \
-    PythonAPI/inc/OutputDataSimpleNormalizer.pypp.h \
+    PythonAPI/inc/AttLimits.pypp.h \
+    PythonAPI/inc/ChiSquaredModule.pypp.h \
+    PythonAPI/inc/FitSuite.pypp.h \
+    PythonAPI/inc/FitSuiteParameters.pypp.h \
+    PythonAPI/inc/IChiSquaredModule.pypp.h \
+    PythonAPI/inc/IMinimizer.pypp.h \
+    PythonAPI/inc/IOutputDataNormalizer.pypp.h \
     PythonAPI/inc/ISquaredFunction.pypp.h \
     PythonAPI/inc/MinimizerFactory.pypp.h \
     PythonAPI/inc/OutputDataNormalizer.pypp.h \
-    PythonAPI/inc/SquaredFunctionWithSystematicError.pypp.h \
-    PythonAPI/inc/IOutputDataNormalizer.pypp.h \
-    PythonAPI/inc/SquaredFunctionWhichOnlyWorks.pypp.h \
-    PythonAPI/inc/IMinimizer.pypp.h \
+    PythonAPI/inc/OutputDataSimpleNormalizer.pypp.h \
     PythonAPI/inc/SquaredFunctionDefault.pypp.h \
-    PythonAPI/inc/ChiSquaredModule.pypp.h \
-    PythonAPI/inc/FitSuite.pypp.h \
-    PythonAPI/inc/AttLimits.pypp.h \
-    PythonAPI/inc/IChiSquaredModule.pypp.h \
-    PythonAPI/inc/FitSuiteParameters.pypp.h 
+    PythonAPI/inc/SquaredFunctionWhichOnlyWorks.pypp.h \
+    PythonAPI/inc/SquaredFunctionWithGaussianError.pypp.h \
+    PythonAPI/inc/SquaredFunctionWithSystematicError.pypp.h 
 
 SOURCES +=  \ 
     PythonAPI/src/PythonModule.cpp \ 
-    PythonAPI/src/OutputDataSimpleNormalizer.pypp.cpp \
-    PythonAPI/src/SquaredFunctionWithSystematicError.pypp.cpp \
     PythonAPI/src/AttLimits.pypp.cpp \
     PythonAPI/src/ChiSquaredModule.pypp.cpp \
+    PythonAPI/src/FitSuite.pypp.cpp \
+    PythonAPI/src/FitSuiteParameters.pypp.cpp \
     PythonAPI/src/IChiSquaredModule.pypp.cpp \
+    PythonAPI/src/IMinimizer.pypp.cpp \
+    PythonAPI/src/IOutputDataNormalizer.pypp.cpp \
+    PythonAPI/src/ISquaredFunction.pypp.cpp \
+    PythonAPI/src/MinimizerFactory.pypp.cpp \
+    PythonAPI/src/OutputDataNormalizer.pypp.cpp \
+    PythonAPI/src/OutputDataSimpleNormalizer.pypp.cpp \
     PythonAPI/src/SquaredFunctionDefault.pypp.cpp \
     PythonAPI/src/SquaredFunctionWhichOnlyWorks.pypp.cpp \
-    PythonAPI/src/OutputDataNormalizer.pypp.cpp \
-    PythonAPI/src/FitSuite.pypp.cpp \
-    PythonAPI/src/IMinimizer.pypp.cpp \
     PythonAPI/src/SquaredFunctionWithGaussianError.pypp.cpp \
-    PythonAPI/src/MinimizerFactory.pypp.cpp \
-    PythonAPI/src/ISquaredFunction.pypp.cpp \
-    PythonAPI/src/IOutputDataNormalizer.pypp.cpp \
-    PythonAPI/src/FitSuiteParameters.pypp.cpp 
+    PythonAPI/src/SquaredFunctionWithSystematicError.pypp.cpp 
 
 INCLUDEPATH += ./PythonAPI/inc 
 DEPENDPATH  += ./PythonAPI/inc 
diff --git a/dev-tools/python-bindings/MakePyCore.py b/dev-tools/python-bindings/MakePyCore.py
index c5d0df958d4738e839be757932f9d8bd2a420820..92ad879d32be9ca3ba048c704ae9e18457e7eabc 100644
--- a/dev-tools/python-bindings/MakePyCore.py
+++ b/dev-tools/python-bindings/MakePyCore.py
@@ -183,6 +183,9 @@ def ManualClassTunings(mb):
     cl.member_function( "buildSample" ).include()
     cl.member_function( "buildSample" ).call_policies = call_policies.return_value_policy( call_policies.manage_new_object )
     #
+    cl = mb.class_( "IClusteredParticles" )
+    cl.member_function( "setAmbientMaterial" ).include()
+    #
     cl = mb.class_( "MaterialManager" )
     cl.constructors().exclude()
     #