diff --git a/Device/Detector/FlatDetector.cpp b/Device/Detector/FlatDetector.cpp
index a617de73b3fc984dd0b8dce6501bc0f020ba119f..4a9df6223045fbd2e6ec88390ba54f98f978ab8c 100644
--- a/Device/Detector/FlatDetector.cpp
+++ b/Device/Detector/FlatDetector.cpp
@@ -69,12 +69,6 @@ FlatDetector* FlatDetector::clone() const
     return new FlatDetector(*this);
 }
 
-void FlatDetector::setDetectorNormal(const R3& k)
-{
-    initNormalVector(k);
-    initUandV();
-}
-
 double FlatDetector::width() const
 {
     return axis(0).span();
@@ -95,11 +89,6 @@ size_t FlatDetector::ySize() const
     return axis(1).size();
 }
 
-R3 FlatDetector::getNormalVector() const
-{
-    return m_normal_to_detector;
-}
-
 double FlatDetector::getU0() const
 {
     return m_u0;
@@ -110,11 +99,6 @@ double FlatDetector::getV0() const
     return m_v0;
 }
 
-R3 FlatDetector::getDirectionVector() const
-{
-    return m_direction;
-}
-
 double FlatDetector::getDistance() const
 {
     return m_distance;
@@ -177,47 +161,6 @@ size_t FlatDetector::indexOfSpecular(const Beam& beam) const
     return getGlobalIndex(u_axis.closestIndex(u), v_axis.closestIndex(v));
 }
 
-void FlatDetector::setDistanceAndOffset(double distance, double u0, double v0)
-{
-    if (distance <= 0.0) {
-        std::ostringstream message;
-        message << "FlatDetector::setPerpendicularToSample -> Error. "
-                << "Distance to sample cannot be negative or zero";
-        throw std::runtime_error(message.str());
-    }
-    m_distance = distance;
-    m_u0 = u0;
-    m_v0 = v0;
-}
-
-void FlatDetector::initNormalVector(const R3 central_k)
-{
-    R3 central_k_unit = central_k.unit_or_throw();
-
-    if (m_nominalNormal == X)
-        m_normal_to_detector = R3(m_distance, 0.0, 0.0);
-
-    else if (m_nominalNormal == T)
-        m_normal_to_detector = m_distance * central_k_unit;
-
-    else if (m_nominalNormal == R) {
-        m_normal_to_detector = m_distance * central_k_unit;
-        m_normal_to_detector.setZ(-m_normal_to_detector.z());
-    }
-
-    else
-        ASSERT_NEVER;
-}
-
-void FlatDetector::initUandV()
-{
-    double d2 = m_normal_to_detector.dot(m_normal_to_detector);
-    R3 u_direction =
-        d2 * m_direction - m_direction.dot(m_normal_to_detector) * m_normal_to_detector;
-    m_u_unit = u_direction.unit_or_throw();
-    m_v_unit = m_u_unit.cross(m_normal_to_detector).unit_or_throw();
-}
-
 Frame FlatDetector::scatteringCoords() const
 {
     return {axesClippedToRegionOfInterest()};
diff --git a/Device/Detector/FlatDetector.h b/Device/Detector/FlatDetector.h
index 8908a3e00bc4e7ad54a3d551eaf83750cc767bc9..7a762ef2e96b31c430c094161b24701bdcea910c 100644
--- a/Device/Detector/FlatDetector.h
+++ b/Device/Detector/FlatDetector.h
@@ -37,16 +37,12 @@ public:
     FlatDetector* clone() const override;
     std::string className() const final { return "FlatDetector"; }
 
-    void setDetectorNormal(const R3& k) override;
-
     double width() const;
     double height() const;
     size_t xSize() const;
     size_t ySize() const;
-    R3 getNormalVector() const;
     double getU0() const;
     double getV0() const;
-    R3 getDirectionVector() const;
     double getDistance() const;
     NominalNormal getDetectorArrangment() const;
     std::string normalName() const;
@@ -72,10 +68,6 @@ private:
     //! returned. This corresponds to an overflow index.
     size_t indexOfSpecular(const Beam& beam) const override;
 
-    void setDistanceAndOffset(double distance, double u0, double v0);
-    void initNormalVector(R3 central_k);
-    void initUandV();
-
     NominalNormal m_nominalNormal;
     R3 m_normal_to_detector;
     double m_u0, m_v0; //!< position of normal vector hitting point in detector coordinates
diff --git a/GUI/Model/Device/InstrumentItems.cpp b/GUI/Model/Device/InstrumentItems.cpp
index 6224faf4f921d48e444bb8c4e06fb550b76e2720..98077de34e50e4d615209a90ed19ffd7d5eb7cee 100644
--- a/GUI/Model/Device/InstrumentItems.cpp
+++ b/GUI/Model/Device/InstrumentItems.cpp
@@ -709,7 +709,6 @@ ISimulation* GISASInstrumentItem::createSimulation(const MultiLayer& sample) con
     if (withPolarizer())
         beam->setPolarization(m_polarizerBlochVector);
     const auto detector = detectorItem()->createDetector(*beam);
-    detector->setDetectorNormal(beam->ki());
     if (withAnalyzer())
         detector->setAnalyzer(m_analyzerBlochVector);
     auto* result = new ScatteringSimulation(*beam, sample, *detector);
diff --git a/auto/README.md b/auto/README.md
deleted file mode 100644
index 2d0c84d97a2bab67e8f7f9948fb63982c36ce161..0000000000000000000000000000000000000000
--- a/auto/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-#### Directory auto/
-
-This directory contains files that are automatically
-generated, but are nonetheless part of the source archive.
-
-Users who want to build BornAgain should consider this
-directory a regular part of the source distributions.
-
-Developers, on the other hand, should regenerate files
-in this directory whenever their sources have changed.
-To this end, configure CMake with `cmake .. -DDEV=ON`.
-The build process then requires additional tools,
-- Swig for regenerating auto/Wrap;
-- Ruby (which provides the embedded Ruby interpreter erb)
-  for regenerating Examples and MiniExamples.
-
-Contents of this directory:
-
-`Examples`
-: Public version of the Python scripting examples
-`MiniExamples`
-: Version of the Python scripting examples with mini detectors,
-  for automatized testing
-`Wrap`
-: Python wrapper, generated by Doxygen and Swig.
diff --git a/auto/Wrap/libBornAgainDevice.py b/auto/Wrap/libBornAgainDevice.py
index 90893f5e90b34a0d316f0dea71693c098c173a4e..345e08fb4d5baf34951d7ee4daabd88e7c5a378c 100644
--- a/auto/Wrap/libBornAgainDevice.py
+++ b/auto/Wrap/libBornAgainDevice.py
@@ -2808,10 +2808,6 @@ class FlatDetector(IDetector):
         r"""className(FlatDetector self) -> std::string"""
         return _libBornAgainDevice.FlatDetector_className(self)
 
-    def setDetectorNormal(self, k):
-        r"""setDetectorNormal(FlatDetector self, R3 k)"""
-        return _libBornAgainDevice.FlatDetector_setDetectorNormal(self, k)
-
     def width(self):
         r"""width(FlatDetector self) -> double"""
         return _libBornAgainDevice.FlatDetector_width(self)
@@ -2828,10 +2824,6 @@ class FlatDetector(IDetector):
         r"""ySize(FlatDetector self) -> size_t"""
         return _libBornAgainDevice.FlatDetector_ySize(self)
 
-    def getNormalVector(self):
-        r"""getNormalVector(FlatDetector self) -> R3"""
-        return _libBornAgainDevice.FlatDetector_getNormalVector(self)
-
     def getU0(self):
         r"""getU0(FlatDetector self) -> double"""
         return _libBornAgainDevice.FlatDetector_getU0(self)
@@ -2840,10 +2832,6 @@ class FlatDetector(IDetector):
         r"""getV0(FlatDetector self) -> double"""
         return _libBornAgainDevice.FlatDetector_getV0(self)
 
-    def getDirectionVector(self):
-        r"""getDirectionVector(FlatDetector self) -> R3"""
-        return _libBornAgainDevice.FlatDetector_getDirectionVector(self)
-
     def getDistance(self):
         r"""getDistance(FlatDetector self) -> double"""
         return _libBornAgainDevice.FlatDetector_getDistance(self)
diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp
index 34a88f214182cfde2cda7e2f70ff885e1a36829c..4110ce2a4c176a26cf8e47c51b04937751a1114c 100644
--- a/auto/Wrap/libBornAgainDevice_wrap.cpp
+++ b/auto/Wrap/libBornAgainDevice_wrap.cpp
@@ -38436,48 +38436,6 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_FlatDetector_setDetectorNormal(PyObject *self, PyObject *args) {
-  PyObject *resultobj = 0;
-  FlatDetector *arg1 = (FlatDetector *) 0 ;
-  R3 *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject *swig_obj[2] ;
-  
-  if (!SWIG_Python_UnpackTuple(args, "FlatDetector_setDetectorNormal", 2, 2, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FlatDetector, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FlatDetector_setDetectorNormal" "', argument " "1"" of type '" "FlatDetector *""'"); 
-  }
-  arg1 = reinterpret_cast< FlatDetector * >(argp1);
-  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Vec3T_double_t,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FlatDetector_setDetectorNormal" "', argument " "2"" of type '" "R3 const &""'"); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FlatDetector_setDetectorNormal" "', argument " "2"" of type '" "R3 const &""'"); 
-  }
-  arg2 = reinterpret_cast< R3 * >(argp2);
-  {
-    try {
-      (arg1)->setDetectorNormal((R3 const &)*arg2);
-    } catch (const std::exception& ex) {
-      // message shown in the Python interpreter
-      const std::string msg {
-        "BornAgain C++ Exception: " + std::string(ex.what())
-      };
-      SWIG_exception(SWIG_RuntimeError, msg.c_str());
-    }
-  }
-  resultobj = SWIG_Py_Void();
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
 SWIGINTERN PyObject *_wrap_FlatDetector_width(PyObject *self, PyObject *args) {
   PyObject *resultobj = 0;
   FlatDetector *arg1 = (FlatDetector *) 0 ;
@@ -38610,39 +38568,6 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_FlatDetector_getNormalVector(PyObject *self, PyObject *args) {
-  PyObject *resultobj = 0;
-  FlatDetector *arg1 = (FlatDetector *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject *swig_obj[1] ;
-  R3 result;
-  
-  if (!args) SWIG_fail;
-  swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FlatDetector, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FlatDetector_getNormalVector" "', argument " "1"" of type '" "FlatDetector const *""'"); 
-  }
-  arg1 = reinterpret_cast< FlatDetector * >(argp1);
-  {
-    try {
-      result = ((FlatDetector const *)arg1)->getNormalVector();
-    } catch (const std::exception& ex) {
-      // message shown in the Python interpreter
-      const std::string msg {
-        "BornAgain C++ Exception: " + std::string(ex.what())
-      };
-      SWIG_exception(SWIG_RuntimeError, msg.c_str());
-    }
-  }
-  resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
 SWIGINTERN PyObject *_wrap_FlatDetector_getU0(PyObject *self, PyObject *args) {
   PyObject *resultobj = 0;
   FlatDetector *arg1 = (FlatDetector *) 0 ;
@@ -38709,39 +38634,6 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_FlatDetector_getDirectionVector(PyObject *self, PyObject *args) {
-  PyObject *resultobj = 0;
-  FlatDetector *arg1 = (FlatDetector *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject *swig_obj[1] ;
-  R3 result;
-  
-  if (!args) SWIG_fail;
-  swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FlatDetector, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FlatDetector_getDirectionVector" "', argument " "1"" of type '" "FlatDetector const *""'"); 
-  }
-  arg1 = reinterpret_cast< FlatDetector * >(argp1);
-  {
-    try {
-      result = ((FlatDetector const *)arg1)->getDirectionVector();
-    } catch (const std::exception& ex) {
-      // message shown in the Python interpreter
-      const std::string msg {
-        "BornAgain C++ Exception: " + std::string(ex.what())
-      };
-      SWIG_exception(SWIG_RuntimeError, msg.c_str());
-    }
-  }
-  resultobj = SWIG_NewPointerObj((new R3(result)), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  return NULL;
-}
-
-
 SWIGINTERN PyObject *_wrap_FlatDetector_getDistance(PyObject *self, PyObject *args) {
   PyObject *resultobj = 0;
   FlatDetector *arg1 = (FlatDetector *) 0 ;
@@ -41784,15 +41676,12 @@ static PyMethodDef SwigMethods[] = {
 	 { "delete_FlatDetector", _wrap_delete_FlatDetector, METH_O, "delete_FlatDetector(FlatDetector self)"},
 	 { "FlatDetector_clone", _wrap_FlatDetector_clone, METH_O, "FlatDetector_clone(FlatDetector self) -> FlatDetector"},
 	 { "FlatDetector_className", _wrap_FlatDetector_className, METH_O, "FlatDetector_className(FlatDetector self) -> std::string"},
-	 { "FlatDetector_setDetectorNormal", _wrap_FlatDetector_setDetectorNormal, METH_VARARGS, "FlatDetector_setDetectorNormal(FlatDetector self, R3 k)"},
 	 { "FlatDetector_width", _wrap_FlatDetector_width, METH_O, "FlatDetector_width(FlatDetector self) -> double"},
 	 { "FlatDetector_height", _wrap_FlatDetector_height, METH_O, "FlatDetector_height(FlatDetector self) -> double"},
 	 { "FlatDetector_xSize", _wrap_FlatDetector_xSize, METH_O, "FlatDetector_xSize(FlatDetector self) -> size_t"},
 	 { "FlatDetector_ySize", _wrap_FlatDetector_ySize, METH_O, "FlatDetector_ySize(FlatDetector self) -> size_t"},
-	 { "FlatDetector_getNormalVector", _wrap_FlatDetector_getNormalVector, METH_O, "FlatDetector_getNormalVector(FlatDetector self) -> R3"},
 	 { "FlatDetector_getU0", _wrap_FlatDetector_getU0, METH_O, "FlatDetector_getU0(FlatDetector self) -> double"},
 	 { "FlatDetector_getV0", _wrap_FlatDetector_getV0, METH_O, "FlatDetector_getV0(FlatDetector self) -> double"},
-	 { "FlatDetector_getDirectionVector", _wrap_FlatDetector_getDirectionVector, METH_O, "FlatDetector_getDirectionVector(FlatDetector self) -> R3"},
 	 { "FlatDetector_getDistance", _wrap_FlatDetector_getDistance, METH_O, "FlatDetector_getDistance(FlatDetector self) -> double"},
 	 { "FlatDetector_getDetectorArrangment", _wrap_FlatDetector_getDetectorArrangment, METH_O, "FlatDetector_getDetectorArrangment(FlatDetector self) -> FlatDetector::NominalNormal"},
 	 { "FlatDetector_normalName", _wrap_FlatDetector_normalName, METH_O, "FlatDetector_normalName(FlatDetector self) -> std::string"},