diff --git a/Core/Multilayer/DWBADiffuseReflection.h b/Core/Multilayer/DWBADiffuseReflection.h
index 5b3e872449ed4966cd597a6e29f98a4dc732c33c..e4ca5180cf41a16082d92929c5a2dd98c9bb63a6 100644
--- a/Core/Multilayer/DWBADiffuseReflection.h
+++ b/Core/Multilayer/DWBADiffuseReflection.h
@@ -49,8 +49,8 @@ private:
     complex_t get_sum4terms(size_t ilayer);
 
     const MultiLayer* m_sample;
-    SpecularMatrix::MultiLayerCoeff_t m_fcoeff_i;
-    SpecularMatrix::MultiLayerCoeff_t m_fcoeff_f;
+    std::vector<ScalarRTCoefficients> m_fcoeff_i;
+    std::vector<ScalarRTCoefficients> m_fcoeff_f;
     double m_diffuse_autocorr;
     double m_diffuse_crosscorr;
 
diff --git a/Core/Multilayer/MatrixFresnelMap.cpp b/Core/Multilayer/MatrixFresnelMap.cpp
index 848f913051502b4fd404381310a38812a2864e6b..2b30c4716f316cecf50623466148bad015719754 100644
--- a/Core/Multilayer/MatrixFresnelMap.cpp
+++ b/Core/Multilayer/MatrixFresnelMap.cpp
@@ -29,7 +29,7 @@ MatrixFresnelMap::MatrixFresnelMap(const MultiLayer* p_multilayer,
 const ILayerRTCoefficients* MatrixFresnelMap::getOutCoefficients(
         const SimulationElement& sim_element, size_t layer_index) const
 {
-    SpecularMagnetic::MultiLayerCoeff_t coeffs;
+    std::vector<MatrixRTCoefficients> coeffs;
     SpecularMagnetic::execute(*mp_inverted_multilayer, -sim_element.getMeanKf(), coeffs);
     return new MatrixRTCoefficients(coeffs[layer_index]);
 }
@@ -37,7 +37,7 @@ const ILayerRTCoefficients* MatrixFresnelMap::getOutCoefficients(
 const ILayerRTCoefficients* MatrixFresnelMap::getInCoefficients(
         const SimulationElement& sim_element, size_t layer_index) const
 {
-    SpecularMagnetic::MultiLayerCoeff_t coeffs;
+    std::vector<MatrixRTCoefficients> coeffs;
     SpecularMagnetic::execute(*mp_multilayer, sim_element.getKi(), coeffs);
     return new MatrixRTCoefficients(coeffs[layer_index]);
 }
diff --git a/Core/Multilayer/SpecularMagnetic.cpp b/Core/Multilayer/SpecularMagnetic.cpp
index 362f09a9fd56176a2c39f6b1e71ed69899cdee8f..e22a527af425748f5be84897259527b30b116b8d 100644
--- a/Core/Multilayer/SpecularMagnetic.cpp
+++ b/Core/Multilayer/SpecularMagnetic.cpp
@@ -26,7 +26,7 @@ namespace {
 }
 
 void SpecularMagnetic::execute(
-    const MultiLayer& sample, const kvector_t k, MultiLayerCoeff_t& coeff)
+    const MultiLayer& sample, const kvector_t k, std::vector<MatrixRTCoefficients>& coeff)
 {
     coeff.clear();
     coeff.resize(sample.getNumberOfLayers());
@@ -37,7 +37,7 @@ void SpecularMagnetic::execute(
 }
 
 void SpecularMagnetic::calculateEigenvalues(
-    const MultiLayer& sample, const kvector_t k, MultiLayerCoeff_t& coeff)
+    const MultiLayer& sample, const kvector_t k, std::vector<MatrixRTCoefficients>& coeff)
 {
     double mag_k = k.mag();
     double sign_kz = k.z() > 0.0 ? -1.0 : 1.0;
@@ -64,7 +64,7 @@ void SpecularMagnetic::calculateEigenvalues(
 
 // todo: avoid overflows (see SpecularMatrix.cpp)
 void SpecularMagnetic::calculateTransferAndBoundary(
-    const MultiLayer& sample, const kvector_t k, MultiLayerCoeff_t& coeff)
+    const MultiLayer& sample, const kvector_t k, std::vector<MatrixRTCoefficients>& coeff)
 {
     (void)k;
     size_t N = coeff.size();
@@ -127,7 +127,7 @@ void SpecularMagnetic::calculateTransferAndBoundary(
     }
 }
 
-void SpecularMagnetic::setForNoTransmission(MultiLayerCoeff_t& coeff)
+void SpecularMagnetic::setForNoTransmission(std::vector<MatrixRTCoefficients>& coeff)
 {
     size_t N = coeff.size();
     for (size_t i=0; i<N; ++i) {
diff --git a/Core/Multilayer/SpecularMagnetic.h b/Core/Multilayer/SpecularMagnetic.h
index 87bea205fc4cbf9c65f1d6a956d3e5544b37cd61..84986df1a4cb30e794ddbfe5e2e7ace2e0a5f530 100644
--- a/Core/Multilayer/SpecularMagnetic.h
+++ b/Core/Multilayer/SpecularMagnetic.h
@@ -27,20 +27,17 @@
 class BA_CORE_API_ SpecularMagnetic
 {
 public:
-    //! Layer coefficients describing refraction and reflection/transmission.
-    typedef std::vector<MatrixRTCoefficients> MultiLayerCoeff_t;
-
     //! Computes refraction angle reflection/transmission coefficients
     //! for given multilayer and wavevector k
-    static void execute(
-        const class MultiLayer& sample, const kvector_t k, MultiLayerCoeff_t& coeff);
+    static void execute(const class MultiLayer& sample, const kvector_t k,
+                        std::vector<MatrixRTCoefficients>& coeff);
 
 private:
-    static void calculateEigenvalues(
-        const class MultiLayer& sample, const kvector_t k, MultiLayerCoeff_t& coeff);
-    static void calculateTransferAndBoundary(
-        const MultiLayer& sample, const kvector_t k, MultiLayerCoeff_t& coeff);
-    static void setForNoTransmission(MultiLayerCoeff_t& coeff);
+    static void calculateEigenvalues(const class MultiLayer& sample, const kvector_t k,
+                                     std::vector<MatrixRTCoefficients>& coeff);
+    static void calculateTransferAndBoundary(const MultiLayer& sample, const kvector_t k,
+                                             std::vector<MatrixRTCoefficients>& coeff);
+    static void setForNoTransmission(std::vector<MatrixRTCoefficients>& coeff);
     static complex_t getImExponential(complex_t exponent);
 };
 
diff --git a/Core/Multilayer/SpecularMatrix.cpp b/Core/Multilayer/SpecularMatrix.cpp
index fcc33dfc212522dafe36011042c5c5f486949186..9a0aa43bf7ee6ebe59b1cf9116f63dcaeaaafd7f 100644
--- a/Core/Multilayer/SpecularMatrix.cpp
+++ b/Core/Multilayer/SpecularMatrix.cpp
@@ -27,12 +27,12 @@ namespace {
     const complex_t imag_unit = complex_t(0.0, 1.0);
 }
 
-void setZeroBelow(SpecularMatrix::MultiLayerCoeff_t& coeff, size_t current_layer);
+void setZeroBelow(std::vector<ScalarRTCoefficients>& coeff, size_t current_layer);
 bool calculateUpFromLayer(
-    SpecularMatrix::MultiLayerCoeff_t& coeff, const MultiLayer& sample,
+    std::vector<ScalarRTCoefficients>& coeff, const MultiLayer& sample,
     const double kmag, size_t layer_index);
 size_t bisectRTcomputation(
-    SpecularMatrix::MultiLayerCoeff_t& coeff, const MultiLayer& sample,
+    std::vector<ScalarRTCoefficients>& coeff, const MultiLayer& sample,
     const double kmag, const size_t lgood, const size_t lbad, const size_t l);
 
 //! Computes refraction angles and transmission/reflection coefficients
@@ -40,7 +40,8 @@ size_t bisectRTcomputation(
 //! Roughness is modelled by tanh profile [see e.g. Phys. Rev. B, vol. 47 (8), p. 4385 (1993)].
 //! k : length: wavenumber in vacuum, direction: defined in layer 0.
 
-void SpecularMatrix::execute(const MultiLayer& sample, const kvector_t k, MultiLayerCoeff_t& coeff)
+void SpecularMatrix::execute(const MultiLayer& sample, const kvector_t k,
+                             std::vector<ScalarRTCoefficients>& coeff)
 {
     size_t N = sample.getNumberOfLayers();
     assert(N>0);
@@ -102,7 +103,7 @@ void SpecularMatrix::execute(const MultiLayer& sample, const kvector_t k, MultiL
 
 //! Sets coeff to zero for all layers below current_layer.
 
-void setZeroBelow(SpecularMatrix::MultiLayerCoeff_t& coeff, size_t current_layer)
+void setZeroBelow(std::vector<ScalarRTCoefficients>& coeff, size_t current_layer)
 {
     size_t N = coeff.size();
     for (size_t i=current_layer+1; i<N; ++i) {
@@ -113,7 +114,7 @@ void setZeroBelow(SpecularMatrix::MultiLayerCoeff_t& coeff, size_t current_layer
 //! Computes RT coefficients coeff, starting from layer number layer_index.
 //! Returns true if no overflow happens.
 
-bool calculateUpFromLayer(SpecularMatrix::MultiLayerCoeff_t& coeff, const MultiLayer& sample,
+bool calculateUpFromLayer(std::vector<ScalarRTCoefficients>& coeff, const MultiLayer& sample,
                           const double kmag, size_t layer_index)
 {
     coeff[layer_index+1].t_r(0) = 1.0;
@@ -154,7 +155,7 @@ bool calculateUpFromLayer(SpecularMatrix::MultiLayerCoeff_t& coeff, const MultiL
 //! Computes coeff, and returns largest possible start layer index.
 
 size_t bisectRTcomputation(
-    SpecularMatrix::MultiLayerCoeff_t& coeff, const MultiLayer& sample,
+    std::vector<ScalarRTCoefficients>& coeff, const MultiLayer& sample,
     const double kmag, const size_t lgood, const size_t lbad, const size_t l)
 {
     if (calculateUpFromLayer(coeff, sample, kmag, l)) {
diff --git a/Core/Multilayer/SpecularMatrix.h b/Core/Multilayer/SpecularMatrix.h
index 75ae0ade4b05b386e912fc0ccf6b5474b31c5818..edb4a3dab71142d3a1fde9f3f1f7e62f793e391c 100644
--- a/Core/Multilayer/SpecularMatrix.h
+++ b/Core/Multilayer/SpecularMatrix.h
@@ -27,13 +27,10 @@
 class BA_CORE_API_ SpecularMatrix
 {
 public:
-    //! Layer coefficients describing refraction and transmission/reflection.
-    typedef std::vector<ScalarRTCoefficients> MultiLayerCoeff_t;
-
     //! Computes refraction angles and transmission/reflection coefficients
     //! for given coherent wave propagation in a multilayer.
-    static void execute(
-        const class MultiLayer& sample, const kvector_t k, MultiLayerCoeff_t& coeff);
+    static void execute(const class MultiLayer& sample, const kvector_t k,
+                        std::vector<ScalarRTCoefficients>& coeff);
 };
 
 #endif // SPECULARMATRIX_H
diff --git a/Core/Simulation/SpecularSimulation.cpp b/Core/Simulation/SpecularSimulation.cpp
index a9312fd3e97201f203463dbe64c9c16f3fa7e742..5d1d43e4f5a8330c4b5b3d44d427969d61af8be1 100644
--- a/Core/Simulation/SpecularSimulation.cpp
+++ b/Core/Simulation/SpecularSimulation.cpp
@@ -213,7 +213,7 @@ void SpecularSimulation::collectRTCoefficientsScalar(const MultiLayer *multilaye
         double alpha_i = m_data.getAxisValue(it.getIndex(), 0);
         kvector_t kvec = vecOfLambdaAlphaPhi(m_lambda, -alpha_i, 0.0);
 
-        SpecularMatrix::MultiLayerCoeff_t coeffs;
+        std::vector<ScalarRTCoefficients> coeffs;
         SpecularMatrix::execute(*multilayer, kvec, coeffs);
 
         MultiLayerRTCoefficients_t ml_coeffs;
diff --git a/Tests/UnitTests/Core/Fresnel/SpecularMagneticTest.h b/Tests/UnitTests/Core/Fresnel/SpecularMagneticTest.h
index 7063a99d5932bf2635996130d6e9ed4c9c7cfa1c..ea10dfa222c65892966e0c8008bbdc192bef5290 100644
--- a/Tests/UnitTests/Core/Fresnel/SpecularMagneticTest.h
+++ b/Tests/UnitTests/Core/Fresnel/SpecularMagneticTest.h
@@ -16,7 +16,7 @@ TEST_F(SpecularMagneticTest, initial)
 {
     MultiLayer mLayer;
     kvector_t v;
-    SpecularMagnetic::MultiLayerCoeff_t coeff;
+    std::vector<MatrixRTCoefficients> coeff;
 
     // @Error: Throws exception (Layer index is out of bounds)
     //matrix.execute(mLayer, v, coeff);
@@ -45,14 +45,14 @@ TEST_F(SpecularMagneticTest, zerofield)
     Layer substr_layer_scalar(substr_material_scalar);
     multi_layer_scalar.addLayer(air_layer);
     multi_layer_scalar.addLayer(substr_layer_scalar);
-    SpecularMatrix::MultiLayerCoeff_t coeffs_scalar;
+    std::vector<ScalarRTCoefficients> coeffs_scalar;
 
     MultiLayer multi_layer_zerofield;
     HomogeneousMagneticMaterial substr_material_zerofield("Substrate", 7e-6, 2e-8, substr_field);
     Layer substr_layer_zerofield(substr_material_zerofield);
     multi_layer_zerofield.addLayer(air_layer);
     multi_layer_zerofield.addLayer(substr_layer_zerofield);
-    SpecularMagnetic::MultiLayerCoeff_t coeffs_zerofield;
+    std::vector<MatrixRTCoefficients> coeffs_zerofield;
 
     // k1
     SpecularMatrix::execute(multi_layer_scalar, k1, coeffs_scalar);
diff --git a/Tests/UnitTests/Core/Fresnel/SpecularMatrixTest.h b/Tests/UnitTests/Core/Fresnel/SpecularMatrixTest.h
index b5ea32dfafda657317b19e682562dd083bb28e8a..c382c1fc3bd61562566adc34f6c7e1ad551d4f9e 100644
--- a/Tests/UnitTests/Core/Fresnel/SpecularMatrixTest.h
+++ b/Tests/UnitTests/Core/Fresnel/SpecularMatrixTest.h
@@ -14,7 +14,7 @@ TEST_F(SpecularMatrixTest, initial)
 {
     MultiLayer mLayer;
     kvector_t v;
-    SpecularMatrix::MultiLayerCoeff_t coeff;
+    std::vector<ScalarRTCoefficients> coeff;
 
     // @Error: Throws exception (Layer index is out of bounds)
     //matrix.execute(mLayer, v, coeff);
diff --git a/auto/Wrap/doxygen_core.i b/auto/Wrap/doxygen_core.i
index e728bd58ce348ac9e34a101bc273f358f9c9a3e1..09b9cbda7cdebbaa2d78b1c611b6f10d261ad059 100644
--- a/auto/Wrap/doxygen_core.i
+++ b/auto/Wrap/doxygen_core.i
@@ -5077,6 +5077,16 @@ Resets region of interest making whole detector plane available for the simulati
 ";
 
 
+// File: classHashKVector.xml
+%feature("docstring") HashKVector "";
+
+%feature("docstring")  HashKVector::HashKVector "HashKVector::HashKVector()
+";
+
+%feature("docstring")  HashKVector::~HashKVector "HashKVector::~HashKVector()
+";
+
+
 // File: classHexagonalLattice.xml
 %feature("docstring") HexagonalLattice "";
 
@@ -13179,16 +13189,16 @@ C++ includes: WavevectorInfo.h
 // File: namespace_0D280.xml
 
 
-// File: namespace_0D306.xml
+// File: namespace_0D308.xml
 
 
-// File: namespace_0D308.xml
+// File: namespace_0D310.xml
 
 
-// File: namespace_0D321.xml
+// File: namespace_0D323.xml
 
 
-// File: namespace_0D434.xml
+// File: namespace_0D436.xml
 
 
 // File: namespace_0D60.xml
@@ -14602,6 +14612,12 @@ make Swappable
 // File: FormFactorDWBAPol_8h.xml
 
 
+// File: HashKVector_8cpp.xml
+
+
+// File: HashKVector_8h.xml
+
+
 // File: IFresnelMap_8cpp.xml
 
 
@@ -14681,17 +14697,17 @@ make Swappable
 
 
 // File: SpecularMatrix_8cpp.xml
-%feature("docstring")  setZeroBelow "void setZeroBelow(SpecularMatrix::MultiLayerCoeff_t &coeff, size_t current_layer)
+%feature("docstring")  setZeroBelow "void setZeroBelow(std::vector< ScalarRTCoefficients > &coeff, size_t current_layer)
 
 Sets coeff to zero for all layers below current_layer. 
 ";
 
-%feature("docstring")  calculateUpFromLayer "bool calculateUpFromLayer(SpecularMatrix::MultiLayerCoeff_t &coeff, const MultiLayer &sample, const double kmag, size_t layer_index)
+%feature("docstring")  calculateUpFromLayer "bool calculateUpFromLayer(std::vector< ScalarRTCoefficients > &coeff, const MultiLayer &sample, const double kmag, size_t layer_index)
 
 Computes RT coefficients coeff, starting from layer number layer_index. Returns true if no overflow happens. 
 ";
 
-%feature("docstring")  bisectRTcomputation "size_t bisectRTcomputation(SpecularMatrix::MultiLayerCoeff_t &coeff, const MultiLayer &sample, const double kmag, const size_t lgood, const size_t lbad, const size_t l)
+%feature("docstring")  bisectRTcomputation "size_t bisectRTcomputation(std::vector< ScalarRTCoefficients > &coeff, const MultiLayer &sample, const double kmag, const size_t lgood, const size_t lbad, const size_t l)
 
 Recursive bisection to determine the number of the deepest layer where RT computation can be started without running into overflow. Computes coeff, and returns largest possible start layer index. 
 ";