diff --git a/GUI/main/appoptions.cpp b/App/AppOptions.cpp
similarity index 94%
rename from GUI/main/appoptions.cpp
rename to App/AppOptions.cpp
index 25bf2fbe30c6983a8fdc0eba5d605b6ba4511001..3e96eca7d0230ea8922b92b93cedc0e517ba6ff4 100644
--- a/GUI/main/appoptions.cpp
+++ b/App/AppOptions.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/main/appoptions.cpp
+//! @file      App/AppOptions.cpp
 //! @brief     Implements class ProgramOptions.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/main/appoptions.h"
-#include "GUI/utils/Helpers.h"
+#include "App/AppOptions.h"
+#include "GUI/Util/Path.h"
 #include <QSize>
+#include <QStringList>
 #include <boost/program_options/config.hpp>
 #include <boost/program_options/parsers.hpp>
 #include <fstream>
@@ -27,7 +28,7 @@ const char* nohighdpi = "nohighdpi";
 //! Converts string "1600x1000" to QSize(1600, 1000)
 QSize windowSize(const QString& size_string)
 {
-    auto list = size_string.split("x");
+    QStringList list = size_string.split("x");
 
     if (list.size() != 2)
         return QSize();
@@ -122,7 +123,7 @@ void ApplicationOptions::processOptions()
     }
 
     else if (m_variables_map.count("version")) {
-        std::cout << "BornAgain-" << GUI::Helpers::getBornAgainVersionString().toStdString()
+        std::cout << "BornAgain-" << GUI::Util::Path::getBornAgainVersionString().toStdString()
                   << std::endl;
         m_options_is_consistent = false;
     }
diff --git a/GUI/main/appoptions.h b/App/AppOptions.h
similarity index 93%
rename from GUI/main/appoptions.h
rename to App/AppOptions.h
index 2d52d233f96c71061414299b5fc001e05b4e3875..7c4d7e050bf2bbdd9466c739e2ce0dac3dc3f810 100644
--- a/GUI/main/appoptions.h
+++ b/App/AppOptions.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/main/appoptions.h
+//! @file      App/AppOptions.h
 //! @brief     Collection of utilities to parse command line options
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAIN_APPOPTIONS_H
-#define BORNAGAIN_GUI_MAIN_APPOPTIONS_H
+#ifndef BORNAGAIN_APP_APPOPTIONS_H
+#define BORNAGAIN_APP_APPOPTIONS_H
 
 #include <boost/program_options/options_description.hpp>
 #include <boost/program_options/positional_options.hpp>
@@ -68,4 +68,4 @@ private:
     bpo::variables_map m_variables_map; //! parsed variables
 };
 
-#endif // BORNAGAIN_GUI_MAIN_APPOPTIONS_H
+#endif // BORNAGAIN_APP_APPOPTIONS_H
diff --git a/GUI/main/BornAgain.icns b/App/BornAgain.icns
similarity index 100%
rename from GUI/main/BornAgain.icns
rename to App/BornAgain.icns
diff --git a/GUI/main/BornAgain.ico b/App/BornAgain.ico
similarity index 100%
rename from GUI/main/BornAgain.ico
rename to App/BornAgain.ico
diff --git a/GUI/main/CMakeLists.txt b/App/CMakeLists.txt
similarity index 92%
rename from GUI/main/CMakeLists.txt
rename to App/CMakeLists.txt
index e67975ba94dd7b3ccb5a9bff1909241bff785607..e22673bdbd53af3299f589fa7c331e7bf62c3427 100644
--- a/GUI/main/CMakeLists.txt
+++ b/App/CMakeLists.txt
@@ -8,8 +8,8 @@ else()
     set(executable_name bornagain)
 endif()
 
-set(source_files main.cpp appoptions.cpp MessageHandler.cpp)
-set(include_files appoptions.h MessageHandler.h )
+set(source_files main.cpp AppOptions.cpp MessageHandler.cpp)
+set(include_files AppOptions.h MessageHandler.h )
 
 # -----------------------------------------------------------------------------
 # Qt configuration
@@ -29,7 +29,7 @@ endif()
 
 if(APPLE)
     set(MACOSX_BUNDLE_ICON_FILE BornAgain.icns)
-    set_source_files_properties(${CMAKE_SOURCE_DIR}/GUI/main/BornAgain.icns
+    set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/BornAgain.icns
         PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
     if(BORNAGAIN_APPLE_BUNDLE)
         set(executable_options MACOSX_BUNDLE)
@@ -50,7 +50,7 @@ add_executable(${executable_name}
 target_link_libraries(${executable_name} ${BornAgainGUI_LIBRARY} ${Boost_LIBRARIES})
 target_include_directories(${executable_name}
     PUBLIC
-    ${BornAgainGUI_INCLUDE_DIRS}
+    ${CMAKE_SOURCE_DIR}
     ${Boost_INCLUDE_DIRS})
 
 # -----------------------------------------------------------------------------
@@ -96,8 +96,8 @@ endif()
 install (TARGETS ${executable_name} ${executable_destination} COMPONENT Applications)
 
 set(image_files
-    ${CMAKE_SOURCE_DIR}/GUI/main/BornAgain.ico
-    ${CMAKE_SOURCE_DIR}/GUI/main/BornAgain.icns
+    ${CMAKE_CURRENT_SOURCE_DIR}/BornAgain.ico
+    ${CMAKE_CURRENT_SOURCE_DIR}/BornAgain.icns
     ${CMAKE_SOURCE_DIR}/GUI/images/BornAgain_48x48.png
     ${CMAKE_SOURCE_DIR}/GUI/images/BornAgain_64x64.png)
 install (FILES ${image_files} DESTINATION ${destination_images} COMPONENT Applications)
@@ -107,7 +107,7 @@ install (FILES ${image_files} DESTINATION ${destination_images} COMPONENT Applic
 # -----------------------------------------------------------------------------
 if(UNIX)
     if(BORNAGAIN_APPLE_BUNDLE)
-        install(FILES ${CMAKE_SOURCE_DIR}/GUI/main/BornAgain.icns
+        install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/BornAgain.icns
             DESTINATION ${destination_bundle}/Contents/Resources/)
         install(FILES ${CMAKE_SOURCE_DIR}/cmake/configurables/qt.conf
             DESTINATION ${destination_bundle}/Contents/Resources/)
diff --git a/GUI/main/MessageHandler.cpp b/App/MessageHandler.cpp
similarity index 95%
rename from GUI/main/MessageHandler.cpp
rename to App/MessageHandler.cpp
index c322dd675746dad5ff100e6fcaae7e20e8b0b22b..3b5c5b13720cfa1248c48fc500f60d2a89effd6b 100644
--- a/GUI/main/MessageHandler.cpp
+++ b/App/MessageHandler.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/main/MessageHandler.cpp
+//! @file      App/MessageHandler.cpp
 //! @brief     Implements function MessageHandler
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/main/MessageHandler.h"
+#include "App/MessageHandler.h"
 #include <QMessageBox>
 #include <iostream>
 
diff --git a/GUI/main/MessageHandler.h b/App/MessageHandler.h
similarity index 79%
rename from GUI/main/MessageHandler.h
rename to App/MessageHandler.h
index 97fc1f4e16bb7ca6e8dde3904c220c7566592c69..6ce6709579c260c11dd18709b819eb821893a3b0 100644
--- a/GUI/main/MessageHandler.h
+++ b/App/MessageHandler.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/main/MessageHandler.h
+//! @file      App/MessageHandler.h
 //! @brief     Declares function MessageHandler
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAIN_MESSAGEHANDLER_H
-#define BORNAGAIN_GUI_MAIN_MESSAGEHANDLER_H
+#ifndef BORNAGAIN_APP_MESSAGEHANDLER_H
+#define BORNAGAIN_APP_MESSAGEHANDLER_H
 
 #include <QApplication>
 
 void MessageHandler(QtMsgType type, const QMessageLogContext&, const QString& msg);
 
-#endif // BORNAGAIN_GUI_MAIN_MESSAGEHANDLER_H
+#endif // BORNAGAIN_APP_MESSAGEHANDLER_H
diff --git a/GUI/main/bornagain.rc b/App/bornagain.rc
similarity index 100%
rename from GUI/main/bornagain.rc
rename to App/bornagain.rc
diff --git a/GUI/main/main.cpp b/App/main.cpp
similarity index 66%
rename from GUI/main/main.cpp
rename to App/main.cpp
index 6435f2542fc67086cef8ea8bd94ccfef0697f0ad..42a80b9cbdf62db19175ad579f9cd3a42cd9c9b5 100644
--- a/GUI/main/main.cpp
+++ b/App/main.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/main/main.cpp
+//! @file      App/main.cpp
 //! @brief     Main function of the whole GUI
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,17 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Application/Application.h"
-#include "GUI/DataLoaders/DataLoaderUtil.h"
-#include "GUI/main/MessageHandler.h"
-#include "GUI/main/appoptions.h"
-#include "GUI/mainwindow/mainwindow.h"
+#include "App/AppOptions.h"
+#include "App/MessageHandler.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/Util/OSInfo.h"
+#include "GUI/Util/Path.h"
+#include "GUI/View/Loaders/DataLoaderUtil.h"
+#include "GUI/View/Main/MainWindow.h"
 #include "config_build.h"
 #include <QDir>
+#include <QIcon>
 #include <QLocale>
 #include <QMessageBox>
 #include <QMetaType>
@@ -38,7 +42,15 @@ int main(int argc, char* argv[])
     if (!options.disableHighDPISupport())
         QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
 
-    Application app(argc, argv);
+    QApplication app(argc, argv);
+    app.setApplicationName("BornAgain");
+    app.setApplicationVersion(GUI::Util::Path::getBornAgainVersionString());
+    app.setOrganizationName("BornAgain");
+    if (!GUI::Util::OS::HostOsInfo::isMacHost())
+        QApplication::setWindowIcon(QIcon(":/images/BornAgain.ico"));
+
+    GlobalSettings GSettings;
+    SessionData GSession;
     int ret;
 
 #if !defined(BUILD_DEBUG)
@@ -48,12 +60,14 @@ int main(int argc, char* argv[])
 
         register1DDataLoaders();
 
-        app.loadStyle(app.settings().styleToUse());
+        auto style = GSettings.settings().styleToUse();
+        GSettings.loadStyle(style);
 
-        if (!QDir().exists(app.appDataFolder()))
-            QDir().mkpath(app.appDataFolder());
+        QString dir = SessionData::appDataFolder();
+        if (!QDir().exists(dir))
+            QDir().mkpath(dir);
 
-        app.instrumentLibrary().load(app.instrumentLibraryFilePath());
+        GSession.instrumentLibrary.load();
 
         MainWindow win;
         if (options.find("geometry"))
@@ -63,7 +77,7 @@ int main(int argc, char* argv[])
 
         ret = QApplication::exec();
 
-        app.instrumentLibrary().saveIfModified(app.instrumentLibraryFilePath());
+        GSession.instrumentLibrary.saveIfModified();
 #if !defined(BUILD_DEBUG)
     } catch (...) {
         QMessageBox box;
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b97429a6d00e99bbcc41f9a8597ced1fd95c0ff..db819858e24b5b272448b78aa0d7f2ddeeab4146 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -194,6 +194,7 @@ add_subdirectory(Tests/Examples)
 # GUI
 if(BORNAGAIN_GUI)
     add_subdirectory(GUI)
+    add_subdirectory(App)
     add_subdirectory(Tests/Unit/GUI)
 endif()
 
diff --git a/Device/Mask/Polygon.cpp b/Device/Mask/Polygon.cpp
index 7876297f6a69000c46c769a6dd03dd315dcb7c5e..99c28d7ba3ac190d786206fdc3a6d591eb0b66e0 100644
--- a/Device/Mask/Polygon.cpp
+++ b/Device/Mask/Polygon.cpp
@@ -97,8 +97,7 @@ bool Polygon::contains(double x, double y) const
     // return within(PolygonPrivate::point_t(x, y), m_d->polygon);
 
     // including borders
-    return boost::geometry::covered_by(PolygonPrivate::point_t(x, y),
-                                       m_d->polygon);
+    return boost::geometry::covered_by(PolygonPrivate::point_t(x, y), m_d->polygon);
 }
 
 bool Polygon::contains(const Bin1D& binx, const Bin1D& biny) const
diff --git a/Doc/Doxygen/gui/Doxyfile.in b/Doc/Doxygen/gui/Doxyfile.in
index f0e171e2dee593bbcdb101284abcc67738dd5913..a5eb589751b154947efeb0b3d5ab3dd9ca146e1e 100644
--- a/Doc/Doxygen/gui/Doxyfile.in
+++ b/Doc/Doxygen/gui/Doxyfile.in
@@ -857,7 +857,8 @@ WARN_LOGFILE           =
 
 INPUT                  = @CMAKE_SOURCE_DIR@/Doc/Doxygen/gui \
                          @CMAKE_SOURCE_DIR@/Doc/Doxygen/common \
-                         @CMAKE_SOURCE_DIR@/GUI
+                         @CMAKE_SOURCE_DIR@/GUI \
+                         @CMAKE_SOURCE_DIR@/App
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
diff --git a/Fit/Tools/MultiOption.cpp b/Fit/Tools/MultiOption.cpp
index 71617944c771b6afe59a0a1f9d0d20e6defe90b1..57ddf95bccb816ef2c6374e75c52a188b47cb2ed 100644
--- a/Fit/Tools/MultiOption.cpp
+++ b/Fit/Tools/MultiOption.cpp
@@ -46,13 +46,13 @@ MultiOption::variant_t& MultiOption::defaultValue()
 void MultiOption::setFromString(const std::string& value)
 {
     const std::size_t idx = m_value.index();
-    switch(idx) {
+    switch (idx) {
     case 0:
         m_value = std::stoi(value);
-    break;
+        break;
     case 1:
         m_value = std::stod(value);
-    break;
+        break;
     default:
         m_value = value;
     }
@@ -65,6 +65,6 @@ std::string MultiOption::value_str()
         return std::to_string(std::get<int>(m_value));
     else if (std::holds_alternative<double>(m_value))
         return std::to_string(std::get<double>(m_value));
-    else  // std::holds_alternative<std::string>(m_value)
+    else // std::holds_alternative<std::string>(m_value)
         return std::get<std::string>(m_value);
 }
diff --git a/Fit/Tools/MultiOption.h b/Fit/Tools/MultiOption.h
index 29f430de70dbac23bf84a77256a5c3708dc63079..871cb432c245cae7f00378b757d7219fb0e1ee5a 100644
--- a/Fit/Tools/MultiOption.h
+++ b/Fit/Tools/MultiOption.h
@@ -20,8 +20,8 @@
 #ifndef BORNAGAIN_FIT_TOOLS_MULTIOPTION_H
 #define BORNAGAIN_FIT_TOOLS_MULTIOPTION_H
 
-#include <variant>
 #include <string>
+#include <variant>
 
 //! Stores a single option for minimization algorithm. Int, double, string values are available.
 
diff --git a/GUI/Application/Application.cpp b/GUI/Application/GlobalSettings.cpp
similarity index 68%
rename from GUI/Application/Application.cpp
rename to GUI/Application/GlobalSettings.cpp
index d99d18019fdc8b2827de06bda2521f026d862a93..ff377009baa5a9a95d67414ac954511db0ee38ef 100644
--- a/GUI/Application/Application.cpp
+++ b/GUI/Application/GlobalSettings.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Application/Application.cpp
+//! @file      GUI/Application/GlobalSettings.cpp
 //! @brief     Implements class Application
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,30 +12,24 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Application/Application.h"
-#include "GUI/utils/Helpers.h"
-#include "GUI/utils/hostosinfo.h"
+#include "GUI/Application/GlobalSettings.h"
+#include <QApplication>
 #include <QFile>
-#include <QIcon>
 #include <QStandardPaths>
 
-Application::Application(int& argc, char** argv)
-    : QApplication(argc, argv), m_currentStyle(ApplicationSettings::Style::native)
-{
-    setApplicationName("BornAgain");
-    setApplicationVersion(GUI::Helpers::getBornAgainVersionString());
-    setOrganizationName("BornAgain");
+GlobalSettings* baApp; //!< global pointer to _the_ instance
 
-    if (!GUI::Utils::OS::HostOsInfo::isMacHost())
-        QApplication::setWindowIcon(QIcon(":/images/BornAgain.ico"));
+GlobalSettings::GlobalSettings() : m_currentStyle(ApplicationSettings::Style::native)
+{
+    baApp = this;
 }
 
-ApplicationSettings& Application::settings()
+ApplicationSettings& GlobalSettings::settings()
 {
     return m_settings;
 }
 
-void Application::loadStyle(ApplicationSettings::Style style)
+void GlobalSettings::loadStyle(ApplicationSettings::Style style)
 {
     QString stylesheet;
 
@@ -64,7 +58,7 @@ void Application::loadStyle(ApplicationSettings::Style style)
     }
     }
 
-    setStyleSheet(stylesheet);
+    qApp->setStyleSheet(stylesheet);
     m_currentStyle = style;
 
     // -- init palette for later usage; could be improved by parsing the stylesheet
@@ -87,27 +81,17 @@ void Application::loadStyle(ApplicationSettings::Style style)
     }
 }
 
-ApplicationSettings::Style Application::currentStyle()
+ApplicationSettings::Style GlobalSettings::currentStyle()
 {
     return m_currentStyle;
 }
 
-const Application::Palette& Application::styleSheetPalette() const
+const GlobalSettings::Palette& GlobalSettings::styleSheetPalette() const
 {
     return m_styleSheetPalette;
 }
 
-InstrumentLibrary& Application::instrumentLibrary()
-{
-    return m_instrumentLibrary;
-}
-
-QString Application::instrumentLibraryFilePath() const
-{
-    return appDataFolder() + "/BornAgainInstrumentLibrary.balib";
-}
-
-QString Application::appDataFolder() const
+QString GlobalSettings::appDataFolder() const
 {
     return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
 }
diff --git a/GUI/Application/Application.h b/GUI/Application/GlobalSettings.h
similarity index 71%
rename from GUI/Application/Application.h
rename to GUI/Application/GlobalSettings.h
index 88a9dc864d070ee8fa885ca4c3559ced0b76f5b7..542927c29de451e3621c6ac251831157647c4649 100644
--- a/GUI/Application/Application.h
+++ b/GUI/Application/GlobalSettings.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Application/Application.h
+//! @file      GUI/Application/GlobalSettings.h
 //! @brief     Defines class Application
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,19 +12,17 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_APPLICATION_APPLICATION_H
-#define BORNAGAIN_GUI_APPLICATION_APPLICATION_H
+#ifndef BORNAGAIN_GUI_APPLICATION_GLOBALSETTINGS_H
+#define BORNAGAIN_GUI_APPLICATION_GLOBALSETTINGS_H
 
 #include "GUI/Application/ApplicationSettings.h"
-#include "GUI/Application/InstrumentLibrary.h"
-#include <QApplication>
 #include <QColor>
 
 //! Provides access to application wide stuff like settings.
 
-class Application : public QApplication {
+class GlobalSettings {
 public:
-    Application(int& argc, char** argv);
+    GlobalSettings();
 
     ApplicationSettings& settings();
 
@@ -38,10 +36,6 @@ public:
 
     const Palette& styleSheetPalette() const;
 
-    InstrumentLibrary& instrumentLibrary();
-
-    QString instrumentLibraryFilePath() const;
-
     //! The folder where persistent application data shall be stored. E.g. in Windows this is the
     //! AppData/Roaming location.
     //! Used e.g. for storing the instrument library.
@@ -49,11 +43,10 @@ public:
 
 private:
     ApplicationSettings m_settings;
-    InstrumentLibrary m_instrumentLibrary;
     ApplicationSettings::Style m_currentStyle;
     Palette m_styleSheetPalette;
 };
 
-#define baApp (static_cast<Application*>(qApp))
+extern GlobalSettings* baApp; //!< global pointer to the single instance
 
-#endif // BORNAGAIN_GUI_APPLICATION_APPLICATION_H
+#endif // BORNAGAIN_GUI_APPLICATION_GLOBALSETTINGS_H
diff --git a/GUI/CMakeLists.txt b/GUI/CMakeLists.txt
index d908a02aa9060ecb9e2a432d1a10f8757c2450b5..a698c4c9b753641885fd1f7608360356ce4953d0 100644
--- a/GUI/CMakeLists.txt
+++ b/GUI/CMakeLists.txt
@@ -13,49 +13,14 @@ set(library_name BornAgainGUI)
 
 # --- source and include files ---
 
-set(include_dirs
-    ${CMAKE_CURRENT_SOURCE_DIR}/Application
-    ${CMAKE_CURRENT_SOURCE_DIR}/mainwindow
-    ${CMAKE_CURRENT_SOURCE_DIR}/utils
-    ${CMAKE_CURRENT_SOURCE_DIR}/Models
-    ${CMAKE_CURRENT_SOURCE_DIR}/DataLoaders
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/SampleDesigner
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/JobWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/IntensityDataWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/InfoWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/MaterialEditor
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/InstrumentWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/SimulationWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/FitWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/ProjectionsWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/PropertyEditor
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/MaskWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/ImportDataWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/ImportDataWidgets/CsvImportAssistant
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/CommonWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/RealSpaceWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/SpecularDataWidgets
-    ${CMAKE_CURRENT_SOURCE_DIR}/Views/Tools
-)
-
-set(source_files)
-set(include_files)
-set(form_files)
-
-foreach(dir ${include_dirs})
-    file(GLOB source ${dir}/*.cpp)
-    file(GLOB include ${dir}/*.h)
-    file(GLOB forms ${dir}/*.ui)
-    list(APPEND source_files ${source})
-    list(APPEND include_files ${include})
-    list(APPEND form_files ${forms})
-endforeach()
+file(GLOB_RECURSE include_files *.h)
+file(GLOB_RECURSE source_files *.cpp)
+file(GLOB_RECURSE forms_files *.ui)
 
 set(resource_files
     gui.qrc
-    Views/SampleDesigner/SampleDesigner.qrc
-    Views/MaskWidgets/MaskWidgets.qrc
+    View/SampleDesigner/SampleDesigner.qrc
+    View/Mask/MaskWidgets.qrc
 )
 
 # --- Qt configuration ---------
@@ -145,8 +110,6 @@ if(WIN32)
 
 endif()
 
-add_subdirectory(main)
-
 # --- Transmit variables for use in tests
 
 set(BornAgainGUI_INCLUDE_DIRS ${BornAgainGUI_INCLUDE_DIRS} PARENT_SCOPE)
diff --git a/GUI/Models/ComponentProxyModel.cpp b/GUI/Model/Component/ComponentProxyModel.cpp
similarity index 95%
rename from GUI/Models/ComponentProxyModel.cpp
rename to GUI/Model/Component/ComponentProxyModel.cpp
index a923af487941a2f358ce0bdcc67f586e86db0c35..7a210cfd0609d6932065733564a3f9bee68970d9 100644
--- a/GUI/Models/ComponentProxyModel.cpp
+++ b/GUI/Model/Component/ComponentProxyModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ComponentProxyModel.cpp
+//! @file      GUI/Model/Component/ComponentProxyModel.cpp
 //! @brief     Implements class ComponentProxyModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ComponentProxyModel.h"
-#include "GUI/Models/ComponentProxyStrategy.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Component/ComponentProxyModel.h"
+#include "GUI/Model/Component/ComponentProxyStrategy.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Session/SessionModel.h"
 #include <QSet>
 #include <functional>
 
diff --git a/GUI/Models/ComponentProxyModel.h b/GUI/Model/Component/ComponentProxyModel.h
similarity index 88%
rename from GUI/Models/ComponentProxyModel.h
rename to GUI/Model/Component/ComponentProxyModel.h
index aaacfce76291611b15127450bca6f45717349b76..bc6466e8a091a0f328a11888adf895e1b6b8aa4c 100644
--- a/GUI/Models/ComponentProxyModel.h
+++ b/GUI/Model/Component/ComponentProxyModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ComponentProxyModel.h
+//! @file      GUI/Model/Component/ComponentProxyModel.h
 //! @brief     Defines class ComponentProxyModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_COMPONENTPROXYMODEL_H
-#define BORNAGAIN_GUI_MODELS_COMPONENTPROXYMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_COMPONENT_COMPONENTPROXYMODEL_H
+#define BORNAGAIN_GUI_MODEL_COMPONENT_COMPONENTPROXYMODEL_H
 
-#include "GUI/Models/ProxyModelStrategy.h"
+#include "GUI/Model/Component/ProxyModelStrategy.h"
 #include <QAbstractProxyModel>
 #include <QMap>
 #include <QPersistentModelIndex>
@@ -68,4 +68,4 @@ private:
     std::unique_ptr<ProxyModelStrategy> m_proxyStrategy;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_COMPONENTPROXYMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_COMPONENT_COMPONENTPROXYMODEL_H
diff --git a/GUI/Models/ComponentProxyStrategy.cpp b/GUI/Model/Component/ComponentProxyStrategy.cpp
similarity index 94%
rename from GUI/Models/ComponentProxyStrategy.cpp
rename to GUI/Model/Component/ComponentProxyStrategy.cpp
index 1547bf438bb5e48fabca8994aeda82b3e2cc457f..debf6420eba1bf90acd7c4771dcab4dacc93090a 100644
--- a/GUI/Models/ComponentProxyStrategy.cpp
+++ b/GUI/Model/Component/ComponentProxyStrategy.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ComponentProxyStrategy.cpp
+//! @file      GUI/Model/Component/ComponentProxyStrategy.cpp
 //! @brief     Implements class ComponentProxyStrategy
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ComponentProxyStrategy.h"
-#include "GUI/Models/ComponentProxyModel.h"
-#include "GUI/Models/ComponentUtils.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Component/ComponentProxyStrategy.h"
+#include "GUI/Model/Component/ComponentProxyModel.h"
+#include "GUI/Model/Component/ComponentUtils.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Job/ModelPath.h"
+#include "GUI/Model/Session/SessionModel.h"
 
 void ComponentProxyStrategy::onDataChanged(SessionModel* source, ComponentProxyModel* proxy)
 {
diff --git a/GUI/Models/ComponentProxyStrategy.h b/GUI/Model/Component/ComponentProxyStrategy.h
similarity index 82%
rename from GUI/Models/ComponentProxyStrategy.h
rename to GUI/Model/Component/ComponentProxyStrategy.h
index 76a67cfcef1dc22d5228f5067ea47c9625bb78d1..f17d5f0f612e3c92737c662a702f83df32216a04 100644
--- a/GUI/Models/ComponentProxyStrategy.h
+++ b/GUI/Model/Component/ComponentProxyStrategy.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ComponentProxyStrategy.h
+//! @file      GUI/Model/Component/ComponentProxyStrategy.h
 //! @brief     Defines class ComponentProxyStrategy
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_COMPONENTPROXYSTRATEGY_H
-#define BORNAGAIN_GUI_MODELS_COMPONENTPROXYSTRATEGY_H
+#ifndef BORNAGAIN_GUI_MODEL_COMPONENT_COMPONENTPROXYSTRATEGY_H
+#define BORNAGAIN_GUI_MODEL_COMPONENT_COMPONENTPROXYSTRATEGY_H
 
-#include "GUI/Models/ProxyModelStrategy.h"
+#include "GUI/Model/Component/ProxyModelStrategy.h"
 
 //! Strategy for ComponentProxyModel which hides extra level of GroupProperty.
 
@@ -39,4 +39,4 @@ private:
     int parentVisibleRow(const SessionItem& item);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_COMPONENTPROXYSTRATEGY_H
+#endif // BORNAGAIN_GUI_MODEL_COMPONENT_COMPONENTPROXYSTRATEGY_H
diff --git a/GUI/Models/ComponentUtils.cpp b/GUI/Model/Component/ComponentUtils.cpp
similarity index 83%
rename from GUI/Models/ComponentUtils.cpp
rename to GUI/Model/Component/ComponentUtils.cpp
index 8f8026a6986f79b3928234dd335ef86ec856c156..816407d852385bbbbd2f12826fe8b098bb66ac49 100644
--- a/GUI/Models/ComponentUtils.cpp
+++ b/GUI/Model/Component/ComponentUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ComponentUtils.cpp
+//! @file      GUI/Model/Component/ComponentUtils.cpp
 //! @brief     Implements ComponentUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,27 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ComponentUtils.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/MaterialDataItems.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Component/ComponentUtils.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Material/MaterialDataItems.h"
+#include "GUI/Model/Types/VectorItem.h"
 
 namespace {
-QList<const SessionItem*> groupItems(const GroupItem& item);
+
+QList<const SessionItem*> groupItems(const GroupItem& item)
+{
+    QList<const SessionItem*> result;
+    for (auto grandchild : item.children())
+        if (grandchild->isVisible())
+            result += GUI::Model::ComponentUtils::componentItems(*grandchild);
+    return result;
 }
 
+} // namespace
+
+
 const QStringList& GUI::Model::ComponentUtils::propertyRelatedTypes()
 {
     static const QStringList result = {
@@ -60,16 +70,3 @@ QList<const SessionItem*> GUI::Model::ComponentUtils::componentItems(const Sessi
 
     return result;
 }
-
-namespace {
-QList<const SessionItem*> groupItems(const GroupItem& item)
-{
-    QList<const SessionItem*> result;
-    for (auto grandchild : item.children()) {
-        if (grandchild->isVisible())
-            result += GUI::Model::ComponentUtils::componentItems(*grandchild);
-    }
-
-    return result;
-}
-} // namespace
diff --git a/GUI/Models/ComponentUtils.h b/GUI/Model/Component/ComponentUtils.h
similarity index 83%
rename from GUI/Models/ComponentUtils.h
rename to GUI/Model/Component/ComponentUtils.h
index f982abf5a9c3c4f5295e819b0b81a20357b1b129..e5a6c5513ef160868c0c5d8acd714f9718445cb3 100644
--- a/GUI/Models/ComponentUtils.h
+++ b/GUI/Model/Component/ComponentUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ComponentUtils.h
+//! @file      GUI/Model/Component/ComponentUtils.h
 //! @brief     Defines namespace GUI::Model::ComponentUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_COMPONENTUTILS_H
-#define BORNAGAIN_GUI_MODELS_COMPONENTUTILS_H
+#ifndef BORNAGAIN_GUI_MODEL_COMPONENT_COMPONENTUTILS_H
+#define BORNAGAIN_GUI_MODEL_COMPONENT_COMPONENTUTILS_H
 
 #include <QList>
 #include <QStringList>
@@ -32,4 +32,4 @@ QList<const SessionItem*> componentItems(const SessionItem& item);
 
 } // namespace GUI::Model::ComponentUtils
 
-#endif // BORNAGAIN_GUI_MODELS_COMPONENTUTILS_H
+#endif // BORNAGAIN_GUI_MODEL_COMPONENT_COMPONENTUTILS_H
diff --git a/GUI/Models/ProxyModelStrategy.cpp b/GUI/Model/Component/ProxyModelStrategy.cpp
similarity index 92%
rename from GUI/Models/ProxyModelStrategy.cpp
rename to GUI/Model/Component/ProxyModelStrategy.cpp
index b640a8ef795c81c85d0f422fbd927d43e53d3490..b710199532c97ff9e24c656533c8b6245e28339b 100644
--- a/GUI/Models/ProxyModelStrategy.cpp
+++ b/GUI/Model/Component/ProxyModelStrategy.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ProxyModelStrategy.cpp
+//! @file      GUI/Model/Component/ProxyModelStrategy.cpp
 //! @brief     Implements class ProxyModelStrategy
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ComponentProxyModel.h"
-#include "GUI/Models/ModelUtils.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Component/ComponentProxyModel.h"
+#include "GUI/Model/Session/ModelUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
 
 ProxyModelStrategy::ProxyModelStrategy() : m_source(nullptr), m_proxy(nullptr) {}
 
diff --git a/GUI/Models/ProxyModelStrategy.h b/GUI/Model/Component/ProxyModelStrategy.h
similarity index 89%
rename from GUI/Models/ProxyModelStrategy.h
rename to GUI/Model/Component/ProxyModelStrategy.h
index f4f4408e356fa799ddeceb58a0332a4d7f412ff4..b1ae351ed74a5c8b688a7fd0a6cd58f1078184cd 100644
--- a/GUI/Models/ProxyModelStrategy.h
+++ b/GUI/Model/Component/ProxyModelStrategy.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ProxyModelStrategy.h
+//! @file      GUI/Model/Component/ProxyModelStrategy.h
 //! @brief     Defines class ProxyModelStrategy
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_PROXYMODELSTRATEGY_H
-#define BORNAGAIN_GUI_MODELS_PROXYMODELSTRATEGY_H
+#ifndef BORNAGAIN_GUI_MODEL_COMPONENT_PROXYMODELSTRATEGY_H
+#define BORNAGAIN_GUI_MODEL_COMPONENT_PROXYMODELSTRATEGY_H
 
 #include <QPersistentModelIndex>
 
@@ -59,4 +59,4 @@ protected:
     bool processSourceIndex(const QModelIndex& index);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_PROXYMODELSTRATEGY_H
+#endif // BORNAGAIN_GUI_MODEL_COMPONENT_PROXYMODELSTRATEGY_H
diff --git a/GUI/Models/ApplicationModels.cpp b/GUI/Model/Data/ApplicationModels.cpp
similarity index 81%
rename from GUI/Models/ApplicationModels.cpp
rename to GUI/Model/Data/ApplicationModels.cpp
index d273d2472e5985acacf7bdbe2902ac9e648147a3..e25659d8410b7696fb2f961759b276f29a4c781b 100644
--- a/GUI/Models/ApplicationModels.cpp
+++ b/GUI/Model/Data/ApplicationModels.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ApplicationModels.cpp
+//! @file      GUI/Model/Data/ApplicationModels.cpp
 //! @brief     Defines class holding all application models
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,16 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/DocumentModel.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/SimulationOptionsItem.h"
-#include "GUI/utils/DeserializationException.h"
+#include "GUI/Model/Data/ApplicationModels.h"
+#include "GUI/Model/Data/DocumentModel.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Session/SimulationOptionsItem.h"
+#include "GUI/Util/DeserializationException.h"
 #include <QtCore/QXmlStreamWriter>
 
 ApplicationModels::ApplicationModels(QObject* parent)
@@ -112,7 +111,6 @@ void ApplicationModels::writeTo(QXmlStreamWriter* writer)
 void ApplicationModels::readFrom(QXmlStreamReader* reader, MessageService* messageService)
 {
     try {
-
         for (auto model : modelList()) {
             if (model->getModelTag() == reader->name()) {
                 model->readFrom(reader, messageService);
@@ -148,12 +146,12 @@ QVector<SessionItem*> ApplicationModels::nonXMLItems() const
 
 void ApplicationModels::connectModel(SessionModel* model) const
 {
-    if (model) {
-        connect(model, &SessionModel::dataChanged, this, &ApplicationModels::modelChanged,
-                Qt::UniqueConnection);
-        connect(model, &SessionModel::rowsRemoved, this, &ApplicationModels::modelChanged,
-                Qt::UniqueConnection);
-        connect(model, &SessionModel::rowsInserted, this, &ApplicationModels::modelChanged,
-                Qt::UniqueConnection);
-    }
+    if (!model)
+        return;
+    connect(model, &SessionModel::dataChanged, this, &ApplicationModels::modelChanged,
+            Qt::UniqueConnection);
+    connect(model, &SessionModel::rowsRemoved, this, &ApplicationModels::modelChanged,
+            Qt::UniqueConnection);
+    connect(model, &SessionModel::rowsInserted, this, &ApplicationModels::modelChanged,
+            Qt::UniqueConnection);
 }
diff --git a/GUI/Models/ApplicationModels.h b/GUI/Model/Data/ApplicationModels.h
similarity index 89%
rename from GUI/Models/ApplicationModels.h
rename to GUI/Model/Data/ApplicationModels.h
index 455bf7ca60ec7a55fbfebc858b261ae8a0c18762..b910e969335dfb3c4d01c0aac58f9adab3dd6dc5 100644
--- a/GUI/Models/ApplicationModels.h
+++ b/GUI/Model/Data/ApplicationModels.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ApplicationModels.h
+//! @file      GUI/Model/Data/ApplicationModels.h
 //! @brief     Defines class holding all application models
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_APPLICATIONMODELS_H
-#define BORNAGAIN_GUI_MODELS_APPLICATIONMODELS_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_APPLICATIONMODELS_H
+#define BORNAGAIN_GUI_MODEL_DATA_APPLICATIONMODELS_H
 
 #include <QObject>
 
@@ -64,4 +64,4 @@ private:
     JobModel* m_jobModel;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_APPLICATIONMODELS_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_APPLICATIONMODELS_H
diff --git a/GUI/Models/AxesItems.cpp b/GUI/Model/Data/AxesItems.cpp
similarity index 98%
rename from GUI/Models/AxesItems.cpp
rename to GUI/Model/Data/AxesItems.cpp
index 44fbb4d3b5bcc88ecd77c46c6df04b4c42c0432c..040f5276ea139aa325da24d51849bd30350a6750 100644
--- a/GUI/Models/AxesItems.cpp
+++ b/GUI/Model/Data/AxesItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/AxesItems.cpp
+//! @file      GUI/Model/Data/AxesItems.cpp
 //! @brief     Implements various axis items
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/AxesItems.h"
+#include "GUI/Model/Data/AxesItems.h"
 #include "Base/Axis/FixedBinAxis.h"
 
 const int max_detector_pixels = 65536;
diff --git a/GUI/Models/AxesItems.h b/GUI/Model/Data/AxesItems.h
similarity index 92%
rename from GUI/Models/AxesItems.h
rename to GUI/Model/Data/AxesItems.h
index ff13ce7116817b4b3335cbc7a2dd13df9ee2c685..10507ea393234b2ab7141419ca506142625cd3ef 100644
--- a/GUI/Models/AxesItems.h
+++ b/GUI/Model/Data/AxesItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/AxesItems.h
+//! @file      GUI/Model/Data/AxesItems.h
 //! @brief     Defines various axis items
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_AXESITEMS_H
-#define BORNAGAIN_GUI_MODELS_AXESITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_AXESITEMS_H
+#define BORNAGAIN_GUI_MODEL_DATA_AXESITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 #include <memory>
 
 class IAxis;
@@ -89,4 +89,4 @@ private:
     void setMinMaxEditor(const QString& editorType);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_AXESITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_AXESITEMS_H
diff --git a/GUI/Models/Data1DViewItem.cpp b/GUI/Model/Data/Data1DViewItem.cpp
similarity index 94%
rename from GUI/Models/Data1DViewItem.cpp
rename to GUI/Model/Data/Data1DViewItem.cpp
index 5407f25de51885a4ad9070f041b4c8359298e468..377361e12b796ca52489e2ddd5a785d80af2d916 100644
--- a/GUI/Models/Data1DViewItem.cpp
+++ b/GUI/Model/Data/Data1DViewItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/Data1DViewItem.cpp
+//! @file      GUI/Model/Data/Data1DViewItem.cpp
 //! @brief     Implements class Data1DViewItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/Data1DViewItem.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/DataProperties.h"
-#include "GUI/Models/DataPropertyContainer.h"
-#include "GUI/Models/DataViewUtils.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/JobItem.h"
+#include "GUI/Model/Data/Data1DViewItem.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Data/DataProperties.h"
+#include "GUI/Model/Data/DataPropertyContainer.h"
+#include "GUI/Model/Data/DataViewUtils.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/Util/Error.h"
 
 namespace {
 const QString x_axis_default_name = "X [nbins]";
diff --git a/GUI/Models/Data1DViewItem.h b/GUI/Model/Data/Data1DViewItem.h
similarity index 92%
rename from GUI/Models/Data1DViewItem.h
rename to GUI/Model/Data/Data1DViewItem.h
index 0f05909999a23ea4b4958a207efcf5de170f9ad2..9126912840d9bdeba50ad3320990e4ca253857dc 100644
--- a/GUI/Models/Data1DViewItem.h
+++ b/GUI/Model/Data/Data1DViewItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/Data1DViewItem.h
+//! @file      GUI/Model/Data/Data1DViewItem.h
 //! @brief     Defines class Data1DViewItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DATA1DVIEWITEM_H
-#define BORNAGAIN_GUI_MODELS_DATA1DVIEWITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_DATA1DVIEWITEM_H
+#define BORNAGAIN_GUI_MODEL_DATA_DATA1DVIEWITEM_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class AmplitudeAxisItem;
 class BasicAxisItem;
@@ -105,4 +105,4 @@ private:
     JobItem* m_job_item;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_DATA1DVIEWITEM_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_DATA1DVIEWITEM_H
diff --git a/GUI/Models/DataItem.cpp b/GUI/Model/Data/DataItem.cpp
similarity index 95%
rename from GUI/Models/DataItem.cpp
rename to GUI/Model/Data/DataItem.cpp
index dd6aea3ec168f18c27b87df8ef8364523cf71d18..486b285292eb9e63dc4881b2aed62e9e02c263c4 100644
--- a/GUI/Models/DataItem.cpp
+++ b/GUI/Model/Data/DataItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataItem.cpp
+//! @file      GUI/Model/Data/DataItem.cpp
 //! @brief     Implements class IntensityDataItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DataItem.h"
+#include "GUI/Model/Data/DataItem.h"
 #include "Device/Histo/IntensityDataIOFactory.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/Error.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/Util/Error.h"
 
 void DataItem::setOutputData(OutputData<double>* data)
 {
diff --git a/GUI/Models/DataItem.h b/GUI/Model/Data/DataItem.h
similarity index 91%
rename from GUI/Models/DataItem.h
rename to GUI/Model/Data/DataItem.h
index 907e7750e487888e22fc87e8dd08048cbc9f2e06..648006ee0e594045415fa3515d5ff39b71c9b8e1 100644
--- a/GUI/Models/DataItem.h
+++ b/GUI/Model/Data/DataItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataItem.h
+//! @file      GUI/Model/Data/DataItem.h
 //! @brief     Declares class DataItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DATAITEM_H
-#define BORNAGAIN_GUI_MODELS_DATAITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_DATAITEM_H
+#define BORNAGAIN_GUI_MODEL_DATA_DATAITEM_H
 
 #include "Device/Data/OutputData.h"
-#include "GUI/Models/SaveLoadInterface.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/IO/SaveLoadInterface.h"
+#include "GUI/Model/Session/SessionItem.h"
 #include <QDateTime>
 #include <mutex>
 
@@ -79,4 +79,4 @@ protected:
     std::mutex m_update_data_mutex;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_DATAITEM_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_DATAITEM_H
diff --git a/GUI/Models/DataItemUtils.cpp b/GUI/Model/Data/DataItemUtils.cpp
similarity index 84%
rename from GUI/Models/DataItemUtils.cpp
rename to GUI/Model/Data/DataItemUtils.cpp
index 1b4639c66485b6616c9c928ff4ffda59b2d54279..5eaf9b123adaa0b3a519af79928e94094631e318 100644
--- a/GUI/Models/DataItemUtils.cpp
+++ b/GUI/Model/Data/DataItemUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataItemUtils.cpp
+//! @file      GUI/Model/Data/DataItemUtils.cpp
 //! @brief     Implements namespace DataItemUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DataItemUtils.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SpecularDataItem.h"
+#include "GUI/Model/Data/DataItemUtils.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Job/JobItem.h"
 
 namespace {
 template <class DataItemType> DataItemType* dataItem(SessionItem* parent)
diff --git a/GUI/Models/DataItemUtils.h b/GUI/Model/Data/DataItemUtils.h
similarity index 84%
rename from GUI/Models/DataItemUtils.h
rename to GUI/Model/Data/DataItemUtils.h
index d29eaf97dc7171eb4f25a9a5e24a38f8ac939cf6..61060eb0743044573a1d6f3560580f188612ce34 100644
--- a/GUI/Models/DataItemUtils.h
+++ b/GUI/Model/Data/DataItemUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataItemUtils.h
+//! @file      GUI/Model/Data/DataItemUtils.h
 //! @brief     Defines functions in  namespace GUI::Model::DataItemUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DATAITEMUTILS_H
-#define BORNAGAIN_GUI_MODELS_DATAITEMUTILS_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_DATAITEMUTILS_H
+#define BORNAGAIN_GUI_MODEL_DATA_DATAITEMUTILS_H
 
 class IntensityDataItem;
 class SessionItem;
@@ -31,4 +31,4 @@ SpecularDataItem* specularDataItem(SessionItem* parent);
 
 } // namespace GUI::Model::DataItemUtils
 
-#endif // BORNAGAIN_GUI_MODELS_DATAITEMUTILS_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_DATAITEMUTILS_H
diff --git a/GUI/Models/DataProperties.cpp b/GUI/Model/Data/DataProperties.cpp
similarity index 93%
rename from GUI/Models/DataProperties.cpp
rename to GUI/Model/Data/DataProperties.cpp
index cb9176a8e8d41ee497c6fbf9e7029187df4711c5..e9b690accb769c4d4fea853b9807c163b0aeeab3 100644
--- a/GUI/Models/DataProperties.cpp
+++ b/GUI/Model/Data/DataProperties.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataProperties.cpp
+//! @file      GUI/Model/Data/DataProperties.cpp
 //! @brief     Implements class DataPresentationProperties and its descendants
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DataProperties.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Data/DataProperties.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Job/ModelPath.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/Util/Error.h"
 #include <QColor>
 
 namespace {
diff --git a/GUI/Models/DataProperties.h b/GUI/Model/Data/DataProperties.h
similarity index 88%
rename from GUI/Models/DataProperties.h
rename to GUI/Model/Data/DataProperties.h
index 82eb5c12971541bec9fd1a04d8587cc1539dfd46..acceccf9ae9ee6d8a7759c8fde206f7c4cb80f16 100644
--- a/GUI/Models/DataProperties.h
+++ b/GUI/Model/Data/DataProperties.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataProperties.h
+//! @file      GUI/Model/Data/DataProperties.h
 //! @brief     Defines class DataProperties and its descendants
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DATAPROPERTIES_H
-#define BORNAGAIN_GUI_MODELS_DATAPROPERTIES_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_DATAPROPERTIES_H
+#define BORNAGAIN_GUI_MODEL_DATA_DATAPROPERTIES_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class DataItem;
 
@@ -59,4 +59,4 @@ public:
     static const QString& nextColorName(Data1DProperties* properties);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_DATAPROPERTIES_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_DATAPROPERTIES_H
diff --git a/GUI/Models/DataPropertyContainer.cpp b/GUI/Model/Data/DataPropertyContainer.cpp
similarity index 92%
rename from GUI/Models/DataPropertyContainer.cpp
rename to GUI/Model/Data/DataPropertyContainer.cpp
index 89bc239fd727c30dcdf3c8bc87960fa0c2c26c1e..f3abbfc1bf3590dd0ecf56bf0f2ec5e2d07ead95 100644
--- a/GUI/Models/DataPropertyContainer.cpp
+++ b/GUI/Model/Data/DataPropertyContainer.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataPropertyContainer.cpp
+//! @file      GUI/Model/Data/DataPropertyContainer.cpp
 //! @brief     Implements class DataPropertyContainer
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DataPropertyContainer.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/DataProperties.h"
-#include "GUI/Models/Error.h"
+#include "GUI/Model/Data/DataPropertyContainer.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Data/DataProperties.h"
+#include "GUI/Util/Error.h"
 
 DataPropertyContainer::DataPropertyContainer() : SessionItem(M_TYPE)
 {
diff --git a/GUI/Models/DataPropertyContainer.h b/GUI/Model/Data/DataPropertyContainer.h
similarity index 81%
rename from GUI/Models/DataPropertyContainer.h
rename to GUI/Model/Data/DataPropertyContainer.h
index 0712dd027eba53380bc56649f5ea571491f7b295..2be645fa5877b56f391379f9cfe6dc4bb64aa362 100644
--- a/GUI/Models/DataPropertyContainer.h
+++ b/GUI/Model/Data/DataPropertyContainer.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataPropertyContainer.h
+//! @file      GUI/Model/Data/DataPropertyContainer.h
 //! @brief     Defines class DataPropertyContainer
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DATAPROPERTYCONTAINER_H
-#define BORNAGAIN_GUI_MODELS_DATAPROPERTYCONTAINER_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_DATAPROPERTYCONTAINER_H
+#define BORNAGAIN_GUI_MODEL_DATA_DATAPROPERTYCONTAINER_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class DataItem;
 class DataProperties;
@@ -43,4 +43,4 @@ protected:
     DataItem* dataItem(size_t i) const;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_DATAPROPERTYCONTAINER_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_DATAPROPERTYCONTAINER_H
diff --git a/GUI/Models/DataViewUtils.cpp b/GUI/Model/Data/DataViewUtils.cpp
similarity index 87%
rename from GUI/Models/DataViewUtils.cpp
rename to GUI/Model/Data/DataViewUtils.cpp
index 2717390d6bf3253516a055c2010b7069823573a7..cde2967c18d9f8e2086edb88aaa39aab070fac55 100644
--- a/GUI/Models/DataViewUtils.cpp
+++ b/GUI/Model/Data/DataViewUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataViewUtils.cpp
+//! @file      GUI/Model/Data/DataViewUtils.cpp
 //! @brief     Implements functions in namespace DataViewUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DataViewUtils.h"
+#include "GUI/Model/Data/DataViewUtils.h"
 #include "Device/Coord/ICoordSystem.h"
-#include "GUI/Models/Data1DViewItem.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobItemUtils.h"
+#include "GUI/Model/Data/Data1DViewItem.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobItemUtils.h"
 
 namespace {
 
diff --git a/GUI/Models/DataViewUtils.h b/GUI/Model/Data/DataViewUtils.h
similarity index 83%
rename from GUI/Models/DataViewUtils.h
rename to GUI/Model/Data/DataViewUtils.h
index c09a7c618bdf8b2117d1b939f1c4a535f226ebb9..08b8346be5bbb3f9682ba62e0087cfec82dbc8ce 100644
--- a/GUI/Models/DataViewUtils.h
+++ b/GUI/Model/Data/DataViewUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataViewUtils.h
+//! @file      GUI/Model/Data/DataViewUtils.h
 //! @brief     Defines namespace GUI::Model::DataViewUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DATAVIEWUTILS_H
-#define BORNAGAIN_GUI_MODELS_DATAVIEWUTILS_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_DATAVIEWUTILS_H
+#define BORNAGAIN_GUI_MODEL_DATA_DATAVIEWUTILS_H
 
 #include <QString>
 #include <memory>
@@ -30,4 +30,4 @@ std::unique_ptr<OutputData<double>> getTranslatedData(Data1DViewItem* view_item,
                                                       DataItem* data_item);
 }; // namespace GUI::Model::DataViewUtils
 
-#endif // BORNAGAIN_GUI_MODELS_DATAVIEWUTILS_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_DATAVIEWUTILS_H
diff --git a/GUI/Models/DocumentModel.cpp b/GUI/Model/Data/DocumentModel.cpp
similarity index 85%
rename from GUI/Models/DocumentModel.cpp
rename to GUI/Model/Data/DocumentModel.cpp
index 9e3112f061e52278c93176936fef7fbfaaf2ccdc..7242015754ed82bbb9ede95cbb47a13dd1e32fc4 100644
--- a/GUI/Models/DocumentModel.cpp
+++ b/GUI/Model/Data/DocumentModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DocumentModel.cpp
+//! @file      GUI/Model/Data/DocumentModel.cpp
 //! @brief     Implements class DocumentModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DocumentModel.h"
-#include "GUI/Models/SimulationOptionsItem.h"
+#include "GUI/Model/Data/DocumentModel.h"
+#include "GUI/Model/Session/SimulationOptionsItem.h"
 
 DocumentModel::DocumentModel(QObject* parent)
     : SessionModel(GUI::Session::XML::DocumentModelTag, parent)
diff --git a/GUI/Models/DocumentModel.h b/GUI/Model/Data/DocumentModel.h
similarity index 79%
rename from GUI/Models/DocumentModel.h
rename to GUI/Model/Data/DocumentModel.h
index 1aa28fcc52056ec5c9b87f18549d47407c3eac3c..c8b2afb0328a602d05bb12d688be2c0529a85372 100644
--- a/GUI/Models/DocumentModel.h
+++ b/GUI/Model/Data/DocumentModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DocumentModel.h
+//! @file      GUI/Model/Data/DocumentModel.h
 //! @brief     Defines class DocumentModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DOCUMENTMODEL_H
-#define BORNAGAIN_GUI_MODELS_DOCUMENTMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_DOCUMENTMODEL_H
+#define BORNAGAIN_GUI_MODEL_DATA_DOCUMENTMODEL_H
 
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Session/SessionModel.h"
 
 class SimulationOptionsItem;
 
@@ -31,4 +31,4 @@ public:
     SimulationOptionsItem* simulationOptionsItem();
 };
 
-#endif // BORNAGAIN_GUI_MODELS_DOCUMENTMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_DOCUMENTMODEL_H
diff --git a/GUI/Models/ImportDataInfo.cpp b/GUI/Model/Data/ImportDataInfo.cpp
similarity index 92%
rename from GUI/Models/ImportDataInfo.cpp
rename to GUI/Model/Data/ImportDataInfo.cpp
index 83b1e71559804eabc133e96a7d4d7008fbf14588..8948a76651471cf53a45f2b244a2c7e1412db7f1 100644
--- a/GUI/Models/ImportDataInfo.cpp
+++ b/GUI/Model/Data/ImportDataInfo.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ImportDataInfo.cpp
+//! @file      GUI/Model/Data/ImportDataInfo.cpp
 //! @brief     Implements ImportDataInfo helper struct
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ImportDataInfo.h"
+#include "GUI/Model/Data/ImportDataInfo.h"
 #include "Device/Coord/AxisNames.h"
 #include "Device/Data/OutputData.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/JobItemUtils.h"
-#include "GUI/utils/OutputDataUtils.h"
+#include "GUI/Model/IO/OutputDataUtils.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Util/Error.h"
 
 namespace {
 std::vector<Axes::Coords> specularUnits()
@@ -39,7 +39,7 @@ ImportDataInfo::ImportDataInfo(ImportDataInfo&& other)
 }
 
 ImportDataInfo::ImportDataInfo(std::unique_ptr<OutputData<double>> data, Axes::Coords units)
-    : m_data(units == Axes::Coords::NBINS && data ? GUI::Utils::Output::binifyAxes(*data)
+    : m_data(units == Axes::Coords::NBINS && data ? GUI::Util::Output::binifyAxes(*data)
                                                   : std::move(data))
     , m_coords(units)
 {
diff --git a/GUI/Models/ImportDataInfo.h b/GUI/Model/Data/ImportDataInfo.h
similarity index 88%
rename from GUI/Models/ImportDataInfo.h
rename to GUI/Model/Data/ImportDataInfo.h
index bb7c577830b0329ad73049aa2510140cf952f116..1111a7bb3f31dec04ea8727f180e7f8709d6d4ac 100644
--- a/GUI/Models/ImportDataInfo.h
+++ b/GUI/Model/Data/ImportDataInfo.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ImportDataInfo.h
+//! @file      GUI/Model/Data/ImportDataInfo.h
 //! @brief     Defines ImportDataInfo helper struct
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_IMPORTDATAINFO_H
-#define BORNAGAIN_GUI_MODELS_IMPORTDATAINFO_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_IMPORTDATAINFO_H
+#define BORNAGAIN_GUI_MODEL_DATA_IMPORTDATAINFO_H
 
 #include "Device/Coord/Axes.h"
 #include <QString>
@@ -51,4 +51,4 @@ private:
     const Axes::Coords m_coords;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_IMPORTDATAINFO_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_IMPORTDATAINFO_H
diff --git a/GUI/Models/IntensityDataItem.cpp b/GUI/Model/Data/IntensityDataItem.cpp
similarity index 96%
rename from GUI/Models/IntensityDataItem.cpp
rename to GUI/Model/Data/IntensityDataItem.cpp
index ff6d94e8dfa21dda91be52e480c898d1c71b853b..26cc9743d0b8a7ab58d95acf0be8651a2cb53979 100644
--- a/GUI/Models/IntensityDataItem.cpp
+++ b/GUI/Model/Data/IntensityDataItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/IntensityDataItem.cpp
+//! @file      GUI/Model/Data/IntensityDataItem.cpp
 //! @brief     Implements class IntensityDataItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/ImportDataInfo.h"
-#include "GUI/Models/JobItemUtils.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/MaskUnitsConverter.h"
-#include "GUI/Models/ProjectionItems.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/ImportDataInfo.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Data/MaskUnitsConverter.h"
+#include "GUI/Model/Data/ProjectionItems.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/Error.h"
 
 namespace {
 ComboProperty gradientCombo()
diff --git a/GUI/Models/IntensityDataItem.h b/GUI/Model/Data/IntensityDataItem.h
similarity index 94%
rename from GUI/Models/IntensityDataItem.h
rename to GUI/Model/Data/IntensityDataItem.h
index bb0f53e6b04bb18b182dbcf618648de949261a4f..08f256990c12cd4ee14d83cfb46a27d0a69252e3 100644
--- a/GUI/Models/IntensityDataItem.h
+++ b/GUI/Model/Data/IntensityDataItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/IntensityDataItem.h
+//! @file      GUI/Model/Data/IntensityDataItem.h
 //! @brief     Defines class IntensityDataItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_INTENSITYDATAITEM_H
-#define BORNAGAIN_GUI_MODELS_INTENSITYDATAITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_INTENSITYDATAITEM_H
+#define BORNAGAIN_GUI_MODEL_DATA_INTENSITYDATAITEM_H
 
-#include "GUI/Models/DataItem.h"
+#include "GUI/Model/Data/DataItem.h"
 
 class BasicAxisItem;
 class AmplitudeAxisItem;
@@ -135,4 +135,4 @@ private:
     void updateAxesLabels();
 };
 
-#endif // BORNAGAIN_GUI_MODELS_INTENSITYDATAITEM_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_INTENSITYDATAITEM_H
diff --git a/GUI/Models/MaskItems.cpp b/GUI/Model/Data/MaskItems.cpp
similarity index 98%
rename from GUI/Models/MaskItems.cpp
rename to GUI/Model/Data/MaskItems.cpp
index b313260032e99fa0d54c91866ed0d8b35a53b7b9..4f62c9423d9b4c880062e8a6c12ec1cd8a1e69b2 100644
--- a/GUI/Models/MaskItems.cpp
+++ b/GUI/Model/Data/MaskItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaskItems.cpp
+//! @file      GUI/Model/Data/MaskItems.cpp
 //! @brief     Implements MaskItems classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/MaskItems.h"
+#include "GUI/Model/Data/MaskItems.h"
 #include "Device/Mask/Ellipse.h"
 #include "Device/Mask/InfinitePlane.h"
 #include "Device/Mask/Line.h"
 #include "Device/Mask/Polygon.h"
 #include "Device/Mask/Rectangle.h"
-#include "GUI/Models/Error.h"
+#include "GUI/Util/Error.h"
 
 MaskContainerItem::MaskContainerItem() : SessionItem(M_TYPE)
 {
diff --git a/GUI/Models/MaskItems.h b/GUI/Model/Data/MaskItems.h
similarity index 95%
rename from GUI/Models/MaskItems.h
rename to GUI/Model/Data/MaskItems.h
index 0463307ceb24faed1d10823cb11ac71f5275408c..1e145ac77634d37765d07272fe4d5870f5a8b1e6 100644
--- a/GUI/Models/MaskItems.h
+++ b/GUI/Model/Data/MaskItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaskItems.h
+//! @file      GUI/Model/Data/MaskItems.h
 //! @brief     Defines MaskItems classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MASKITEMS_H
-#define BORNAGAIN_GUI_MODELS_MASKITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_MASKITEMS_H
+#define BORNAGAIN_GUI_MODEL_DATA_MASKITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class IShape2D;
 
@@ -188,4 +188,4 @@ public:
     virtual std::unique_ptr<IShape2D> createShape(double scale) const override;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_MASKITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_MASKITEMS_H
diff --git a/GUI/Models/MaskUnitsConverter.cpp b/GUI/Model/Data/MaskUnitsConverter.cpp
similarity index 95%
rename from GUI/Models/MaskUnitsConverter.cpp
rename to GUI/Model/Data/MaskUnitsConverter.cpp
index bbd35d11e7b3e871d37fea25165abe8ca3015202..920160acd83985ed9c63d146cb1a36006c6adadc 100644
--- a/GUI/Models/MaskUnitsConverter.cpp
+++ b/GUI/Model/Data/MaskUnitsConverter.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaskUnitsConverter.cpp
+//! @file      GUI/Model/Data/MaskUnitsConverter.cpp
 //! @brief     Implements class MaskUnitsConverter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/MaskUnitsConverter.h"
+#include "GUI/Model/Data/MaskUnitsConverter.h"
 #include "Device/Data/DataUtils.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/ProjectionItems.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Data/ProjectionItems.h"
 
 #include <boost/polymorphic_cast.hpp>
 using boost::polymorphic_downcast;
diff --git a/GUI/Models/MaskUnitsConverter.h b/GUI/Model/Data/MaskUnitsConverter.h
similarity index 88%
rename from GUI/Models/MaskUnitsConverter.h
rename to GUI/Model/Data/MaskUnitsConverter.h
index d93e91552a4e5cc6e60452643275280c6cd0e9b4..6a177baf6078139f3be7a53955a99919a43c76eb 100644
--- a/GUI/Models/MaskUnitsConverter.h
+++ b/GUI/Model/Data/MaskUnitsConverter.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaskUnitsConverter.h
+//! @file      GUI/Model/Data/MaskUnitsConverter.h
 //! @brief     Defines class MaskUnitsConverter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MASKUNITSCONVERTER_H
-#define BORNAGAIN_GUI_MODELS_MASKUNITSCONVERTER_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_MASKUNITSCONVERTER_H
+#define BORNAGAIN_GUI_MODEL_DATA_MASKUNITSCONVERTER_H
 
 class IntensityDataItem;
 class SessionItem;
@@ -51,4 +51,4 @@ private:
     EConvertionDirection m_direction;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_MASKUNITSCONVERTER_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_MASKUNITSCONVERTER_H
diff --git a/GUI/Models/PointwiseAxisItem.cpp b/GUI/Model/Data/PointwiseAxisItem.cpp
similarity index 96%
rename from GUI/Models/PointwiseAxisItem.cpp
rename to GUI/Model/Data/PointwiseAxisItem.cpp
index 47fe40851d7065d58560926a597d2923efda6a2d..de4a0d87d23265c1df9ce4f4d79e6629a1ebaf2d 100644
--- a/GUI/Models/PointwiseAxisItem.cpp
+++ b/GUI/Model/Data/PointwiseAxisItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/PointwiseAxisItem.cpp
+//! @file      GUI/Model/Data/PointwiseAxisItem.cpp
 //! @brief     Implements pointwise axis item
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/PointwiseAxisItem.h"
+#include "GUI/Model/Data/PointwiseAxisItem.h"
 #include "Base/Axis/PointwiseAxis.h"
 #include "Device/Coord/ICoordSystem.h"
 #include "Device/Data/OutputData.h"
 #include "Device/Histo/IntensityDataIOFactory.h"
-#include "GUI/Models/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
 
 namespace {
 
diff --git a/GUI/Models/PointwiseAxisItem.h b/GUI/Model/Data/PointwiseAxisItem.h
similarity index 86%
rename from GUI/Models/PointwiseAxisItem.h
rename to GUI/Model/Data/PointwiseAxisItem.h
index 8f2a707e73e486ef755d93470b7747a5c262f43f..32277a9bc88f143d838ac715ebf2232c5117cb0b 100644
--- a/GUI/Models/PointwiseAxisItem.h
+++ b/GUI/Model/Data/PointwiseAxisItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/PointwiseAxisItem.h
+//! @file      GUI/Model/Data/PointwiseAxisItem.h
 //! @brief     Defines pointwise axis item
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_POINTWISEAXISITEM_H
-#define BORNAGAIN_GUI_MODELS_POINTWISEAXISITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_POINTWISEAXISITEM_H
+#define BORNAGAIN_GUI_MODEL_DATA_POINTWISEAXISITEM_H
 
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/SaveLoadInterface.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/IO/SaveLoadInterface.h"
 
 class PointwiseAxis;
 class SpecularInstrumentItem;
@@ -63,4 +63,4 @@ private:
     QDateTime m_last_modified;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_POINTWISEAXISITEM_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_POINTWISEAXISITEM_H
diff --git a/GUI/Models/ProjectionItems.cpp b/GUI/Model/Data/ProjectionItems.cpp
similarity index 86%
rename from GUI/Models/ProjectionItems.cpp
rename to GUI/Model/Data/ProjectionItems.cpp
index 62e72aafcde22e83673f813d734178ef954083ed..41e38f4cc955e6dbe89d1d9f439e753b6e1166ed 100644
--- a/GUI/Models/ProjectionItems.cpp
+++ b/GUI/Model/Data/ProjectionItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ProjectionItems.cpp
+//! @file      GUI/Model/Data/ProjectionItems.cpp
 //! @brief     Implements items related to projections over color map.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ProjectionItems.h"
-#include "GUI/Models/MaskItems.h"
+#include "GUI/Model/Data/ProjectionItems.h"
+#include "GUI/Model/Data/MaskItems.h"
 
 ProjectionContainerItem::ProjectionContainerItem() : SessionItem(M_TYPE)
 {
diff --git a/GUI/Models/ProjectionItems.h b/GUI/Model/Data/ProjectionItems.h
similarity index 77%
rename from GUI/Models/ProjectionItems.h
rename to GUI/Model/Data/ProjectionItems.h
index 262057e83c5cb00da25a8f87d7cac8813643302f..37fbaa39a4974e524b30956a1a4e5a4f73a86df7 100644
--- a/GUI/Models/ProjectionItems.h
+++ b/GUI/Model/Data/ProjectionItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ProjectionItems.h
+//! @file      GUI/Model/Data/ProjectionItems.h
 //! @brief     Defines items related to projections over color map.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_PROJECTIONITEMS_H
-#define BORNAGAIN_GUI_MODELS_PROJECTIONITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_PROJECTIONITEMS_H
+#define BORNAGAIN_GUI_MODEL_DATA_PROJECTIONITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 //! A container to hold ProjectionItems, intended to store projections of color map on X, Y axes.
 
@@ -26,4 +26,4 @@ public:
     ProjectionContainerItem();
 };
 
-#endif // BORNAGAIN_GUI_MODELS_PROJECTIONITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_PROJECTIONITEMS_H
diff --git a/GUI/Models/RealDataItem.cpp b/GUI/Model/Data/RealDataItem.cpp
similarity index 93%
rename from GUI/Models/RealDataItem.cpp
rename to GUI/Model/Data/RealDataItem.cpp
index f3c984fbeba878c00f8f1491a73c8e253a30bd15..ba29772781c8a645f36cd715b707f137c830a12e 100644
--- a/GUI/Models/RealDataItem.cpp
+++ b/GUI/Model/Data/RealDataItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/RealDataItem.cpp
+//! @file      GUI/Model/Data/RealDataItem.cpp
 //! @brief     Implements class RealDataItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,26 +12,26 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/RealDataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
 #include "Device/Data/DataUtils.h"
-#include "GUI/Models/AbstractDataLoader1D.h"
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/DataLoaders1D.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/ImportDataInfo.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/ItemFileNameUtils.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobItemUtils.h"
-#include "GUI/Models/JobModelFunctions.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/ProjectionItems.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/mainwindow/projectmanager.h"
-#include "GUI/utils/DeserializationException.h"
+#include "GUI/Model/Data/ApplicationModels.h"
+#include "GUI/Model/Data/ImportDataInfo.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Data/ProjectionItems.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/IO/AbstractDataLoader1D.h"
+#include "GUI/Model/IO/DataLoaders1D.h"
+#include "GUI/Model/IO/ItemFileNameUtils.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Model/Job/JobModelFunctions.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/Util/DeserializationException.h"
+#include "GUI/Util/Error.h"
 #include <QtCore/QXmlStreamReader>
 #include <QtCore/QXmlStreamWriter>
 
@@ -267,7 +267,7 @@ InstrumentItem* RealDataItem::linkedInstrument() const
         return parentJob->instrumentItem();
     }
 
-    const auto doc = ProjectManager::instance()->document();
+    const ProjectDocument* doc = gSessionData->projectDocument;
     if (!doc)
         return nullptr;
     if (!doc->instrumentModel())
@@ -427,9 +427,9 @@ void RealDataItem::rotateData()
 void RealDataItem::updateNonXMLDataFileNames()
 {
     if (DataItem* item = dataItem())
-        item->setFileName(GUI::Model::FilenameUtils::realDataFileName(*this));
+        item->setFileName(GUI::Model::FilenameUtils::realDataFileName(dataName()));
     if (DataItem* item = nativeData())
-        item->setFileName(GUI::Model::FilenameUtils::nativeDataFileName(*this));
+        item->setFileName(GUI::Model::FilenameUtils::nativeDataFileName(dataName()));
 }
 
 void RealDataItem::updateToInstrument(const InstrumentItem* instrument)
diff --git a/GUI/Models/RealDataItem.h b/GUI/Model/Data/RealDataItem.h
similarity index 93%
rename from GUI/Models/RealDataItem.h
rename to GUI/Model/Data/RealDataItem.h
index 0c249a5292840455b9e8740be7ebcfb523cf50a7..c6f91b0efc240fd987a2422f001a5697f8c910b8 100644
--- a/GUI/Models/RealDataItem.h
+++ b/GUI/Model/Data/RealDataItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/RealDataItem.h
+//! @file      GUI/Model/Data/RealDataItem.h
 //! @brief     Defines class RealDataItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_REALDATAITEM_H
-#define BORNAGAIN_GUI_MODELS_REALDATAITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_REALDATAITEM_H
+#define BORNAGAIN_GUI_MODEL_DATA_REALDATAITEM_H
 
-#include "GUI/Models/AbstractDataLoader.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/IO/AbstractDataLoader.h"
+#include "GUI/Model/Session/SessionItem.h"
 #include <QPointer>
 
 class DataItem;
@@ -127,4 +127,4 @@ private:
     std::unique_ptr<AbstractDataLoader> m_dataLoader;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_REALDATAITEM_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_REALDATAITEM_H
diff --git a/GUI/Models/RealDataModel.cpp b/GUI/Model/Data/RealDataModel.cpp
similarity index 94%
rename from GUI/Models/RealDataModel.cpp
rename to GUI/Model/Data/RealDataModel.cpp
index 8633b4cfdcde3597b9db88fcb9c254a5ef6db0c6..ef50c6b245c46ae1c6e2f3b72da8063d9c1f6412 100644
--- a/GUI/Models/RealDataModel.cpp
+++ b/GUI/Model/Data/RealDataModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/RealDataModel.cpp
+//! @file      GUI/Model/Data/RealDataModel.cpp
 //! @brief     Implements class RealDataModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/RealDataItem.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
 
 RealDataModel::RealDataModel(QObject* parent)
     : SessionModel(GUI::Session::XML::RealDataModelTag, parent)
diff --git a/GUI/Models/RealDataModel.h b/GUI/Model/Data/RealDataModel.h
similarity index 87%
rename from GUI/Models/RealDataModel.h
rename to GUI/Model/Data/RealDataModel.h
index 56f25135b535839eaa9bb15a0a93a20105b2c8d4..5374ab9d13fe8bd52c81e291e4601b40d305924d 100644
--- a/GUI/Models/RealDataModel.h
+++ b/GUI/Model/Data/RealDataModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/RealDataModel.h
+//! @file      GUI/Model/Data/RealDataModel.h
 //! @brief     Defines class RealDataModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_REALDATAMODEL_H
-#define BORNAGAIN_GUI_MODELS_REALDATAMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_REALDATAMODEL_H
+#define BORNAGAIN_GUI_MODEL_DATA_REALDATAMODEL_H
 
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Session/SessionModel.h"
 
 class RealDataItem;
 
@@ -51,4 +51,4 @@ private:
     using SessionModel::removeRows;   //< hiding this from usage - deprecated!
 };
 
-#endif // BORNAGAIN_GUI_MODELS_REALDATAMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_REALDATAMODEL_H
diff --git a/GUI/Models/SpecularDataItem.cpp b/GUI/Model/Data/SpecularDataItem.cpp
similarity index 96%
rename from GUI/Models/SpecularDataItem.cpp
rename to GUI/Model/Data/SpecularDataItem.cpp
index 669535a515b6353219b1cf70117860b278b9b702..96902e6d36cce94ea20d6ab460ee49d646f97831 100644
--- a/GUI/Models/SpecularDataItem.cpp
+++ b/GUI/Model/Data/SpecularDataItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SpecularDataItem.cpp
+//! @file      GUI/Model/Data/SpecularDataItem.cpp
 //! @brief     Implements class SpecularDataItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/ImportDataInfo.h"
-#include "GUI/Models/JobItemUtils.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/ImportDataInfo.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Util/Error.h"
 
 namespace {
 
diff --git a/GUI/Models/SpecularDataItem.h b/GUI/Model/Data/SpecularDataItem.h
similarity index 91%
rename from GUI/Models/SpecularDataItem.h
rename to GUI/Model/Data/SpecularDataItem.h
index 6a51b0f0acae963b4e3e983914b20abd0ce086d6..e3defcd35b8b8c82bf01fe9c86e2904e48a7bc04 100644
--- a/GUI/Models/SpecularDataItem.h
+++ b/GUI/Model/Data/SpecularDataItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SpecularDataItem.h
+//! @file      GUI/Model/Data/SpecularDataItem.h
 //! @brief     Defines class SpecularDataItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SPECULARDATAITEM_H
-#define BORNAGAIN_GUI_MODELS_SPECULARDATAITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_DATA_SPECULARDATAITEM_H
+#define BORNAGAIN_GUI_MODEL_DATA_SPECULARDATAITEM_H
 
-#include "GUI/Models/DataItem.h"
+#include "GUI/Model/Data/DataItem.h"
 
 class AmplitudeAxisItem;
 class BasicAxisItem;
@@ -89,4 +89,4 @@ private:
     void updateAxesZoomLevel();
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SPECULARDATAITEM_H
+#endif // BORNAGAIN_GUI_MODEL_DATA_SPECULARDATAITEM_H
diff --git a/GUI/Models/DomainObjectBuilder.cpp b/GUI/Model/Domain/DomainObjectBuilder.cpp
similarity index 87%
rename from GUI/Models/DomainObjectBuilder.cpp
rename to GUI/Model/Domain/DomainObjectBuilder.cpp
index 4fdf0e22f157ddc82b6c2e42683e9f270f415951..351bc29916625a3626df15b9644835b58516d932 100644
--- a/GUI/Models/DomainObjectBuilder.cpp
+++ b/GUI/Model/Domain/DomainObjectBuilder.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DomainObjectBuilder.cpp
+//! @file      GUI/Model/Domain/DomainObjectBuilder.cpp
 //! @brief     Implements DomainObjectBuilder namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DomainObjectBuilder.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InterferenceItems.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/TransformToDomain.h"
+#include "GUI/Model/Domain/DomainObjectBuilder.h"
+#include "GUI/Model/Domain/ToDomain.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Util/Error.h"
 
 std::unique_ptr<MultiLayer>
 GUI::Model::DomainObjectBuilder::buildMultiLayer(const MultiLayerItem& multilayer_item)
diff --git a/GUI/Models/DomainObjectBuilder.h b/GUI/Model/Domain/DomainObjectBuilder.h
similarity index 84%
rename from GUI/Models/DomainObjectBuilder.h
rename to GUI/Model/Domain/DomainObjectBuilder.h
index e9b249d1ea1fb893d215c79aeff75082296f2a9d..43bbad2fca1cb9dfde7cf21ed7d3b3d908e89ab4 100644
--- a/GUI/Models/DomainObjectBuilder.h
+++ b/GUI/Model/Domain/DomainObjectBuilder.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DomainObjectBuilder.h
+//! @file      GUI/Model/Domain/DomainObjectBuilder.h
 //! @brief     Defines namespace GUI::Model::DomainObjectBuilder
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DOMAINOBJECTBUILDER_H
-#define BORNAGAIN_GUI_MODELS_DOMAINOBJECTBUILDER_H
+#ifndef BORNAGAIN_GUI_MODEL_DOMAIN_DOMAINOBJECTBUILDER_H
+#define BORNAGAIN_GUI_MODEL_DOMAIN_DOMAINOBJECTBUILDER_H
 
 #include <memory>
 
@@ -38,4 +38,4 @@ std::unique_ptr<IInterference> buildInterference(const SessionItem& item);
 
 } // namespace GUI::Model::DomainObjectBuilder
 
-#endif // BORNAGAIN_GUI_MODELS_DOMAINOBJECTBUILDER_H
+#endif // BORNAGAIN_GUI_MODEL_DOMAIN_DOMAINOBJECTBUILDER_H
diff --git a/GUI/Models/DomainSimulationBuilder.cpp b/GUI/Model/Domain/DomainSimulationBuilder.cpp
similarity index 92%
rename from GUI/Models/DomainSimulationBuilder.cpp
rename to GUI/Model/Domain/DomainSimulationBuilder.cpp
index ec886b53fdf96eaf35c19a2be4efda7e5eb068d8..91a812c9c3b1577d6ded65fea4fe24cf91b14fc6 100644
--- a/GUI/Models/DomainSimulationBuilder.cpp
+++ b/GUI/Model/Domain/DomainSimulationBuilder.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DomainSimulationBuilder.cpp
+//! @file      GUI/Model/Domain/DomainSimulationBuilder.cpp
 //! @brief     Implements class DomainSimulationBuilder
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,22 +12,22 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DomainSimulationBuilder.h"
+#include "GUI/Model/Domain/DomainSimulationBuilder.h"
 #include "Base/Const/Units.h"
 #include "Core/Background/IBackground.h"
 #include "Core/Scan/AlphaScan.h"
 #include "Core/Simulation/includeSimulations.h"
 #include "Device/Beam/Beam.h"
 #include "Device/Beam/IFootprintFactor.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/BackgroundItems.h"
-#include "GUI/Models/DomainObjectBuilder.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FootprintItems.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/SimulationOptionsItem.h"
-#include "GUI/Models/TransformToDomain.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Domain/DomainObjectBuilder.h"
+#include "GUI/Model/Domain/ToDomain.h"
+#include "GUI/Model/Instrument/BackgroundItems.h"
+#include "GUI/Model/Instrument/FootprintItems.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Session/SimulationOptionsItem.h"
+#include "GUI/Util/Error.h"
 
 namespace {
 
diff --git a/GUI/Models/DomainSimulationBuilder.h b/GUI/Model/Domain/DomainSimulationBuilder.h
similarity index 83%
rename from GUI/Models/DomainSimulationBuilder.h
rename to GUI/Model/Domain/DomainSimulationBuilder.h
index 0f79ab93fadcf7388bc1d4e52979d0f58bf6b401..30c20c07e56ab8af01c760f7fa7c1c2f5c976816 100644
--- a/GUI/Models/DomainSimulationBuilder.h
+++ b/GUI/Model/Domain/DomainSimulationBuilder.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DomainSimulationBuilder.h
+//! @file      GUI/Model/Domain/DomainSimulationBuilder.h
 //! @brief     Defines namespace GUI::Model::DomainSimulationBuilder
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DOMAINSIMULATIONBUILDER_H
-#define BORNAGAIN_GUI_MODELS_DOMAINSIMULATIONBUILDER_H
+#ifndef BORNAGAIN_GUI_MODEL_DOMAIN_DOMAINSIMULATIONBUILDER_H
+#define BORNAGAIN_GUI_MODEL_DOMAIN_DOMAINSIMULATIONBUILDER_H
 
 #include <memory>
 
@@ -33,4 +33,4 @@ std::unique_ptr<ISimulation> createSimulation(const MultiLayerItem* sampleItem,
                                               const SimulationOptionsItem* optionsItem = nullptr);
 }; // namespace GUI::Model::DomainSimulationBuilder
 
-#endif // BORNAGAIN_GUI_MODELS_DOMAINSIMULATIONBUILDER_H
+#endif // BORNAGAIN_GUI_MODEL_DOMAIN_DOMAINSIMULATIONBUILDER_H
diff --git a/GUI/Models/TransformFromDomain.cpp b/GUI/Model/Domain/FromDomain.cpp
similarity index 97%
rename from GUI/Models/TransformFromDomain.cpp
rename to GUI/Model/Domain/FromDomain.cpp
index dbacb2abed1a9122c7392f9be4165ebea0600009..0a7137855b770cb1c3ba15f6e13728df15f967d4 100644
--- a/GUI/Models/TransformFromDomain.cpp
+++ b/GUI/Model/Domain/FromDomain.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/TransformFromDomain.cpp
+//! @file      GUI/Model/Domain/FromDomain.cpp
 //! @brief     Implements namespace TransformFromDomain
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/TransformFromDomain.h"
+#include "GUI/Model/Domain/FromDomain.h"
 #include "Base/Const/Units.h"
 #include "Core/Background/ConstantBackground.h"
 #include "Core/Background/PoissonNoiseBackground.h"
@@ -32,25 +32,24 @@
 #include "Device/Resolution/ConvolutionDetectorResolution.h"
 #include "Device/Resolution/ResolutionFunction2DGaussian.h"
 #include "Device/Resolution/ScanResolution.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/BackgroundItems.h"
-#include "GUI/Models/BeamAngleItems.h"
-#include "GUI/Models/BeamWavelengthItem.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FTDecayFunctionItems.h"
-#include "GUI/Models/FTDistributionItems.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InterferenceItems.h"
-#include "GUI/Models/Lattice2DItems.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/LayerRoughnessItems.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/RectangularDetectorItem.h"
-#include "GUI/Models/ResolutionFunctionItems.h"
-#include "GUI/Models/SphericalDetectorItem.h"
-#include "GUI/Models/UIntDescriptor.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Instrument/BackgroundItems.h"
+#include "GUI/Model/Instrument/BeamAngleItems.h"
+#include "GUI/Model/Instrument/BeamWavelengthItem.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/RectangularDetectorItem.h"
+#include "GUI/Model/Instrument/ResolutionFunctionItems.h"
+#include "GUI/Model/Instrument/SphericalDetectorItem.h"
+#include "GUI/Model/Sample/FTDecayFunctionItems.h"
+#include "GUI/Model/Sample/FTDistributionItems.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
+#include "GUI/Model/Sample/Lattice2DItems.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/LayerRoughnessItems.h"
+#include "GUI/Model/Types/UIntDescriptor.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/Util/Error.h"
 #include "Param/Distrib/Distributions.h"
 #include "Param/Distrib/RangedDistributions.h"
 #include "Param/Node/NodeUtils.h"
@@ -88,9 +87,8 @@ void setPDF1D(InterferenceRadialParaCrystalItem* item, const IFTDistribution1D*
         FTDistribution1DVoigtItem* pdfItem = item->setPDFType<FTDistribution1DVoigtItem>();
         pdfItem->omega().set(pdf->omega());
         pdfItem->eta().set(pdf->eta());
-    } else {
+    } else
         throw Error("GUI::Transform::FromDomain::setPDF1D: -> Error");
-    }
 }
 
 // note: SetterPDF(1|2)Type are needed because template template parameter must be classes
@@ -137,9 +135,8 @@ void setPDF2D(Interference2DParaCrystalItem* item, const IFTDistribution2D* pdf)
         pdfItem->setOmegaY(pdf_voigt->omegaY());
         pdfItem->setGamma(Units::rad2deg(pdf_voigt->gamma()));
         pdfItem->setEta(pdf_voigt->eta());
-    } else {
+    } else
         throw Error("GUI::Transform::FromDomain::setPDF2D: -> Error");
-    }
 }
 
 void setDecayFunction1D(Interference1DLatticeItem* item, const IFTDecayFunction1D* ipdf)
@@ -164,9 +161,8 @@ void setDecayFunction1D(Interference1DLatticeItem* item, const IFTDecayFunction1
             item->setDecayFunctionType<FTDecayFunction1DVoigtItem>();
         pdfItem->decayLength().set(pdf->decayLength());
         pdfItem->eta().set(pdf->eta());
-    } else {
+    } else
         throw Error("GUI::Transform::FromDomain::setDecayFunction1D: -> Error");
-    }
 }
 
 void setDecayFunction2D(Interference2DLatticeItem* item, const IFTDecayFunction2D* pdf)
@@ -193,9 +189,8 @@ void setDecayFunction2D(Interference2DLatticeItem* item, const IFTDecayFunction2
         pdfItem->setDecayLengthY(pdf_voigt->decayLengthY());
         pdfItem->setGamma(Units::rad2deg(pdf_voigt->gamma()));
         pdfItem->setEta(pdf_voigt->eta());
-    } else {
+    } else
         throw Error("GUI::Transform::FromDomain::setDecayFunction2D: -> Error");
-    }
 }
 
 void set2DLatticeParameters(Interference2DAbstractLatticeItem* item, const Lattice2D& lattice)
@@ -273,9 +268,8 @@ void setDistribution(BeamDistributionItem* part_distr_item, ParameterDistributio
         distr_trapez_item->setMiddleWidth(factor * distr->getMiddleWidth());
         distr_trapez_item->setRightWidth(factor * distr->getRightWidth());
         distItem = distr_trapez_item;
-    } else {
+    } else
         throw Error("GUI::Transform::FromDomain::setDistribution: -> unknown distribution");
-    }
 
     distItem->setNumberOfSamples(par_distr.getNbrSamples());
 
diff --git a/GUI/Models/TransformFromDomain.h b/GUI/Model/Domain/FromDomain.h
similarity index 95%
rename from GUI/Models/TransformFromDomain.h
rename to GUI/Model/Domain/FromDomain.h
index 2584c89afee37e159b1d930c8c34d3130646a254..c990c6fc62a8b25bad124813b02d3da911a27d4c 100644
--- a/GUI/Models/TransformFromDomain.h
+++ b/GUI/Model/Domain/FromDomain.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/TransformFromDomain.h
+//! @file      GUI/Model/Domain/FromDomain.h
 //! @brief     Defines namespace GUI::Transform::FromDomain
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_TRANSFORMFROMDOMAIN_H
-#define BORNAGAIN_GUI_MODELS_TRANSFORMFROMDOMAIN_H
+#ifndef BORNAGAIN_GUI_MODEL_DOMAIN_FROMDOMAIN_H
+#define BORNAGAIN_GUI_MODEL_DOMAIN_FROMDOMAIN_H
 
 #include <QString>
 
@@ -115,4 +115,4 @@ void setAxisItem(BasicAxisItem* item, const IAxis& axis, double factor = 1.0);
 
 } // namespace GUI::Transform::FromDomain
 
-#endif // BORNAGAIN_GUI_MODELS_TRANSFORMFROMDOMAIN_H
+#endif // BORNAGAIN_GUI_MODEL_DOMAIN_FROMDOMAIN_H
diff --git a/GUI/Models/GUIObjectBuilder.cpp b/GUI/Model/Domain/GUIObjectBuilder.cpp
similarity index 92%
rename from GUI/Models/GUIObjectBuilder.cpp
rename to GUI/Model/Domain/GUIObjectBuilder.cpp
index dab657978e31435298899b542c34c87c239dd2e9..6a5f1a2b49a04215ebca6d57e2300a3dff3c94a6 100644
--- a/GUI/Models/GUIObjectBuilder.cpp
+++ b/GUI/Model/Domain/GUIObjectBuilder.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GUIObjectBuilder.cpp
+//! @file      GUI/Model/Domain/GUIObjectBuilder.cpp
 //! @brief     Implements GUI::Model::ObjectBuilder namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,16 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/GUIObjectBuilder.h"
+#include "GUI/Model/Domain/GUIObjectBuilder.h"
 #include "Base/Const/Units.h"
 #include "Base/Utils/Assert.h"
 #include "Core/Simulation/includeSimulations.h"
-#include "Device/Instrument/Instrument.h"
-#include "GUI/Models/DocumentModel.h"
-#include "GUI/Models/GUIDomainSampleVisitor.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/SimulationOptionsItem.h"
-#include "GUI/Models/TransformFromDomain.h"
+#include "GUI/Model/Data/DocumentModel.h"
+#include "GUI/Model/Domain/FromDomain.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Sample/GUIDomainSampleVisitor.h"
+#include "GUI/Model/Session/SimulationOptionsItem.h"
 #include "Resample/Options/SimulationOptions.h"
 
 namespace {
diff --git a/GUI/Models/GUIObjectBuilder.h b/GUI/Model/Domain/GUIObjectBuilder.h
similarity index 84%
rename from GUI/Models/GUIObjectBuilder.h
rename to GUI/Model/Domain/GUIObjectBuilder.h
index d6ec87aeee0ba8cde536f3d778db75b087b79e89..ca03e936c5fa19c4a2c35a56387d9cb482a5c440 100644
--- a/GUI/Models/GUIObjectBuilder.h
+++ b/GUI/Model/Domain/GUIObjectBuilder.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GUIObjectBuilder.h
+//! @file      GUI/Model/Domain/GUIObjectBuilder.h
 //! @brief     Defines namespace GUI::Model::ObjectBuilder
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_GUIOBJECTBUILDER_H
-#define BORNAGAIN_GUI_MODELS_GUIOBJECTBUILDER_H
+#ifndef BORNAGAIN_GUI_MODEL_DOMAIN_GUIOBJECTBUILDER_H
+#define BORNAGAIN_GUI_MODEL_DOMAIN_GUIOBJECTBUILDER_H
 
 #include <QString>
 
@@ -37,4 +37,4 @@ SessionItem* populateDocumentModel(DocumentModel* p_documentModel, const ISimula
 
 } // namespace GUI::Model::ObjectBuilder
 
-#endif // BORNAGAIN_GUI_MODELS_GUIOBJECTBUILDER_H
+#endif // BORNAGAIN_GUI_MODEL_DOMAIN_GUIOBJECTBUILDER_H
diff --git a/GUI/Models/TransformToDomain.cpp b/GUI/Model/Domain/ToDomain.cpp
similarity index 74%
rename from GUI/Models/TransformToDomain.cpp
rename to GUI/Model/Domain/ToDomain.cpp
index cb318a42205a74667ab639c2a35e9a512791cc15..09dff3b1b587d3e02743f80dd57d2bf8351c39dc 100644
--- a/GUI/Models/TransformToDomain.cpp
+++ b/GUI/Model/Domain/ToDomain.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/TransformToDomain.cpp
+//! @file      GUI/Model/Domain/ToDomain.cpp
 //! @brief     Implements class TransformToDomain
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,31 +12,28 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/TransformToDomain.h"
+#include "GUI/Model/Domain/ToDomain.h"
 #include "Base/Vector/Transform3D.h"
 #include "Core/Scan/AlphaScan.h"
 #include "Core/Simulation/GISASSimulation.h"
 #include "Device/Resolution/ScanResolution.h"
-#include "GUI/Models/BeamAngleItems.h"
-#include "GUI/Models/BeamItems.h"
-#include "GUI/Models/BeamWavelengthItem.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModelFunctions.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/LayerRoughnessItems.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/RotationItems.h"
-#include "GUI/Models/SimulationOptionsItem.h"
-#include "GUI/Models/TransformationItem.h"
-#include "GUI/Models/UIntDescriptor.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Instrument/BeamAngleItems.h"
+#include "GUI/Model/Instrument/BeamItems.h"
+#include "GUI/Model/Instrument/BeamWavelengthItem.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/LayerRoughnessItems.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Session/SimulationOptionsItem.h"
+#include "GUI/Model/Trafo/RotationItems.h"
+#include "GUI/Model/Trafo/TransformationItem.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
+#include "GUI/Model/Types/UIntDescriptor.h"
+#include "GUI/Model/Types/VectorItem.h"
 #include "Param/Distrib/RangedDistributions.h"
 #include "Resample/Options/SimulationOptions.h"
 #include "Sample/Particle/MesoCrystal.h"
@@ -44,24 +41,15 @@
 #include "Sample/Particle/ParticleCoreShell.h"
 
 namespace {
+
 template <class T>
 void setParameterDistributionToSimulation(ParameterDistribution::WhichParameter which,
                                           const SessionItem* item, ISimulation& simulation);
 
 std::unique_ptr<ScanResolution> createScanResolution(const SessionItem* item);
+
 } // namespace
 
-std::unique_ptr<Material>
-GUI::Transform::ToDomain::createDomainMaterial(const ItemWithMaterial& item)
-{
-    auto parent_job = GUI::Model::JobFunctions::findJobItem(&item);
-    const MaterialItemContainer* container =
-        parent_job ? parent_job->materialContainerItem() : nullptr;
-    return container
-               ? GUI::Model::MaterialItemUtils::createDomainMaterial(item.materialIdentifier(),
-                                                                     *container)
-               : GUI::Model::MaterialItemUtils::createDomainMaterial(item.materialIdentifier());
-}
 
 std::unique_ptr<MultiLayer> GUI::Transform::ToDomain::createMultiLayer(const MultiLayerItem& item)
 {
@@ -76,7 +64,7 @@ std::unique_ptr<MultiLayer> GUI::Transform::ToDomain::createMultiLayer(const Mul
 
 std::unique_ptr<Layer> GUI::Transform::ToDomain::createLayer(const LayerItem& item)
 {
-    auto P_layer = std::make_unique<Layer>(*createDomainMaterial(item), item.thickness());
+    auto P_layer = std::make_unique<Layer>(*item.domainMaterial(), item.thickness());
     P_layer->setNumberOfSlices(item.numSlices());
     return P_layer;
 }
@@ -157,15 +145,6 @@ void GUI::Transform::ToDomain::addBeamDivergencesToScan(const BeamItem& beam_ite
         scan.setAngleResolution(*resolution);
 }
 
-void GUI::Transform::ToDomain::setBeamDistribution(ParameterDistribution::WhichParameter which,
-                                                   const BeamDistributionItem& item,
-                                                   ISimulation& simulation)
-{
-    auto P_par_distr = item.getParameterDistributionForName(which);
-    if (P_par_distr)
-        simulation.addParameterDistribution(*P_par_distr);
-}
-
 void GUI::Transform::ToDomain::setSimulationOptions(ISimulation* simulation,
                                                     const SessionItem& item)
 {
@@ -173,26 +152,14 @@ void GUI::Transform::ToDomain::setSimulationOptions(ISimulation* simulation,
 
     if (auto optionItem = dynamic_cast<const SimulationOptionsItem*>(&item)) {
         simulation->options().setNumberOfThreads(optionItem->numberOfThreads());
-        if (optionItem->useMonteCarloIntegration()) {
+        if (optionItem->useMonteCarloIntegration())
             simulation->options().setMonteCarloIntegration(true,
                                                            optionItem->numberOfMonteCarloPoints());
-        }
         simulation->options().setUseAvgMaterials(optionItem->useAverageMaterials());
         simulation->options().setIncludeSpecular(optionItem->includeSpecularPeak());
     }
 }
 
-void GUI::Transform::ToDomain::setTransformationInfo(IParticle* result,
-                                                     const ItemWithParticles& item)
-{
-    result->setPosition(item.position());
-    const Transform3D r = item.rotation();
-    if (!r.isIdentity()) {
-        std::unique_ptr<IRotation> rotation(IRotation::createRotation(r));
-        result->setRotation(*rotation);
-    }
-}
-
 namespace {
 
 //! If the given item has distributions, then add these distributions to the simulation's
@@ -202,10 +169,7 @@ void setParameterDistributionToSimulation(ParameterDistribution::WhichParameter
                                           const SessionItem* item, ISimulation& simulation)
 {
     const auto parameter_item = dynamic_cast<const T*>(item);
-    if (!parameter_item) {
-        ASSERT(parameter_item);
-        return;
-    }
+    ASSERT(parameter_item);
 
     auto P_par_distr = parameter_item->getParameterDistributionForName(which);
     if (P_par_distr)
diff --git a/GUI/Models/TransformToDomain.h b/GUI/Model/Domain/ToDomain.h
similarity index 80%
rename from GUI/Models/TransformToDomain.h
rename to GUI/Model/Domain/ToDomain.h
index 3fb7d07909727a5d6f6f6ed5a06f6d0bbf64f365..e7d1d8dcfe7d4d344c51a3633291501e12d05f6c 100644
--- a/GUI/Models/TransformToDomain.h
+++ b/GUI/Model/Domain/ToDomain.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/TransformToDomain.h
+//! @file      GUI/Model/Domain/ToDomain.h
 //! @brief     Defines namespace GUI::Transform::ToDomain
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_TRANSFORMTODOMAIN_H
-#define BORNAGAIN_GUI_MODELS_TRANSFORMTODOMAIN_H
+#ifndef BORNAGAIN_GUI_MODEL_DOMAIN_TODOMAIN_H
+#define BORNAGAIN_GUI_MODEL_DOMAIN_TODOMAIN_H
 
 #include "Device/Instrument/Instrument.h"
 #include "Param/Distrib/Distributions.h" // for IDistribution1D
@@ -45,7 +45,6 @@ class LayerBasicRoughnessItem;
 
 namespace GUI::Transform::ToDomain {
 
-std::unique_ptr<Material> createDomainMaterial(const ItemWithMaterial& item);
 std::unique_ptr<IParticle> createIParticle(const SessionItem& item);
 std::unique_ptr<Layer> createLayer(const LayerItem& item);
 std::unique_ptr<LayerRoughness> createLayerRoughness(
@@ -56,12 +55,8 @@ std::unique_ptr<ParticleLayout> createParticleLayout(const ParticleLayoutItem& i
 void addDistributionParametersToSimulation(const BeamItem& beam_item, GISASSimulation& simulation);
 void addBeamDivergencesToScan(const BeamItem& beam_item, AlphaScan& simulation);
 
-void setBeamDistribution(ParameterDistribution::WhichParameter which,
-                         const BeamDistributionItem& item, ISimulation& simulation);
-
 void setSimulationOptions(ISimulation* simulation, const SessionItem& item);
-void setTransformationInfo(IParticle* result, const ItemWithParticles& item);
 
 } // namespace GUI::Transform::ToDomain
 
-#endif // BORNAGAIN_GUI_MODELS_TRANSFORMTODOMAIN_H
+#endif // BORNAGAIN_GUI_MODEL_DOMAIN_TODOMAIN_H
diff --git a/GUI/Models/FitParameterHelper.cpp b/GUI/Model/Fit/FitParameterHelper.cpp
similarity index 92%
rename from GUI/Models/FitParameterHelper.cpp
rename to GUI/Model/Fit/FitParameterHelper.cpp
index 33819cb73bbb4c3f188cfacb7f18e35edcea1905..5ea5a277cbe45a5c78ceadcb87701e0b6972186e 100644
--- a/GUI/Models/FitParameterHelper.cpp
+++ b/GUI/Model/Fit/FitParameterHelper.cpp
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FitParameterHelper.cpp
-//! @brief     Implements class FitModelHelper
+//! @file      GUI/Model/Fit/FitParameterHelper.cpp
+//! @brief     Implements namespace FitModelHelper
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/FitParameterHelper.h"
-#include "GUI/Models/FitParameterItems.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/ParameterTreeItems.h"
+#include "GUI/Model/Fit/FitParameterHelper.h"
+#include "GUI/Model/Fit/FitParameterItems.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/Job/ModelPath.h"
 
 //! Creates fit parameter from given ParameterItem, sets starting value to the value
 //! of ParameterItem, copies link.
diff --git a/GUI/Model/Fit/FitParameterHelper.h b/GUI/Model/Fit/FitParameterHelper.h
new file mode 100644
index 0000000000000000000000000000000000000000..7709ca01f7375fb59eda22082a383d535e317e68
--- /dev/null
+++ b/GUI/Model/Fit/FitParameterHelper.h
@@ -0,0 +1,43 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/Model/Fit/FitParameterHelper.h
+//! @brief     Defines namespace FitParameterHelper
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2018
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#ifndef BORNAGAIN_GUI_MODEL_FIT_FITPARAMETERHELPER_H
+#define BORNAGAIN_GUI_MODEL_FIT_FITPARAMETERHELPER_H
+
+#include <QStringList>
+
+class ParameterItem;
+class FitParameterItem;
+class FitParameterContainerItem;
+
+//! Convenience static methods to handle various fitting items in given JobItem.
+
+namespace FitParameterHelper {
+
+void createFitParameter(FitParameterContainerItem* container, ParameterItem* parameterItem);
+
+void removeFromFitParameters(FitParameterContainerItem* container, ParameterItem* parameterItem);
+void addToFitParameter(FitParameterContainerItem* container, ParameterItem* parameterItem,
+                       const QString& fitParName);
+
+FitParameterItem* getFitParameterItem(FitParameterContainerItem* container,
+                                      ParameterItem* parameterItem);
+
+QStringList getFitParameterNames(FitParameterContainerItem* container);
+QString getParameterItemPath(const ParameterItem* parameterItem);
+ParameterItem* getParameterItem(FitParameterContainerItem* container, const QString& link);
+
+}; // namespace FitParameterHelper
+
+#endif // BORNAGAIN_GUI_MODEL_FIT_FITPARAMETERHELPER_H
diff --git a/GUI/Models/FitParameterItems.cpp b/GUI/Model/Fit/FitParameterItems.cpp
similarity index 97%
rename from GUI/Models/FitParameterItems.cpp
rename to GUI/Model/Fit/FitParameterItems.cpp
index 133f2dd82e5ba2f3c8d9ad2f8e729f911c28829d..56d8caafe2fe3caa506926256f5984e7843e32aa 100644
--- a/GUI/Models/FitParameterItems.cpp
+++ b/GUI/Model/Fit/FitParameterItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FitParameterItems.cpp
+//! @file      GUI/Model/Fit/FitParameterItems.cpp
 //! @brief     Implements FitParameterItems family of classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/FitParameterItems.h"
+#include "GUI/Model/Fit/FitParameterItems.h"
 #include "Base/Utils/Assert.h"
 #include "Fit/Param/Parameters.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/ParameterTreeItems.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/ModelPath.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/Util/Error.h"
 #include <cmath>
 
 namespace {
diff --git a/GUI/Models/FitParameterItems.h b/GUI/Model/Fit/FitParameterItems.h
similarity index 92%
rename from GUI/Models/FitParameterItems.h
rename to GUI/Model/Fit/FitParameterItems.h
index bebcec8526745fe8d9484fc961c49e607d2ccf8b..87f6ab8500401e3d63c11f0ae9f955328f3bb686 100644
--- a/GUI/Models/FitParameterItems.h
+++ b/GUI/Model/Fit/FitParameterItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FitParameterItems.h
+//! @file      GUI/Model/Fit/FitParameterItems.h
 //! @brief     Defines classes FitParameterItem, FitParameterLinkItem, FitParameterContainerItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_FITPARAMETERITEMS_H
-#define BORNAGAIN_GUI_MODELS_FITPARAMETERITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_FIT_FITPARAMETERITEMS_H
+#define BORNAGAIN_GUI_MODEL_FIT_FITPARAMETERITEMS_H
 
 #include "Fit/Param/AttLimits.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class FitParameterLinkItem;
 
@@ -109,4 +109,4 @@ public:
     mumufit::Parameters createParameters() const;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_FITPARAMETERITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_FIT_FITPARAMETERITEMS_H
diff --git a/GUI/Models/FitParameterProxyModel.cpp b/GUI/Model/Fit/FitParameterProxyModel.cpp
similarity index 97%
rename from GUI/Models/FitParameterProxyModel.cpp
rename to GUI/Model/Fit/FitParameterProxyModel.cpp
index bbd1d2c9c9be2f79d600b562e9c5a7870d9cc629..5c89f237424ba6ae3e75fdf6c4f857a94057fdfe 100644
--- a/GUI/Models/FitParameterProxyModel.cpp
+++ b/GUI/Model/Fit/FitParameterProxyModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FitParameterProxyModel.cpp
+//! @file      GUI/Model/Fit/FitParameterProxyModel.cpp
 //! @brief     Implements class FitParameterAbsModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/FitParameterProxyModel.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FitParameterHelper.h"
-#include "GUI/Models/FitParameterItems.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/SessionItemUtils.h"
+#include "GUI/Model/Fit/FitParameterProxyModel.h"
+#include "GUI/Model/Fit/FitParameterHelper.h"
+#include "GUI/Model/Fit/FitParameterItems.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/Job/ModelPath.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Util/Error.h"
 #include <QColor>
 #include <QMimeData>
 
diff --git a/GUI/Models/FitParameterProxyModel.h b/GUI/Model/Fit/FitParameterProxyModel.h
similarity index 93%
rename from GUI/Models/FitParameterProxyModel.h
rename to GUI/Model/Fit/FitParameterProxyModel.h
index 593c089c33ace438519f4990e8b079ca1908ade1..5f47ab1a4866c7b8bce1ef4d3ff0400b51b94364 100644
--- a/GUI/Models/FitParameterProxyModel.h
+++ b/GUI/Model/Fit/FitParameterProxyModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FitParameterProxyModel.h
+//! @file      GUI/Model/Fit/FitParameterProxyModel.h
 //! @brief     Defines class FitParameterProxyModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_FITPARAMETERPROXYMODEL_H
-#define BORNAGAIN_GUI_MODELS_FITPARAMETERPROXYMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_FIT_FITPARAMETERPROXYMODEL_H
+#define BORNAGAIN_GUI_MODEL_FIT_FITPARAMETERPROXYMODEL_H
 
 #include <QAbstractItemModel>
 #include <QStringList>
@@ -88,4 +88,4 @@ inline Qt::DropActions FitParameterProxyModel::supportedDropActions() const
     return Qt::MoveAction | Qt::CopyAction;
 }
 
-#endif // BORNAGAIN_GUI_MODELS_FITPARAMETERPROXYMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_FIT_FITPARAMETERPROXYMODEL_H
diff --git a/GUI/Models/FitSuiteItem.cpp b/GUI/Model/Fit/FitSuiteItem.cpp
similarity index 91%
rename from GUI/Models/FitSuiteItem.cpp
rename to GUI/Model/Fit/FitSuiteItem.cpp
index 0e847b185dbf5fd89f0c61b6507a7948b7384153..6b880eb6eb1ca12166a317442ef26306c3052d6b 100644
--- a/GUI/Models/FitSuiteItem.cpp
+++ b/GUI/Model/Fit/FitSuiteItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FitSuiteItem.cpp
+//! @file      GUI/Model/Fit/FitSuiteItem.cpp
 //! @brief     Implements class FitSuiteItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FitParameterItems.h"
-#include "GUI/Models/MinimizerItem.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Fit/FitParameterItems.h"
+#include "GUI/Model/Fit/MinimizerItem.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/Error.h"
 
 FitSuiteItem::FitSuiteItem() : SessionItem(M_TYPE)
 {
diff --git a/GUI/Models/FitSuiteItem.h b/GUI/Model/Fit/FitSuiteItem.h
similarity index 87%
rename from GUI/Models/FitSuiteItem.h
rename to GUI/Model/Fit/FitSuiteItem.h
index d3d6e215274d39eb86fd51df14ec739c70d5207d..ebd8f58ff127e28f05e7c5e9defee3bdea5a370a 100644
--- a/GUI/Models/FitSuiteItem.h
+++ b/GUI/Model/Fit/FitSuiteItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FitSuiteItem.h
+//! @file      GUI/Model/Fit/FitSuiteItem.h
 //! @brief     Defines class FitSuiteItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_FITSUITEITEM_H
-#define BORNAGAIN_GUI_MODELS_FITSUITEITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_FIT_FITSUITEITEM_H
+#define BORNAGAIN_GUI_MODEL_FIT_FITSUITEITEM_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class FitParameterContainerItem;
 class MinimizerContainerItem;
@@ -51,4 +51,4 @@ public:
     void setChi2(double chi2);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_FITSUITEITEM_H
+#endif // BORNAGAIN_GUI_MODEL_FIT_FITSUITEITEM_H
diff --git a/GUI/Models/MinimizerItem.cpp b/GUI/Model/Fit/MinimizerItem.cpp
similarity index 98%
rename from GUI/Models/MinimizerItem.cpp
rename to GUI/Model/Fit/MinimizerItem.cpp
index 819862a5ffed19ee4d0b5a966ae9dd1af75d2571..380d7474f43bff5a4e93f026b2306130ae54aeb3 100644
--- a/GUI/Models/MinimizerItem.cpp
+++ b/GUI/Model/Fit/MinimizerItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MinimizerItem.cpp
+//! @file      GUI/Model/Fit/MinimizerItem.cpp
 //! @brief     Implements MinimizerItem class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/MinimizerItem.h"
+#include "GUI/Model/Fit/MinimizerItem.h"
 #include "Core/Fitting/ObjectiveMetric.h"
 #include "Core/Fitting/ObjectiveMetricUtils.h"
 #include "Fit/Adapter/GSLLevenbergMarquardtMinimizer.h"
@@ -21,8 +21,8 @@
 #include "Fit/Adapter/Minuit2Minimizer.h"
 #include "Fit/Adapter/SimAnMinimizer.h"
 #include "Fit/Minimizer/TestMinimizer.h"
-#include "GUI/Models/GroupInfo.h"
-#include "GUI/Models/MinimizerItemCatalog.h"
+#include "GUI/Model/Fit/MinimizerItemCatalog.h"
+#include "GUI/Model/Group/GroupInfo.h"
 
 namespace {
 
diff --git a/GUI/Models/MinimizerItem.h b/GUI/Model/Fit/MinimizerItem.h
similarity index 94%
rename from GUI/Models/MinimizerItem.h
rename to GUI/Model/Fit/MinimizerItem.h
index 75a443798cc189a5470f433f1b81acaee8c3af2a..2c5b3483fb43638af30ed6a097b4978994a25bc1 100644
--- a/GUI/Models/MinimizerItem.h
+++ b/GUI/Model/Fit/MinimizerItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MinimizerItem.h
+//! @file      GUI/Model/Fit/MinimizerItem.h
 //! @brief     Defines MinimizerItem class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MINIMIZERITEM_H
-#define BORNAGAIN_GUI_MODELS_MINIMIZERITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_FIT_MINIMIZERITEM_H
+#define BORNAGAIN_GUI_MODEL_FIT_MINIMIZERITEM_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class IMinimizer;
 class ObjectiveMetric;
@@ -139,4 +139,4 @@ public:
     std::unique_ptr<IMinimizer> createMinimizer() const;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_MINIMIZERITEM_H
+#endif // BORNAGAIN_GUI_MODEL_FIT_MINIMIZERITEM_H
diff --git a/GUI/Models/MinimizerItemCatalog.cpp b/GUI/Model/Fit/MinimizerItemCatalog.cpp
similarity index 86%
rename from GUI/Models/MinimizerItemCatalog.cpp
rename to GUI/Model/Fit/MinimizerItemCatalog.cpp
index c043e5330f6c81250d9334d050a76d684ee07455..86e574c29068b8bf7ada70254a5d5db251d41b6a 100644
--- a/GUI/Models/MinimizerItemCatalog.cpp
+++ b/GUI/Model/Fit/MinimizerItemCatalog.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MinimizerItemCatalog.cpp
+//! @file      GUI/Model/Fit/MinimizerItemCatalog.cpp
 //! @brief     Implements MinimizerItemCatalog class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/MinimizerItemCatalog.h"
+#include "GUI/Model/Fit/MinimizerItemCatalog.h"
 #include "Fit/Kernel/MinimizerFactory.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Util/String.h"
 
 //! Returns ComboProperty representing list of algorithms defined for given minimizerType.
 
@@ -31,7 +31,7 @@ QStringList MinimizerItemCatalog::algorithmNames(const QString& minimizerType)
 {
     std::vector<std::string> algos =
         MinimizerFactory::catalog().algorithmNames(minimizerType.toStdString());
-    return GUI::Helpers::fromStdStrings(algos);
+    return GUI::Util::String::fromStdStrings(algos);
 }
 
 //! Returns list of algoritm descriptions defined for given minimizer.
@@ -40,5 +40,5 @@ QStringList MinimizerItemCatalog::algorithmDescriptions(const QString& minimizer
 {
     std::vector<std::string> descr =
         MinimizerFactory::catalog().algorithmDescriptions(minimizerType.toStdString());
-    return GUI::Helpers::fromStdStrings(descr);
+    return GUI::Util::String::fromStdStrings(descr);
 }
diff --git a/GUI/Models/MinimizerItemCatalog.h b/GUI/Model/Fit/MinimizerItemCatalog.h
similarity index 79%
rename from GUI/Models/MinimizerItemCatalog.h
rename to GUI/Model/Fit/MinimizerItemCatalog.h
index e166c18e18260393f47236baf4b6ff3600e2b255..c2ff0daadb0ecf6c48bb459a959c7fe982d82a46 100644
--- a/GUI/Models/MinimizerItemCatalog.h
+++ b/GUI/Model/Fit/MinimizerItemCatalog.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MinimizerItemCatalog.h
+//! @file      GUI/Model/Fit/MinimizerItemCatalog.h
 //! @brief     Defines MinimizerItemCatalog class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MINIMIZERITEMCATALOG_H
-#define BORNAGAIN_GUI_MODELS_MINIMIZERITEMCATALOG_H
+#ifndef BORNAGAIN_GUI_MODEL_FIT_MINIMIZERITEMCATALOG_H
+#define BORNAGAIN_GUI_MODEL_FIT_MINIMIZERITEMCATALOG_H
 
-#include "GUI/Models/ComboProperty.h"
+#include "GUI/Util/ComboProperty.h"
 
 class MinimizerItem;
 
@@ -31,4 +31,4 @@ private:
     static QStringList algorithmDescriptions(const QString& minimizerType);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_MINIMIZERITEMCATALOG_H
+#endif // BORNAGAIN_GUI_MODEL_FIT_MINIMIZERITEMCATALOG_H
diff --git a/GUI/Models/ParameterTreeItems.cpp b/GUI/Model/Fit/ParameterTreeItems.cpp
similarity index 89%
rename from GUI/Models/ParameterTreeItems.cpp
rename to GUI/Model/Fit/ParameterTreeItems.cpp
index 825be105aa7ebf80b97514db3f94c0861667f26a..fdb8c67c36f30d98650f08f5887549f9201a7766 100644
--- a/GUI/Models/ParameterTreeItems.cpp
+++ b/GUI/Model/Fit/ParameterTreeItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParameterTreeItems.cpp
+//! @file      GUI/Model/Fit/ParameterTreeItems.cpp
 //! @brief     Implements classes for ParameterTreeItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ParameterTreeItems.h"
-#include "GUI/Models/FitParameterHelper.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/ModelPath.h"
 
 // ----------------------------------------------------------------------------
 
@@ -47,7 +45,7 @@ void ParameterItem::propagateValueToLink(double newValue)
         item->setValue(newValue);
 }
 
-//! Returns corresponding linked item in MultiLayerItem/IsntrumentItem
+//! Returns corresponding linked item in MultiLayerItem/InstrumentItem
 
 SessionItem* ParameterItem::linkedItem()
 {
diff --git a/GUI/Models/ParameterTreeItems.h b/GUI/Model/Fit/ParameterTreeItems.h
similarity index 87%
rename from GUI/Models/ParameterTreeItems.h
rename to GUI/Model/Fit/ParameterTreeItems.h
index 328cf9888c4d0272a97d83afdfb9a125b561e756..f293defdd03b15a3d291c49f08cf58a1fd61c1bb 100644
--- a/GUI/Models/ParameterTreeItems.h
+++ b/GUI/Model/Fit/ParameterTreeItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParameterTreeItems.h
+//! @file      GUI/Model/Fit/ParameterTreeItems.h
 //! @brief     Defines classes for ParameterTreeItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_PARAMETERTREEITEMS_H
-#define BORNAGAIN_GUI_MODELS_PARAMETERTREEITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_FIT_PARAMETERTREEITEMS_H
+#define BORNAGAIN_GUI_MODEL_FIT_PARAMETERTREEITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 //! ParameterTreeItems is a collection of items necessary to form a tuning tree for
 //! real time widget.
@@ -60,4 +60,4 @@ public:
     ParameterContainerItem();
 };
 
-#endif // BORNAGAIN_GUI_MODELS_PARAMETERTREEITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_FIT_PARAMETERTREEITEMS_H
diff --git a/GUI/Models/ParameterTuningModel.cpp b/GUI/Model/Fit/ParameterTuningModel.cpp
similarity index 88%
rename from GUI/Models/ParameterTuningModel.cpp
rename to GUI/Model/Fit/ParameterTuningModel.cpp
index 72e0eb01643bfa8d71ae030546f59f895fca05f4..a54bca28bb10b95ed4f67085cc9caf4d38c10a92 100644
--- a/GUI/Models/ParameterTuningModel.cpp
+++ b/GUI/Model/Fit/ParameterTuningModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParameterTuningModel.cpp
+//! @file      GUI/Model/Fit/ParameterTuningModel.cpp
 //! @brief     Implements class ParameterTuningModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ParameterTuningModel.h"
-#include "GUI/Models/FitParameterHelper.h"
-#include "GUI/Models/ParameterTreeItems.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Fit/ParameterTuningModel.h"
+#include "GUI/Model/Fit/FitParameterHelper.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/Session/SessionModel.h"
 #include <QMimeData>
 
 ParameterTuningModel::ParameterTuningModel(QObject* parent) : FilterPropertyProxy(2, parent) {}
@@ -58,8 +58,7 @@ ParameterItem* ParameterTuningModel::getParameterItem(const QModelIndex& proxyIn
     ASSERT(sessionModel);
 
     QModelIndex sourceIndex = toSourceIndex(proxyIndex);
-    if (sourceIndex.column() == 0) {
+    if (sourceIndex.column() == 0)
         return dynamic_cast<ParameterItem*>(sessionModel->itemForIndex(sourceIndex));
-    }
     return nullptr;
 }
diff --git a/GUI/Models/ParameterTuningModel.h b/GUI/Model/Fit/ParameterTuningModel.h
similarity index 84%
rename from GUI/Models/ParameterTuningModel.h
rename to GUI/Model/Fit/ParameterTuningModel.h
index 7468128bec173516d34edd7aa534d7ea79f2ac21..d0375c46a4a15ce1e5c883dae5cb4f82108965fd 100644
--- a/GUI/Models/ParameterTuningModel.h
+++ b/GUI/Model/Fit/ParameterTuningModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParameterTuningModel.h
+//! @file      GUI/Model/Fit/ParameterTuningModel.h
 //! @brief     Defines class ParameterTuningModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_PARAMETERTUNINGMODEL_H
-#define BORNAGAIN_GUI_MODELS_PARAMETERTUNINGMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_FIT_PARAMETERTUNINGMODEL_H
+#define BORNAGAIN_GUI_MODEL_FIT_PARAMETERTUNINGMODEL_H
 
-#include "GUI/Models/FilterPropertyProxy.h"
+#include "GUI/Model/Group/FilterPropertyProxy.h"
 
 class ParameterItem;
 
@@ -49,4 +49,4 @@ inline Qt::DropActions ParameterTuningModel::supportedDropActions() const
     return Qt::IgnoreAction;
 }
 
-#endif // BORNAGAIN_GUI_MODELS_PARAMETERTUNINGMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_FIT_PARAMETERTUNINGMODEL_H
diff --git a/GUI/Models/DistributionItems.cpp b/GUI/Model/Group/DistributionItems.cpp
similarity index 98%
rename from GUI/Models/DistributionItems.cpp
rename to GUI/Model/Group/DistributionItems.cpp
index ed1a462e89cd682860deb9de12a4246d86f3a1fe..5b842cf197f80cea0d9465c52fd78e04f9fc813b 100644
--- a/GUI/Models/DistributionItems.cpp
+++ b/GUI/Model/Group/DistributionItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DistributionItems.cpp
+//! @file      GUI/Model/Group/DistributionItems.cpp
 //! @brief     Implements class DistributionItem and several subclasses
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DistributionItems.h"
-#include "GUI/Models/GroupInfo.h"
-#include "GUI/Models/RealLimitsItems.h"
+#include "GUI/Model/Group/DistributionItems.h"
+#include "GUI/Model/Group/GroupInfo.h"
+#include "GUI/Model/Session/RealLimitsItems.h"
 #include "Param/Distrib/Distributions.h"
 #include "Param/Distrib/RangedDistributions.h"
 #include <cmath>
diff --git a/GUI/Models/DistributionItems.h b/GUI/Model/Group/DistributionItems.h
similarity index 96%
rename from GUI/Models/DistributionItems.h
rename to GUI/Model/Group/DistributionItems.h
index 2d0aef3d7e86e6b1445b6523d0427db469a15de9..f846f9fb9fb201be29015ce9c2b4239764dfc69e 100644
--- a/GUI/Models/DistributionItems.h
+++ b/GUI/Model/Group/DistributionItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DistributionItems.h
+//! @file      GUI/Model/Group/DistributionItems.h
 //! @brief     Defines class DistributionItem and several subclasses
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DISTRIBUTIONITEMS_H
-#define BORNAGAIN_GUI_MODELS_DISTRIBUTIONITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_GROUP_DISTRIBUTIONITEMS_H
+#define BORNAGAIN_GUI_MODEL_GROUP_DISTRIBUTIONITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class IDistribution1D;
 class IRangedDistribution;
@@ -208,4 +208,4 @@ public:
     void setRightWidth(double right_width);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_DISTRIBUTIONITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_GROUP_DISTRIBUTIONITEMS_H
diff --git a/GUI/Models/FilterPropertyProxy.cpp b/GUI/Model/Group/FilterPropertyProxy.cpp
similarity index 84%
rename from GUI/Models/FilterPropertyProxy.cpp
rename to GUI/Model/Group/FilterPropertyProxy.cpp
index b31fc9e1d1cd132d487f0524484696bb6cb3497a..05ec4a1c6ae93e44fac3f71b6f6592ad23c5e518 100644
--- a/GUI/Models/FilterPropertyProxy.cpp
+++ b/GUI/Model/Group/FilterPropertyProxy.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FilterPropertyProxy.cpp
+//! @file      GUI/Model/Group/FilterPropertyProxy.cpp
 //! @brief     Implements class FilterPropertyProxy
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/FilterPropertyProxy.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Group/FilterPropertyProxy.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Model/Types/VectorItem.h"
 
 int FilterPropertyProxy::columnCount(const QModelIndex& parent) const
 {
diff --git a/GUI/Models/FilterPropertyProxy.h b/GUI/Model/Group/FilterPropertyProxy.h
similarity index 84%
rename from GUI/Models/FilterPropertyProxy.h
rename to GUI/Model/Group/FilterPropertyProxy.h
index 35fe054e0697eb30011a62321880ffa1c8a77545..b2ba9a5586683d2a1faf000c9e877f7482ba2bc9 100644
--- a/GUI/Models/FilterPropertyProxy.h
+++ b/GUI/Model/Group/FilterPropertyProxy.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FilterPropertyProxy.h
+//! @file      GUI/Model/Group/FilterPropertyProxy.h
 //! @brief     Defines class FilterPropertyProxy
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -11,8 +11,8 @@
 //! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
 //
 //  ************************************************************************************************
-#ifndef BORNAGAIN_GUI_MODELS_FILTERPROPERTYPROXY_H
-#define BORNAGAIN_GUI_MODELS_FILTERPROPERTYPROXY_H
+#ifndef BORNAGAIN_GUI_MODEL_GROUP_FILTERPROPERTYPROXY_H
+#define BORNAGAIN_GUI_MODEL_GROUP_FILTERPROPERTYPROXY_H
 
 #include <QSortFilterProxyModel>
 
@@ -40,4 +40,4 @@ private:
     int m_columns;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_FILTERPROPERTYPROXY_H
+#endif // BORNAGAIN_GUI_MODEL_GROUP_FILTERPROPERTYPROXY_H
diff --git a/GUI/Models/GroupInfo.cpp b/GUI/Model/Group/GroupInfo.cpp
similarity index 95%
rename from GUI/Models/GroupInfo.cpp
rename to GUI/Model/Group/GroupInfo.cpp
index d93c2a450388b3898a189d96344742739db70559..3076902f7a34b74b35e601ccd6a30641342babc8 100644
--- a/GUI/Models/GroupInfo.cpp
+++ b/GUI/Model/Group/GroupInfo.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GroupInfo.cpp
+//! @file      GUI/Model/Group/GroupInfo.cpp
 //! @brief     Defines class GroupInfo
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/GroupInfo.h"
-#include "GUI/Models/Error.h"
+#include "GUI/Model/Group/GroupInfo.h"
+#include "GUI/Util/Error.h"
 
 GroupInfo::GroupInfo(bool is_sorted) : is_sorted(is_sorted) {}
 
diff --git a/GUI/Models/GroupInfo.h b/GUI/Model/Group/GroupInfo.h
similarity index 90%
rename from GUI/Models/GroupInfo.h
rename to GUI/Model/Group/GroupInfo.h
index b1ddcae7b95f530e79182062fa6cc8dd649e5754..0657ef5b6effa6a9701e68558a890b296daad7ac 100644
--- a/GUI/Models/GroupInfo.h
+++ b/GUI/Model/Group/GroupInfo.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GroupInfo.h
+//! @file      GUI/Model/Group/GroupInfo.h
 //! @brief     Defines class GroupInfo
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_GROUPINFO_H
-#define BORNAGAIN_GUI_MODELS_GROUPINFO_H
+#ifndef BORNAGAIN_GUI_MODEL_GROUP_GROUPINFO_H
+#define BORNAGAIN_GUI_MODEL_GROUP_GROUPINFO_H
 
-#include "GUI/Models/ItemCatalog.h"
+#include "GUI/Model/Group/ItemCatalog.h"
 #include <QString>
 #include <QStringList>
 #include <QVector>
@@ -67,4 +67,4 @@ private:
     QVector<TypeAndLabel> m_info;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_GROUPINFO_H
+#endif // BORNAGAIN_GUI_MODEL_GROUP_GROUPINFO_H
diff --git a/GUI/Models/GroupItem.cpp b/GUI/Model/Group/GroupItem.cpp
similarity index 94%
rename from GUI/Models/GroupItem.cpp
rename to GUI/Model/Group/GroupItem.cpp
index 8838e66bbadd9dd1c828ba22597a496880bed1bd..f42f75cb97b95cf704113cf9c0c43d4d8c8f05fc 100644
--- a/GUI/Models/GroupItem.cpp
+++ b/GUI/Model/Group/GroupItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GroupItem.cpp
+//! @file      GUI/Model/Group/GroupItem.cpp
 //! @brief     Implements class GroupItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/Error.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/Util/Error.h"
 
 GroupItem::GroupItem() : SessionItem(M_TYPE)
 {
diff --git a/GUI/Models/GroupItem.h b/GUI/Model/Group/GroupItem.h
similarity index 84%
rename from GUI/Models/GroupItem.h
rename to GUI/Model/Group/GroupItem.h
index 96ebbc5f61ae0ad0a7cda3e2239c6c45a870803c..26a99685c454c530fda256cc1785f77d96731782 100644
--- a/GUI/Models/GroupItem.h
+++ b/GUI/Model/Group/GroupItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GroupItem.h
+//! @file      GUI/Model/Group/GroupItem.h
 //! @brief     Defines class GroupItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_GROUPITEM_H
-#define BORNAGAIN_GUI_MODELS_GROUPITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_GROUP_GROUPITEM_H
+#define BORNAGAIN_GUI_MODEL_GROUP_GROUPITEM_H
 
-#include "GUI/Models/GroupInfo.h"
-#include "GUI/Models/GroupItemController.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Group/GroupItemController.h"
+#include "GUI/Model/Session/SessionItem.h"
 #include <memory>
 
 class GroupInfo;
@@ -58,4 +57,4 @@ template <typename T> T* GroupItem::itemOfType() const
     return dynamic_cast<T*>(m_controller->getItemOfType(T::M_TYPE));
 }
 
-#endif // BORNAGAIN_GUI_MODELS_GROUPITEM_H
+#endif // BORNAGAIN_GUI_MODEL_GROUP_GROUPITEM_H
diff --git a/GUI/Models/GroupItemController.cpp b/GUI/Model/Group/GroupItemController.cpp
similarity index 93%
rename from GUI/Models/GroupItemController.cpp
rename to GUI/Model/Group/GroupItemController.cpp
index 2b0107848e061cc21c651c9d1aaa178dce21ef43..2cf71f27a5b4c895f437edfdec8739d4d4f798cd 100644
--- a/GUI/Models/GroupItemController.cpp
+++ b/GUI/Model/Group/GroupItemController.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GroupItemController.cpp
+//! @file      GUI/Model/Group/GroupItemController.cpp
 //! @brief     Implements class GroupItemController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/GroupItemController.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/ItemFactory.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Group/GroupItemController.h"
+#include "GUI/Model/Group/ItemFactory.h"
+#include "GUI/Model/Session/SessionItem.h"
+#include "GUI/Util/ComboProperty.h"
 
 GroupItemController::GroupItemController(SessionItem* groupItem, GroupInfo groupInfo)
     : m_groupItem(groupItem), m_groupInfo(groupInfo)
diff --git a/GUI/Models/GroupItemController.h b/GUI/Model/Group/GroupItemController.h
similarity index 84%
rename from GUI/Models/GroupItemController.h
rename to GUI/Model/Group/GroupItemController.h
index 37f10821c43028ea2fef20529e10177ff2fc91be..2d5faa963405b59c3499903e5d7223f148c73bc7 100644
--- a/GUI/Models/GroupItemController.h
+++ b/GUI/Model/Group/GroupItemController.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GroupItemController.h
+//! @file      GUI/Model/Group/GroupItemController.h
 //! @brief     Defines class GroupItemController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_GROUPITEMCONTROLLER_H
-#define BORNAGAIN_GUI_MODELS_GROUPITEMCONTROLLER_H
+#ifndef BORNAGAIN_GUI_MODEL_GROUP_GROUPITEMCONTROLLER_H
+#define BORNAGAIN_GUI_MODEL_GROUP_GROUPITEMCONTROLLER_H
 
-#include "GUI/Models/GroupInfo.h"
+#include "GUI/Model/Group/GroupInfo.h"
 #include <QStringList>
 #include <QVariant>
 
@@ -52,4 +52,4 @@ private:
     GroupInfo m_groupInfo;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_GROUPITEMCONTROLLER_H
+#endif // BORNAGAIN_GUI_MODEL_GROUP_GROUPITEMCONTROLLER_H
diff --git a/GUI/Models/ItemCatalog.cpp b/GUI/Model/Group/ItemCatalog.cpp
similarity index 88%
rename from GUI/Models/ItemCatalog.cpp
rename to GUI/Model/Group/ItemCatalog.cpp
index d7ea3feeb6a424146bf0f4815700a29914107d3d..43140f80d1636236a6303f2ebd7c4a65952aa569 100644
--- a/GUI/Models/ItemCatalog.cpp
+++ b/GUI/Model/Group/ItemCatalog.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ItemCatalog.cpp
+//! @file      GUI/Model/Group/ItemCatalog.cpp
 //! @brief     Implements class ItemCatalog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,55 +12,54 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ItemCatalog.h"
+#include "GUI/Model/Group/ItemCatalog.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Models/BackgroundItems.h"
-#include "GUI/Models/BeamAngleItems.h"
-#include "GUI/Models/BeamWavelengthItem.h"
-#include "GUI/Models/Data1DViewItem.h"
-#include "GUI/Models/DataProperties.h"
-#include "GUI/Models/DataPropertyContainer.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FTDecayFunctionItems.h"
-#include "GUI/Models/FTDistributionItems.h"
-#include "GUI/Models/FitParameterItems.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/FootprintItems.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/InterferenceItems.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/Lattice2DItems.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/LayerRoughnessItems.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/MaterialDataItems.h"
-#include "GUI/Models/MaterialItem.h"
-#include "GUI/Models/MaterialItemContainer.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/MinimizerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParameterTreeItems.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/PointwiseAxisItem.h"
-#include "GUI/Models/ProjectionItems.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RealLimitsItems.h"
-#include "GUI/Models/RectangularDetectorItem.h"
-#include "GUI/Models/ResolutionFunctionItems.h"
-#include "GUI/Models/RotationItems.h"
-#include "GUI/Models/SimulationOptionsItem.h"
-#include "GUI/Models/SpecularBeamInclinationItem.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/Models/SphericalDetectorItem.h"
-#include "GUI/Models/TransformationItem.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Data/Data1DViewItem.h"
+#include "GUI/Model/Data/DataProperties.h"
+#include "GUI/Model/Data/DataPropertyContainer.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Data/PointwiseAxisItem.h"
+#include "GUI/Model/Data/ProjectionItems.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Fit/FitParameterItems.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Fit/MinimizerItem.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Instrument/BackgroundItems.h"
+#include "GUI/Model/Instrument/BeamAngleItems.h"
+#include "GUI/Model/Instrument/BeamWavelengthItem.h"
+#include "GUI/Model/Instrument/FootprintItems.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/RectangularDetectorItem.h"
+#include "GUI/Model/Instrument/ResolutionFunctionItems.h"
+#include "GUI/Model/Instrument/SpecularBeamInclinationItem.h"
+#include "GUI/Model/Instrument/SphericalDetectorItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Material/MaterialDataItems.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItemContainer.h"
+#include "GUI/Model/Sample/FTDecayFunctionItems.h"
+#include "GUI/Model/Sample/FTDistributionItems.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
+#include "GUI/Model/Sample/Lattice2DItems.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/LayerRoughnessItems.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Session/RealLimitsItems.h"
+#include "GUI/Model/Session/SimulationOptionsItem.h"
+#include "GUI/Model/Trafo/RotationItems.h"
+#include "GUI/Model/Trafo/TransformationItem.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/Util/Error.h"
 
 ItemCatalog::ItemCatalog()
 {
diff --git a/GUI/Models/ItemCatalog.h b/GUI/Model/Group/ItemCatalog.h
similarity index 90%
rename from GUI/Models/ItemCatalog.h
rename to GUI/Model/Group/ItemCatalog.h
index 24fa8aafcd82d7c03b55a725761299b8f17d6401..29923cbb78949b91a6592b9cc65d6614668460ee 100644
--- a/GUI/Models/ItemCatalog.h
+++ b/GUI/Model/Group/ItemCatalog.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ItemCatalog.h
+//! @file      GUI/Model/Group/ItemCatalog.h
 //! @brief     Defines class ItemCatalog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_ITEMCATALOG_H
-#define BORNAGAIN_GUI_MODELS_ITEMCATALOG_H
+#ifndef BORNAGAIN_GUI_MODEL_GROUP_ITEMCATALOG_H
+#define BORNAGAIN_GUI_MODEL_GROUP_ITEMCATALOG_H
 
 #include "Base/Utils/IFactory.h"
 #include <QMap>
@@ -64,4 +64,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_MODELS_ITEMCATALOG_H
+#endif // BORNAGAIN_GUI_MODEL_GROUP_ITEMCATALOG_H
diff --git a/GUI/Models/ItemFactory.cpp b/GUI/Model/Group/ItemFactory.cpp
similarity index 84%
rename from GUI/Models/ItemFactory.cpp
rename to GUI/Model/Group/ItemFactory.cpp
index ef0061d4857259665eab9149a7e096563a616efb..540a6de4a8c79ebac1f126a17dd177c00c2abde2 100644
--- a/GUI/Models/ItemFactory.cpp
+++ b/GUI/Model/Group/ItemFactory.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ItemFactory.cpp
+//! @file      GUI/Model/Group/ItemFactory.cpp
 //! @brief     Implements class ItemFactory
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ItemFactory.h"
-#include "GUI/Models/ItemCatalog.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Group/ItemFactory.h"
+#include "GUI/Model/Group/ItemCatalog.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 SessionItem* GUI::Model::ItemFactory::CreateItem(const QString& model_name, SessionItem* parent)
 {
diff --git a/GUI/Models/ItemFactory.h b/GUI/Model/Group/ItemFactory.h
similarity index 86%
rename from GUI/Models/ItemFactory.h
rename to GUI/Model/Group/ItemFactory.h
index 92046c656bccf2168c9f86418cccaa372a75fc7e..a99c6a17b8d0b2cd0e9248563ec79e3914ee74fd 100644
--- a/GUI/Models/ItemFactory.h
+++ b/GUI/Model/Group/ItemFactory.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ItemFactory.h
+//! @file      GUI/Model/Group/ItemFactory.h
 //! @brief     Defines namespace GUI::Model::ItemFactory
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_ITEMFACTORY_H
-#define BORNAGAIN_GUI_MODELS_ITEMFACTORY_H
+#ifndef BORNAGAIN_GUI_MODEL_GROUP_ITEMFACTORY_H
+#define BORNAGAIN_GUI_MODEL_GROUP_ITEMFACTORY_H
 
 #include <QString>
 
@@ -39,4 +39,4 @@ template <typename ItemType> ItemType* CreateItem(SessionItem* parent)
 
 }; // namespace GUI::Model::ItemFactory
 
-#endif // BORNAGAIN_GUI_MODELS_ITEMFACTORY_H
+#endif // BORNAGAIN_GUI_MODEL_GROUP_ITEMFACTORY_H
diff --git a/GUI/Models/PropertyItem.cpp b/GUI/Model/Group/PropertyItem.cpp
similarity index 87%
rename from GUI/Models/PropertyItem.cpp
rename to GUI/Model/Group/PropertyItem.cpp
index 7081bf8b7352f2caa95a61aeb4d86ca0d9415174..63c5b1c75474882128c64c9982b4b8874db769e0 100644
--- a/GUI/Models/PropertyItem.cpp
+++ b/GUI/Model/Group/PropertyItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/PropertyItem.cpp
+//! @file      GUI/Model/Group/PropertyItem.cpp
 //! @brief     Implements class PropertyItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,6 +12,6 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/PropertyItem.h"
+#include "GUI/Model/Group/PropertyItem.h"
 
 PropertyItem::PropertyItem() : SessionItem(M_TYPE) {}
diff --git a/GUI/Models/PropertyItem.h b/GUI/Model/Group/PropertyItem.h
similarity index 74%
rename from GUI/Models/PropertyItem.h
rename to GUI/Model/Group/PropertyItem.h
index a6d9f3c14b295989fd5ad86acd508e3538fcd69e..d9c30f5b85bdac976e1d6f53400fbcb6626b7ef8 100644
--- a/GUI/Models/PropertyItem.h
+++ b/GUI/Model/Group/PropertyItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/PropertyItem.h
+//! @file      GUI/Model/Group/PropertyItem.h
 //! @brief     Defines class PropertyItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_PROPERTYITEM_H
-#define BORNAGAIN_GUI_MODELS_PROPERTYITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_GROUP_PROPERTYITEM_H
+#define BORNAGAIN_GUI_MODEL_GROUP_PROPERTYITEM_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class BA_CORE_API_ PropertyItem : public SessionItem {
 
@@ -25,4 +25,4 @@ public:
     PropertyItem();
 };
 
-#endif // BORNAGAIN_GUI_MODELS_PROPERTYITEM_H
+#endif // BORNAGAIN_GUI_MODEL_GROUP_PROPERTYITEM_H
diff --git a/GUI/Models/SelectionDescriptor.h b/GUI/Model/Group/SelectionDescriptor.h
similarity index 92%
rename from GUI/Models/SelectionDescriptor.h
rename to GUI/Model/Group/SelectionDescriptor.h
index 43f7a283ce91f197f13765f2fcfe70d252ff0798..54ac83313ae32bccf3d4046db4ce9bdc62996645 100644
--- a/GUI/Models/SelectionDescriptor.h
+++ b/GUI/Model/Group/SelectionDescriptor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SelectionDescriptor.h
+//! @file      GUI/Model/Group/SelectionDescriptor.h
 //! @brief     Defines class SelectionDescriptor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SELECTIONDESCRIPTOR_H
-#define BORNAGAIN_GUI_MODELS_SELECTIONDESCRIPTOR_H
+#ifndef BORNAGAIN_GUI_MODEL_GROUP_SELECTIONDESCRIPTOR_H
+#define BORNAGAIN_GUI_MODEL_GROUP_SELECTIONDESCRIPTOR_H
 
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/GroupItem.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Util/ComboProperty.h"
 #include <QString>
 #include <QStringList>
 #include <functional>
@@ -89,4 +89,4 @@ public:
     function<T()> currentItem;              //!< Function to get currently selected item
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SELECTIONDESCRIPTOR_H
+#endif // BORNAGAIN_GUI_MODEL_GROUP_SELECTIONDESCRIPTOR_H
diff --git a/GUI/Models/AbstractDataLoader.cpp b/GUI/Model/IO/AbstractDataLoader.cpp
similarity index 91%
rename from GUI/Models/AbstractDataLoader.cpp
rename to GUI/Model/IO/AbstractDataLoader.cpp
index 5a2e1e480b5a4706e99674573b805fcb25ffb650..84d605f7d71362e0a7956ed057bdfbd7959674cd 100644
--- a/GUI/Models/AbstractDataLoader.cpp
+++ b/GUI/Model/IO/AbstractDataLoader.cpp
@@ -1,92 +1,92 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      GUI/Models/AbstractDataLoader.cpp
-//! @brief     Implements class AbstractDataLoader
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2021
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#include "GUI/Models/AbstractDataLoader.h"
-#include <QString>
-
-void AbstractDataLoader::populateImportSettingsWidget(QWidget*) {}
-
-void AbstractDataLoader::applyImportSettings() {}
-
-void AbstractDataLoader::initWithDefaultImportSettings() {}
-
-QByteArray AbstractDataLoader::serialize() const
-{
-    return QByteArray();
-}
-
-void AbstractDataLoader::deserialize(const QByteArray&) {}
-
-QByteArray AbstractDataLoader::defaultImportSettings() const
-{
-    std::unique_ptr<AbstractDataLoader> cloned(clone());
-    cloned->initWithDefaultImportSettings();
-    return cloned->serialize();
-}
-
-void AbstractDataLoader::guessSettings() {}
-
-int AbstractDataLoader::numErrors() const
-{
-    return 0;
-}
-
-int AbstractDataLoader::numLineRelatedErrors() const
-{
-    return 0;
-}
-
-QStringList AbstractDataLoader::lineUnrelatedErrors() const
-{
-    return {};
-}
-
-AbstractDataLoaderResultModel* AbstractDataLoader::createResultModel() const
-{
-    return nullptr;
-}
-
-QByteArray AbstractDataLoader::fileContent() const
-{
-    return {};
-}
-
-void AbstractDataLoader::setRealDataItem(RealDataItem* item)
-{
-    m_item = item;
-}
-
-RealDataItem* AbstractDataLoader::realDataItem()
-{
-    return m_item;
-}
-
-const RealDataItem* AbstractDataLoader::realDataItem() const
-{
-    return m_item;
-}
-
-QDataStream& operator<<(QDataStream& stream, const AbstractDataLoader& s)
-{
-    stream << s.serialize();
-    return stream;
-}
-
-QDataStream& operator>>(QDataStream& stream, AbstractDataLoader& s)
-{
-    QByteArray b;
-    stream >> b;
-    s.deserialize(b);
-    return stream;
-}
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/Model/IO/AbstractDataLoader.cpp
+//! @brief     Implements class AbstractDataLoader
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2021
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#include "GUI/Model/IO/AbstractDataLoader.h"
+#include <QString>
+
+void AbstractDataLoader::populateImportSettingsWidget(QWidget*) {}
+
+void AbstractDataLoader::applyImportSettings() {}
+
+void AbstractDataLoader::initWithDefaultImportSettings() {}
+
+QByteArray AbstractDataLoader::serialize() const
+{
+    return QByteArray();
+}
+
+void AbstractDataLoader::deserialize(const QByteArray&) {}
+
+QByteArray AbstractDataLoader::defaultImportSettings() const
+{
+    std::unique_ptr<AbstractDataLoader> cloned(clone());
+    cloned->initWithDefaultImportSettings();
+    return cloned->serialize();
+}
+
+void AbstractDataLoader::guessSettings() {}
+
+int AbstractDataLoader::numErrors() const
+{
+    return 0;
+}
+
+int AbstractDataLoader::numLineRelatedErrors() const
+{
+    return 0;
+}
+
+QStringList AbstractDataLoader::lineUnrelatedErrors() const
+{
+    return {};
+}
+
+AbstractDataLoaderResultModel* AbstractDataLoader::createResultModel() const
+{
+    return nullptr;
+}
+
+QByteArray AbstractDataLoader::fileContent() const
+{
+    return {};
+}
+
+void AbstractDataLoader::setRealDataItem(RealDataItem* item)
+{
+    m_item = item;
+}
+
+RealDataItem* AbstractDataLoader::realDataItem()
+{
+    return m_item;
+}
+
+const RealDataItem* AbstractDataLoader::realDataItem() const
+{
+    return m_item;
+}
+
+QDataStream& operator<<(QDataStream& stream, const AbstractDataLoader& s)
+{
+    stream << s.serialize();
+    return stream;
+}
+
+QDataStream& operator>>(QDataStream& stream, AbstractDataLoader& s)
+{
+    QByteArray b;
+    stream >> b;
+    s.deserialize(b);
+    return stream;
+}
diff --git a/GUI/Models/AbstractDataLoader.h b/GUI/Model/IO/AbstractDataLoader.h
similarity index 95%
rename from GUI/Models/AbstractDataLoader.h
rename to GUI/Model/IO/AbstractDataLoader.h
index 0fec8f288e454f408ef4aaf9e771e5cb2a8ddaf7..f7eaad03773c7cc2020c5fc46e507cfc79d7c425 100644
--- a/GUI/Models/AbstractDataLoader.h
+++ b/GUI/Model/IO/AbstractDataLoader.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/AbstractDataLoader.h
+//! @file      GUI/Model/IO/AbstractDataLoader.h
 //! @brief     Defines class AbstractDataLoader
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_ABSTRACTDATALOADER_H
-#define BORNAGAIN_GUI_MODELS_ABSTRACTDATALOADER_H
+#ifndef BORNAGAIN_GUI_MODEL_IO_ABSTRACTDATALOADER_H
+#define BORNAGAIN_GUI_MODEL_IO_ABSTRACTDATALOADER_H
 
 class QString;
 class QByteArray;
@@ -127,4 +127,4 @@ protected:
 QDataStream& operator<<(QDataStream& stream, const AbstractDataLoader& s);
 QDataStream& operator>>(QDataStream& stream, AbstractDataLoader& s);
 
-#endif // BORNAGAIN_GUI_MODELS_ABSTRACTDATALOADER_H
+#endif // BORNAGAIN_GUI_MODEL_IO_ABSTRACTDATALOADER_H
diff --git a/GUI/Models/AbstractDataLoader1D.h b/GUI/Model/IO/AbstractDataLoader1D.h
similarity index 72%
rename from GUI/Models/AbstractDataLoader1D.h
rename to GUI/Model/IO/AbstractDataLoader1D.h
index 83a1f77933247dc7f9c74d436e8843028086f3be..38cbb0ae518fb5e35fd1e62452a1d1d165b58976 100644
--- a/GUI/Models/AbstractDataLoader1D.h
+++ b/GUI/Model/IO/AbstractDataLoader1D.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/AbstractDataLoader1D.h
+//! @file      GUI/Model/IO/AbstractDataLoader1D.h
 //! @brief     Defines class AbstractDataLoader1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_ABSTRACTDATALOADER1D_H
-#define BORNAGAIN_GUI_MODELS_ABSTRACTDATALOADER1D_H
+#ifndef BORNAGAIN_GUI_MODEL_IO_ABSTRACTDATALOADER1D_H
+#define BORNAGAIN_GUI_MODEL_IO_ABSTRACTDATALOADER1D_H
 
-#include "GUI/Models/AbstractDataLoader.h"
+#include "GUI/Model/IO/AbstractDataLoader.h"
 
 //! Abstract base class for reflectometry data loaders.
 
 class AbstractDataLoader1D : public AbstractDataLoader {
 };
 
-#endif // BORNAGAIN_GUI_MODELS_ABSTRACTDATALOADER1D_H
+#endif // BORNAGAIN_GUI_MODEL_IO_ABSTRACTDATALOADER1D_H
diff --git a/GUI/Models/AbstractDataLoaderResultModel.cpp b/GUI/Model/IO/AbstractDataLoaderResultModel.cpp
similarity index 95%
rename from GUI/Models/AbstractDataLoaderResultModel.cpp
rename to GUI/Model/IO/AbstractDataLoaderResultModel.cpp
index f3e1c06877848950bddd9f15cc6f13a94409df72..eb98668b1f50772b909d95d35e31994f7d0e9f1d 100644
--- a/GUI/Models/AbstractDataLoaderResultModel.cpp
+++ b/GUI/Model/IO/AbstractDataLoaderResultModel.cpp
@@ -1,250 +1,250 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      GUI/Models/AbstractDataLoaderResultModel.cpp
-//! @brief     Implements class AbstractDataLoaderResultModel
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2021
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#include "GUI/Models/AbstractDataLoaderResultModel.h"
-#include <QColor>
-#include <QIcon>
-#include <QVariant>
-
-namespace {
-struct Palette {
-    static QColor backgroundColorFileContent;
-    static QColor backgroundColorRawContent;
-    static QColor backgroundColorProcessedContent;
-    static QColor backgroundColorErrors;
-    static QColor skippedLineTextColor;
-};
-
-QColor Palette::backgroundColorFileContent(239, 237, 248);
-QColor Palette::backgroundColorRawContent(247, 240, 210);
-QColor Palette::backgroundColorProcessedContent(191, 232, 242);
-QColor Palette::backgroundColorErrors(247, 140, 146);
-QColor Palette::skippedLineTextColor(Qt::lightGray);
-
-} // namespace
-
-AbstractDataLoaderResultModel::AbstractDataLoaderResultModel()
-{
-    m_warningIcon = QIcon(":/images/warning_16x16.png");
-}
-
-int AbstractDataLoaderResultModel::columnCount(const QModelIndex& parent /*= QModelIndex()*/) const
-{
-    if (parent.isValid())
-        return 0;
-
-    const auto colTypes = {ColumnType::line, ColumnType::fileContent, ColumnType::raw,
-                           ColumnType::processed, ColumnType::error};
-
-    int cols = 0;
-    for (ColumnType type : colTypes)
-        cols += columnCount(type);
-
-    return cols;
-}
-
-int AbstractDataLoaderResultModel::rowCount(const QModelIndex& parent) const
-{
-    return parent.isValid() ? 0 : rowCount();
-}
-
-QVariant AbstractDataLoaderResultModel::data(const QModelIndex& index,
-                                             int role /*= Qt::DisplayRole*/) const
-{
-    if (!index.isValid())
-        return QVariant();
-
-    const auto colType = columnType(index);
-
-    if (role == Qt::BackgroundRole) {
-        switch (colType) {
-        case ColumnType::line:
-        case ColumnType::fileContent:
-            return Palette::backgroundColorFileContent;
-        case ColumnType::raw:
-            return rowIsSkipped(index) ? QVariant() : Palette::backgroundColorRawContent;
-        case ColumnType::processed:
-            return rowIsSkipped(index) || rowHasError(index)
-                       ? QVariant()
-                       : Palette::backgroundColorProcessedContent;
-        case ColumnType::error:
-            return rowIsSkipped(index) || !rowHasError(index) ? QVariant()
-                                                              : Palette::backgroundColorErrors;
-        default:
-            return QVariant();
-        }
-    }
-
-    if (role == Qt::ForegroundRole) {
-        if (colType == ColumnType::fileContent && rowIsSkipped(index))
-            return Palette::skippedLineTextColor;
-        return QVariant();
-    }
-
-    if (role == Qt::DisplayRole) {
-        switch (colType) {
-        case ColumnType::line:
-            return QString::number(index.row() + 1);
-
-        case ColumnType::fileContent: {
-            QString lineContent =
-                cellText(colType, index.row(), index.column() - firstSectionOfColumnType(colType));
-            lineContent.replace("\t", " --> ");
-            return lineContent;
-        }
-
-        case ColumnType::raw:
-        case ColumnType::error: {
-            if (!rowIsSkipped(index))
-                return cellText(colType, index.row(),
-                                index.column() - firstSectionOfColumnType(colType));
-        } break;
-
-        case ColumnType::processed: {
-            if (!rowIsSkipped(index) && !rowHasError(index))
-                return cellText(colType, index.row(),
-                                index.column() - firstSectionOfColumnType(colType));
-        } break;
-        default:
-            break;
-        }
-
-        return QVariant();
-    }
-
-    if (role == Qt::DecorationRole && (colType == ColumnType::line || colType == ColumnType::error)
-        && rowHasError(index))
-        return m_warningIcon;
-
-    if (role == Qt::TextAlignmentRole && colType == ColumnType::line)
-        return QVariant(Qt::AlignRight | Qt::AlignVCenter);
-
-    if (role == Qt::ToolTipRole && colType == ColumnType::line && rowHasError(index))
-        return cellText(ColumnType::error, index.row(), 0);
-
-    return QVariant();
-}
-
-QVariant AbstractDataLoaderResultModel::headerData(int section, Qt::Orientation orientation,
-                                                   int role) const
-{
-    if (role == Qt::DisplayRole && orientation == Qt::Horizontal) {
-        switch (columnType(section)) {
-        case ColumnType::line:
-            return "Line";
-        case ColumnType::fileContent:
-            return "File content (text)";
-        case ColumnType::raw:
-            return QString("Column %1 raw")
-                .arg(section - firstSectionOfColumnType(ColumnType::raw) + 1);
-        case ColumnType::processed:
-            return headerTextOfCalculatedColumn(section
-                                                - firstSectionOfColumnType(ColumnType::processed));
-        case ColumnType::error:
-            return "Parser warnings";
-        default:
-            return QVariant();
-        }
-    }
-
-    return QAbstractTableModel::headerData(section, orientation, role);
-}
-
-QVector<int> AbstractDataLoaderResultModel::sectionsOfColumnType(ColumnType type) const
-{
-    QVector<int> sections;
-    for (int section = firstSectionOfColumnType(type); section <= lastSectionOfColumnType(type);
-         section++)
-        if (section >= 0)
-            sections << section;
-
-    return sections;
-}
-
-AbstractDataLoaderResultModel::ColumnType
-AbstractDataLoaderResultModel::columnType(int section) const
-{
-    const auto colTypes = {ColumnType::line, ColumnType::fileContent, ColumnType::raw,
-                           ColumnType::processed, ColumnType::error};
-
-    for (ColumnType type : colTypes) {
-        const int firstSection = firstSectionOfColumnType(type);
-        if (firstSection < 0)
-            continue;
-
-        if (section >= firstSection && section <= lastSectionOfColumnType(type))
-            return type;
-    }
-
-    return ColumnType::none;
-}
-
-AbstractDataLoaderResultModel::ColumnType
-AbstractDataLoaderResultModel::columnType(const QModelIndex& index) const
-{
-    return columnType(index.column());
-}
-
-int AbstractDataLoaderResultModel::firstSectionOfColumnType(ColumnType type) const
-{
-    const int lineColumnCount = columnCount(ColumnType::line);
-    const int fileContentColumnCount = columnCount(ColumnType::fileContent);
-
-    if (type == ColumnType::line)
-        return lineColumnCount > 0 ? 0 : -1;
-
-    if (type == ColumnType::fileContent)
-        return columnCount(ColumnType::fileContent) > 0 ? lineColumnCount : -1;
-
-    if (type == ColumnType::raw) {
-        const bool hasRawContent = columnCount(ColumnType::raw) > 0;
-        return hasRawContent ? lineColumnCount + fileContentColumnCount : -1;
-    }
-
-    if (type == ColumnType::processed) {
-        const bool hasProcessedContent = columnCount(ColumnType::processed) > 0;
-        return hasProcessedContent
-                   ? (lineColumnCount + fileContentColumnCount + columnCount(ColumnType::raw))
-                   : -1;
-    }
-
-    if (type == ColumnType::error) {
-        const bool hasParsingErrors = columnCount(ColumnType::error) > 0;
-        return hasParsingErrors
-                   ? (lineColumnCount + fileContentColumnCount + columnCount(ColumnType::raw)
-                      + columnCount(ColumnType::processed))
-                   : -1;
-    }
-
-    return -1;
-}
-
-int AbstractDataLoaderResultModel::lastSectionOfColumnType(ColumnType type) const
-{
-    const int firstSection = firstSectionOfColumnType(type);
-    if (firstSection == -1)
-        return -1;
-
-    return firstSection + columnCount(type) - 1;
-}
-
-bool AbstractDataLoaderResultModel::rowIsSkipped(const QModelIndex& index) const
-{
-    return rowIsSkipped(index.row());
-}
-
-bool AbstractDataLoaderResultModel::rowHasError(const QModelIndex& index) const
-{
-    return rowHasError(index.row());
-}
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/Model/IO/AbstractDataLoaderResultModel.cpp
+//! @brief     Implements class AbstractDataLoaderResultModel
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2021
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#include "GUI/Model/IO/AbstractDataLoaderResultModel.h"
+#include <QColor>
+#include <QIcon>
+#include <QVariant>
+
+namespace {
+struct Palette {
+    static QColor backgroundColorFileContent;
+    static QColor backgroundColorRawContent;
+    static QColor backgroundColorProcessedContent;
+    static QColor backgroundColorErrors;
+    static QColor skippedLineTextColor;
+};
+
+QColor Palette::backgroundColorFileContent(239, 237, 248);
+QColor Palette::backgroundColorRawContent(247, 240, 210);
+QColor Palette::backgroundColorProcessedContent(191, 232, 242);
+QColor Palette::backgroundColorErrors(247, 140, 146);
+QColor Palette::skippedLineTextColor(Qt::lightGray);
+
+} // namespace
+
+AbstractDataLoaderResultModel::AbstractDataLoaderResultModel()
+{
+    m_warningIcon = QIcon(":/images/warning_16x16.png");
+}
+
+int AbstractDataLoaderResultModel::columnCount(const QModelIndex& parent /*= QModelIndex()*/) const
+{
+    if (parent.isValid())
+        return 0;
+
+    const auto colTypes = {ColumnType::line, ColumnType::fileContent, ColumnType::raw,
+                           ColumnType::processed, ColumnType::error};
+
+    int cols = 0;
+    for (ColumnType type : colTypes)
+        cols += columnCount(type);
+
+    return cols;
+}
+
+int AbstractDataLoaderResultModel::rowCount(const QModelIndex& parent) const
+{
+    return parent.isValid() ? 0 : rowCount();
+}
+
+QVariant AbstractDataLoaderResultModel::data(const QModelIndex& index,
+                                             int role /*= Qt::DisplayRole*/) const
+{
+    if (!index.isValid())
+        return QVariant();
+
+    const auto colType = columnType(index);
+
+    if (role == Qt::BackgroundRole) {
+        switch (colType) {
+        case ColumnType::line:
+        case ColumnType::fileContent:
+            return Palette::backgroundColorFileContent;
+        case ColumnType::raw:
+            return rowIsSkipped(index) ? QVariant() : Palette::backgroundColorRawContent;
+        case ColumnType::processed:
+            return rowIsSkipped(index) || rowHasError(index)
+                       ? QVariant()
+                       : Palette::backgroundColorProcessedContent;
+        case ColumnType::error:
+            return rowIsSkipped(index) || !rowHasError(index) ? QVariant()
+                                                              : Palette::backgroundColorErrors;
+        default:
+            return QVariant();
+        }
+    }
+
+    if (role == Qt::ForegroundRole) {
+        if (colType == ColumnType::fileContent && rowIsSkipped(index))
+            return Palette::skippedLineTextColor;
+        return QVariant();
+    }
+
+    if (role == Qt::DisplayRole) {
+        switch (colType) {
+        case ColumnType::line:
+            return QString::number(index.row() + 1);
+
+        case ColumnType::fileContent: {
+            QString lineContent =
+                cellText(colType, index.row(), index.column() - firstSectionOfColumnType(colType));
+            lineContent.replace("\t", " --> ");
+            return lineContent;
+        }
+
+        case ColumnType::raw:
+        case ColumnType::error: {
+            if (!rowIsSkipped(index))
+                return cellText(colType, index.row(),
+                                index.column() - firstSectionOfColumnType(colType));
+        } break;
+
+        case ColumnType::processed: {
+            if (!rowIsSkipped(index) && !rowHasError(index))
+                return cellText(colType, index.row(),
+                                index.column() - firstSectionOfColumnType(colType));
+        } break;
+        default:
+            break;
+        }
+
+        return QVariant();
+    }
+
+    if (role == Qt::DecorationRole && (colType == ColumnType::line || colType == ColumnType::error)
+        && rowHasError(index))
+        return m_warningIcon;
+
+    if (role == Qt::TextAlignmentRole && colType == ColumnType::line)
+        return QVariant(Qt::AlignRight | Qt::AlignVCenter);
+
+    if (role == Qt::ToolTipRole && colType == ColumnType::line && rowHasError(index))
+        return cellText(ColumnType::error, index.row(), 0);
+
+    return QVariant();
+}
+
+QVariant AbstractDataLoaderResultModel::headerData(int section, Qt::Orientation orientation,
+                                                   int role) const
+{
+    if (role == Qt::DisplayRole && orientation == Qt::Horizontal) {
+        switch (columnType(section)) {
+        case ColumnType::line:
+            return "Line";
+        case ColumnType::fileContent:
+            return "File content (text)";
+        case ColumnType::raw:
+            return QString("Column %1 raw")
+                .arg(section - firstSectionOfColumnType(ColumnType::raw) + 1);
+        case ColumnType::processed:
+            return headerTextOfCalculatedColumn(section
+                                                - firstSectionOfColumnType(ColumnType::processed));
+        case ColumnType::error:
+            return "Parser warnings";
+        default:
+            return QVariant();
+        }
+    }
+
+    return QAbstractTableModel::headerData(section, orientation, role);
+}
+
+QVector<int> AbstractDataLoaderResultModel::sectionsOfColumnType(ColumnType type) const
+{
+    QVector<int> sections;
+    for (int section = firstSectionOfColumnType(type); section <= lastSectionOfColumnType(type);
+         section++)
+        if (section >= 0)
+            sections << section;
+
+    return sections;
+}
+
+AbstractDataLoaderResultModel::ColumnType
+AbstractDataLoaderResultModel::columnType(int section) const
+{
+    const auto colTypes = {ColumnType::line, ColumnType::fileContent, ColumnType::raw,
+                           ColumnType::processed, ColumnType::error};
+
+    for (ColumnType type : colTypes) {
+        const int firstSection = firstSectionOfColumnType(type);
+        if (firstSection < 0)
+            continue;
+
+        if (section >= firstSection && section <= lastSectionOfColumnType(type))
+            return type;
+    }
+
+    return ColumnType::none;
+}
+
+AbstractDataLoaderResultModel::ColumnType
+AbstractDataLoaderResultModel::columnType(const QModelIndex& index) const
+{
+    return columnType(index.column());
+}
+
+int AbstractDataLoaderResultModel::firstSectionOfColumnType(ColumnType type) const
+{
+    const int lineColumnCount = columnCount(ColumnType::line);
+    const int fileContentColumnCount = columnCount(ColumnType::fileContent);
+
+    if (type == ColumnType::line)
+        return lineColumnCount > 0 ? 0 : -1;
+
+    if (type == ColumnType::fileContent)
+        return columnCount(ColumnType::fileContent) > 0 ? lineColumnCount : -1;
+
+    if (type == ColumnType::raw) {
+        const bool hasRawContent = columnCount(ColumnType::raw) > 0;
+        return hasRawContent ? lineColumnCount + fileContentColumnCount : -1;
+    }
+
+    if (type == ColumnType::processed) {
+        const bool hasProcessedContent = columnCount(ColumnType::processed) > 0;
+        return hasProcessedContent
+                   ? (lineColumnCount + fileContentColumnCount + columnCount(ColumnType::raw))
+                   : -1;
+    }
+
+    if (type == ColumnType::error) {
+        const bool hasParsingErrors = columnCount(ColumnType::error) > 0;
+        return hasParsingErrors
+                   ? (lineColumnCount + fileContentColumnCount + columnCount(ColumnType::raw)
+                      + columnCount(ColumnType::processed))
+                   : -1;
+    }
+
+    return -1;
+}
+
+int AbstractDataLoaderResultModel::lastSectionOfColumnType(ColumnType type) const
+{
+    const int firstSection = firstSectionOfColumnType(type);
+    if (firstSection == -1)
+        return -1;
+
+    return firstSection + columnCount(type) - 1;
+}
+
+bool AbstractDataLoaderResultModel::rowIsSkipped(const QModelIndex& index) const
+{
+    return rowIsSkipped(index.row());
+}
+
+bool AbstractDataLoaderResultModel::rowHasError(const QModelIndex& index) const
+{
+    return rowHasError(index.row());
+}
diff --git a/GUI/Models/AbstractDataLoaderResultModel.h b/GUI/Model/IO/AbstractDataLoaderResultModel.h
similarity index 94%
rename from GUI/Models/AbstractDataLoaderResultModel.h
rename to GUI/Model/IO/AbstractDataLoaderResultModel.h
index 12624f0ae047039889c400e6a1f2ef0623475628..c3544e0c389122e0f3b33e88eae1e31b6078b34d 100644
--- a/GUI/Models/AbstractDataLoaderResultModel.h
+++ b/GUI/Model/IO/AbstractDataLoaderResultModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/AbstractDataLoaderResultModel.h
+//! @file      GUI/Model/IO/AbstractDataLoaderResultModel.h
 //! @brief     Defines class AbstractDataLoaderResultModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_ABSTRACTDATALOADERRESULTMODEL_H
-#define BORNAGAIN_GUI_MODELS_ABSTRACTDATALOADERRESULTMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_IO_ABSTRACTDATALOADERRESULTMODEL_H
+#define BORNAGAIN_GUI_MODEL_IO_ABSTRACTDATALOADERRESULTMODEL_H
 
 #include <QAbstractItemModel>
 #include <QIcon>
@@ -93,4 +93,4 @@ private:
     QIcon m_warningIcon;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_ABSTRACTDATALOADERRESULTMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_IO_ABSTRACTDATALOADERRESULTMODEL_H
diff --git a/GUI/Models/DataLoaders1D.cpp b/GUI/Model/IO/DataLoaders1D.cpp
similarity index 92%
rename from GUI/Models/DataLoaders1D.cpp
rename to GUI/Model/IO/DataLoaders1D.cpp
index 3408e581819616118ec7349c711c83ecc79f5958..fe23e2c0fab7ec1b073904896fa7a8c394407529 100644
--- a/GUI/Models/DataLoaders1D.cpp
+++ b/GUI/Model/IO/DataLoaders1D.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataLoaders1D.cpp
+//! @file      GUI/Model/IO/DataLoaders1D.cpp
 //! @brief     Implements class DataLoaders1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DataLoaders1D.h"
-#include "GUI/Models/AbstractDataLoader1D.h"
+#include "GUI/Model/IO/DataLoaders1D.h"
+#include "GUI/Model/IO/AbstractDataLoader1D.h"
 
 DataLoaders1D::~DataLoaders1D()
 {
diff --git a/GUI/Models/DataLoaders1D.h b/GUI/Model/IO/DataLoaders1D.h
similarity index 92%
rename from GUI/Models/DataLoaders1D.h
rename to GUI/Model/IO/DataLoaders1D.h
index a82690dc38df84e6c9a9f6db99f51a04098cfe82..77b859647aad6509afa74e316f4647fe306446b8 100644
--- a/GUI/Models/DataLoaders1D.h
+++ b/GUI/Model/IO/DataLoaders1D.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DataLoaders1D.h
+//! @file      GUI/Model/IO/DataLoaders1D.h
 //! @brief     Defines class DataLoaders1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DATALOADERS1D_H
-#define BORNAGAIN_GUI_MODELS_DATALOADERS1D_H
+#ifndef BORNAGAIN_GUI_MODEL_IO_DATALOADERS1D_H
+#define BORNAGAIN_GUI_MODEL_IO_DATALOADERS1D_H
 
 #include <QVector>
 
@@ -65,4 +65,4 @@ private:
     std::map<QString, std::function<AbstractDataLoader1D*()>> m_createLoaders;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_DATALOADERS1D_H
+#endif // BORNAGAIN_GUI_MODEL_IO_DATALOADERS1D_H
diff --git a/GUI/Models/ItemFileNameUtils.cpp b/GUI/Model/IO/ItemFileNameUtils.cpp
similarity index 60%
rename from GUI/Models/ItemFileNameUtils.cpp
rename to GUI/Model/IO/ItemFileNameUtils.cpp
index 5bd19c8d3b53e2085cffe2b10ab2328cf560ac2d..9e10e87eae08b30b10d1790b2b1d1321af2bef25 100644
--- a/GUI/Models/ItemFileNameUtils.cpp
+++ b/GUI/Model/IO/ItemFileNameUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ItemFileNameUtils.cpp
+//! @file      GUI/Model/IO/ItemFileNameUtils.cpp
 //! @brief     Defines auxiliary functions in ItemFileNameUtils namespace.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ItemFileNameUtils.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/IO/ItemFileNameUtils.h"
+#include "GUI/Util/Path.h"
 
 namespace {
+
 const QString jobdata_file_prefix = "jobdata";
 const QString refdata_file_prefix = "refdata";
 const QString realdata_file_prefix = "realdata";
@@ -26,43 +24,49 @@ const QString instrument_file_prefix = "instrdata";
 const QString nativedata_file_prefix = "nativedata";
 
 //! Constructs the name of the file for intensity data.
-QString intensityDataFileName(const QString& itemName, const QString& prefix);
+QString intensityDataFileName(const QString& itemName, const QString& prefix)
+{
+    QString bodyName = GUI::Util::Path::getValidFileName(itemName);
+    return QString("%1_%2_0.int.gz").arg(prefix).arg(bodyName);
+}
+
 } // namespace
 
+
 //! Constructs the name of the file with simulated intensities.
 
-QString GUI::Model::FilenameUtils::jobResultsFileName(const JobItem& jobItem)
+QString GUI::Model::FilenameUtils::jobResultsFileName(const QString& itemName)
 {
-    return intensityDataFileName(jobItem.itemName(), jobdata_file_prefix);
+    return intensityDataFileName(itemName, jobdata_file_prefix);
 }
 
 //! Constructs the name of the file with reference data.
 
-QString GUI::Model::FilenameUtils::jobReferenceFileName(const JobItem& jobItem)
+QString GUI::Model::FilenameUtils::jobReferenceFileName(const QString& itemName)
 {
-    return intensityDataFileName(jobItem.itemName(), refdata_file_prefix);
+    return intensityDataFileName(itemName, refdata_file_prefix);
 }
 
-QString GUI::Model::FilenameUtils::jobNativeDataFileName(const JobItem& jobItem)
+QString GUI::Model::FilenameUtils::jobNativeDataFileName(const QString& id)
 {
-    return intensityDataFileName(jobItem.getIdentifier(), nativedata_file_prefix);
+    return intensityDataFileName(id, nativedata_file_prefix);
 }
 
 //! Constructs the name of the intensity file belonging to real data item.
 
-QString GUI::Model::FilenameUtils::realDataFileName(const RealDataItem& realDataItem)
+QString GUI::Model::FilenameUtils::realDataFileName(const QString& dataName)
 {
-    return intensityDataFileName(realDataItem.dataName(), realdata_file_prefix);
+    return intensityDataFileName(dataName, realdata_file_prefix);
 }
 
-QString GUI::Model::FilenameUtils::nativeDataFileName(const RealDataItem& realDataItem)
+QString GUI::Model::FilenameUtils::nativeDataFileName(const QString& dataName)
 {
-    return intensityDataFileName(realDataItem.dataName(), nativedata_file_prefix);
+    return intensityDataFileName(dataName, nativedata_file_prefix);
 }
 
-QString GUI::Model::FilenameUtils::instrumentDataFileName(const InstrumentItem& instrumentItem)
+QString GUI::Model::FilenameUtils::instrumentDataFileName(const QString& id)
 {
-    return intensityDataFileName(instrumentItem.id(), instrument_file_prefix);
+    return intensityDataFileName(id, instrument_file_prefix);
 }
 
 //! Returns list of fileName filters related to nonXML data stored by JobModel and RealDataModel.
@@ -77,11 +81,3 @@ QStringList GUI::Model::FilenameUtils::nonXMLFileNameFilters()
 
     return result;
 }
-
-namespace {
-QString intensityDataFileName(const QString& itemName, const QString& prefix)
-{
-    QString bodyName = GUI::Helpers::getValidFileName(itemName);
-    return QString("%1_%2_0.int.gz").arg(prefix).arg(bodyName);
-}
-} // namespace
diff --git a/GUI/Models/ItemFileNameUtils.h b/GUI/Model/IO/ItemFileNameUtils.h
similarity index 55%
rename from GUI/Models/ItemFileNameUtils.h
rename to GUI/Model/IO/ItemFileNameUtils.h
index ffd5bdc3a67894949ae9c6824d0be377f8df3fdd..37f9e3049ea586d24709b84bba743181d21b7189 100644
--- a/GUI/Models/ItemFileNameUtils.h
+++ b/GUI/Model/IO/ItemFileNameUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ItemFileNameUtils.h
+//! @file      GUI/Model/IO/ItemFileNameUtils.h
 //! @brief     Defines namespace GUI::Model::FilenameUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,33 +12,29 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_ITEMFILENAMEUTILS_H
-#define BORNAGAIN_GUI_MODELS_ITEMFILENAMEUTILS_H
+#ifndef BORNAGAIN_GUI_MODEL_IO_ITEMFILENAMEUTILS_H
+#define BORNAGAIN_GUI_MODEL_IO_ITEMFILENAMEUTILS_H
 
-#include <QString>
-
-class InstrumentItem;
-class JobItem;
-class RealDataItem;
+#include <QStringList>
 
 //! Contains set of convenience methods for JobItem and its children.
 
 namespace GUI::Model::FilenameUtils {
 
-QString jobResultsFileName(const JobItem& jobItem);
+QString jobResultsFileName(const QString& itemName);
 
-QString jobReferenceFileName(const JobItem& jobItem);
+QString jobReferenceFileName(const QString& itemName);
 
-QString jobNativeDataFileName(const JobItem& jobItem);
+QString jobNativeDataFileName(const QString& id);
 
-QString realDataFileName(const RealDataItem& realDataItem);
+QString realDataFileName(const QString& dataName);
 
-QString nativeDataFileName(const RealDataItem& realDataItem);
+QString nativeDataFileName(const QString& dataName);
 
-QString instrumentDataFileName(const InstrumentItem& instrumentItem);
+QString instrumentDataFileName(const QString& id);
 
 QStringList nonXMLFileNameFilters();
 
 } // namespace GUI::Model::FilenameUtils
 
-#endif // BORNAGAIN_GUI_MODELS_ITEMFILENAMEUTILS_H
+#endif // BORNAGAIN_GUI_MODEL_IO_ITEMFILENAMEUTILS_H
diff --git a/GUI/mainwindow/OutputDataIOHistory.cpp b/GUI/Model/IO/OutputDataIOHistory.cpp
similarity index 95%
rename from GUI/mainwindow/OutputDataIOHistory.cpp
rename to GUI/Model/IO/OutputDataIOHistory.cpp
index 4a00a16575676469448ae801de1351c30bbd669c..ca8b2a6286d1b0e909e32e49503af12ca87a7593 100644
--- a/GUI/mainwindow/OutputDataIOHistory.cpp
+++ b/GUI/Model/IO/OutputDataIOHistory.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/OutputDataIOHistory.cpp
+//! @file      GUI/Model/IO/OutputDataIOHistory.cpp
 //! @brief     Defines OutputDataIOHistory classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/OutputDataIOHistory.h"
+#include "GUI/Model/IO/OutputDataIOHistory.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/SaveLoadInterface.h"
+#include "GUI/Model/IO/SaveLoadInterface.h"
+#include "GUI/Util/Error.h"
 
 //! Static method to create info for just saved item.
 
diff --git a/GUI/mainwindow/OutputDataIOHistory.h b/GUI/Model/IO/OutputDataIOHistory.h
similarity index 90%
rename from GUI/mainwindow/OutputDataIOHistory.h
rename to GUI/Model/IO/OutputDataIOHistory.h
index 189eeae3d68c062844619eed5a6e82e47f6055c1..b34d8fb902e68fd4ec0eb782badcd0cb70d08ad2 100644
--- a/GUI/mainwindow/OutputDataIOHistory.h
+++ b/GUI/Model/IO/OutputDataIOHistory.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/OutputDataIOHistory.h
+//! @file      GUI/Model/IO/OutputDataIOHistory.h
 //! @brief     Defines OutputDataIOHistory classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_OUTPUTDATAIOHISTORY_H
-#define BORNAGAIN_GUI_MAINWINDOW_OUTPUTDATAIOHISTORY_H
+#ifndef BORNAGAIN_GUI_MODEL_IO_OUTPUTDATAIOHISTORY_H
+#define BORNAGAIN_GUI_MODEL_IO_OUTPUTDATAIOHISTORY_H
 
 #include <QDateTime>
 #include <QMap>
@@ -80,4 +80,4 @@ private:
     QMap<QString, OutputDataDirHistory> m_dir_history;
 };
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_OUTPUTDATAIOHISTORY_H
+#endif // BORNAGAIN_GUI_MODEL_IO_OUTPUTDATAIOHISTORY_H
diff --git a/GUI/utils/OutputDataUtils.cpp b/GUI/Model/IO/OutputDataUtils.cpp
similarity index 83%
rename from GUI/utils/OutputDataUtils.cpp
rename to GUI/Model/IO/OutputDataUtils.cpp
index 926971276a972cd815c9372a55e6ceead4797234..85d16d187839fc54293b038c243e478f07753508 100644
--- a/GUI/utils/OutputDataUtils.cpp
+++ b/GUI/Model/IO/OutputDataUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/OutputDataUtils.cpp
+//! @file      GUI/Model/IO/OutputDataUtils.cpp
 //! @brief     Implements OutputDataUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/utils/OutputDataUtils.h"
+#include "GUI/Model/IO/OutputDataUtils.h"
 #include "Device/Data/OutputData.h"
 
-std::unique_ptr<OutputData<double>> GUI::Utils::Output::binifyAxes(const OutputData<double>& data)
+std::unique_ptr<OutputData<double>> GUI::Util::Output::binifyAxes(const OutputData<double>& data)
 {
     std::unique_ptr<OutputData<double>> result(new OutputData<double>);
     for (size_t i = 0; i < data.rank(); ++i) {
diff --git a/GUI/utils/OutputDataUtils.h b/GUI/Model/IO/OutputDataUtils.h
similarity index 70%
rename from GUI/utils/OutputDataUtils.h
rename to GUI/Model/IO/OutputDataUtils.h
index 1cabfa3d9a96c08549331bebd2ccf623ad0f60b2..90a9b5b61c719116459fc6372ce164a21fbd96cc 100644
--- a/GUI/utils/OutputDataUtils.h
+++ b/GUI/Model/IO/OutputDataUtils.h
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/OutputDataUtils.h
-//! @brief     Defines namespace GUI::Utils::Output
+//! @file      GUI/Model/IO/OutputDataUtils.h
+//! @brief     Defines namespace GUI::Util::Output
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_UTILS_OUTPUTDATAUTILS_H
-#define BORNAGAIN_GUI_UTILS_OUTPUTDATAUTILS_H
+#ifndef BORNAGAIN_GUI_MODEL_IO_OUTPUTDATAUTILS_H
+#define BORNAGAIN_GUI_MODEL_IO_OUTPUTDATAUTILS_H
 
 #include <memory>
 
@@ -21,11 +21,11 @@ template <class T> class OutputData;
 
 //! Provides utility methods for output data.
 
-namespace GUI::Utils::Output {
+namespace GUI::Util::Output {
 
 //! Creates OutputData with bin-valued axes.
 std::unique_ptr<OutputData<double>> binifyAxes(const OutputData<double>& data);
 
-} // namespace GUI::Utils::Output
+} // namespace GUI::Util::Output
 
-#endif // BORNAGAIN_GUI_UTILS_OUTPUTDATAUTILS_H
+#endif // BORNAGAIN_GUI_MODEL_IO_OUTPUTDATAUTILS_H
diff --git a/GUI/mainwindow/ProjectUtils.cpp b/GUI/Model/IO/ProjectUtils.cpp
similarity index 87%
rename from GUI/mainwindow/ProjectUtils.cpp
rename to GUI/Model/IO/ProjectUtils.cpp
index 06e7d9ae2dbc4bb88bf42ad3b8ceef1178d9f234..87dcffd307b54f261f1c8242f438a28fbd6b5f08 100644
--- a/GUI/mainwindow/ProjectUtils.cpp
+++ b/GUI/Model/IO/ProjectUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/ProjectUtils.cpp
+//! @file      GUI/Model/IO/ProjectUtils.cpp
 //! @brief     Implements ProjectUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/Model/IO/ProjectUtils.h"
 #include <QFileInfo>
 
 QString GUI::Project::Utils::projectName(const QString& projectFileName)
@@ -38,8 +37,7 @@ QString GUI::Project::Utils::autosaveDir(const QString& projectFileName)
 
 QString GUI::Project::Utils::autosaveName(const QString& projectFileName)
 {
-    return autosaveDir(projectFileName) + "/" + projectName(projectFileName)
-           + ProjectDocument::projectFileExtension();
+    return autosaveDir(projectFileName) + "/" + projectName(projectFileName) + projectFileExtension;
 }
 
 bool GUI::Project::Utils::hasAutosavedData(const QString& projectFileName)
diff --git a/GUI/mainwindow/ProjectUtils.h b/GUI/Model/IO/ProjectUtils.h
similarity index 86%
rename from GUI/mainwindow/ProjectUtils.h
rename to GUI/Model/IO/ProjectUtils.h
index 41fff8d50c6c0cda3f3188919dad17d7eeb0cfaa..b920030dc85899e61d8c300e6cafa3593c36ec0a 100644
--- a/GUI/mainwindow/ProjectUtils.h
+++ b/GUI/Model/IO/ProjectUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/ProjectUtils.h
+//! @file      GUI/Model/IO/ProjectUtils.h
 //! @brief     Defines namespace GUI::Project::Utils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_PROJECTUTILS_H
-#define BORNAGAIN_GUI_MAINWINDOW_PROJECTUTILS_H
+#ifndef BORNAGAIN_GUI_MODEL_IO_PROJECTUTILS_H
+#define BORNAGAIN_GUI_MODEL_IO_PROJECTUTILS_H
 
 #include <QString>
 
@@ -21,6 +21,8 @@
 
 namespace GUI::Project::Utils {
 
+inline constexpr const char* projectFileExtension{".pro"};
+
 //! Returns project name deduced from project file name.
 QString projectName(const QString& projectFileName);
 
@@ -44,4 +46,4 @@ bool hasAutosavedData(const QString& projectFileName);
 
 } // namespace GUI::Project::Utils
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_PROJECTUTILS_H
+#endif // BORNAGAIN_GUI_MODEL_IO_PROJECTUTILS_H
diff --git a/GUI/Models/SaveLoadInterface.cpp b/GUI/Model/IO/SaveLoadInterface.cpp
similarity index 89%
rename from GUI/Models/SaveLoadInterface.cpp
rename to GUI/Model/IO/SaveLoadInterface.cpp
index 4433e370be968225fa11aabd14e24900d95640de..67c8f40dd1529ba52f3dbf096bcc13e9e1031a0e 100644
--- a/GUI/Models/SaveLoadInterface.cpp
+++ b/GUI/Model/IO/SaveLoadInterface.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SaveLoadInterface.cpp
+//! @file      GUI/Model/IO/SaveLoadInterface.cpp
 //! @brief     Impelments save/load interface.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SaveLoadInterface.h"
+#include "GUI/Model/IO/SaveLoadInterface.h"
 #include "Base/Utils/FileSystemUtils.h"
 
 QString SaveLoadInterface::fileName(const QString& projectDir) const
diff --git a/GUI/Models/SaveLoadInterface.h b/GUI/Model/IO/SaveLoadInterface.h
similarity index 87%
rename from GUI/Models/SaveLoadInterface.h
rename to GUI/Model/IO/SaveLoadInterface.h
index f1c691d678ed2a0b887f545fe6b63785cddbbf46..ce4f6baab4e6744f4db0c8762d453a8ad9bd3800 100644
--- a/GUI/Models/SaveLoadInterface.h
+++ b/GUI/Model/IO/SaveLoadInterface.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SaveLoadInterface.h
+//! @file      GUI/Model/IO/SaveLoadInterface.h
 //! @brief     Defines save/load interface.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SAVELOADINTERFACE_H
-#define BORNAGAIN_GUI_MODELS_SAVELOADINTERFACE_H
+#ifndef BORNAGAIN_GUI_MODEL_IO_SAVELOADINTERFACE_H
+#define BORNAGAIN_GUI_MODEL_IO_SAVELOADINTERFACE_H
 
 #include <QDateTime>
 #include <QString>
@@ -45,4 +45,4 @@ public:
     QString fileName(const QString& projectDir) const;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SAVELOADINTERFACE_H
+#endif // BORNAGAIN_GUI_MODEL_IO_SAVELOADINTERFACE_H
diff --git a/GUI/Models/BackgroundItems.cpp b/GUI/Model/Instrument/BackgroundItems.cpp
similarity index 95%
rename from GUI/Models/BackgroundItems.cpp
rename to GUI/Model/Instrument/BackgroundItems.cpp
index 7c6ecf746c4d9aeec40fce86630eb11491f867c0..f2abd0df7f7a05a33dbd5fe6d100470115adb880 100644
--- a/GUI/Models/BackgroundItems.cpp
+++ b/GUI/Model/Instrument/BackgroundItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/BackgroundItems.cpp
+//! @file      GUI/Model/Instrument/BackgroundItems.cpp
 //! @brief     Implements BackgroundItem classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/BackgroundItems.h"
+#include "GUI/Model/Instrument/BackgroundItems.h"
 #include "Core/Background/ConstantBackground.h"
 #include "Core/Background/PoissonNoiseBackground.h"
 
diff --git a/GUI/Models/BackgroundItems.h b/GUI/Model/Instrument/BackgroundItems.h
similarity index 85%
rename from GUI/Models/BackgroundItems.h
rename to GUI/Model/Instrument/BackgroundItems.h
index 7ea751540e1f0c3934da12fe6434cc3dc44f3d13..1af041e96e578ebe480bc90f169d8fec0e54b7ad 100644
--- a/GUI/Models/BackgroundItems.h
+++ b/GUI/Model/Instrument/BackgroundItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/BackgroundItems.h
+//! @file      GUI/Model/Instrument/BackgroundItems.h
 //! @brief     Defines BackgroundItem classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_BACKGROUNDITEMS_H
-#define BORNAGAIN_GUI_MODELS_BACKGROUNDITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_BACKGROUNDITEMS_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_BACKGROUNDITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class IBackground;
 
@@ -56,4 +56,4 @@ public:
     std::unique_ptr<IBackground> createBackground() const;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_BACKGROUNDITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_BACKGROUNDITEMS_H
diff --git a/GUI/Models/BeamAngleItems.cpp b/GUI/Model/Instrument/BeamAngleItems.cpp
similarity index 95%
rename from GUI/Models/BeamAngleItems.cpp
rename to GUI/Model/Instrument/BeamAngleItems.cpp
index ed8493b64d68e05a9b245a3237dc257ec9a75754..5437f3cf009d9cf5ece68207af0c0666feca1eac 100644
--- a/GUI/Models/BeamAngleItems.cpp
+++ b/GUI/Model/Instrument/BeamAngleItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/BeamAngleItems.cpp
+//! @file      GUI/Model/Instrument/BeamAngleItems.cpp
 //! @brief     Implements class BeamAngleItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/BeamAngleItems.h"
+#include "GUI/Model/Instrument/BeamAngleItems.h"
 #include "Base/Const/Units.h"
 
 BeamAzimuthalAngleItem::BeamAzimuthalAngleItem() : BeamDistributionItem(M_TYPE, m_show_mean)
diff --git a/GUI/Models/BeamAngleItems.h b/GUI/Model/Instrument/BeamAngleItems.h
similarity index 80%
rename from GUI/Models/BeamAngleItems.h
rename to GUI/Model/Instrument/BeamAngleItems.h
index 51c97b6861a5c00141760edc9707924571f74edb..a18cf25bfc35106cd487af6615e95bc4fcc84995 100644
--- a/GUI/Models/BeamAngleItems.h
+++ b/GUI/Model/Instrument/BeamAngleItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/BeamAngleItems.h
+//! @file      GUI/Model/Instrument/BeamAngleItems.h
 //! @brief     Defines class BeamAngleItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_BEAMANGLEITEMS_H
-#define BORNAGAIN_GUI_MODELS_BEAMANGLEITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMANGLEITEMS_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMANGLEITEMS_H
 
-#include "GUI/Models/BeamDistributionItem.h"
+#include "GUI/Model/Instrument/BeamDistributionItem.h"
 
 class BeamAzimuthalAngleItem : public BeamDistributionItem {
 public:
@@ -45,4 +45,4 @@ private:
     static const bool m_show_mean = true;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_BEAMANGLEITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMANGLEITEMS_H
diff --git a/GUI/Models/BeamDistributionItem.cpp b/GUI/Model/Instrument/BeamDistributionItem.cpp
similarity index 97%
rename from GUI/Models/BeamDistributionItem.cpp
rename to GUI/Model/Instrument/BeamDistributionItem.cpp
index 5e046b7851a0c4d40199e11c66254244e1c0e462..c6296758dfaf2a6ee725743bbecea5f51d50491a 100644
--- a/GUI/Models/BeamDistributionItem.cpp
+++ b/GUI/Model/Instrument/BeamDistributionItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/BeamDistributionItem.cpp
+//! @file      GUI/Model/Instrument/BeamDistributionItem.cpp
 //! @brief     Implements class BeamDistributionItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/BeamDistributionItem.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/RealLimitsItems.h"
+#include "GUI/Model/Instrument/BeamDistributionItem.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Session/RealLimitsItems.h"
 #include "Param/Distrib/Distributions.h"
 
 namespace {
diff --git a/GUI/Models/BeamDistributionItem.h b/GUI/Model/Instrument/BeamDistributionItem.h
similarity index 85%
rename from GUI/Models/BeamDistributionItem.h
rename to GUI/Model/Instrument/BeamDistributionItem.h
index 9f1cf07acfde3af04ef729dcf03afe37cc0a7a4d..bab439b3a0268e9d8c9a39a82ef952a04b278bc3 100644
--- a/GUI/Models/BeamDistributionItem.h
+++ b/GUI/Model/Instrument/BeamDistributionItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/BeamDistributionItem.h
+//! @file      GUI/Model/Instrument/BeamDistributionItem.h
 //! @brief     Defines class BeamDistributionItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_BEAMDISTRIBUTIONITEM_H
-#define BORNAGAIN_GUI_MODELS_BEAMDISTRIBUTIONITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMDISTRIBUTIONITEM_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMDISTRIBUTIONITEM_H
 
-#include "GUI/Models/DistributionItems.h"
-#include "GUI/Models/ItemWithDistribution.h"
+#include "GUI/Model/Group/DistributionItems.h"
+#include "GUI/Model/Types/ItemWithDistribution.h"
 #include "Param/Distrib/ParameterDistribution.h"
 
 //! The BeamDistributionItem handles wavelength, inclination and azimuthal parameter
@@ -59,4 +59,4 @@ template <typename T> T* BeamDistributionItem::setDistributionType()
     return setGroupPropertyType<T>(P_DISTRIBUTION);
 }
 
-#endif // BORNAGAIN_GUI_MODELS_BEAMDISTRIBUTIONITEM_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMDISTRIBUTIONITEM_H
diff --git a/GUI/Models/BeamItems.cpp b/GUI/Model/Instrument/BeamItems.cpp
similarity index 95%
rename from GUI/Models/BeamItems.cpp
rename to GUI/Model/Instrument/BeamItems.cpp
index 0efc944569fda58c11074ceff715f897c5882a75..a03a90c1ec1218f31e9c14e5785f9a7ef2643065 100644
--- a/GUI/Models/BeamItems.cpp
+++ b/GUI/Model/Instrument/BeamItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/BeamItems.cpp
+//! @file      GUI/Model/Instrument/BeamItems.cpp
 //! @brief     Implements BeamItem hierarchy
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,16 +12,16 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/BeamItems.h"
+#include "GUI/Model/Instrument/BeamItems.h"
 #include "Base/Axis/IAxis.h"
 #include "Base/Const/Units.h"
 #include "Device/Beam/Beam.h"
-#include "GUI/Models/BeamAngleItems.h"
-#include "GUI/Models/BeamWavelengthItem.h"
-#include "GUI/Models/FootprintItems.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/PointwiseAxisItem.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Data/PointwiseAxisItem.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Instrument/BeamAngleItems.h"
+#include "GUI/Model/Instrument/BeamWavelengthItem.h"
+#include "GUI/Model/Instrument/FootprintItems.h"
+#include "GUI/Model/Types/VectorItem.h"
 #include <cmath>
 
 namespace {
diff --git a/GUI/Models/BeamItems.h b/GUI/Model/Instrument/BeamItems.h
similarity index 91%
rename from GUI/Models/BeamItems.h
rename to GUI/Model/Instrument/BeamItems.h
index 8a07a5bc7628fe6ac1660336589f2d767198f760..92b43a681e1e6543fdfb1cae6bf4e5ef182a845f 100644
--- a/GUI/Models/BeamItems.h
+++ b/GUI/Model/Instrument/BeamItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/BeamItems.h
+//! @file      GUI/Model/Instrument/BeamItems.h
 //! @brief     Defines BeamItem hierarchy
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_BEAMITEMS_H
-#define BORNAGAIN_GUI_MODELS_BEAMITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMITEMS_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMITEMS_H
 
 #include "Base/Vector/Vectors3D.h"
-#include "GUI/Models/SessionItem.h"
-#include "GUI/Models/SpecularBeamInclinationItem.h"
+#include "GUI/Model/Instrument/SpecularBeamInclinationItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class BasicAxisItem;
 class Beam;
@@ -112,4 +112,4 @@ template <typename T> T* SpecularBeamItem::setFootprintType()
     return setGroupPropertyType<T>(P_FOOTPRINT);
 }
 
-#endif // BORNAGAIN_GUI_MODELS_BEAMITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMITEMS_H
diff --git a/GUI/Models/BeamWavelengthItem.cpp b/GUI/Model/Instrument/BeamWavelengthItem.cpp
similarity index 94%
rename from GUI/Models/BeamWavelengthItem.cpp
rename to GUI/Model/Instrument/BeamWavelengthItem.cpp
index d8dc505a4e90b31d2815897272a061ec50609d20..c512378e908cc79a875fa5537aea0bed31135b5e 100644
--- a/GUI/Models/BeamWavelengthItem.cpp
+++ b/GUI/Model/Instrument/BeamWavelengthItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/BeamWavelengthItem.cpp
+//! @file      GUI/Model/Instrument/BeamWavelengthItem.cpp
 //! @brief     Implements class BeamWavelengthItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/BeamWavelengthItem.h"
+#include "GUI/Model/Instrument/BeamWavelengthItem.h"
 
 namespace {
 const double default_wl = 0.1;
diff --git a/GUI/Models/BeamWavelengthItem.h b/GUI/Model/Instrument/BeamWavelengthItem.h
similarity index 79%
rename from GUI/Models/BeamWavelengthItem.h
rename to GUI/Model/Instrument/BeamWavelengthItem.h
index c0523f92f105db3054f8560fd994b61276aebd61..499c51137e552eb6e15d5a0fecc9a8c52d781553 100644
--- a/GUI/Models/BeamWavelengthItem.h
+++ b/GUI/Model/Instrument/BeamWavelengthItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/BeamWavelengthItem.h
+//! @file      GUI/Model/Instrument/BeamWavelengthItem.h
 //! @brief     Defines class BeamWavelengthItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_BEAMWAVELENGTHITEM_H
-#define BORNAGAIN_GUI_MODELS_BEAMWAVELENGTHITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMWAVELENGTHITEM_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMWAVELENGTHITEM_H
 
-#include "GUI/Models/BeamDistributionItem.h"
+#include "GUI/Model/Instrument/BeamDistributionItem.h"
 
 class BA_CORE_API_ BeamWavelengthItem : public BeamDistributionItem {
 public:
@@ -39,4 +39,4 @@ public:
     void setToRange(const RealLimits& limits);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_BEAMWAVELENGTHITEM_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMWAVELENGTHITEM_H
diff --git a/GUI/Models/DetectorItems.cpp b/GUI/Model/Instrument/DetectorItems.cpp
similarity index 93%
rename from GUI/Models/DetectorItems.cpp
rename to GUI/Model/Instrument/DetectorItems.cpp
index 27cd06e08f77f2fb98c42ec1a65638322ade28c2..0b939532146d2b29f6c2f2c0ebd494ea501ee1b7 100644
--- a/GUI/Models/DetectorItems.cpp
+++ b/GUI/Model/Instrument/DetectorItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DetectorItems.cpp
+//! @file      GUI/Model/Instrument/DetectorItems.cpp
 //! @brief     Implements classes DetectorItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DetectorItems.h"
+#include "GUI/Model/Instrument/DetectorItems.h"
 #include "Device/Detector/IDetector2D.h"
 #include "Device/Mask/IShape2D.h"
 #include "Device/Resolution/ResolutionFunction2DGaussian.h"
-#include "GUI/Models/GroupInfo.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/ResolutionFunctionItems.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/SphericalDetectorItem.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Group/GroupInfo.h"
+#include "GUI/Model/Instrument/ResolutionFunctionItems.h"
+#include "GUI/Model/Instrument/SphericalDetectorItem.h"
+#include "GUI/Model/Session/SessionModel.h"
 
 namespace {
 const QString res_func_group_label = "Type";
diff --git a/GUI/Models/DetectorItems.h b/GUI/Model/Instrument/DetectorItems.h
similarity index 90%
rename from GUI/Models/DetectorItems.h
rename to GUI/Model/Instrument/DetectorItems.h
index 65f49bc22bbb46daba1693bb43a8f2a247dd7d06..7bf353ed1c3c07138a3eb402507915c1b1fe5079 100644
--- a/GUI/Models/DetectorItems.h
+++ b/GUI/Model/Instrument/DetectorItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DetectorItems.h
+//! @file      GUI/Model/Instrument/DetectorItems.h
 //! @brief     Defines classes DetectorItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DETECTORITEMS_H
-#define BORNAGAIN_GUI_MODELS_DETECTORITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_DETECTORITEMS_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_DETECTORITEMS_H
 
 #include "Base/Vector/Vectors3D.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class MaskContainerItem;
 class IDetector2D;
@@ -82,4 +82,4 @@ template <typename T> T* DetectorItem::setResolutionFunctionType()
     return setGroupPropertyType<T>(P_RESOLUTION_FUNCTION);
 }
 
-#endif // BORNAGAIN_GUI_MODELS_DETECTORITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_DETECTORITEMS_H
diff --git a/GUI/Models/FootprintItems.cpp b/GUI/Model/Instrument/FootprintItems.cpp
similarity index 96%
rename from GUI/Models/FootprintItems.cpp
rename to GUI/Model/Instrument/FootprintItems.cpp
index 0992132f65dc2c188e3da405c4674ca19e5c9734..acf418eaf8ece0de670eba4014890781d21b14b1 100644
--- a/GUI/Models/FootprintItems.cpp
+++ b/GUI/Model/Instrument/FootprintItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FootprintItems.cpp
+//! @file      GUI/Model/Instrument/FootprintItems.cpp
 //! @brief     Implements FootprintItem classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/FootprintItems.h"
+#include "GUI/Model/Instrument/FootprintItems.h"
 #include "Device/Beam/FootprintGauss.h"
 #include "Device/Beam/FootprintSquare.h"
 
diff --git a/GUI/Models/FootprintItems.h b/GUI/Model/Instrument/FootprintItems.h
similarity index 87%
rename from GUI/Models/FootprintItems.h
rename to GUI/Model/Instrument/FootprintItems.h
index 5fd018550faad3f332ae7343aa85ecdc8c50c1ca..0610f0170fc93a801dbf833c6397cf7b5db2aaf5 100644
--- a/GUI/Models/FootprintItems.h
+++ b/GUI/Model/Instrument/FootprintItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FootprintItems.h
+//! @file      GUI/Model/Instrument/FootprintItems.h
 //! @brief     Declares FootprintItem classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_FOOTPRINTITEMS_H
-#define BORNAGAIN_GUI_MODELS_FOOTPRINTITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_FOOTPRINTITEMS_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_FOOTPRINTITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class IFootprintFactor;
 
@@ -65,4 +65,4 @@ public:
     void setSquareFootprintValue(double value);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_FOOTPRINTITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_FOOTPRINTITEMS_H
diff --git a/GUI/Models/InstrumentItems.cpp b/GUI/Model/Instrument/InstrumentItems.cpp
similarity index 92%
rename from GUI/Models/InstrumentItems.cpp
rename to GUI/Model/Instrument/InstrumentItems.cpp
index 4be8015fdd223c419181f4366bb74036c4a301ea..8532988bb89f7fc7c2c7785537f2249f67259a9c 100644
--- a/GUI/Models/InstrumentItems.cpp
+++ b/GUI/Model/Instrument/InstrumentItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/InstrumentItems.cpp
+//! @file      GUI/Model/Instrument/InstrumentItems.cpp
 //! @brief     Implement class InstrumentItem and all its children
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
 #include "Base/Const/Units.h"
 #include "Base/Pixel/RectangularPixel.h"
 #include "Core/Simulation/DepthProbeSimulation.h"
@@ -21,20 +21,19 @@
 #include "Device/Coord/CoordSystem2D.h"
 #include "Device/Detector/RectangularDetector.h"
 #include "Device/Detector/SphericalDetector.h"
-#include "GUI/Models/BackgroundItems.h"
-#include "GUI/Models/BeamWavelengthItem.h"
-#include "GUI/Models/DetectorItems.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/ItemFileNameUtils.h"
-#include "GUI/Models/JobItemUtils.h"
-#include "GUI/Models/PointwiseAxisItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RectangularDetectorItem.h"
-#include "GUI/Models/SphericalDetectorItem.h"
-#include "GUI/Models/TransformToDomain.h"
-#include "GUI/Models/VectorItem.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Data/PointwiseAxisItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/IO/ItemFileNameUtils.h"
+#include "GUI/Model/Instrument/BackgroundItems.h"
+#include "GUI/Model/Instrument/BeamWavelengthItem.h"
+#include "GUI/Model/Instrument/DetectorItems.h"
+#include "GUI/Model/Instrument/RectangularDetectorItem.h"
+#include "GUI/Model/Instrument/SphericalDetectorItem.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/Path.h"
 
 namespace {
 
@@ -75,6 +74,14 @@ const GroupInfo createBackgroundGroup()
     return info;
 }
 
+void setBeamDistribution(ParameterDistribution::WhichParameter which,
+                         const BeamDistributionItem& item, ISimulation& simulation)
+{
+    auto P_par_distr = item.getParameterDistributionForName(which);
+    if (P_par_distr)
+        simulation.addParameterDistribution(*P_par_distr);
+}
+
 } // namespace
 
 //  ************************************************************************************************
@@ -194,7 +201,7 @@ void InstrumentItem::setAnalyzerTotalTransmission(const double transmission)
 InstrumentItem::InstrumentItem(const QString& modelType) : SessionItem(modelType)
 {
     setItemName(modelType);
-    addProperty(P_IDENTIFIER, GUI::Helpers::createUuid())->setVisible(false);
+    addProperty(P_IDENTIFIER, QUuid::createUuid().toString())->setVisible(false);
     addProperty(P_DESCRIPTION, QString())->setVisible(false);
     addProperty(P_WITH_POLARIZER_ANALYZER, false);
     addProperty<VectorItem>(P_POLARIZATION);
@@ -231,7 +238,7 @@ SpecularInstrumentItem::SpecularInstrumentItem() : InstrumentItem(M_TYPE)
 
     initBackgroundGroup();
     beam<SpecularBeamItem>()->updateFileName(
-        GUI::Model::FilenameUtils::instrumentDataFileName(*this));
+        GUI::Model::FilenameUtils::instrumentDataFileName(id()));
 }
 
 SpecularBeamItem* SpecularInstrumentItem::beamItem() const
@@ -362,11 +369,11 @@ std::unique_ptr<DepthProbeSimulation> DepthProbeInstrumentItem::createSimulation
     auto depthAxis = depthAxisItem->createAxis(1.0);
     simulation->setZSpan(depthAxis->size(), depthAxis->lowerBound(), depthAxis->upperBound());
 
-    GUI::Transform::ToDomain::setBeamDistribution(ParameterDistribution::BeamWavelength,
-                                                  *beamItem()->wavelengthItem(), *simulation);
+    setBeamDistribution(ParameterDistribution::BeamWavelength, *beamItem()->wavelengthItem(),
+                        *simulation);
 
-    GUI::Transform::ToDomain::setBeamDistribution(ParameterDistribution::BeamInclinationAngle,
-                                                  *beamItem()->inclinationAngleItem(), *simulation);
+    setBeamDistribution(ParameterDistribution::BeamInclinationAngle,
+                        *beamItem()->inclinationAngleItem(), *simulation);
 
     return simulation;
 }
diff --git a/GUI/Models/InstrumentItems.h b/GUI/Model/Instrument/InstrumentItems.h
similarity index 95%
rename from GUI/Models/InstrumentItems.h
rename to GUI/Model/Instrument/InstrumentItems.h
index 43fd081209733432edcdc1a2b6fc083ca45d3541..48add155e12e9d446096db8e687f81c3a3e1cb46 100644
--- a/GUI/Models/InstrumentItems.h
+++ b/GUI/Model/Instrument/InstrumentItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/InstrumentItems.h
+//! @file      GUI/Model/Instrument/InstrumentItems.h
 //! @brief     Defines class InstrumentItem and all its children
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_INSTRUMENTITEMS_H
-#define BORNAGAIN_GUI_MODELS_INSTRUMENTITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTITEMS_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTITEMS_H
 
-#include "GUI/Models/BeamItems.h" // inheritance prevents forward declaration
+#include "GUI/Model/Instrument/BeamItems.h" // inheritance prevents forward declaration
 
 class BackgroundItem;
 class DataItem;
@@ -210,4 +210,4 @@ template <typename T> T* Instrument2DItem::setDetectorType()
     return setGroupPropertyType<T>(P_DETECTOR);
 }
 
-#endif // BORNAGAIN_GUI_MODELS_INSTRUMENTITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTITEMS_H
diff --git a/GUI/Application/InstrumentLibrary.cpp b/GUI/Model/Instrument/InstrumentLibrary.cpp
similarity index 84%
rename from GUI/Application/InstrumentLibrary.cpp
rename to GUI/Model/Instrument/InstrumentLibrary.cpp
index 9abfed9fb2802ddce3bef4e9c0e1a51ef2312df8..4212341b5b86a19c56d5e12bdeedce75786be377 100644
--- a/GUI/Application/InstrumentLibrary.cpp
+++ b/GUI/Model/Instrument/InstrumentLibrary.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Application/InstrumentLibrary.cpp
+//! @file      GUI/Model/Instrument/InstrumentLibrary.cpp
 //! @brief     Implements class InstrumentLibrary
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,26 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Application/InstrumentLibrary.h"
-#include "../Models/InstrumentsTreeModel.h"
-#include "GUI/Models/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentLibrary.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentsTreeModel.h"
+#include "GUI/Model/State/SessionData.h"
 #include <QFile>
 #include <QXmlStreamWriter>
 
 namespace {
+
 const QString XML_ROOT_TAG = "BornAgainInstrumentLibrary";
 const QString XML_VERSION_TAG = "Version";
+
+QString instrumentLibraryFilePath()
+{
+    return SessionData::appDataFolder() + "/BornAgainInstrumentLibrary.balib";
+}
+
 } // namespace
 
+
 InstrumentLibrary::InstrumentLibrary() : m_modified(false)
 {
     QObject::connect(&m_model, &InstrumentModel::instrumentChanged, [&]() { m_modified = true; });
@@ -51,12 +60,12 @@ QList<InstrumentItem*> InstrumentLibrary::instrumentItems() const
     return m_model.instrumentItems().toList();
 }
 
-bool InstrumentLibrary::saveIfModified(const QString& filepath)
+bool InstrumentLibrary::saveIfModified()
 {
     if (!m_modified)
         return true;
 
-    QFile file(filepath);
+    QFile file(instrumentLibraryFilePath());
     if (!file.open(QFile::ReadWrite | QIODevice::Truncate | QFile::Text))
         return false;
 
@@ -76,12 +85,12 @@ bool InstrumentLibrary::saveIfModified(const QString& filepath)
     return true;
 }
 
-bool InstrumentLibrary::load(const QString& filepath)
+bool InstrumentLibrary::load()
 {
     m_modified = false;
     m_model.clear();
 
-    QFile file(filepath);
+    QFile file(instrumentLibraryFilePath());
     if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
         return false;
 
diff --git a/GUI/Application/InstrumentLibrary.h b/GUI/Model/Instrument/InstrumentLibrary.h
similarity index 73%
rename from GUI/Application/InstrumentLibrary.h
rename to GUI/Model/Instrument/InstrumentLibrary.h
index e5f408632a44cf32c492f85e29a72f6e589113a5..d20bb567b7d131e1cdff1a38d523bd8f05ade170 100644
--- a/GUI/Application/InstrumentLibrary.h
+++ b/GUI/Model/Instrument/InstrumentLibrary.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Application/InstrumentLibrary.h
+//! @file      GUI/Model/Instrument/InstrumentLibrary.h
 //! @brief     Defines class InstrumentLibrary
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_APPLICATION_INSTRUMENTLIBRARY_H
-#define BORNAGAIN_GUI_APPLICATION_INSTRUMENTLIBRARY_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTLIBRARY_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTLIBRARY_H
 
-#include "GUI/Models/InstrumentModel.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
 
 class InstrumentLibrary {
 public:
@@ -28,8 +28,8 @@ public:
     bool isEmpty() const;
     QList<InstrumentItem*> instrumentItems() const;
 
-    bool saveIfModified(const QString& filepath);
-    bool load(const QString& filepath);
+    bool saveIfModified();
+    bool load();
 
     InstrumentModel* model();
 
@@ -38,4 +38,4 @@ private:
     bool m_modified;
 };
 
-#endif // BORNAGAIN_GUI_APPLICATION_INSTRUMENTLIBRARY_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTLIBRARY_H
diff --git a/GUI/Models/InstrumentModel.cpp b/GUI/Model/Instrument/InstrumentModel.cpp
similarity index 95%
rename from GUI/Models/InstrumentModel.cpp
rename to GUI/Model/Instrument/InstrumentModel.cpp
index 18455225fa795fb025f32f32343f77529f02cdd5..ef6d3df7c8fd6fff587af64c7782c77a635b23d0 100644
--- a/GUI/Models/InstrumentModel.cpp
+++ b/GUI/Model/Instrument/InstrumentModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/InstrumentModel.cpp
+//! @file      GUI/Model/Instrument/InstrumentModel.cpp
 //! @brief     Implements class InstrumentModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/ModelUtils.h"
-#include "GUI/Models/PointwiseAxisItem.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Data/PointwiseAxisItem.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Session/ModelUtils.h"
 
 InstrumentModel::InstrumentModel(QObject* parent)
     : SessionModel(GUI::Session::XML::InstrumentModelTag, parent)
diff --git a/GUI/Models/InstrumentModel.h b/GUI/Model/Instrument/InstrumentModel.h
similarity index 88%
rename from GUI/Models/InstrumentModel.h
rename to GUI/Model/Instrument/InstrumentModel.h
index 2d29e0d7766961af3f09ddf05852439a3a08dc34..79baea51066531a9fc6074fa7b0ea1133c2a606d 100644
--- a/GUI/Models/InstrumentModel.h
+++ b/GUI/Model/Instrument/InstrumentModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/InstrumentModel.h
+//! @file      GUI/Model/Instrument/InstrumentModel.h
 //! @brief     Defines class InstrumentModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_INSTRUMENTMODEL_H
-#define BORNAGAIN_GUI_MODELS_INSTRUMENTMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTMODEL_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTMODEL_H
 
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Session/SessionModel.h"
 #include <functional>
 
 class InstrumentItem;
@@ -45,7 +45,6 @@ public:
 
     void removeInstrument(InstrumentItem* instrument);
 
-
     QString suggestInstrumentName(const QString& currentName) const;
 
     QVector<InstrumentItem*>
@@ -63,4 +62,4 @@ private:
     void onInstrumentPropertyChange(const InstrumentItem* instrument, const QString& propertyName);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_INSTRUMENTMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTMODEL_H
diff --git a/GUI/Models/InstrumentsTreeModel.cpp b/GUI/Model/Instrument/InstrumentsTreeModel.cpp
similarity index 96%
rename from GUI/Models/InstrumentsTreeModel.cpp
rename to GUI/Model/Instrument/InstrumentsTreeModel.cpp
index 7313223add2df33c9d061896e445def543efb500..70c6da8c4e97a72e1cff700eea11ecda1f435973 100644
--- a/GUI/Models/InstrumentsTreeModel.cpp
+++ b/GUI/Model/Instrument/InstrumentsTreeModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/InstrumentsTreeModel.cpp
+//! @file      GUI/Model/Instrument/InstrumentsTreeModel.cpp
 //! @brief     Implements class InstrumentsTreeModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/InstrumentsTreeModel.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Application/ApplicationSettings.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
+#include "GUI/Model/Instrument/InstrumentsTreeModel.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
 #include <QApplication>
 #include <QtCore>
 #include <QtGui>
@@ -60,7 +59,7 @@ void InstrumentsTreeModel::refreshAfterModelChange()
     //         }
     //     }
     //
-    //     updateSubsriptions();
+    //     updateSubscriptions();
 }
 
 void InstrumentsTreeModel::clear()
diff --git a/GUI/Models/InstrumentsTreeModel.h b/GUI/Model/Instrument/InstrumentsTreeModel.h
similarity index 91%
rename from GUI/Models/InstrumentsTreeModel.h
rename to GUI/Model/Instrument/InstrumentsTreeModel.h
index b5d11da8024cea44653b796ba464a229cea76ec4..e481b23b64d5434b1fb480d2135e712611583858 100644
--- a/GUI/Models/InstrumentsTreeModel.h
+++ b/GUI/Model/Instrument/InstrumentsTreeModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/InstrumentsTreeModel.h
+//! @file      GUI/Model/Instrument/InstrumentsTreeModel.h
 //! @brief     Defines class InstrumentsTreeModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_INSTRUMENTSTREEMODEL_H
-#define BORNAGAIN_GUI_MODELS_INSTRUMENTSTREEMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTSTREEMODEL_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTSTREEMODEL_H
 
 #include <QAbstractItemModel>
 #include <QSet>
@@ -74,4 +74,4 @@ private:
     bool m_enableEmptyHeadlines;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_INSTRUMENTSTREEMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_INSTRUMENTSTREEMODEL_H
diff --git a/GUI/mainwindow/LinkInstrumentManager.cpp b/GUI/Model/Instrument/LinkInstrumentManager.cpp
similarity index 72%
rename from GUI/mainwindow/LinkInstrumentManager.cpp
rename to GUI/Model/Instrument/LinkInstrumentManager.cpp
index fc7bf5f9787ed3199b1b6388bcd5e91857559511..06e2bff4aaa019ca9da69f883c6b5bb560d4a696 100644
--- a/GUI/mainwindow/LinkInstrumentManager.cpp
+++ b/GUI/Model/Instrument/LinkInstrumentManager.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/LinkInstrumentManager.cpp
+//! @file      GUI/Model/Instrument/LinkInstrumentManager.cpp
 //! @brief     Implements class LinkInstrumentManager
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,19 +12,16 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/LinkInstrumentManager.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/Views/ImportDataWidgets/ImportDataUtils.h"
-#include "GUI/mainwindow/mainwindow.h"
+#include "GUI/Model/Instrument/LinkInstrumentManager.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
 #include <QMessageBox>
 #include <QPushButton>
 
-using namespace GUI::View;
-
 namespace {
+
 bool QuestionOnInstrumentReshaping(const QString& message)
 {
     QMessageBox msgBox;
@@ -43,6 +40,29 @@ bool QuestionOnInstrumentReshaping(const QString& message)
 
     return msgBox.clickedButton() == modifyInstrumentButton;
 }
+
+
+QString printShapeMessage(const std::vector<int>& instrument_shape,
+                          const std::vector<int>& data_shape)
+{
+    auto to_str = [](const std::vector<int>& shape) {
+        std::string result;
+        for (size_t i = 0, size = shape.size(); i < size; ++i) {
+            result += std::to_string(shape[i]);
+            if (i + 1 != size)
+                result += ", ";
+        }
+        return result;
+    };
+
+    std::string message_string = "instrument [";
+    message_string += to_str(instrument_shape);
+    message_string += "], data [";
+    message_string += to_str(data_shape);
+    message_string += "]";
+    return QString::fromStdString(std::move(message_string));
+}
+
 } // namespace
 
 LinkInstrumentManager::LinkInstrumentManager(InstrumentModel* instrumentModel,
@@ -57,8 +77,7 @@ LinkInstrumentManager::LinkInstrumentManager(InstrumentModel* instrumentModel,
 }
 
 bool LinkInstrumentManager::canLinkDataToInstrument(const RealDataItem* realDataItem,
-                                                    const QString& identifier,
-                                                    bool quiet /*= false*/)
+                                                    const QString& identifier, QWidget* parent)
 {
     auto instrumentItem = m_instrumentModel->findInstrumentById(identifier);
 
@@ -66,16 +85,16 @@ bool LinkInstrumentManager::canLinkDataToInstrument(const RealDataItem* realData
     if (!instrumentItem)
         return true;
 
-    if (!ImportDataUtils::Compatible(*instrumentItem, *realDataItem)) {
-        if (!quiet)
-            QMessageBox::warning(baWin, "Can't link to instrument",
+    if (instrumentItem->shape().size() != realDataItem->shape().size()) {
+        if (parent)
+            QMessageBox::warning(parent, "Can't link to instrument",
                                  "Can't link, data is incompatible with the instrument.");
         return false;
     }
 
     if (realDataItem->isSpecularData() && !realDataItem->hasNativeData()) {
-        if (!quiet)
-            QMessageBox::warning(baWin, "Can't link to instrument", "Can't link, data is empty.");
+        if (parent)
+            QMessageBox::warning(parent, "Can't link to instrument", "Can't link, data is empty.");
         return false;
     }
 
@@ -85,7 +104,7 @@ bool LinkInstrumentManager::canLinkDataToInstrument(const RealDataItem* realData
     QString message =
         realDataItem->holdsDimensionalData()
             ? "Experimental data carries information on the range/points of measurement."
-            : ImportDataUtils::printShapeMessage(instrumentItem->shape(), realDataItem->shape());
+            : printShapeMessage(instrumentItem->shape(), realDataItem->shape());
     if (!QuestionOnInstrumentReshaping(message))
         return false;
 
diff --git a/GUI/mainwindow/LinkInstrumentManager.h b/GUI/Model/Instrument/LinkInstrumentManager.h
similarity index 85%
rename from GUI/mainwindow/LinkInstrumentManager.h
rename to GUI/Model/Instrument/LinkInstrumentManager.h
index 8c00b7c47360627ef3c0b094001b8da5812fb664..8a078a94fcdf2987465f6a66a32b44d20a4a90e9 100644
--- a/GUI/mainwindow/LinkInstrumentManager.h
+++ b/GUI/Model/Instrument/LinkInstrumentManager.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/LinkInstrumentManager.h
+//! @file      GUI/Model/Instrument/LinkInstrumentManager.h
 //! @brief     Defines class LinkInstrumentManager
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_LINKINSTRUMENTMANAGER_H
-#define BORNAGAIN_GUI_MAINWINDOW_LINKINSTRUMENTMANAGER_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_LINKINSTRUMENTMANAGER_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_LINKINSTRUMENTMANAGER_H
 
 #include <QList>
 #include <QObject>
@@ -41,7 +41,7 @@ public:
     //! this e.g. for unit tests. The question for adjusting the instrument is not suppressed by
     //! this flag.
     bool canLinkDataToInstrument(const RealDataItem* realDataItem, const QString& identifier,
-                                 bool quiet = false);
+                                 QWidget* parent);
 
 private:
     void onInstrumentChanged(const InstrumentItem* instrument);
@@ -52,4 +52,4 @@ private:
     RealDataModel* m_realDataModel;
 };
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_LINKINSTRUMENTMANAGER_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_LINKINSTRUMENTMANAGER_H
diff --git a/GUI/Models/RectangularDetectorItem.cpp b/GUI/Model/Instrument/RectangularDetectorItem.cpp
similarity index 97%
rename from GUI/Models/RectangularDetectorItem.cpp
rename to GUI/Model/Instrument/RectangularDetectorItem.cpp
index 60f359f91643bc8e54999cd7aae96b73694298d1..4d73c24153d9276d6e92da920493bf0d29724db2 100644
--- a/GUI/Models/RectangularDetectorItem.cpp
+++ b/GUI/Model/Instrument/RectangularDetectorItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/RectangularDetectorItem.cpp
+//! @file      GUI/Model/Instrument/RectangularDetectorItem.cpp
 //! @brief     Implements class RectangularDetectorItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/RectangularDetectorItem.h"
+#include "GUI/Model/Instrument/RectangularDetectorItem.h"
 #include "Device/Detector/RectangularDetector.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/Util/Error.h"
 
 namespace {
 const double default_detector_width = 20.0;
diff --git a/GUI/Models/RectangularDetectorItem.h b/GUI/Model/Instrument/RectangularDetectorItem.h
similarity index 89%
rename from GUI/Models/RectangularDetectorItem.h
rename to GUI/Model/Instrument/RectangularDetectorItem.h
index 939f5e30e2728cf739909a41e153563d854c39c4..080f9ed1d9e35345b35b54dad8dabca728b9ae11 100644
--- a/GUI/Models/RectangularDetectorItem.h
+++ b/GUI/Model/Instrument/RectangularDetectorItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/RectangularDetectorItem.h
+//! @file      GUI/Model/Instrument/RectangularDetectorItem.h
 //! @brief     Defines class RectangularDetectorItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,14 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_RECTANGULARDETECTORITEM_H
-#define BORNAGAIN_GUI_MODELS_RECTANGULARDETECTORITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_RECTANGULARDETECTORITEM_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_RECTANGULARDETECTORITEM_H
 
-#include "Base/Vector/Vectors3D.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/DetectorItems.h"
+#include "GUI/Model/Instrument/DetectorItems.h"
 
 class BasicAxisItem;
 class VectorItem;
+class ComboProperty;
 
 class BA_CORE_API_ RectangularDetectorItem : public DetectorItem {
 private:
@@ -92,4 +91,4 @@ private:
     bool m_is_constructed;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_RECTANGULARDETECTORITEM_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_RECTANGULARDETECTORITEM_H
diff --git a/GUI/Models/ResolutionFunctionItems.cpp b/GUI/Model/Instrument/ResolutionFunctionItems.cpp
similarity index 95%
rename from GUI/Models/ResolutionFunctionItems.cpp
rename to GUI/Model/Instrument/ResolutionFunctionItems.cpp
index a877571057862060a01746dd5e32f2565b4c2e8d..bcd830ee30c8622ebddff5885737bee1e0980860 100644
--- a/GUI/Models/ResolutionFunctionItems.cpp
+++ b/GUI/Model/Instrument/ResolutionFunctionItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ResolutionFunctionItems.cpp
+//! @file      GUI/Model/Instrument/ResolutionFunctionItems.cpp
 //! @brief     Implements family of ResolutionFunctionItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ResolutionFunctionItems.h"
+#include "GUI/Model/Instrument/ResolutionFunctionItems.h"
 #include "Device/Resolution/ResolutionFunction2DGaussian.h"
 
 ResolutionFunctionItem::ResolutionFunctionItem(const QString& name) : SessionItem(name) {}
diff --git a/GUI/Models/ResolutionFunctionItems.h b/GUI/Model/Instrument/ResolutionFunctionItems.h
similarity index 85%
rename from GUI/Models/ResolutionFunctionItems.h
rename to GUI/Model/Instrument/ResolutionFunctionItems.h
index 618ad8c91a85fbfad78104c8c2fe32b0e6a6c748..63fff411d8b121d665e4526500905f7a93da933c 100644
--- a/GUI/Models/ResolutionFunctionItems.h
+++ b/GUI/Model/Instrument/ResolutionFunctionItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ResolutionFunctionItems.h
+//! @file      GUI/Model/Instrument/ResolutionFunctionItems.h
 //! @brief     Defines family of ResolutionFunctionItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_RESOLUTIONFUNCTIONITEMS_H
-#define BORNAGAIN_GUI_MODELS_RESOLUTIONFUNCTIONITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_RESOLUTIONFUNCTIONITEMS_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_RESOLUTIONFUNCTIONITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 #include <memory>
 
 class IResolutionFunction2D;
@@ -61,4 +61,4 @@ public:
     void setSigmaY(double sigma_y);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_RESOLUTIONFUNCTIONITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_RESOLUTIONFUNCTIONITEMS_H
diff --git a/GUI/Models/SpecularBeamInclinationItem.cpp b/GUI/Model/Instrument/SpecularBeamInclinationItem.cpp
similarity index 95%
rename from GUI/Models/SpecularBeamInclinationItem.cpp
rename to GUI/Model/Instrument/SpecularBeamInclinationItem.cpp
index a8b3186317f341cdba859fc0b12d8b05205f8265..e5a42fcee5eeb98cda9ad201a9c1c6ef7514656e 100644
--- a/GUI/Models/SpecularBeamInclinationItem.cpp
+++ b/GUI/Model/Instrument/SpecularBeamInclinationItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SpecularBeamInclinationItem.cpp
+//! @file      GUI/Model/Instrument/SpecularBeamInclinationItem.cpp
 //! @brief     Implements class SpecularBeamInclinationItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SpecularBeamInclinationItem.h"
+#include "GUI/Model/Instrument/SpecularBeamInclinationItem.h"
 #include "Base/Const/Units.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/PointwiseAxisItem.h"
+#include "GUI/Model/Data/PointwiseAxisItem.h"
+#include "GUI/Model/Group/GroupItem.h"
 
 namespace {
 void setupDistributionMean(SessionItem* distribution);
diff --git a/GUI/Models/SpecularBeamInclinationItem.h b/GUI/Model/Instrument/SpecularBeamInclinationItem.h
similarity index 81%
rename from GUI/Models/SpecularBeamInclinationItem.h
rename to GUI/Model/Instrument/SpecularBeamInclinationItem.h
index 1363e38b64b291cbce9e930a34735b344ae0a49f..68818afc7634d5f86c80b5da53dd278aadf0d2bf 100644
--- a/GUI/Models/SpecularBeamInclinationItem.h
+++ b/GUI/Model/Instrument/SpecularBeamInclinationItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SpecularBeamInclinationItem.h
+//! @file      GUI/Model/Instrument/SpecularBeamInclinationItem.h
 //! @brief     Declares the class SpecularBeamInclinationItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SPECULARBEAMINCLINATIONITEM_H
-#define BORNAGAIN_GUI_MODELS_SPECULARBEAMINCLINATIONITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_SPECULARBEAMINCLINATIONITEM_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_SPECULARBEAMINCLINATIONITEM_H
 
-#include "GUI/Models/BeamDistributionItem.h"
+#include "GUI/Model/Instrument/BeamDistributionItem.h"
 
 class BasicAxisItem;
 class GroupItem;
@@ -47,4 +47,4 @@ private:
     static const bool m_show_mean = false;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SPECULARBEAMINCLINATIONITEM_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_SPECULARBEAMINCLINATIONITEM_H
diff --git a/GUI/Models/SphericalDetectorItem.cpp b/GUI/Model/Instrument/SphericalDetectorItem.cpp
similarity index 95%
rename from GUI/Models/SphericalDetectorItem.cpp
rename to GUI/Model/Instrument/SphericalDetectorItem.cpp
index 5f7edafa1c280f8c7d49ccc6f9013d18d73dd760..aaa94d8d35bf248f4d6da5dc445ce85846e4123c 100644
--- a/GUI/Models/SphericalDetectorItem.cpp
+++ b/GUI/Model/Instrument/SphericalDetectorItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SphericalDetectorItem.cpp
+//! @file      GUI/Model/Instrument/SphericalDetectorItem.cpp
 //! @brief     Implements class SphericalDetectorItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SphericalDetectorItem.h"
+#include "GUI/Model/Instrument/SphericalDetectorItem.h"
 #include "Base/Const/Units.h"
 #include "Device/Detector/SphericalDetector.h"
-#include "GUI/Models/AxesItems.h"
+#include "GUI/Model/Data/AxesItems.h"
 
 SphericalDetectorItem::SphericalDetectorItem() : DetectorItem(M_TYPE)
 {
diff --git a/GUI/Models/SphericalDetectorItem.h b/GUI/Model/Instrument/SphericalDetectorItem.h
similarity index 81%
rename from GUI/Models/SphericalDetectorItem.h
rename to GUI/Model/Instrument/SphericalDetectorItem.h
index 41e369fefcb3c39dafaf79695610492bd7a1d2c6..c5f50bfa83ef05aba525d2281572741887da7826 100644
--- a/GUI/Models/SphericalDetectorItem.h
+++ b/GUI/Model/Instrument/SphericalDetectorItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SphericalDetectorItem.h
+//! @file      GUI/Model/Instrument/SphericalDetectorItem.h
 //! @brief     Defines class SphericalDetectorItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SPHERICALDETECTORITEM_H
-#define BORNAGAIN_GUI_MODELS_SPHERICALDETECTORITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_SPHERICALDETECTORITEM_H
+#define BORNAGAIN_GUI_MODEL_INSTRUMENT_SPHERICALDETECTORITEM_H
 
-#include "GUI/Models/DetectorItems.h"
+#include "GUI/Model/Instrument/DetectorItems.h"
 
 class BasicAxisItem;
 
@@ -45,4 +45,4 @@ protected:
     double axesToDomainUnitsFactor() const override;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SPHERICALDETECTORITEM_H
+#endif // BORNAGAIN_GUI_MODEL_INSTRUMENT_SPHERICALDETECTORITEM_H
diff --git a/GUI/Models/JobItem.cpp b/GUI/Model/Job/JobItem.cpp
similarity index 93%
rename from GUI/Models/JobItem.cpp
rename to GUI/Model/Job/JobItem.cpp
index 59738e8d10a162ae4a05932380747d4ed99555d1..b8a17780152e8dc1cb68050107e0b60abf540ddf 100644
--- a/GUI/Models/JobItem.cpp
+++ b/GUI/Model/Job/JobItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobItem.cpp
+//! @file      GUI/Model/Job/JobItem.cpp
 //! @brief     Implements class JobItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,21 +12,21 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/JobItem.h"
+#include "GUI/Model/Job/JobItem.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Models/Data1DViewItem.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/ItemFileNameUtils.h"
-#include "GUI/Models/JobItemUtils.h"
-#include "GUI/Models/MaterialItemContainer.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParameterTreeItems.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SimulationOptionsItem.h"
-#include "GUI/Models/SpecularDataItem.h"
+#include "GUI/Model/Data/Data1DViewItem.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/IO/ItemFileNameUtils.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Model/Material/MaterialItemContainer.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Session/SimulationOptionsItem.h"
+#include "GUI/Util/Error.h"
 
 JobItem::JobItem() : SessionItem(M_TYPE)
 {
@@ -383,14 +383,14 @@ void JobItem::setPresentationType(const QString& type)
 void JobItem::updateIntensityDataFileName()
 {
     if (DataItem* item = dataItem())
-        item->setFileName(GUI::Model::FilenameUtils::jobResultsFileName(*this));
+        item->setFileName(GUI::Model::FilenameUtils::jobResultsFileName(itemName()));
 
     if (RealDataItem* realItem = realDataItem()) {
         if (DataItem* item = realItem->dataItem())
-            item->setFileName(GUI::Model::FilenameUtils::jobReferenceFileName(*this));
+            item->setFileName(GUI::Model::FilenameUtils::jobReferenceFileName(itemName()));
 
         if (DataItem* item = realItem->nativeData())
-            item->setFileName(GUI::Model::FilenameUtils::jobNativeDataFileName(*this));
+            item->setFileName(GUI::Model::FilenameUtils::jobNativeDataFileName(getIdentifier()));
     }
 }
 
diff --git a/GUI/Models/JobItem.h b/GUI/Model/Job/JobItem.h
similarity index 93%
rename from GUI/Models/JobItem.h
rename to GUI/Model/Job/JobItem.h
index ab0e7226399fdfb3db6d5632965c070995dd0f5f..2e47e4e310cb6cf64d992320f6ba4c0450f62612 100644
--- a/GUI/Models/JobItem.h
+++ b/GUI/Model/Job/JobItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobItem.h
+//! @file      GUI/Model/Job/JobItem.h
 //! @brief     Defines class JobItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,25 +12,26 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_JOBITEM_H
-#define BORNAGAIN_GUI_MODELS_JOBITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_JOB_JOBITEM_H
+#define BORNAGAIN_GUI_MODEL_JOB_JOBITEM_H
 
-#include "GUI/Models/SessionItem.h"
-#include "GUI/Models/JobStatus.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Session/SessionItem.h"
+
+#include "GUI/Model/Job/JobStatus.h"        // enum cannot be forward declared
+#include "GUI/Model/Session/SessionModel.h" // call to model() from templated fct
 
-class DataItem;
 class Data1DViewItem;
+class DataItem;
 class FitParameterContainerItem;
 class FitSuiteItem;
-class InstrumentItem;
+class ISimulation;
 class Instrument2DItem;
+class InstrumentItem;
 class IntensityDataItem;
 class MaterialItemContainer;
 class MultiLayerItem;
 class ParameterContainerItem;
 class RealDataItem;
-class ISimulation;
 class SimulationOptionsItem;
 
 #include <QDateTime>
@@ -159,4 +160,4 @@ template <typename T> T* JobItem::setDataType()
     return model()->insertItem<T>(this, -1, T_OUTPUT);
 }
 
-#endif // BORNAGAIN_GUI_MODELS_JOBITEM_H
+#endif // BORNAGAIN_GUI_MODEL_JOB_JOBITEM_H
diff --git a/GUI/Models/JobItemUtils.cpp b/GUI/Model/Job/JobItemUtils.cpp
similarity index 96%
rename from GUI/Models/JobItemUtils.cpp
rename to GUI/Model/Job/JobItemUtils.cpp
index 76d9d5244101948a28b8eb123cc590e4a45c73c5..16ef5bd19dc12d9391a41ee7b1ded119c849c30c 100644
--- a/GUI/Models/JobItemUtils.cpp
+++ b/GUI/Model/Job/JobItemUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobItemUtils.cpp
+//! @file      GUI/Model/Job/JobItemUtils.cpp
 //! @brief     Implements class JobItemUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/JobItemUtils.h"
+#include "GUI/Model/Job/JobItemUtils.h"
 #include "Core/Simulation/ISimulation.h"
-#include "Device/Coord/ICoordSystem.h"
 #include "Device/Histo/SimulationResult.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/InstrumentItems.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
 
 namespace {
 
diff --git a/GUI/Models/JobItemUtils.h b/GUI/Model/Job/JobItemUtils.h
similarity index 88%
rename from GUI/Models/JobItemUtils.h
rename to GUI/Model/Job/JobItemUtils.h
index 2f6630dc4479706a43b94845f57ad01d0877d6b2..417c1515a52b1b5d226e6ddfa7da4635d580d747 100644
--- a/GUI/Models/JobItemUtils.h
+++ b/GUI/Model/Job/JobItemUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobItemUtils.h
+//! @file      GUI/Model/Job/JobItemUtils.h
 //! @brief     Defines namespace GUI::Model::JobItemUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_JOBITEMUTILS_H
-#define BORNAGAIN_GUI_MODELS_JOBITEMUTILS_H
+#ifndef BORNAGAIN_GUI_MODEL_JOB_JOBITEMUTILS_H
+#define BORNAGAIN_GUI_MODEL_JOB_JOBITEMUTILS_H
 
 #include "Device/Detector/IDetector.h"
-#include "GUI/Models/ComboProperty.h"
+#include "GUI/Util/ComboProperty.h"
 #include <QMap>
 
 class DataItem;
@@ -53,4 +53,4 @@ ComboProperty availableUnits(const ICoordSystem& converter);
 
 } // namespace GUI::Model::JobItemUtils
 
-#endif // BORNAGAIN_GUI_MODELS_JOBITEMUTILS_H
+#endif // BORNAGAIN_GUI_MODEL_JOB_JOBITEMUTILS_H
diff --git a/GUI/Models/JobModel.cpp b/GUI/Model/Job/JobModel.cpp
similarity index 91%
rename from GUI/Models/JobModel.cpp
rename to GUI/Model/Job/JobModel.cpp
index ef29dbff63054c17ff0103a31a5058b9159138ac..8749d7eb64e90ebef06a0cab7d8d82bd513f911a 100644
--- a/GUI/Models/JobModel.cpp
+++ b/GUI/Model/Job/JobModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobModel.cpp
+//! @file      GUI/Model/Job/JobModel.cpp
 //! @brief     Implements class JobModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,19 +12,19 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModelFunctions.h"
-#include "GUI/Models/JobQueueData.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParameterTreeItems.h"
-#include "GUI/Models/ParameterTreeUtils.h"
-#include "GUI/Models/PointwiseAxisItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/PointwiseAxisItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModelFunctions.h"
+#include "GUI/Model/Job/JobQueueData.h"
+#include "GUI/Model/Job/ParameterTreeUtils.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Util/Path.h"
 
 JobModel::JobModel(QObject* parent)
     : SessionModel(GUI::Session::XML::JobModelTag, parent), m_queue_data(nullptr)
@@ -77,7 +77,7 @@ JobItem* JobModel::addJob(const MultiLayerItem* multiLayerItem,
 
     auto jobItem = insertItem<JobItem>();
     jobItem->setItemName(generateJobName());
-    jobItem->setIdentifier(GUI::Helpers::createUuid());
+    jobItem->setIdentifier(QUuid::createUuid().toString());
 
     GUI::Model::JobFunctions::setupJobItemSampleData(jobItem, multiLayerItem);
     GUI::Model::JobFunctions::setupJobItemInstrument(jobItem, instrumentItem);
diff --git a/GUI/Models/JobModel.h b/GUI/Model/Job/JobModel.h
similarity index 89%
rename from GUI/Models/JobModel.h
rename to GUI/Model/Job/JobModel.h
index 3fd7fa412636b047d6e9ccbb5a2db42bd719a0d7..c13610860572dd51311bd59302b266acdf6f0826 100644
--- a/GUI/Models/JobModel.h
+++ b/GUI/Model/Job/JobModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobModel.h
+//! @file      GUI/Model/Job/JobModel.h
 //! @brief     Defines class JobModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -11,14 +11,15 @@
 //! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
 //
 //  ************************************************************************************************
-#ifndef BORNAGAIN_GUI_MODELS_JOBMODEL_H
-#define BORNAGAIN_GUI_MODELS_JOBMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_JOB_JOBMODEL_H
+#define BORNAGAIN_GUI_MODEL_JOB_JOBMODEL_H
 
-#include "GUI/Models/SessionModel.h"
-class JobQueueData;
+#include "GUI/Model/Session/SessionModel.h"
+
+class InstrumentItem;
 class JobItem;
+class JobQueueData;
 class MultiLayerItem;
-class InstrumentItem;
 class RealDataItem;
 class SimulationOptionsItem;
 
@@ -64,4 +65,4 @@ private:
     JobQueueData* m_queue_data;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_JOBMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_JOB_JOBMODEL_H
diff --git a/GUI/Models/JobModelFunctions.cpp b/GUI/Model/Job/JobModelFunctions.cpp
similarity index 86%
rename from GUI/Models/JobModelFunctions.cpp
rename to GUI/Model/Job/JobModelFunctions.cpp
index 896cff85b7c57306d78292897a3eb1230dfc98fe..197f18707be4c13d9d9bcf7cc620612421788969 100644
--- a/GUI/Models/JobModelFunctions.cpp
+++ b/GUI/Model/Job/JobModelFunctions.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobModelFunctions.cpp
+//! @file      GUI/Model/Job/JobModelFunctions.cpp
 //! @brief     Implements auxiliary functions in JobModelFunctions namespace.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,29 +12,30 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/JobModelFunctions.h"
+#include "GUI/Model/Job/JobModelFunctions.h"
 #include "Base/Utils/Assert.h"
 #include "Device/Instrument/Instrument.h"
-#include "GUI/Models/Data1DViewItem.h"
-#include "GUI/Models/DataPropertyContainer.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FitParameterItems.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/ItemFileNameUtils.h"
-#include "GUI/Models/ItemWithMaterial.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobItemUtils.h"
-#include "GUI/Models/MaterialItemContainer.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/MinimizerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/PointwiseAxisItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Data/Data1DViewItem.h"
+#include "GUI/Model/Data/DataPropertyContainer.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/PointwiseAxisItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Fit/FitParameterItems.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Fit/MinimizerItem.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/IO/ItemFileNameUtils.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItemContainer.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/Sample/ItemWithMaterial.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/Path.h"
 #include <map>
 
 namespace {
@@ -136,7 +137,7 @@ void GUI::Model::JobFunctions::setupJobItemSampleData(JobItem* jobItem,
     std::map<MaterialItem*, MaterialItem*> materials;
     for (auto* itemWithMaterial : multilayer->itemsWithMaterial()) {
         auto materialIdentifier = itemWithMaterial->materialIdentifier();
-        auto material = GUI::Model::MaterialItemUtils::findMaterial(materialIdentifier);
+        auto material = GUI::MaterialUtil::findMaterial(materialIdentifier);
 
         auto iter = materials.find(material);
         if (iter == materials.end()) {
@@ -152,7 +153,7 @@ void GUI::Model::JobFunctions::setupJobItemInstrument(JobItem* jobItem, const In
 {
     auto copiedInstrument = jobItem->copyInstrumentIntoJob(from);
     copiedInstrument->setItemName(from->modelType());
-    copiedInstrument->setId(GUI::Helpers::createUuid());
+    copiedInstrument->setId(QUuid::createUuid().toString());
     jobItem->setInstrumentName(from->itemName());
 
     auto spec_to = dynamic_cast<SpecularInstrumentItem*>(copiedInstrument);
@@ -160,7 +161,7 @@ void GUI::Model::JobFunctions::setupJobItemInstrument(JobItem* jobItem, const In
         return;
 
     // updating filename
-    const auto filename = GUI::Model::FilenameUtils::instrumentDataFileName(*spec_to);
+    const auto filename = GUI::Model::FilenameUtils::instrumentDataFileName(spec_to->id());
     spec_to->beamItem()->updateFileName(filename);
 
     // copying axis data
@@ -233,7 +234,7 @@ void GUI::Model::JobFunctions::copyRealDataItem(JobItem* jobItem, const RealData
 
     // adapting the name to job name
     realDataItemCopy->dataItem()->setFileName(
-        GUI::Model::FilenameUtils::jobReferenceFileName(*jobItem));
+        GUI::Model::FilenameUtils::jobReferenceFileName(jobItem->itemName()));
 
     // #baimport ++ copy members of realDataItem?
 
@@ -242,7 +243,7 @@ void GUI::Model::JobFunctions::copyRealDataItem(JobItem* jobItem, const RealData
 
     realDataItemCopy->setNativeOutputData(realDataItem->nativeOutputData()->clone());
     realDataItemCopy->nativeData()->setFileName(
-        GUI::Model::FilenameUtils::jobNativeDataFileName(*jobItem));
+        GUI::Model::FilenameUtils::jobNativeDataFileName(jobItem->getIdentifier()));
 }
 
 const JobItem* GUI::Model::JobFunctions::findJobItem(const SessionItem* item)
diff --git a/GUI/Models/JobModelFunctions.h b/GUI/Model/Job/JobModelFunctions.h
similarity index 89%
rename from GUI/Models/JobModelFunctions.h
rename to GUI/Model/Job/JobModelFunctions.h
index e23141858a3411eb8a2e0b1bf5d40e9ac31e4b48..8b62568cdd87e9f68abb71bd64fbf4d4f1a82d0f 100644
--- a/GUI/Models/JobModelFunctions.h
+++ b/GUI/Model/Job/JobModelFunctions.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobModelFunctions.h
+//! @file      GUI/Model/Job/JobModelFunctions.h
 //! @brief     Defines auxiliary functions in namespace GUI::Model::JobModelFunctions.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_JOBMODELFUNCTIONS_H
-#define BORNAGAIN_GUI_MODELS_JOBMODELFUNCTIONS_H
+#ifndef BORNAGAIN_GUI_MODEL_JOB_JOBMODELFUNCTIONS_H
+#define BORNAGAIN_GUI_MODEL_JOB_JOBMODELFUNCTIONS_H
 
 class InstrumentItem;
 class JobItem;
@@ -51,4 +51,4 @@ const JobItem* findJobItem(const SessionItem* item);
 
 } // namespace GUI::Model::JobFunctions
 
-#endif // BORNAGAIN_GUI_MODELS_JOBMODELFUNCTIONS_H
+#endif // BORNAGAIN_GUI_MODEL_JOB_JOBMODELFUNCTIONS_H
diff --git a/GUI/Models/JobQueueData.cpp b/GUI/Model/Job/JobQueueData.cpp
similarity index 96%
rename from GUI/Models/JobQueueData.cpp
rename to GUI/Model/Job/JobQueueData.cpp
index 7b77893f1cdad0e21144c2dee218c5b0eb0295ff..c506a0f0634947101f7bf306da6deec68722f91b 100644
--- a/GUI/Models/JobQueueData.cpp
+++ b/GUI/Model/Job/JobQueueData.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobQueueData.cpp
+//! @file      GUI/Model/Job/JobQueueData.cpp
 //! @brief     Implements class JobQueueData
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/JobQueueData.h"
+#include "GUI/Model/Job/JobQueueData.h"
 #include "Core/Simulation/GISASSimulation.h"
-#include "GUI/Models/DomainSimulationBuilder.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/JobWorker.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Domain/DomainSimulationBuilder.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/Job/JobWorker.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/Path.h"
 #include <QThread>
 
 namespace {
diff --git a/GUI/Models/JobQueueData.h b/GUI/Model/Job/JobQueueData.h
similarity index 91%
rename from GUI/Models/JobQueueData.h
rename to GUI/Model/Job/JobQueueData.h
index 8d411c4fbcf7f5c395c6e86c562a56fd223efc5d..881a096a72ff0803d7d648f61af13db72d5ca5cb 100644
--- a/GUI/Models/JobQueueData.h
+++ b/GUI/Model/Job/JobQueueData.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobQueueData.h
+//! @file      GUI/Model/Job/JobQueueData.h
 //! @brief     Defines class JobQueueData
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_JOBQUEUEDATA_H
-#define BORNAGAIN_GUI_MODELS_JOBQUEUEDATA_H
+#ifndef BORNAGAIN_GUI_MODEL_JOB_JOBQUEUEDATA_H
+#define BORNAGAIN_GUI_MODEL_JOB_JOBQUEUEDATA_H
 
 #include <QMap>
 #include <QObject>
@@ -67,4 +67,4 @@ private:
     JobModel* m_jobModel;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_JOBQUEUEDATA_H
+#endif // BORNAGAIN_GUI_MODEL_JOB_JOBQUEUEDATA_H
diff --git a/GUI/Models/JobStatus.cpp b/GUI/Model/Job/JobStatus.cpp
similarity index 94%
rename from GUI/Models/JobStatus.cpp
rename to GUI/Model/Job/JobStatus.cpp
index 10a4adf362c3f4e7f64c90cb95df960e0cf5c0fa..69aa7155509c88bb153761f2ba1a248fdaca6356 100644
--- a/GUI/Models/JobStatus.cpp
+++ b/GUI/Model/Job/JobStatus.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobWorker.cpp
+//! @file      GUI/Model/Job/JobStatus.cpp
 //! @brief     Implements class JobWorker
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/JobStatus.h"
+#include "GUI/Model/Job/JobStatus.h"
 #include "Base/Utils/Assert.h"
 
 #include <boost/bimap.hpp>
@@ -25,8 +25,10 @@ const std::vector<boost::bimap<JobStatus, QString>::value_type> values = {
     {JobStatus::Canceled, "Canceled"}, {JobStatus::Failed, "Failed"}};
 
 const boost::bimap<JobStatus, QString> status2name(values.begin(), values.end());
+
 } // namespace
 
+
 const QString jobStatusToString(JobStatus status)
 {
     auto it = status2name.left.find(status);
diff --git a/GUI/Models/JobStatus.h b/GUI/Model/Job/JobStatus.h
similarity index 87%
rename from GUI/Models/JobStatus.h
rename to GUI/Model/Job/JobStatus.h
index cd6f9f3ead02b90e04c2c850f0b0310285badd3a..80fa5768d9e6779c688490952e08282acd0741ce 100644
--- a/GUI/Models/JobStatus.h
+++ b/GUI/Model/Job/JobStatus.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobStatus.h
+//! @file      GUI/Model/Job/JobStatus.h
 //! @brief     Defines enum JobStatus
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_JOBSTATUS_H
-#define BORNAGAIN_GUI_MODELS_JOBSTATUS_H
+#ifndef BORNAGAIN_GUI_MODEL_JOB_JOBSTATUS_H
+#define BORNAGAIN_GUI_MODEL_JOB_JOBSTATUS_H
 
 #include <QString>
 
@@ -34,4 +34,4 @@ const QString jobStatusToString(JobStatus status);
 //! get status value for given string representation
 JobStatus jobStatusFromString(const QString& name);
 
-#endif // BORNAGAIN_GUI_MODELS_JOBSTATUS_H
+#endif // BORNAGAIN_GUI_MODEL_JOB_JOBSTATUS_H
diff --git a/GUI/Models/JobWorker.cpp b/GUI/Model/Job/JobWorker.cpp
similarity index 97%
rename from GUI/Models/JobWorker.cpp
rename to GUI/Model/Job/JobWorker.cpp
index a3acaede4bfc90fa8ab86d7c8e0b3e9367cf0b44..eace8a30aa213c0ae3f3dcc2cddb7e16d729125b 100644
--- a/GUI/Models/JobWorker.cpp
+++ b/GUI/Model/Job/JobWorker.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobWorker.cpp
+//! @file      GUI/Model/Job/JobWorker.cpp
 //! @brief     Implements class JobWorker
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/JobWorker.h"
+#include "GUI/Model/Job/JobWorker.h"
 #include "Core/Simulation/GISASSimulation.h"
 #include <QDateTime>
 #include <memory>
diff --git a/GUI/Models/JobWorker.h b/GUI/Model/Job/JobWorker.h
similarity index 87%
rename from GUI/Models/JobWorker.h
rename to GUI/Model/Job/JobWorker.h
index 9eb805ef3102b7e4ea1c5d890c3eeb54093a4a96..d293de018b82080c254d3420666c0c5e4b2dea80 100644
--- a/GUI/Models/JobWorker.h
+++ b/GUI/Model/Job/JobWorker.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/JobWorker.h
+//! @file      GUI/Model/Job/JobWorker.h
 //! @brief     Defines class JobWorker
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_JOBWORKER_H
-#define BORNAGAIN_GUI_MODELS_JOBWORKER_H
+#ifndef BORNAGAIN_GUI_MODEL_JOB_JOBWORKER_H
+#define BORNAGAIN_GUI_MODEL_JOB_JOBWORKER_H
 
-#include "GUI/Models/JobStatus.h"
-#include <QObject>
+#include "GUI/Model/Job/JobStatus.h"
 #include <QDateTime>
+#include <QObject>
 
 class ISimulation;
 
@@ -61,4 +61,4 @@ private:
     QDateTime m_simulation_end;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_JOBWORKER_H
+#endif // BORNAGAIN_GUI_MODEL_JOB_JOBWORKER_H
diff --git a/GUI/Models/ModelPath.cpp b/GUI/Model/Job/ModelPath.cpp
similarity index 65%
rename from GUI/Models/ModelPath.cpp
rename to GUI/Model/Job/ModelPath.cpp
index a2f1195b79abf9589a261f9b734b6232bf766602..c009ad3f96dbf0a9fb1f58de2c7ec5c48a116a84 100644
--- a/GUI/Models/ModelPath.cpp
+++ b/GUI/Model/Job/ModelPath.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ModelPath.cpp
+//! @file      GUI/Model/Job/ModelPath.cpp
 //! @brief     Implements class ModelPath
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,47 +12,47 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/JobItem.h"
+#include "GUI/Model/Job/ModelPath.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Job/JobItem.h"
 
 QString GUI::Model::Path::getPathFromIndex(const QModelIndex& index)
 {
-    if (index.isValid()) {
-        QStringList namePath;
-        QModelIndex cur = index;
-        while (cur.isValid()) {
-            namePath << cur.data().toString();
-            cur = cur.parent();
-        }
-        std::reverse(namePath.begin(), namePath.end());
-        return namePath.join("/");
+    if (!index.isValid())
+        return "";
+
+    QStringList namePath;
+    QModelIndex cur = index;
+    while (cur.isValid()) {
+        namePath << cur.data().toString();
+        cur = cur.parent();
     }
-    return "";
+    std::reverse(namePath.begin(), namePath.end());
+    return namePath.join("/");
 }
 
 // TODO cover with unit tests and simplify
 
 QModelIndex GUI::Model::Path::getIndexFromPath(const SessionModel* model, const QString& path)
 {
-    if (model) {
-        QStringList parts = path.split("/");
-        SessionItem* t = model->rootItem();
-        for (int i = 0; i < parts.length(); i++) {
-            if (t->modelType() == JobItem::M_TYPE && parts[i] == "GISASInstrument") {
-                t = dynamic_cast<JobItem*>(t)->instrumentItem();
-                continue;
-            }
-            for (int j = 0; j < t->numberOfChildren(); j++) {
-                if (t->childAt(j)->itemName() == parts[i]) {
-                    t = t->childAt(j);
-                    break;
-                }
+    if (!model)
+        return {};
+
+    QStringList parts = path.split("/");
+    SessionItem* t = model->rootItem();
+    for (int i = 0; i < parts.length(); i++) {
+        if (t->modelType() == JobItem::M_TYPE && parts[i] == "GISASInstrument") {
+            t = dynamic_cast<JobItem*>(t)->instrumentItem();
+            continue;
+        }
+        for (int j = 0; j < t->numberOfChildren(); j++) {
+            if (t->childAt(j)->itemName() == parts[i]) {
+                t = t->childAt(j);
+                break;
             }
         }
-        return t->index();
     }
-    return QModelIndex();
+    return t->index();
 }
 
 //! returns an item from relative path wrt to given parent
@@ -73,12 +73,8 @@ bool GUI::Model::Path::isValidItem(SessionModel* model, SessionItem* item,
     for (int i_row = 0; i_row < model->rowCount(parent); ++i_row) {
         QModelIndex index = model->index(i_row, 0, parent);
         SessionItem* curr = model->itemForIndex(index);
-        if (curr == item)
+        if (curr == item || isValidItem(model, item, index))
             return true;
-
-        bool isvalid = isValidItem(model, item, index);
-        if (isvalid)
-            return isvalid;
     }
     return false;
 }
diff --git a/GUI/Models/ModelPath.h b/GUI/Model/Job/ModelPath.h
similarity index 87%
rename from GUI/Models/ModelPath.h
rename to GUI/Model/Job/ModelPath.h
index 3cf7792d67bef2566c7b37d1f03d747ea83c1772..0a53f0fd5d48dbc178b175d81348ba69eb0292db 100644
--- a/GUI/Models/ModelPath.h
+++ b/GUI/Model/Job/ModelPath.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ModelPath.h
+//! @file      GUI/Model/Job/ModelPath.h
 //! @brief     Defines namespace GUI::Model::Path
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MODELPATH_H
-#define BORNAGAIN_GUI_MODELS_MODELPATH_H
+#ifndef BORNAGAIN_GUI_MODEL_JOB_MODELPATH_H
+#define BORNAGAIN_GUI_MODEL_JOB_MODELPATH_H
 
 #include <memory>
 #include <vector>
@@ -39,4 +39,4 @@ const SessionItem* ancestor(const SessionItem* item, const QString& requiredMode
 
 } // namespace GUI::Model::Path
 
-#endif // BORNAGAIN_GUI_MODELS_MODELPATH_H
+#endif // BORNAGAIN_GUI_MODEL_JOB_MODELPATH_H
diff --git a/GUI/Models/ParameterTreeUtils.cpp b/GUI/Model/Job/ParameterTreeUtils.cpp
similarity index 85%
rename from GUI/Models/ParameterTreeUtils.cpp
rename to GUI/Model/Job/ParameterTreeUtils.cpp
index f29de29771c7600f62dc0b093c760cc7e53b038e..343cad3d5b59f2f9b4d81ff65c4d318ce113f228 100644
--- a/GUI/Models/ParameterTreeUtils.cpp
+++ b/GUI/Model/Job/ParameterTreeUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParameterTreeUtils.cpp
+//! @file      GUI/Model/Job/ParameterTreeUtils.cpp
 //! @brief     Implements ParameterTreeUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,18 +12,16 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ParameterTreeUtils.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FitParameterHelper.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/MaterialItemContainer.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParameterTreeItems.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/SampleModel.h"
+#include "GUI/Model/Job/ParameterTreeUtils.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/ModelPath.h"
+#include "GUI/Model/Material/MaterialItemContainer.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Util/Error.h"
 #include <QStack>
 
 #include <boost/polymorphic_cast.hpp>
@@ -33,9 +31,8 @@ namespace {
 
 void handleItem(SessionItem* tree, const SessionItem* source)
 {
-    if (tree->hasModelType<ParameterLabelItem>()) {
+    if (tree->hasModelType<ParameterLabelItem>())
         tree->setDisplayName(source->itemName());
-    }
 
     else if (tree->hasModelType<ParameterItem>()) {
         tree->setDisplayName(source->itemName());
diff --git a/GUI/Models/ParameterTreeUtils.h b/GUI/Model/Job/ParameterTreeUtils.h
similarity index 83%
rename from GUI/Models/ParameterTreeUtils.h
rename to GUI/Model/Job/ParameterTreeUtils.h
index 75b175cdb4f6da9f1e7ebe4cd96e119349c534dd..6317d8d6555d7bda29cd142874c617e000066b12 100644
--- a/GUI/Models/ParameterTreeUtils.h
+++ b/GUI/Model/Job/ParameterTreeUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParameterTreeUtils.h
+//! @file      GUI/Model/Job/ParameterTreeUtils.h
 //! @brief     Defines namespace GUI::Model::ParameterTreeUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_PARAMETERTREEUTILS_H
-#define BORNAGAIN_GUI_MODELS_PARAMETERTREEUTILS_H
+#ifndef BORNAGAIN_GUI_MODEL_JOB_PARAMETERTREEUTILS_H
+#define BORNAGAIN_GUI_MODEL_JOB_PARAMETERTREEUTILS_H
 
 #include <QPair>
 #include <QString>
@@ -33,4 +33,4 @@ void createParameterTree(JobItem* jobItem);
 
 } // namespace GUI::Model::ParameterTreeUtils
 
-#endif // BORNAGAIN_GUI_MODELS_PARAMETERTREEUTILS_H
+#endif // BORNAGAIN_GUI_MODEL_JOB_PARAMETERTREEUTILS_H
diff --git a/GUI/Models/MaterialDataItems.cpp b/GUI/Model/Material/MaterialDataItems.cpp
similarity index 94%
rename from GUI/Models/MaterialDataItems.cpp
rename to GUI/Model/Material/MaterialDataItems.cpp
index d9631ae957aa3b333c7d879c7348dec018f0ec70..ebd044005cd1ac27dd506bb7006e11145e996649 100644
--- a/GUI/Models/MaterialDataItems.cpp
+++ b/GUI/Model/Material/MaterialDataItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaterialDataItems.cpp
+//! @file      GUI/Model/Material/MaterialDataItems.cpp
 //! @brief     Implements MaterialDataItems classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/MaterialDataItems.h"
+#include "GUI/Model/Material/MaterialDataItems.h"
 
 MaterialDataItem::MaterialDataItem(const QString& modelType) : SessionItem(modelType)
 {
diff --git a/GUI/Models/MaterialDataItems.h b/GUI/Model/Material/MaterialDataItems.h
similarity index 82%
rename from GUI/Models/MaterialDataItems.h
rename to GUI/Model/Material/MaterialDataItems.h
index b9e1d61ae22f49b603c5d13d6285490136206d4e..ea25e70dd7583d41a8f4d4e20589076ed3f44651 100644
--- a/GUI/Models/MaterialDataItems.h
+++ b/GUI/Model/Material/MaterialDataItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaterialDataItems.h
+//! @file      GUI/Model/Material/MaterialDataItems.h
 //! @brief     Defines MaterialDataItems classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MATERIALDATAITEMS_H
-#define BORNAGAIN_GUI_MODELS_MATERIALDATAITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALDATAITEMS_H
+#define BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALDATAITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class BA_CORE_API_ MaterialDataItem : public SessionItem {
 protected:
@@ -48,4 +48,4 @@ public:
     friend class MaterialItem;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_MATERIALDATAITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALDATAITEMS_H
diff --git a/GUI/Models/MaterialItem.cpp b/GUI/Model/Material/MaterialItem.cpp
similarity index 94%
rename from GUI/Models/MaterialItem.cpp
rename to GUI/Model/Material/MaterialItem.cpp
index d08ca837c3b4f70ab97f5f258a6f39f103f1175a..e5db9e12d87334205f9c9ab5dfb92211d0ecc316 100644
--- a/GUI/Models/MaterialItem.cpp
+++ b/GUI/Model/Material/MaterialItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaterialItem.cpp
+//! @file      GUI/Model/Material/MaterialItem.cpp
 //! @brief     Implements class MaterialItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,22 +12,22 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItem.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/GroupInfo.h"
-#include "GUI/Models/MaterialDataItems.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Models/VectorItem.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Group/GroupInfo.h"
+#include "GUI/Model/Material/MaterialDataItems.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
 #include "Sample/Material/MaterialFactoryFuncs.h"
-
 #include <QColor>
+#include <QUuid>
 
 namespace {
+
 const QString magnetization_tooltip = "Magnetization (A/m)";
+
 }
 
+
 MaterialItem::MaterialItem() : SessionItem(M_TYPE)
 {
     setItemName("Material");
@@ -41,7 +41,7 @@ MaterialItem::MaterialItem() : SessionItem(M_TYPE)
     addGroupProperty(P_MATERIAL_DATA, info);
 
     addProperty<VectorItem>(P_MAGNETIZATION)->setToolTip(magnetization_tooltip);
-    addProperty(P_IDENTIFIER, GUI::Helpers::createUuid());
+    addProperty(P_IDENTIFIER, QUuid::createUuid().toString());
     getItem(P_IDENTIFIER)->setVisible(false);
 }
 
diff --git a/GUI/Models/MaterialItem.h b/GUI/Model/Material/MaterialItem.h
similarity index 89%
rename from GUI/Models/MaterialItem.h
rename to GUI/Model/Material/MaterialItem.h
index a615b0cb4aef5f3713e73863675b7bdcab8150e5..9332b5bfe3f0c25ebe56280919df548f33b742a9 100644
--- a/GUI/Models/MaterialItem.h
+++ b/GUI/Model/Material/MaterialItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaterialItem.h
+//! @file      GUI/Model/Material/MaterialItem.h
 //! @brief     Defines class MaterialItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MATERIALITEM_H
-#define BORNAGAIN_GUI_MODELS_MATERIALITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEM_H
+#define BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEM_H
+
+#include "GUI/Model/Session/SessionItem.h"
 
-#include "Base/Types/Complex.h"
 #include "Base/Vector/Vectors3D.h"
-#include "GUI/Models/SessionItem.h"
 
 class Material;
 class DoubleDescriptor;
@@ -73,4 +73,4 @@ public:
     bool operator!=(const MaterialItem& other) const;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_MATERIALITEM_H
+#endif // BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEM_H
diff --git a/GUI/Models/MaterialItemContainer.cpp b/GUI/Model/Material/MaterialItemContainer.cpp
similarity index 84%
rename from GUI/Models/MaterialItemContainer.cpp
rename to GUI/Model/Material/MaterialItemContainer.cpp
index f245fca08aae4d4380ff2c42f8cb0f7ec771efcc..b6056c9487096bfac5de5ae5bf41ec95a369731a 100644
--- a/GUI/Models/MaterialItemContainer.cpp
+++ b/GUI/Model/Material/MaterialItemContainer.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaterialItemContainer.cpp
+//! @file      GUI/Model/Material/MaterialItemContainer.cpp
 //! @brief     Implements class MaterialItemContainer
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/MaterialItemContainer.h"
-#include "GUI/Models/MaterialItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Material/MaterialItemContainer.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include <QUuid>
 
 MaterialItemContainer::MaterialItemContainer() : SessionItem(M_TYPE)
 {
@@ -26,7 +26,7 @@ MaterialItemContainer::MaterialItemContainer() : SessionItem(M_TYPE)
 MaterialItem* MaterialItemContainer::insertCopy(MaterialItem* material_item)
 {
     MaterialItem* item_copy = model()->copyItem(material_item, this, T_MATERIALS);
-    item_copy->setIdentifier(GUI::Helpers::createUuid());
+    item_copy->setIdentifier(QUuid::createUuid().toString());
 
     return item_copy;
 }
diff --git a/GUI/Models/MaterialItemContainer.h b/GUI/Model/Material/MaterialItemContainer.h
similarity index 79%
rename from GUI/Models/MaterialItemContainer.h
rename to GUI/Model/Material/MaterialItemContainer.h
index 549ba25983ecaf418354958f128340316c77f6a3..92e259775163c2c9e2b0ea5440f380bf13dbcbd1 100644
--- a/GUI/Models/MaterialItemContainer.h
+++ b/GUI/Model/Material/MaterialItemContainer.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaterialItemContainer.h
+//! @file      GUI/Model/Material/MaterialItemContainer.h
 //! @brief     Defines class MaterialItemContainer
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MATERIALITEMCONTAINER_H
-#define BORNAGAIN_GUI_MODELS_MATERIALITEMCONTAINER_H
+#ifndef BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEMCONTAINER_H
+#define BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEMCONTAINER_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class MaterialItem;
 
@@ -38,4 +38,4 @@ public:
     QVector<MaterialItem*> getMaterials();
 };
 
-#endif // BORNAGAIN_GUI_MODELS_MATERIALITEMCONTAINER_H
+#endif // BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEMCONTAINER_H
diff --git a/GUI/Model/Material/MaterialItemUtils.cpp b/GUI/Model/Material/MaterialItemUtils.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..4b2dd603d25983bd3aeead5bc10b49320b3a44d8
--- /dev/null
+++ b/GUI/Model/Material/MaterialItemUtils.cpp
@@ -0,0 +1,76 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/Model/Material/MaterialItemUtils.cpp
+//! @brief     Implements class MaterialItemUtils
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2018
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItemContainer.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Material/MaterialModelStore.h"
+#include "GUI/Util/Error.h"
+#include "Sample/Material/Material.h"
+
+#include <deque>
+#include <random>
+
+QColor GUI::MaterialUtil::randomMaterialColor()
+{
+    static std::random_device r;
+    std::default_random_engine re(r());
+    std::uniform_int_distribution<int> ru(0, 255);
+
+    return QColor(ru(re), ru(re), ru(re));
+}
+
+QString GUI::MaterialUtil::defaultMaterialIdentifier()
+{
+    if (!GUI::Model::MaterialModelStore::materialModel())
+        return QString();
+
+    auto materials = GUI::Model::MaterialModelStore::materialModel()->topItems<MaterialItem>();
+    return materials.isEmpty() ? QString() : materials.front()->identifier();
+}
+
+std::unique_ptr<Material> GUI::MaterialUtil::createDomainMaterial(const QString& materialIdentifier)
+{
+    MaterialItem* materialItem = findMaterial(materialIdentifier);
+    return materialItem->createMaterial();
+}
+
+std::unique_ptr<Material>
+GUI::MaterialUtil::createDomainMaterial(const QString& materialIdentifier,
+                                        const MaterialItemContainer& container)
+{
+    const MaterialItem* material_item = container.findMaterialById(materialIdentifier);
+    if (!material_item)
+        throw Error("MaterialUtils::createDomainMaterial() -> Error. Can't find "
+                    "material with identifier '"
+                    + materialIdentifier + "'.");
+    return material_item->createMaterial();
+}
+
+MaterialItem* GUI::MaterialUtil::findMaterial(const QString& materialIdentifier)
+{
+    if (!GUI::Model::MaterialModelStore::materialModel())
+        throw Error("GUI::MaterialUtil::findMaterial() -> Error. "
+                    "Attempt to access non-existing material model");
+
+    auto material =
+        GUI::Model::MaterialModelStore::materialModel()->materialFromIdentifier(materialIdentifier);
+
+    if (!material)
+        throw Error("MaterialUtils::findMaterial() -> Error. Can't find "
+                    "material with identifier '"
+                    + materialIdentifier + "'.");
+    return material;
+}
diff --git a/GUI/Models/MaterialItemUtils.h b/GUI/Model/Material/MaterialItemUtils.h
similarity index 65%
rename from GUI/Models/MaterialItemUtils.h
rename to GUI/Model/Material/MaterialItemUtils.h
index 98c93d2d63df636feb24fd221c0a8cd7f03b17ba..6e498c660e1156c3183f8199790296e2875a0b3b 100644
--- a/GUI/Models/MaterialItemUtils.h
+++ b/GUI/Model/Material/MaterialItemUtils.h
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaterialItemUtils.h
-//! @brief     Defines namespace GUI::Model::MaterialItemUtils
+//! @file      GUI/Model/Material/MaterialItemUtils.h
+//! @brief     Defines namespace GUI::MaterialUtil
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,22 +12,21 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MATERIALITEMUTILS_H
-#define BORNAGAIN_GUI_MODELS_MATERIALITEMUTILS_H
+#ifndef BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEMUTILS_H
+#define BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEMUTILS_H
 
-#include "GUI/Models/MaterialItem.h"
 #include <QColor>
 #include <QString>
 #include <memory>
 
 class Material;
+class MaterialItem;
 class MaterialItemContainer;
 class ItemWithMaterial;
 class ParticleLayoutItem;
 
-namespace GUI::Model::MaterialItemUtils {
+namespace GUI::MaterialUtil {
 
-QColor suggestMaterialColor(const QString& name);
 QColor randomMaterialColor();
 
 QString defaultMaterialIdentifier();
@@ -38,9 +37,6 @@ std::unique_ptr<Material> createDomainMaterial(const QString& materialIdentifier
 
 MaterialItem* findMaterial(const QString& materialIdentifier);
 
-//! Gather material property items from a given item
-QVector<ItemWithMaterial*> itemsWithMaterial(ParticleLayoutItem* item);
+} // namespace GUI::MaterialUtil
 
-} // namespace GUI::Model::MaterialItemUtils
-
-#endif // BORNAGAIN_GUI_MODELS_MATERIALITEMUTILS_H
+#endif // BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALITEMUTILS_H
diff --git a/GUI/Models/MaterialModel.cpp b/GUI/Model/Material/MaterialModel.cpp
similarity index 86%
rename from GUI/Models/MaterialModel.cpp
rename to GUI/Model/Material/MaterialModel.cpp
index 69d115a23418c481767e867d8c876eab0e2cb4dd..a3d5bc702b1656754b0260c4a31cbc05c8098afb 100644
--- a/GUI/Models/MaterialModel.cpp
+++ b/GUI/Model/Material/MaterialModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaterialModel.cpp
+//! @file      GUI/Model/Material/MaterialModel.cpp
 //! @brief     Implements class MaterialModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,29 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/MaterialModelStore.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/Material/MaterialModelStore.h"
+#include <QUuid>
+
+namespace {
+
+QColor suggestMaterialColor(const QString& name)
+{
+    if (name.contains("Vacuum"))
+        return QColor(179, 242, 255);
+    if (name.contains("Substrate"))
+        return QColor(205, 102, 0);
+    if (name.contains("Default"))
+        return QColor(Qt::green);
+    if (name.contains("Particle"))
+        return QColor(146, 198, 255);
+    return GUI::MaterialUtil::randomMaterialColor();
+}
+
+} // namespace
+
 
 MaterialModel::MaterialModel(QObject* parent)
     : SessionModel(GUI::Session::XML::MaterialModelTag, parent)
@@ -42,7 +61,7 @@ MaterialItem* MaterialModel::addRefractiveMaterial(const QString& name, double d
 {
     auto materialItem = insertItem<MaterialItem>();
     materialItem->setItemName(name);
-    materialItem->setColor(GUI::Model::MaterialItemUtils::suggestMaterialColor(name));
+    materialItem->setColor(suggestMaterialColor(name));
     materialItem->setRefractiveIndex(delta, beta);
     return materialItem;
 }
@@ -51,7 +70,7 @@ MaterialItem* MaterialModel::addSLDMaterial(const QString& name, double sld, dou
 {
     auto materialItem = insertItem<MaterialItem>();
     materialItem->setItemName(name);
-    materialItem->setColor(GUI::Model::MaterialItemUtils::suggestMaterialColor(name));
+    materialItem->setColor(suggestMaterialColor(name));
     materialItem->setScatteringLengthDensity(complex_t(sld, abs_term));
     return materialItem;
 }
@@ -80,7 +99,7 @@ MaterialItem* MaterialModel::cloneMaterial(MaterialItem* material)
         return nullptr;
 
     auto clonedMaterial = copyItem(material, nullptr);
-    clonedMaterial->setIdentifier(GUI::Helpers::createUuid());
+    clonedMaterial->setIdentifier(QUuid::createUuid().toString());
     clonedMaterial->setItemName(material->itemName() + " (copy)");
     return clonedMaterial;
 }
diff --git a/GUI/Models/MaterialModel.h b/GUI/Model/Material/MaterialModel.h
similarity index 88%
rename from GUI/Models/MaterialModel.h
rename to GUI/Model/Material/MaterialModel.h
index 4e0fc7312b8bfd94fd8576e640f06d5f4a136470..a88ce27b825510a41040cf2130cf47c546a0c837 100644
--- a/GUI/Models/MaterialModel.h
+++ b/GUI/Model/Material/MaterialModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaterialModel.h
+//! @file      GUI/Model/Material/MaterialModel.h
 //! @brief     Defines class MaterialModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MATERIALMODEL_H
-#define BORNAGAIN_GUI_MODELS_MATERIALMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALMODEL_H
+#define BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALMODEL_H
 
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Session/SessionModel.h"
 
 class MaterialItem;
 
@@ -57,4 +57,4 @@ private:
     void onRowsChange(const QModelIndex& parent, int, int);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_MATERIALMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALMODEL_H
diff --git a/GUI/Models/MaterialModelStore.cpp b/GUI/Model/Material/MaterialModelStore.cpp
similarity index 90%
rename from GUI/Models/MaterialModelStore.cpp
rename to GUI/Model/Material/MaterialModelStore.cpp
index 6e0b527bba9af5c323dbb697921cc483f05bfd3f..86d0f9d84a1b549726f0c75ed23e015aab1e95d7 100644
--- a/GUI/Models/MaterialModelStore.cpp
+++ b/GUI/Model/Material/MaterialModelStore.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaterialModelStore.cpp
+//! @file      GUI/Model/Material/MaterialModelStore.cpp
 //! @brief     Implements namespace MaterialModelStore
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/MaterialModelStore.h"
-#include "GUI/Models/Error.h"
+#include "GUI/Model/Material/MaterialModelStore.h"
+#include "GUI/Util/Error.h"
 
 namespace {
 MaterialModel* theMaterialModel = nullptr;
diff --git a/GUI/Models/MaterialModelStore.h b/GUI/Model/Material/MaterialModelStore.h
similarity index 79%
rename from GUI/Models/MaterialModelStore.h
rename to GUI/Model/Material/MaterialModelStore.h
index 8079d58a39534455fd3e9199e1e0adb496c10dda..8af46ae41f99362baf7230ffc0f60b7fcd046f45 100644
--- a/GUI/Models/MaterialModelStore.h
+++ b/GUI/Model/Material/MaterialModelStore.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MaterialModelStore.h
+//! @file      GUI/Model/Material/MaterialModelStore.h
 //! @brief     Defines namespace GUI::Model::MaterialModelStore
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MATERIALMODELSTORE_H
-#define BORNAGAIN_GUI_MODELS_MATERIALMODELSTORE_H
+#ifndef BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALMODELSTORE_H
+#define BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALMODELSTORE_H
 
 class MaterialModel;
 
@@ -27,4 +27,4 @@ void unsubscribe(MaterialModel* materialModel);
 
 } // namespace GUI::Model::MaterialModelStore
 
-#endif // BORNAGAIN_GUI_MODELS_MATERIALMODELSTORE_H
+#endif // BORNAGAIN_GUI_MODEL_MATERIAL_MATERIALMODELSTORE_H
diff --git a/GUI/mainwindow/OutputDataIOService.cpp b/GUI/Model/Project/OutputDataIOService.cpp
similarity index 92%
rename from GUI/mainwindow/OutputDataIOService.cpp
rename to GUI/Model/Project/OutputDataIOService.cpp
index 13d21bbe8b0b0b0f34507c0ae45c9097e201e07c..bf31ba5a5ab6b212a4e1d6cede0b4ac67752b33a 100644
--- a/GUI/mainwindow/OutputDataIOService.cpp
+++ b/GUI/Model/Project/OutputDataIOService.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/OutputDataIOService.cpp
+//! @file      GUI/Model/Project/OutputDataIOService.cpp
 //! @brief     Implements class OutputDataIOService
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/OutputDataIOService.h"
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/SaveLoadInterface.h"
-#include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/utils/MessageService.h"
+#include "GUI/Model/Project/OutputDataIOService.h"
+#include "GUI/Model/Data/ApplicationModels.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/IO/SaveLoadInterface.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/ModelPath.h"
+#include "GUI/Util/MessageService.h"
 #include <QFile>
 #include <QSet>
 
diff --git a/GUI/mainwindow/OutputDataIOService.h b/GUI/Model/Project/OutputDataIOService.h
similarity index 84%
rename from GUI/mainwindow/OutputDataIOService.h
rename to GUI/Model/Project/OutputDataIOService.h
index c8ef06897bded9a09a49fcd891428c86c49e52f9..ac3ce190929499f7cd33dd504a45a230b8687cf3 100644
--- a/GUI/mainwindow/OutputDataIOService.h
+++ b/GUI/Model/Project/OutputDataIOService.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/OutputDataIOService.h
+//! @file      GUI/Model/Project/OutputDataIOService.h
 //! @brief     Defines class OutputDataIOService
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_OUTPUTDATAIOSERVICE_H
-#define BORNAGAIN_GUI_MAINWINDOW_OUTPUTDATAIOSERVICE_H
+#ifndef BORNAGAIN_GUI_MODEL_PROJECT_OUTPUTDATAIOSERVICE_H
+#define BORNAGAIN_GUI_MODEL_PROJECT_OUTPUTDATAIOSERVICE_H
 
-#include "GUI/mainwindow/OutputDataIOHistory.h"
+#include "GUI/Model/IO/OutputDataIOHistory.h"
 #include <QObject>
 
 class ApplicationModels;
@@ -49,4 +49,4 @@ private:
     ApplicationModels* m_applicationModels;
 };
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_OUTPUTDATAIOSERVICE_H
+#endif // BORNAGAIN_GUI_MODEL_PROJECT_OUTPUTDATAIOSERVICE_H
diff --git a/GUI/mainwindow/projectdocument.cpp b/GUI/Model/Project/ProjectDocument.cpp
similarity index 87%
rename from GUI/mainwindow/projectdocument.cpp
rename to GUI/Model/Project/ProjectDocument.cpp
index fe4860d4371588a802bdb424652f070fc37d1ce7..a711d358669ace39bda0a7f3d00920c590e0434f 100644
--- a/GUI/mainwindow/projectdocument.cpp
+++ b/GUI/Model/Project/ProjectDocument.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/projectdocument.cpp
+//! @file      GUI/Model/Project/ProjectDocument.cpp
 //! @brief     Implements class ProjectDocument
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,16 +12,18 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/projectdocument.h"
-#include "GUI/Models/DocumentModel.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/mainwindow/OutputDataIOService.h"
-#include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/utils/Helpers.h"
-#include "GUI/utils/MessageService.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/Model/Data/DocumentModel.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/Instrument/LinkInstrumentManager.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/Project/OutputDataIOService.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/MessageService.h"
+#include "GUI/Util/Path.h"
 #include <QDir>
 #include <QElapsedTimer>
+#include <QStandardPaths>
 #include <QXmlStreamReader>
 
 namespace {
@@ -51,6 +53,8 @@ ProjectDocument::ProjectDocument(const QString& projectFileName)
     connectModels();
 }
 
+ProjectDocument::~ProjectDocument() = default;
+
 QString ProjectDocument::projectName() const
 {
     return m_project_name;
@@ -69,15 +73,31 @@ QString ProjectDocument::projectDir() const
     return m_project_dir;
 }
 
+QString ProjectDocument::validProjectDir() const
+{
+    if (m_project_name.isEmpty())
+        return "";
+    return m_project_dir;
+}
+
 void ProjectDocument::setProjectDir(const QString& text)
 {
     m_project_dir = text;
 }
 
+//! Returns directory name suitable for saving plots.
+
+QString ProjectDocument::userExportDir() const
+{
+    if (QString dir = validProjectDir(); !dir.isEmpty())
+        return dir;
+    return QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
+}
+
 QString ProjectDocument::projectFileName() const
 {
     if (!projectName().isEmpty())
-        return projectDir() + "/" + projectName() + projectFileExtension();
+        return projectDir() + "/" + projectName() + GUI::Project::Utils::projectFileExtension;
     return "";
 }
 
@@ -87,11 +107,6 @@ void ProjectDocument::setProjectFileName(const QString& projectFileName)
     setProjectDir(GUI::Project::Utils::projectDir(projectFileName));
 }
 
-QString ProjectDocument::projectFileExtension()
-{
-    return ".pro";
-}
-
 InstrumentModel* ProjectDocument::instrumentModel() const
 {
     return m_applicationModels.instrumentModel();
@@ -221,7 +236,7 @@ QString ProjectDocument::documentVersion() const
 {
     QString result(m_currentVersion);
     if (result.isEmpty())
-        result = GUI::Helpers::getBornAgainVersionString();
+        result = GUI::Util::Path::getBornAgainVersionString();
     return result;
 }
 
@@ -286,8 +301,8 @@ ProjectDocument::ReadResult ProjectDocument::readProject(QIODevice* device,
             if (reader.name() == BornAgainTag) {
                 m_currentVersion = reader.attributes().value(BornAgainVersionAttribute).toString();
 
-                if (!GUI::Helpers::isVersionMatchMinimal(m_currentVersion,
-                                                         minimal_supported_version)) {
+                if (!GUI::Util::Path::isVersionMatchMinimal(m_currentVersion,
+                                                            minimal_supported_version)) {
                     QString message = QString("Can't open document version '%1', "
                                               "minimal supported version '%2'")
                                           .arg(m_currentVersion)
@@ -322,7 +337,7 @@ void ProjectDocument::writeTo(QIODevice* device)
     writer.setAutoFormatting(true);
     writer.writeStartDocument();
     writer.writeStartElement(BornAgainTag);
-    QString version_string = GUI::Helpers::getBornAgainVersionString();
+    QString version_string = GUI::Util::Path::getBornAgainVersionString();
     writer.writeAttribute(BornAgainVersionAttribute, version_string);
 
     writer.writeStartElement(InfoTag);
diff --git a/GUI/mainwindow/projectdocument.h b/GUI/Model/Project/ProjectDocument.h
similarity index 91%
rename from GUI/mainwindow/projectdocument.h
rename to GUI/Model/Project/ProjectDocument.h
index 49f166ac02e7513d366e67da1fa984fee9a5f58e..b1bd44097c74834caf2f7ba7f8533371b152c39d 100644
--- a/GUI/mainwindow/projectdocument.h
+++ b/GUI/Model/Project/ProjectDocument.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/projectdocument.h
+//! @file      GUI/Model/Project/ProjectDocument.h
 //! @brief     Defines class ProjectDocument
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,15 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_PROJECTDOCUMENT_H
-#define BORNAGAIN_GUI_MAINWINDOW_PROJECTDOCUMENT_H
+#ifndef BORNAGAIN_GUI_MODEL_PROJECT_PROJECTDOCUMENT_H
+#define BORNAGAIN_GUI_MODEL_PROJECT_PROJECTDOCUMENT_H
 
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/mainwindow/LinkInstrumentManager.h"
+#include "GUI/Model/Data/ApplicationModels.h"
 #include <QObject>
 #include <QVariant>
 #include <memory>
 
 class QIODevice;
-class ApplicationModels;
 class MessageService;
 class OutputDataIOService;
 class InstrumentModel;
@@ -58,18 +56,19 @@ public:
     Q_FLAG(Functionalities)
 
     ProjectDocument(const QString& projectFileName = "");
+    ~ProjectDocument();
 
     QString projectName() const;
     void setProjectName(const QString& text);
 
     QString projectDir() const;
+    QString validProjectDir() const;
     void setProjectDir(const QString& text);
+    QString userExportDir() const;
 
     QString projectFileName() const;
     void setProjectFileName(const QString& text);
 
-    static QString projectFileExtension();
-
     InstrumentModel* instrumentModel() const;
     SampleModel* sampleModel() const;
     MaterialModel* materialModel() const;
@@ -140,4 +139,4 @@ inline ProjectDocument::Functionalities toFunctionalities(const QVariant& v)
         v.value<ProjectDocument::Functionalities::Int>());
 }
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_PROJECTDOCUMENT_H
+#endif // BORNAGAIN_GUI_MODEL_PROJECT_PROJECTDOCUMENT_H
diff --git a/GUI/Models/FTDecayFunctionItems.cpp b/GUI/Model/Sample/FTDecayFunctionItems.cpp
similarity index 98%
rename from GUI/Models/FTDecayFunctionItems.cpp
rename to GUI/Model/Sample/FTDecayFunctionItems.cpp
index b251f2fb52f76849f1c400f5d6b4899573723e88..bd615f93b65efdc4b736a98450520e48ac87bc3b 100644
--- a/GUI/Models/FTDecayFunctionItems.cpp
+++ b/GUI/Model/Sample/FTDecayFunctionItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FTDecayFunctionItems.cpp
+//! @file      GUI/Model/Sample/FTDecayFunctionItems.cpp
 //! @brief     Implements FTDecayFunction1DItem classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/FTDecayFunctionItems.h"
+#include "GUI/Model/Sample/FTDecayFunctionItems.h"
 #include "Base/Const/Units.h"
 
 // --------------------------------------------------------------------------------------------- //
diff --git a/GUI/Models/FTDecayFunctionItems.h b/GUI/Model/Sample/FTDecayFunctionItems.h
similarity index 92%
rename from GUI/Models/FTDecayFunctionItems.h
rename to GUI/Model/Sample/FTDecayFunctionItems.h
index 50b8bcaa312bceb511ea21b90cd61125c1fd4127..3aa44f818e61018f83a0587846e1278cf137e108 100644
--- a/GUI/Models/FTDecayFunctionItems.h
+++ b/GUI/Model/Sample/FTDecayFunctionItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FTDecayFunctionItems.h
+//! @file      GUI/Model/Sample/FTDecayFunctionItems.h
 //! @brief     Defines FTDecayFunction1DItem classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_FTDECAYFUNCTIONITEMS_H
-#define BORNAGAIN_GUI_MODELS_FTDECAYFUNCTIONITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_FTDECAYFUNCTIONITEMS_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_FTDECAYFUNCTIONITEMS_H
 
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 #include "Sample/Correlations/FTDecay1D.h"
 #include "Sample/Correlations/FTDecay2D.h"
 
@@ -131,4 +131,4 @@ public:
     void setEta(double eta);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_FTDECAYFUNCTIONITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_FTDECAYFUNCTIONITEMS_H
diff --git a/GUI/Models/FTDistributionItems.cpp b/GUI/Model/Sample/FTDistributionItems.cpp
similarity index 98%
rename from GUI/Models/FTDistributionItems.cpp
rename to GUI/Model/Sample/FTDistributionItems.cpp
index 361110d78f38f17e7b66e5134f7d25bbde895a2a..b5ebc68630a4e55079067d530d605b82234ec706 100644
--- a/GUI/Models/FTDistributionItems.cpp
+++ b/GUI/Model/Sample/FTDistributionItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FTDistributionItems.cpp
+//! @file      GUI/Model/Sample/FTDistributionItems.cpp
 //! @brief     Implements FTDistribution1DItem's classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/FTDistributionItems.h"
+#include "GUI/Model/Sample/FTDistributionItems.h"
 #include "Base/Const/Units.h"
-#include "GUI/Models/DoubleDescriptor.h"
 
 DoubleDescriptor FTDistribution1DItem::omega() const
 {
diff --git a/GUI/Models/FTDistributionItems.h b/GUI/Model/Sample/FTDistributionItems.h
similarity index 93%
rename from GUI/Models/FTDistributionItems.h
rename to GUI/Model/Sample/FTDistributionItems.h
index 01b8ff947cab88ec3771c2174e7056d5d36e8517..123ff7da4023af8440ad3551416c2e1523c42085 100644
--- a/GUI/Models/FTDistributionItems.h
+++ b/GUI/Model/Sample/FTDistributionItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FTDistributionItems.h
+//! @file      GUI/Model/Sample/FTDistributionItems.h
 //! @brief     Defines FTDistribution1DItem's classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_FTDISTRIBUTIONITEMS_H
-#define BORNAGAIN_GUI_MODELS_FTDISTRIBUTIONITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_FTDISTRIBUTIONITEMS_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_FTDISTRIBUTIONITEMS_H
 
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 #include "Sample/Correlations/FTDistributions1D.h"
 #include "Sample/Correlations/FTDistributions2D.h"
 
@@ -162,4 +162,4 @@ public:
     void setEta(double eta);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_FTDISTRIBUTIONITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_FTDISTRIBUTIONITEMS_H
diff --git a/GUI/Models/FormFactorItems.cpp b/GUI/Model/Sample/FormFactorItems.cpp
similarity index 99%
rename from GUI/Models/FormFactorItems.cpp
rename to GUI/Model/Sample/FormFactorItems.cpp
index b10bbfb376cfca579ef8a3618dbebea378d30642..7deca5ee1b51fa2c3fdba541a490199772776d03 100644
--- a/GUI/Models/FormFactorItems.cpp
+++ b/GUI/Model/Sample/FormFactorItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FormFactorItems.cpp
+//! @file      GUI/Model/Sample/FormFactorItems.cpp
 //! @brief     Implements FormFactorItems classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/FormFactorItems.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
 #include "Base/Const/Units.h"
-#include "GUI/Models/GroupInfo.h"
+#include "GUI/Model/Group/GroupInfo.h"
 #include "Sample/HardParticle/HardParticles.h"
 
 /* ------------------------------------------------ */
diff --git a/GUI/Models/FormFactorItems.h b/GUI/Model/Sample/FormFactorItems.h
similarity index 98%
rename from GUI/Models/FormFactorItems.h
rename to GUI/Model/Sample/FormFactorItems.h
index 1ac959775eaa55bba0831889a24a7b9f40c1f0fb..69840f57bcb3736f87c5131433eb484a8ec6b132 100644
--- a/GUI/Models/FormFactorItems.h
+++ b/GUI/Model/Sample/FormFactorItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/FormFactorItems.h
+//! @file      GUI/Model/Sample/FormFactorItems.h
 //! @brief     Defines FormFactorItems classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_FORMFACTORITEMS_H
-#define BORNAGAIN_GUI_MODELS_FORMFACTORITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_FORMFACTORITEMS_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_FORMFACTORITEMS_H
 
-#include "DoubleDescriptor.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 
 class IFormFactor;
 class GroupInfo;
@@ -702,4 +702,4 @@ public:
 /// get a group info containing all form factors
 GroupInfo formFactorGroupInfo();
 
-#endif // BORNAGAIN_GUI_MODELS_FORMFACTORITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_FORMFACTORITEMS_H
diff --git a/GUI/Models/GUIDomainSampleVisitor.cpp b/GUI/Model/Sample/GUIDomainSampleVisitor.cpp
similarity index 96%
rename from GUI/Models/GUIDomainSampleVisitor.cpp
rename to GUI/Model/Sample/GUIDomainSampleVisitor.cpp
index 914821abcd90fb9a33b28bf6c573db45464e4cee..06bb1e89a335bf62e12bd4c05bb59a2c7ed73a11 100644
--- a/GUI/Models/GUIDomainSampleVisitor.cpp
+++ b/GUI/Model/Sample/GUIDomainSampleVisitor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GUIDomainSampleVisitor.cpp
+//! @file      GUI/Model/Sample/GUIDomainSampleVisitor.cpp
 //! @brief     Implements class GUIDomainSampleVisitor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,27 +12,26 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/GUIDomainSampleVisitor.h"
+#include "GUI/Model/Sample/GUIDomainSampleVisitor.h"
 #include "Base/Const/Units.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/InterferenceItems.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/RotationItems.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/TransformFromDomain.h"
-#include "GUI/Models/TransformationItem.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Domain/FromDomain.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Trafo/RotationItems.h"
+#include "GUI/Model/Trafo/TransformationItem.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/Util/Error.h"
 #include "Param/Node/NodeUtils.h"
 #include "Sample/Aggregate/ParticleLayout.h"
 #include "Sample/HardParticle/HardParticles.h"
@@ -42,7 +41,6 @@
 #include "Sample/Particle/Crystal.h"
 #include "Sample/Particle/MesoCrystal.h"
 #include "Sample/Particle/Particle.h"
-#include "Sample/Particle/ParticleComposition.h"
 #include "Sample/Particle/ParticleCoreShell.h"
 #include "Sample/SoftParticle/SoftParticles.h"
 
diff --git a/GUI/Models/GUIDomainSampleVisitor.h b/GUI/Model/Sample/GUIDomainSampleVisitor.h
similarity index 94%
rename from GUI/Models/GUIDomainSampleVisitor.h
rename to GUI/Model/Sample/GUIDomainSampleVisitor.h
index 3c864206114a8bfc5fea7faeeac1020ac70ff139..8d1824eef291a81a846d76bc99e74b9844fbb5b4 100644
--- a/GUI/Models/GUIDomainSampleVisitor.h
+++ b/GUI/Model/Sample/GUIDomainSampleVisitor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GUIDomainSampleVisitor.h
+//! @file      GUI/Model/Sample/GUIDomainSampleVisitor.h
 //! @brief     Defines class GUIDomainSampleVisitor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_GUIDOMAINSAMPLEVISITOR_H
-#define BORNAGAIN_GUI_MODELS_GUIDOMAINSAMPLEVISITOR_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_GUIDOMAINSAMPLEVISITOR_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_GUIDOMAINSAMPLEVISITOR_H
 
 #include "Param/Node/INodeVisitor.h"
 #include <QMap>
@@ -106,4 +106,4 @@ private:
     MaterialModel* m_materialModel;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_GUIDOMAINSAMPLEVISITOR_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_GUIDOMAINSAMPLEVISITOR_H
diff --git a/GUI/Models/GUIExamplesFactory.cpp b/GUI/Model/Sample/GUIExamplesFactory.cpp
similarity index 95%
rename from GUI/Models/GUIExamplesFactory.cpp
rename to GUI/Model/Sample/GUIExamplesFactory.cpp
index e3d6d100198afbe1c334ce71bb17f81df4b394e4..127470df58be984d98c5169df5e9a2df666c085c 100644
--- a/GUI/Models/GUIExamplesFactory.cpp
+++ b/GUI/Model/Sample/GUIExamplesFactory.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GUIExamplesFactory.cpp
+//! @file      GUI/Model/Sample/GUIExamplesFactory.cpp
 //! @brief     Implements class GUIExamplesFactory
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/GUIExamplesFactory.h"
+#include "GUI/Model/Sample/GUIExamplesFactory.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Models/GUIDomainSampleVisitor.h"
+#include "GUI/Model/Sample/GUIDomainSampleVisitor.h"
 #include "Sample/Multilayer/MultiLayer.h"
 #include "Sample/StandardSamples/ExemplarySamples.h"
 #include <QMap>
diff --git a/GUI/Models/GUIExamplesFactory.h b/GUI/Model/Sample/GUIExamplesFactory.h
similarity index 84%
rename from GUI/Models/GUIExamplesFactory.h
rename to GUI/Model/Sample/GUIExamplesFactory.h
index 6e7fb520736a1ce8c0dbf36e3ae0edcbacd31fb8..3536f1667ec6805f38b0b75c274fbce18ec4368a 100644
--- a/GUI/Models/GUIExamplesFactory.h
+++ b/GUI/Model/Sample/GUIExamplesFactory.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/GUIExamplesFactory.h
+//! @file      GUI/Model/Sample/GUIExamplesFactory.h
 //! @brief     Defines class GUIExamplesFactory
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_GUIEXAMPLESFACTORY_H
-#define BORNAGAIN_GUI_MODELS_GUIEXAMPLESFACTORY_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_GUIEXAMPLESFACTORY_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_GUIEXAMPLESFACTORY_H
 
 #include <QString>
 
@@ -36,4 +36,4 @@ public:
     static std::tuple<QString, QString> exampleInfo(const QString& name);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_GUIEXAMPLESFACTORY_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_GUIEXAMPLESFACTORY_H
diff --git a/GUI/Models/InterferenceItems.cpp b/GUI/Model/Sample/InterferenceItems.cpp
similarity index 98%
rename from GUI/Models/InterferenceItems.cpp
rename to GUI/Model/Sample/InterferenceItems.cpp
index e310b77603e622f09a0bfc993fbd6b63d45862be..71ffc0633d27c909476e7bf4fd027626ee5fdcbd 100644
--- a/GUI/Models/InterferenceItems.cpp
+++ b/GUI/Model/Sample/InterferenceItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/InterferenceItems.cpp
+//! @file      GUI/Model/Sample/InterferenceItems.cpp
 //! @brief     Implements InterferenceItems's classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/InterferenceItems.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
 #include "Base/Const/Units.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/FTDecayFunctionItems.h"
-#include "GUI/Models/FTDistributionItems.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/Lattice2DItems.h"
+#include "GUI/Model/Sample/FTDecayFunctionItems.h"
+#include "GUI/Model/Sample/FTDistributionItems.h"
+#include "GUI/Model/Sample/Lattice2DItems.h"
 #include "Sample/Aggregate/Interferences.h"
 
 // TODO (when back compatibility will be broken  again)
diff --git a/GUI/Models/InterferenceItems.h b/GUI/Model/Sample/InterferenceItems.h
similarity index 95%
rename from GUI/Models/InterferenceItems.h
rename to GUI/Model/Sample/InterferenceItems.h
index d808544e9fef39856db72c1a4488af7ed67fc49e..2560eb90df6efc155d5c0de1655bb073d8d23ea6 100644
--- a/GUI/Models/InterferenceItems.h
+++ b/GUI/Model/Sample/InterferenceItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/InterferenceItems.h
+//! @file      GUI/Model/Sample/InterferenceItems.h
 //! @brief     Defines InterferenceItems's classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_INTERFERENCEITEMS_H
-#define BORNAGAIN_GUI_MODELS_INTERFERENCEITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_INTERFERENCEITEMS_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_INTERFERENCEITEMS_H
 
-#include "GUI/Models/SelectionDescriptor.h"
-#include "GUI/Models/SessionGraphicsItem.h"
+#include "GUI/Model/Group/SelectionDescriptor.h"
+#include "GUI/Model/Session/SessionGraphicsItem.h"
 
 class FTDecayFunction1DItem;
 class FTDecayFunction2DItem;
@@ -221,4 +221,4 @@ template <typename T> T* InterferenceRadialParaCrystalItem::setPDFType()
     return setGroupPropertyType<T>(P_PDF);
 }
 
-#endif // BORNAGAIN_GUI_MODELS_INTERFERENCEITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_INTERFERENCEITEMS_H
diff --git a/GUI/Models/ItemWithMaterial.cpp b/GUI/Model/Sample/ItemWithMaterial.cpp
similarity index 64%
rename from GUI/Models/ItemWithMaterial.cpp
rename to GUI/Model/Sample/ItemWithMaterial.cpp
index 3564c5829b978258cd44deccdc73d27b063aa1eb..ce4d1138dbd3dd6812be1017e5651c1cdb7ca91c 100644
--- a/GUI/Models/ItemWithMaterial.cpp
+++ b/GUI/Model/Sample/ItemWithMaterial.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ItemWithMaterial.cpp
+//! @file      GUI/Model/Sample/ItemWithMaterial.cpp
 //! @brief     Implements class ItemWithMaterial
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ItemWithMaterial.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModelFunctions.h"
-#include "GUI/Models/MaterialItemContainer.h"
-#include "GUI/Models/MaterialItemUtils.h"
+#include "GUI/Model/Sample/ItemWithMaterial.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModelFunctions.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItemContainer.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "Sample/Material/Material.h"
 
 void ItemWithMaterial::setMaterial(const MaterialItem* materialItem)
 {
@@ -44,7 +46,7 @@ QColor ItemWithMaterial::materialColor() const
     if (parentJob)
         return parentJob->materialContainerItem()->findMaterialById(materialIdentifier())->color();
 
-    return GUI::Model::MaterialItemUtils::findMaterial(materialIdentifier())->color();
+    return GUI::MaterialUtil::findMaterial(materialIdentifier())->color();
 }
 
 QString ItemWithMaterial::materialName() const
@@ -55,7 +57,7 @@ QString ItemWithMaterial::materialName() const
             ->findMaterialById(materialIdentifier())
             ->itemName();
 
-    return GUI::Model::MaterialItemUtils::findMaterial(materialIdentifier())->itemName();
+    return GUI::MaterialUtil::findMaterial(materialIdentifier())->itemName();
 }
 
 QString ItemWithMaterial::materialIdentifier() const
@@ -65,7 +67,16 @@ QString ItemWithMaterial::materialIdentifier() const
 
 ItemWithMaterial::ItemWithMaterial(const QString& model_type) : SessionGraphicsItem(model_type)
 {
-    addProperty(P_MATERIAL, GUI::Model::MaterialItemUtils::defaultMaterialIdentifier())
+    addProperty(P_MATERIAL, GUI::MaterialUtil::defaultMaterialIdentifier())
         ->setToolTip("Material this item is made of")
         .setEditorType(SessionItem::EDITOR_TYPE_MATERIAL);
 }
+
+std::unique_ptr<Material> ItemWithMaterial::domainMaterial() const
+{
+    auto parent_job = GUI::Model::JobFunctions::findJobItem(this);
+    const MaterialItemContainer* container =
+        parent_job ? parent_job->materialContainerItem() : nullptr;
+    return container ? GUI::MaterialUtil::createDomainMaterial(materialIdentifier(), *container)
+                     : GUI::MaterialUtil::createDomainMaterial(materialIdentifier());
+}
diff --git a/GUI/Models/ItemWithMaterial.h b/GUI/Model/Sample/ItemWithMaterial.h
similarity index 79%
rename from GUI/Models/ItemWithMaterial.h
rename to GUI/Model/Sample/ItemWithMaterial.h
index fac18285505ab3962f5dc002ebaae93e51f2539e..99b89c8be3ab11bb249c390a79e614790e3edcab 100644
--- a/GUI/Models/ItemWithMaterial.h
+++ b/GUI/Model/Sample/ItemWithMaterial.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ItemWithMaterial.h
+//! @file      GUI/Model/Sample/ItemWithMaterial.h
 //! @brief     Defines abstract item with a material property
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,13 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_ITEMWITHMATERIAL_H
-#define BORNAGAIN_GUI_MODELS_ITEMWITHMATERIAL_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_ITEMWITHMATERIAL_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_ITEMWITHMATERIAL_H
 
-#include "GUI/Models/SessionGraphicsItem.h"
+#include "GUI/Model/Session/SessionGraphicsItem.h"
+#include <memory>
 
+class Material;
 class MaterialItem;
 
 class ItemWithMaterial : public virtual SessionGraphicsItem {
@@ -41,8 +43,10 @@ public:
     QString materialName() const;
     QString materialIdentifier() const;
 
+    std::unique_ptr<Material> domainMaterial() const;
+
 protected:
     ItemWithMaterial(const QString& model_type);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_ITEMWITHMATERIAL_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_ITEMWITHMATERIAL_H
diff --git a/GUI/Models/ItemWithParticles.cpp b/GUI/Model/Sample/ItemWithParticles.cpp
similarity index 87%
rename from GUI/Models/ItemWithParticles.cpp
rename to GUI/Model/Sample/ItemWithParticles.cpp
index 84bd20420e0baa42fc322d83ed552e4e01cb11bc..194ca3ea589915f1e09ad254ccbf07aea11a7d94 100644
--- a/GUI/Models/ItemWithParticles.cpp
+++ b/GUI/Model/Sample/ItemWithParticles.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ItemWithParticles.cpp
+//! @file      GUI/Model/Sample/ItemWithParticles.cpp
 //! @brief     Implements class ItemWithParticles
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ItemWithParticles.h"
+#include "GUI/Model/Sample/ItemWithParticles.h"
 #include "Base/Vector/Transform3D.h"
-#include "GUI/Models/RotationItems.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/TransformationItem.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Model/Trafo/RotationItems.h"
+#include "GUI/Model/Trafo/TransformationItem.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
+#include "Sample/Particle/IParticle.h"
+#include "Sample/Scattering/Rotations.h"
 
 DoubleDescriptor ItemWithParticles::abundance() const
 {
@@ -162,3 +163,13 @@ bool ItemWithParticles::isShellParticle() const
 {
     return false;
 }
+
+void ItemWithParticles::setTransformationInfo(IParticle* result) const
+{
+    result->setPosition(position());
+    const Transform3D r = rotation();
+    if (!r.isIdentity()) {
+        std::unique_ptr<IRotation> rotation(IRotation::createRotation(r));
+        result->setRotation(*rotation);
+    }
+}
diff --git a/GUI/Models/ItemWithParticles.h b/GUI/Model/Sample/ItemWithParticles.h
similarity index 83%
rename from GUI/Models/ItemWithParticles.h
rename to GUI/Model/Sample/ItemWithParticles.h
index de03bcb6a99f6316e1b2fc2fce3e8274c78a8377..1de1dae42f6cc6a3299a89879098b82538514ae8 100644
--- a/GUI/Models/ItemWithParticles.h
+++ b/GUI/Model/Sample/ItemWithParticles.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ItemWithParticles.h
+//! @file      GUI/Model/Sample/ItemWithParticles.h
 //! @brief     Defines abstract item with a material property
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,19 +12,21 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_ITEMWITHPARTICLES_H
-#define BORNAGAIN_GUI_MODELS_ITEMWITHPARTICLES_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_ITEMWITHPARTICLES_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_ITEMWITHPARTICLES_H
 
 #include "Base/Vector/Vectors3D.h"
-#include "GUI/Models/SelectionDescriptor.h"
-#include "GUI/Models/SessionGraphicsItem.h"
+#include "GUI/Model/Group/SelectionDescriptor.h"
+#include "GUI/Model/Session/SessionGraphicsItem.h"
 
+class DoubleDescriptor;
+class IParticle;
+class IRotation;
 class RotationItem;
-class TransformationItem;
-class VectorItem;
 class Transform3D;
+class TransformationItem;
 class VectorDescriptor;
-class DoubleDescriptor;
+class VectorItem;
 
 class ItemWithParticles : public virtual SessionGraphicsItem {
 private:
@@ -52,6 +54,8 @@ public:
     //! Returns selection descriptor for rotation methods.
     SelectionDescriptor<RotationItem*> rotationMethod();
 
+    void setTransformationInfo(IParticle* result) const;
+
 protected:
     ItemWithParticles(const QString& model_type, const QString& abundance_tooltip,
                       const QString& position_tooltip);
@@ -66,4 +70,4 @@ private:
     RotationItem* rotationItem() const;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_ITEMWITHPARTICLES_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_ITEMWITHPARTICLES_H
diff --git a/GUI/Models/Lattice2DItems.cpp b/GUI/Model/Sample/Lattice2DItems.cpp
similarity index 97%
rename from GUI/Models/Lattice2DItems.cpp
rename to GUI/Model/Sample/Lattice2DItems.cpp
index 3df7bb1f590905c6ca5e74f2f1006c39a92be561..9a3642585c18a7bec0c5a5f0d1a4ce4bdd4f6ccb 100644
--- a/GUI/Models/Lattice2DItems.cpp
+++ b/GUI/Model/Sample/Lattice2DItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/Lattice2DItems.cpp
+//! @file      GUI/Model/Sample/Lattice2DItems.cpp
 //! @brief     Implements classes Lattice2DItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/Lattice2DItems.h"
+#include "GUI/Model/Sample/Lattice2DItems.h"
 #include "Base/Const/Units.h"
 #include "Sample/Lattice/Lattice2D.h"
 
diff --git a/GUI/Models/Lattice2DItems.h b/GUI/Model/Sample/Lattice2DItems.h
similarity index 90%
rename from GUI/Models/Lattice2DItems.h
rename to GUI/Model/Sample/Lattice2DItems.h
index 497318b95553fec6c4a5f420c104289ba7452af7..127768b3dab479bf4dea6159c95f57a66e76b65f 100644
--- a/GUI/Models/Lattice2DItems.h
+++ b/GUI/Model/Sample/Lattice2DItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/Lattice2DItems.h
+//! @file      GUI/Model/Sample/Lattice2DItems.h
 //! @brief     Defines classes Lattice2DItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_LATTICE2DITEMS_H
-#define BORNAGAIN_GUI_MODELS_LATTICE2DITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_LATTICE2DITEMS_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_LATTICE2DITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 class Lattice2D;
 
 class Lattice2DItem : public SessionItem {
@@ -82,4 +82,4 @@ public:
     void setLatticeLength(double length);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_LATTICE2DITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_LATTICE2DITEMS_H
diff --git a/GUI/Models/LayerItem.cpp b/GUI/Model/Sample/LayerItem.cpp
similarity index 66%
rename from GUI/Models/LayerItem.cpp
rename to GUI/Model/Sample/LayerItem.cpp
index c5d7c075620f9c76983fbfd8a333b906e11e4c10..f22a213a3948b938b4c4381eb4e00df4c3b087ee 100644
--- a/GUI/Models/LayerItem.cpp
+++ b/GUI/Model/Sample/LayerItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/LayerItem.cpp
+//! @file      GUI/Model/Sample/LayerItem.cpp
 //! @brief     Implements class LayerItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,24 +12,60 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/GroupInfo.h"
-#include "GUI/Models/LayerRoughnessItems.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/SelectionDescriptor.h"
-#include "GUI/Models/UIntDescriptor.h"
-
-using std::function;
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Group/GroupInfo.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/Sample/LayerRoughnessItems.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
+#include "GUI/Model/Types/UIntDescriptor.h"
+#include "GUI/Util/Error.h"
+
+#include <boost/polymorphic_cast.hpp>
+using boost::polymorphic_cast;
 
 namespace {
+
 const QString layer_nslices_tooltip = "Number of horizontal slices.\n"
                                       "Used for Average Layer Material calculations \n"
                                       "when corresponding simulation option is set.";
+
+QVector<ItemWithMaterial*> layoutItemsWithMaterial(ParticleLayoutItem* item)
+{
+    QVector<ItemWithMaterial*> ret;
+
+    QVector<ItemWithParticles*> itemsWithParticles{item->particles()};
+    while (!itemsWithParticles.empty()) {
+        auto* item = itemsWithParticles.takeFirst();
+        if (!item)
+            continue;
+
+        if (item->hasModelType<ParticleCompositionItem>())
+            itemsWithParticles << polymorphic_cast<ParticleCompositionItem*>(item)->particles();
+        else if (item->hasModelType<MesoCrystalItem>())
+            itemsWithParticles << polymorphic_cast<MesoCrystalItem*>(item)->basisParticle();
+        else if (item->hasModelType<ParticleItem>())
+            ret << dynamic_cast<ParticleItem*>(item);
+        else if (item->hasModelType<ParticleCoreShellItem>()) {
+            if (auto core = dynamic_cast<ParticleCoreShellItem*>(item)->core())
+                ret << core;
+            if (auto shell = dynamic_cast<ParticleCoreShellItem*>(item)->shell())
+                ret << shell;
+        } else
+            throw Error("Error in GUI::MaterialUtil::materialProperties: cannot handle "
+                        "passed model type '"
+                        + item->modelType() + "'");
+    }
+    return ret;
 }
 
+} // namespace
+
 LayerItem::LayerItem() : SessionGraphicsItem(M_TYPE), ItemWithMaterial(M_TYPE)
 {
     setToolTip("A layer with thickness and material");
@@ -60,7 +96,7 @@ QVector<ItemWithMaterial*> LayerItem::itemsWithMaterial()
     QVector<ItemWithMaterial*> result;
     result.push_back(this);
     for (auto layout : layouts())
-        result.append(GUI::Model::MaterialItemUtils::itemsWithMaterial(layout));
+        result.append(layoutItemsWithMaterial(layout));
     return result;
 }
 
diff --git a/GUI/Models/LayerItem.h b/GUI/Model/Sample/LayerItem.h
similarity index 89%
rename from GUI/Models/LayerItem.h
rename to GUI/Model/Sample/LayerItem.h
index 913325bf14924a83fcc34fb36e7638e1fc0fd333..fca108f11d3c96aace9a5e7a9ce3c910c04845fe 100644
--- a/GUI/Models/LayerItem.h
+++ b/GUI/Model/Sample/LayerItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/LayerItem.h
+//! @file      GUI/Model/Sample/LayerItem.h
 //! @brief     Defines class LayerItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_LAYERITEM_H
-#define BORNAGAIN_GUI_MODELS_LAYERITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_LAYERITEM_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_LAYERITEM_H
 
-#include "GUI/Models/ItemWithMaterial.h"
-#include "GUI/Models/SelectionDescriptor.h"
+#include "GUI/Model/Group/SelectionDescriptor.h"
+#include "GUI/Model/Sample/ItemWithMaterial.h"
 #include <variant>
 
 class LayerZeroRoughnessItem;
@@ -78,4 +78,4 @@ template <typename T> T* LayerItem::setRoughnessType()
     return setGroupPropertyType<T>(P_ROUGHNESS);
 }
 
-#endif // BORNAGAIN_GUI_MODELS_LAYERITEM_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_LAYERITEM_H
diff --git a/GUI/Models/LayerRoughnessItems.cpp b/GUI/Model/Sample/LayerRoughnessItems.cpp
similarity index 93%
rename from GUI/Models/LayerRoughnessItems.cpp
rename to GUI/Model/Sample/LayerRoughnessItems.cpp
index 2cf551186b49737317e85a4b1ccc91d705c72f7d..fbb6aeaba9b4ec431dd8a3e4c87595d50b8c4d35 100644
--- a/GUI/Models/LayerRoughnessItems.cpp
+++ b/GUI/Model/Sample/LayerRoughnessItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/LayerRoughnessItems.cpp
+//! @file      GUI/Model/Sample/LayerRoughnessItems.cpp
 //! @brief     Implements classes LayerRoughnessItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/LayerRoughnessItems.h"
-#include "GUI/Models/DoubleDescriptor.h"
+#include "GUI/Model/Sample/LayerRoughnessItems.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 
 namespace {
 const QString hurst_tooltip =
diff --git a/GUI/Models/LayerRoughnessItems.h b/GUI/Model/Sample/LayerRoughnessItems.h
similarity index 81%
rename from GUI/Models/LayerRoughnessItems.h
rename to GUI/Model/Sample/LayerRoughnessItems.h
index 7dc287022ee0099fa342ae4315397f1122448919..cad52936ea98fcf5536603a96a9cd513b5df26a1 100644
--- a/GUI/Models/LayerRoughnessItems.h
+++ b/GUI/Model/Sample/LayerRoughnessItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/LayerRoughnessItems.h
+//! @file      GUI/Model/Sample/LayerRoughnessItems.h
 //! @brief     Defines classes LayerRoughnessItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_LAYERROUGHNESSITEMS_H
-#define BORNAGAIN_GUI_MODELS_LAYERROUGHNESSITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_LAYERROUGHNESSITEMS_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_LAYERROUGHNESSITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class DoubleDescriptor;
 
@@ -42,4 +42,4 @@ public:
     DoubleDescriptor lateralCorrelationLength() const;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_LAYERROUGHNESSITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_LAYERROUGHNESSITEMS_H
diff --git a/GUI/Models/MesoCrystalItem.cpp b/GUI/Model/Sample/MesoCrystalItem.cpp
similarity index 91%
rename from GUI/Models/MesoCrystalItem.cpp
rename to GUI/Model/Sample/MesoCrystalItem.cpp
index 96f05c8085b806c380e1419ce738d582159c9618..9b036b46db1b8326c6890d32db4e2c409a7b85c9 100644
--- a/GUI/Models/MesoCrystalItem.cpp
+++ b/GUI/Model/Sample/MesoCrystalItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MesoCrystalItem.cpp
+//! @file      GUI/Model/Sample/MesoCrystalItem.cpp
 //! @brief     Implements class MesoCrystalItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/GroupInfo.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/TransformToDomain.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
+#include "GUI/Util/Error.h"
 #include "Sample/Particle/Crystal.h"
 #include "Sample/Particle/MesoCrystal.h"
 #include "Sample/Particle/Particle.h"
@@ -83,7 +80,7 @@ std::unique_ptr<MesoCrystal> MesoCrystalItem::createMesoCrystal() const
                     "No outer shape defined");
 
     auto result = std::make_unique<MesoCrystal>(crystal, *ff);
-    GUI::Transform::ToDomain::setTransformationInfo(result.get(), *this);
+    setTransformationInfo(result.get());
 
     return result;
 }
diff --git a/GUI/Models/MesoCrystalItem.h b/GUI/Model/Sample/MesoCrystalItem.h
similarity index 87%
rename from GUI/Models/MesoCrystalItem.h
rename to GUI/Model/Sample/MesoCrystalItem.h
index 8ffd628123d5dc8b73d4cbe27199058da7102b0d..4d91e709db15cb1cc54bc1dfbbba1e1936ab4f98 100644
--- a/GUI/Models/MesoCrystalItem.h
+++ b/GUI/Model/Sample/MesoCrystalItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MesoCrystalItem.h
+//! @file      GUI/Model/Sample/MesoCrystalItem.h
 //! @brief     Defines class MesoCrystalItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MESOCRYSTALITEM_H
-#define BORNAGAIN_GUI_MODELS_MESOCRYSTALITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_MESOCRYSTALITEM_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_MESOCRYSTALITEM_H
 
-#include "Base/Vector/Vectors3D.h"
-#include "GUI/Models/ItemWithParticles.h"
-#include "GUI/Models/SelectionDescriptor.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Sample/ItemWithParticles.h"
+
+#include "GUI/Model/Session/SessionModel.h"
 #include "Sample/Lattice/Lattice3D.h"
 
 class FormFactorItem;
@@ -82,4 +81,4 @@ template <typename T> T* MesoCrystalItem::createBasis()
     return model()->insertItem<T>(this, -1, T_BASIS_PARTICLE);
 }
 
-#endif // BORNAGAIN_GUI_MODELS_MESOCRYSTALITEM_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_MESOCRYSTALITEM_H
diff --git a/GUI/Models/MultiLayerItem.cpp b/GUI/Model/Sample/MultiLayerItem.cpp
similarity index 93%
rename from GUI/Models/MultiLayerItem.cpp
rename to GUI/Model/Sample/MultiLayerItem.cpp
index 9e1b49bcac4b5ae0b65cc3effa3c9f697d3d4b9a..927ccda04b25b16d78d227e00c98a6f564498d7d 100644
--- a/GUI/Models/MultiLayerItem.cpp
+++ b/GUI/Model/Sample/MultiLayerItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MultiLayerItem.cpp
+//! @file      GUI/Model/Sample/MultiLayerItem.cpp
 //! @brief     Implements class MultiLayerItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
 
 namespace {
 const QString external_field_tooltip = "External field (A/m)";
diff --git a/GUI/Models/MultiLayerItem.h b/GUI/Model/Sample/MultiLayerItem.h
similarity index 88%
rename from GUI/Models/MultiLayerItem.h
rename to GUI/Model/Sample/MultiLayerItem.h
index fc227a7830646ead88ed4f9a8261f04451961d7d..29dec2597ec0ad841833e709f78291f66608273f 100644
--- a/GUI/Models/MultiLayerItem.h
+++ b/GUI/Model/Sample/MultiLayerItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/MultiLayerItem.h
+//! @file      GUI/Model/Sample/MultiLayerItem.h
 //! @brief     Defines class MultiLayerItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MULTILAYERITEM_H
-#define BORNAGAIN_GUI_MODELS_MULTILAYERITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_MULTILAYERITEM_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_MULTILAYERITEM_H
 
 #include "Base/Vector/Vectors3D.h"
-#include "GUI/Models/SessionGraphicsItem.h"
+#include "GUI/Model/Session/SessionGraphicsItem.h"
 
 class LayerItem;
 class ItemWithMaterial;
@@ -63,4 +63,4 @@ private:
     void updateLayers();
 };
 
-#endif // BORNAGAIN_GUI_MODELS_MULTILAYERITEM_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_MULTILAYERITEM_H
diff --git a/GUI/Models/ParticleCompositionItem.cpp b/GUI/Model/Sample/ParticleCompositionItem.cpp
similarity index 87%
rename from GUI/Models/ParticleCompositionItem.cpp
rename to GUI/Model/Sample/ParticleCompositionItem.cpp
index d7fe75d648294eff3e9fdcce8d672a9bfb47712b..bdc8b4461bb8004c506f0508dad81283779d2c34 100644
--- a/GUI/Models/ParticleCompositionItem.cpp
+++ b/GUI/Model/Sample/ParticleCompositionItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParticleCompositionItem.cpp
+//! @file      GUI/Model/Sample/ParticleCompositionItem.cpp
 //! @brief     Implements class ParticleCompositionItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,27 +12,28 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/TransformToDomain.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
+#include "GUI/Model/Types/VectorItem.h"
 #include "Sample/Particle/MesoCrystal.h"
 #include "Sample/Particle/Particle.h"
 #include "Sample/Particle/ParticleCoreShell.h"
 
 namespace {
+
 const QString abundance_tooltip = "Proportion of this type of particles normalized to the \n"
                                   "total number of particles in the layout";
 
 const QString position_tooltip = "Relative position of the particle's reference point \n"
                                  "in the coordinate system of the parent (nm)";
+
 } // namespace
 
+
 ParticleCompositionItem::ParticleCompositionItem()
     : SessionGraphicsItem(M_TYPE), ItemWithParticles(M_TYPE, abundance_tooltip, position_tooltip)
 {
@@ -76,7 +77,7 @@ std::unique_ptr<ParticleComposition> ParticleCompositionItem::createParticleComp
             }
         }
     }
-    GUI::Transform::ToDomain::setTransformationInfo(P_composition.get(), *this);
+    setTransformationInfo(P_composition.get());
 
     return P_composition;
 }
diff --git a/GUI/Models/ParticleCompositionItem.h b/GUI/Model/Sample/ParticleCompositionItem.h
similarity index 79%
rename from GUI/Models/ParticleCompositionItem.h
rename to GUI/Model/Sample/ParticleCompositionItem.h
index 35ca50042cf4b222fe3843f9f3602976885ce784..d4f850f203cbdc4e1fa82840672c5a8f234c33ff 100644
--- a/GUI/Models/ParticleCompositionItem.h
+++ b/GUI/Model/Sample/ParticleCompositionItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParticleCompositionItem.h
+//! @file      GUI/Model/Sample/ParticleCompositionItem.h
 //! @brief     Defines class ParticleCompositionItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_PARTICLECOMPOSITIONITEM_H
-#define BORNAGAIN_GUI_MODELS_PARTICLECOMPOSITIONITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLECOMPOSITIONITEM_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLECOMPOSITIONITEM_H
 
-#include "GUI/Models/ItemWithParticles.h"
+#include "GUI/Model/Sample/ItemWithParticles.h"
 #include "Sample/Particle/ParticleComposition.h"
 
 class VectorItem;
@@ -36,4 +36,4 @@ public:
     void removeParticle(ItemWithParticles* particle);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_PARTICLECOMPOSITIONITEM_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLECOMPOSITIONITEM_H
diff --git a/GUI/Models/ParticleCoreShellItem.cpp b/GUI/Model/Sample/ParticleCoreShellItem.cpp
similarity index 87%
rename from GUI/Models/ParticleCoreShellItem.cpp
rename to GUI/Model/Sample/ParticleCoreShellItem.cpp
index d69c70a60e7d4a00b7cc589efd4b6720b72cc9dd..de6373650f95d61deb7b0a92d693f6a7731b8c3d 100644
--- a/GUI/Models/ParticleCoreShellItem.cpp
+++ b/GUI/Model/Sample/ParticleCoreShellItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParticleCoreShellItem.cpp
+//! @file      GUI/Model/Sample/ParticleCoreShellItem.cpp
 //! @brief     Implements class ParticleCoreShellItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/TransformToDomain.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/Util/Error.h"
 #include "Sample/Particle/Particle.h"
 #include "Sample/Particle/ParticleCoreShell.h"
 
@@ -57,7 +55,7 @@ std::unique_ptr<ParticleCoreShell> ParticleCoreShellItem::createParticleCoreShel
                     "core or shell particle is undefined.");
     auto P_coreshell = std::make_unique<ParticleCoreShell>(*P_shell, *P_core);
     P_coreshell->setAbundance(abundance());
-    GUI::Transform::ToDomain::setTransformationInfo(P_coreshell.get(), *this);
+    setTransformationInfo(P_coreshell.get());
     return P_coreshell;
 }
 
diff --git a/GUI/Models/ParticleCoreShellItem.h b/GUI/Model/Sample/ParticleCoreShellItem.h
similarity index 81%
rename from GUI/Models/ParticleCoreShellItem.h
rename to GUI/Model/Sample/ParticleCoreShellItem.h
index fea1b43f343a161d3cefaf21abbda1258c1e10d8..713212b85e89edaa423e5fe6967b82578fc45bc6 100644
--- a/GUI/Models/ParticleCoreShellItem.h
+++ b/GUI/Model/Sample/ParticleCoreShellItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParticleCoreShellItem.h
+//! @file      GUI/Model/Sample/ParticleCoreShellItem.h
 //! @brief     Defines class ParticleCoreShellItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_PARTICLECORESHELLITEM_H
-#define BORNAGAIN_GUI_MODELS_PARTICLECORESHELLITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLECORESHELLITEM_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLECORESHELLITEM_H
 
-#include "GUI/Models/ItemWithParticles.h"
+#include "GUI/Model/Sample/ItemWithParticles.h"
 
 class ParticleCoreShell;
 class ParticleItem;
@@ -44,4 +44,4 @@ public:
     static bool isShellTagName(const QString& name);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_PARTICLECORESHELLITEM_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLECORESHELLITEM_H
diff --git a/GUI/Models/ParticleItem.cpp b/GUI/Model/Sample/ParticleItem.cpp
similarity index 81%
rename from GUI/Models/ParticleItem.cpp
rename to GUI/Model/Sample/ParticleItem.cpp
index a528de64d624756cb3e15dc469a0142af8f0893d..d59b60bcfb60bc5e89d29982b0163a7bc17ee96f 100644
--- a/GUI/Models/ParticleItem.cpp
+++ b/GUI/Model/Sample/ParticleItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParticleItem.cpp
+//! @file      GUI/Model/Sample/ParticleItem.cpp
 //! @brief     Implements class ParticleItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,19 +12,21 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/TransformToDomain.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModelFunctions.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Types/VectorItem.h"
 #include "Sample/Particle/Particle.h"
 #include "Sample/Scattering/IFormFactor.h"
 
 namespace {
+
 const QString abundance_tooltip = "Proportion of this type of particles normalized to the \n"
                                   "total number of particles in the layout";
 
@@ -46,12 +48,12 @@ ParticleItem::ParticleItem()
 std::unique_ptr<Particle> ParticleItem::createParticle() const
 {
     auto& ffItem = groupItem<FormFactorItem>(P_FORM_FACTOR);
-    auto material = GUI::Transform::ToDomain::createDomainMaterial(*this);
+    auto material = domainMaterial();
 
     auto particle = std::make_unique<Particle>(*material, *ffItem.createFormFactor());
     particle->setAbundance(abundance());
 
-    GUI::Transform::ToDomain::setTransformationInfo(particle.get(), *this);
+    setTransformationInfo(particle.get());
 
     return particle;
 }
diff --git a/GUI/Models/ParticleItem.h b/GUI/Model/Sample/ParticleItem.h
similarity index 83%
rename from GUI/Models/ParticleItem.h
rename to GUI/Model/Sample/ParticleItem.h
index c7fe09251a94f0439682a3a35096ce249b28d10f..a87a71aa2ba62ef67e0b5207f228b9ad111b3ecf 100644
--- a/GUI/Models/ParticleItem.h
+++ b/GUI/Model/Sample/ParticleItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParticleItem.h
+//! @file      GUI/Model/Sample/ParticleItem.h
 //! @brief     Defines class ParticleItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_PARTICLEITEM_H
-#define BORNAGAIN_GUI_MODELS_PARTICLEITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLEITEM_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLEITEM_H
 
-#include "GUI/Models/ItemWithMaterial.h"
-#include "GUI/Models/ItemWithParticles.h"
+#include "GUI/Model/Sample/ItemWithMaterial.h"
+#include "GUI/Model/Sample/ItemWithParticles.h"
 
 class FormFactorItem;
 class GroupItem;
@@ -53,4 +53,4 @@ template <typename T> T* ParticleItem::setFormFactorType()
     return setGroupPropertyType<T>(P_FORM_FACTOR);
 }
 
-#endif // BORNAGAIN_GUI_MODELS_PARTICLEITEM_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLEITEM_H
diff --git a/GUI/Models/ParticleLayoutItem.cpp b/GUI/Model/Sample/ParticleLayoutItem.cpp
similarity index 93%
rename from GUI/Models/ParticleLayoutItem.cpp
rename to GUI/Model/Sample/ParticleLayoutItem.cpp
index de0d5f97debdf16120859dc7acda84c523cd5621..9c59f426aa199806e264e32c63768c29dc599650 100644
--- a/GUI/Models/ParticleLayoutItem.cpp
+++ b/GUI/Model/Sample/ParticleLayoutItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParticleLayoutItem.cpp
+//! @file      GUI/Model/Sample/ParticleLayoutItem.cpp
 //! @brief     Implements class ParticleLayoutItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,16 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/InterferenceItems.h"
-#include "GUI/Models/ItemCatalog.h"
-#include "GUI/Models/Lattice2DItems.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
+#include "GUI/Model/Sample/Lattice2DItems.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 
 namespace {
 
diff --git a/GUI/Models/ParticleLayoutItem.h b/GUI/Model/Sample/ParticleLayoutItem.h
similarity index 83%
rename from GUI/Models/ParticleLayoutItem.h
rename to GUI/Model/Sample/ParticleLayoutItem.h
index 4fe59255891408081cc50f27624b8baefca045de..896271fb5bfbd19b6a7ad0aa1203d6db821c8646 100644
--- a/GUI/Models/ParticleLayoutItem.h
+++ b/GUI/Model/Sample/ParticleLayoutItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ParticleLayoutItem.h
+//! @file      GUI/Model/Sample/ParticleLayoutItem.h
 //! @brief     Defines class ParticleLayoutItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_PARTICLELAYOUTITEM_H
-#define BORNAGAIN_GUI_MODELS_PARTICLELAYOUTITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLELAYOUTITEM_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLELAYOUTITEM_H
 
-#include "GUI/Models/SelectionDescriptor.h"
-#include "GUI/Models/SessionGraphicsItem.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Group/SelectionDescriptor.h"
+#include "GUI/Model/Session/SessionGraphicsItem.h"
+#include "GUI/Model/Session/SessionModel.h"
 
 class InterferenceItem;
 class ItemWithParticles;
@@ -59,4 +59,4 @@ template <typename T> T* ParticleLayoutItem::createInterference()
     return model()->insertItem<T>(this, -1, T_INTERFERENCE);
 }
 
-#endif // BORNAGAIN_GUI_MODELS_PARTICLELAYOUTITEM_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_PARTICLELAYOUTITEM_H
diff --git a/GUI/Models/SampleListModel.cpp b/GUI/Model/Sample/SampleListModel.cpp
similarity index 88%
rename from GUI/Models/SampleListModel.cpp
rename to GUI/Model/Sample/SampleListModel.cpp
index a1f048a4f3d961834e9fd3797e9d172ee49b03e4..f3a4480b9cd3e91be21c79840d73eb4de40a7491 100644
--- a/GUI/Models/SampleListModel.cpp
+++ b/GUI/Model/Sample/SampleListModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/SampleListModel.cpp
+//! @file      GUI/Model/Sample/SampleListModel.cpp
 //! @brief     Implements class SampleListModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SampleListModel.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/GUIExamplesFactory.h"
-#include "GUI/Models/ModelUtils.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/mainwindow/projectmanager.h"
-#include <QApplication>
+#include "GUI/Model/Sample/SampleListModel.h"
+#include "GUI/Model/Sample/GUIExamplesFactory.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Session/ModelUtils.h"
 #include <QFontMetrics>
 #include <QIcon>
 
@@ -142,13 +139,14 @@ QModelIndex SampleListModel::createSample()
 
 QModelIndex SampleListModel::createSampleFromExamples(const QString& className,
                                                       const QString& title,
-                                                      const QString& description)
+                                                      const QString& description,
+                                                      MaterialModel* materialModel)
 {
     const int row = m_sampleModel->multiLayerItems().size();
     beginInsertRows(QModelIndex(), row, row);
 
-    auto* sample = dynamic_cast<MultiLayerItem*>(GUIExamplesFactory::createSampleItems(
-        className, m_sampleModel, ProjectManager::instance()->document()->materialModel()));
+    auto* sample = dynamic_cast<MultiLayerItem*>(
+        GUIExamplesFactory::createSampleItems(className, m_sampleModel, materialModel));
     sample->setItemName(title);
     sample->setDescription(description);
 
diff --git a/GUI/Models/SampleListModel.h b/GUI/Model/Sample/SampleListModel.h
similarity index 87%
rename from GUI/Models/SampleListModel.h
rename to GUI/Model/Sample/SampleListModel.h
index 0edeff0903b0816c3658dc119a9f0ff0cf3473a4..e5cdbce6812ae7a3de8def7bdcd2e04b2efbea4e 100644
--- a/GUI/Models/SampleListModel.h
+++ b/GUI/Model/Sample/SampleListModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/SampleListModel.h
+//! @file      GUI/Model/Sample/SampleListModel.h
 //! @brief     Defines class SampleListModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,14 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_SAMPLELISTMODEL_H
-#define BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_SAMPLELISTMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_SAMPLELISTMODEL_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_SAMPLELISTMODEL_H
 
 #include <QAbstractItemModel>
 #include <QSet>
 
 class SampleModel;
+class MaterialModel;
 class MultiLayerItem;
 
 //! List model for sample selection (used in the left pane of the layer oriented sample editor)
@@ -43,10 +44,10 @@ public:
     //! Create a new sample (multilayer) and return the index of it.
     QModelIndex createSample();
     QModelIndex createSampleFromExamples(const QString& className, const QString& title,
-                                         const QString& description);
+                                         const QString& description, MaterialModel* materialModel);
 
 private:
     SampleModel* m_sampleModel = nullptr;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_SAMPLELISTMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_SAMPLELISTMODEL_H
diff --git a/GUI/Models/SampleModel.cpp b/GUI/Model/Sample/SampleModel.cpp
similarity index 90%
rename from GUI/Models/SampleModel.cpp
rename to GUI/Model/Sample/SampleModel.cpp
index cae2cd51d0756852cc33048dc695d4be34ba39d1..8c9350cb0400269df9441195eae3fb5d2997b516 100644
--- a/GUI/Models/SampleModel.cpp
+++ b/GUI/Model/Sample/SampleModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SampleModel.cpp
+//! @file      GUI/Model/Sample/SampleModel.cpp
 //! @brief     Implements class SampleModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/ItemWithMaterial.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/ModelUtils.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/PropertyItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/Sample/ItemWithMaterial.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Session/ModelUtils.h"
 #include <QApplication>
 #include <QFontMetrics>
 #include <QPixmap>
diff --git a/GUI/Models/SampleModel.h b/GUI/Model/Sample/SampleModel.h
similarity index 86%
rename from GUI/Models/SampleModel.h
rename to GUI/Model/Sample/SampleModel.h
index 08515888291204e562b026b95dda71d284b66e01..88f773864bd6329171829d048cae20f4f61d3dd5 100644
--- a/GUI/Models/SampleModel.h
+++ b/GUI/Model/Sample/SampleModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SampleModel.h
+//! @file      GUI/Model/Sample/SampleModel.h
 //! @brief     Defines class SampleModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SAMPLEMODEL_H
-#define BORNAGAIN_GUI_MODELS_SAMPLEMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_SAMPLEMODEL_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_SAMPLEMODEL_H
 
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Session/SessionModel.h"
 
 class MultiLayerItem;
 class ItemWithMaterial;
@@ -50,4 +50,4 @@ private:
     void onDataChanged(const QModelIndex& index, const QModelIndex&);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SAMPLEMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_SAMPLEMODEL_H
diff --git a/GUI/Models/SampleValidator.cpp b/GUI/Model/Sample/SampleValidator.cpp
similarity index 91%
rename from GUI/Models/SampleValidator.cpp
rename to GUI/Model/Sample/SampleValidator.cpp
index a8a4710a592729319c20197b9ba165f4920d17c1..60ab7893c2b227c9b94bd9543fde02e72c9531e8 100644
--- a/GUI/Models/SampleValidator.cpp
+++ b/GUI/Model/Sample/SampleValidator.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SampleValidator.cpp
+//! @file      GUI/Model/Sample/SampleValidator.cpp
 //! @brief     Implements class SampleValidator
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SampleValidator.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
+#include "GUI/Model/Sample/SampleValidator.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
 
 #include <boost/polymorphic_cast.hpp>
 using boost::polymorphic_cast;
diff --git a/GUI/Models/SampleValidator.h b/GUI/Model/Sample/SampleValidator.h
similarity index 87%
rename from GUI/Models/SampleValidator.h
rename to GUI/Model/Sample/SampleValidator.h
index d65f537a94a70d0bc661433eca76ba5fd5b08844..22e6491ddd9dbc4ebaea1c73f7d8237515ea53da 100644
--- a/GUI/Models/SampleValidator.h
+++ b/GUI/Model/Sample/SampleValidator.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SampleValidator.h
+//! @file      GUI/Model/Sample/SampleValidator.h
 //! @brief     Defines class SampleValidator
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SAMPLEVALIDATOR_H
-#define BORNAGAIN_GUI_MODELS_SAMPLEVALIDATOR_H
+#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_SAMPLEVALIDATOR_H
+#define BORNAGAIN_GUI_MODEL_SAMPLE_SAMPLEVALIDATOR_H
 
 #include <QModelIndex>
 
@@ -47,4 +47,4 @@ private:
     QString m_validation_message;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SAMPLEVALIDATOR_H
+#endif // BORNAGAIN_GUI_MODEL_SAMPLE_SAMPLEVALIDATOR_H
diff --git a/GUI/Models/ModelMapper.cpp b/GUI/Model/Session/ModelMapper.cpp
similarity index 99%
rename from GUI/Models/ModelMapper.cpp
rename to GUI/Model/Session/ModelMapper.cpp
index 61b9162fe60a72dc45fe2192a754f4cb90ec5b12..9ae30c8ecbd42b58b2970a1f77598dd8283c965d 100644
--- a/GUI/Models/ModelMapper.cpp
+++ b/GUI/Model/Session/ModelMapper.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ModelMapper.cpp
+//! @file      GUI/Model/Session/ModelMapper.cpp
 //! @brief     Implements class ModelMapper
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Session/SessionModel.h"
 
 ModelMapper::ModelMapper(QObject* parent)
     : QObject(parent), m_active(true), m_model(nullptr), m_item(nullptr)
diff --git a/GUI/Models/ModelMapper.h b/GUI/Model/Session/ModelMapper.h
similarity index 95%
rename from GUI/Models/ModelMapper.h
rename to GUI/Model/Session/ModelMapper.h
index fbbe80e908ee614b1d9a278299fe8acb5f824bb4..97163d84439655f7c908e1514435a9db01ee8256 100644
--- a/GUI/Models/ModelMapper.h
+++ b/GUI/Model/Session/ModelMapper.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ModelMapper.h
+//! @file      GUI/Model/Session/ModelMapper.h
 //! @brief     Defines class ModelMapper
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MODELMAPPER_H
-#define BORNAGAIN_GUI_MODELS_MODELMAPPER_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_MODELMAPPER_H
+#define BORNAGAIN_GUI_MODEL_SESSION_MODELMAPPER_H
 
 #include <QModelIndex>
 #include <functional>
@@ -112,4 +112,4 @@ template <class U> inline void ModelMapper::clean_container(U& v, const void* ca
             v.end());
 }
 
-#endif // BORNAGAIN_GUI_MODELS_MODELMAPPER_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_MODELMAPPER_H
diff --git a/GUI/Models/ModelUtils.cpp b/GUI/Model/Session/ModelUtils.cpp
similarity index 95%
rename from GUI/Models/ModelUtils.cpp
rename to GUI/Model/Session/ModelUtils.cpp
index f7b8ae6ca962f5e49d194fb259319904f41b42a7..528ba65c4b04195e8f6ffd851cfb1d25e4b5ae6e 100644
--- a/GUI/Models/ModelUtils.cpp
+++ b/GUI/Model/Session/ModelUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ModelUtils.cpp
+//! @file      GUI/Model/Session/ModelUtils.cpp
 //! @brief     Implements ModelUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ModelUtils.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Session/ModelUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
 #include <QAbstractItemModel>
 #include <QModelIndex>
 
diff --git a/GUI/Models/ModelUtils.h b/GUI/Model/Session/ModelUtils.h
similarity index 90%
rename from GUI/Models/ModelUtils.h
rename to GUI/Model/Session/ModelUtils.h
index 4bff0beec84bb662e9c8f45e7ebcdef6d06e524e..fa97a0c3f0f003903c4380a1080ba5ca76deafc8 100644
--- a/GUI/Models/ModelUtils.h
+++ b/GUI/Model/Session/ModelUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ModelUtils.h
+//! @file      GUI/Model/Session/ModelUtils.h
 //! @brief     Defines namespace GUI::Model::ItemUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_MODELUTILS_H
-#define BORNAGAIN_GUI_MODELS_MODELUTILS_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_MODELUTILS_H
+#define BORNAGAIN_GUI_MODEL_SESSION_MODELUTILS_H
 
 #include <QString>
 #include <QStringList>
@@ -57,4 +57,4 @@ template <typename T> QStringList itemNames(const QVector<T*> items)
 
 } // namespace GUI::Model::ItemUtils
 
-#endif // BORNAGAIN_GUI_MODELS_MODELUTILS_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_MODELUTILS_H
diff --git a/GUI/Models/RealLimitsItems.cpp b/GUI/Model/Session/RealLimitsItems.cpp
similarity index 97%
rename from GUI/Models/RealLimitsItems.cpp
rename to GUI/Model/Session/RealLimitsItems.cpp
index 2fda6c21eded1d03ccc4536040d759270c575ed3..4219708f0fcd2fd818c5eb5dcd3da92b6e785e2d 100644
--- a/GUI/Models/RealLimitsItems.cpp
+++ b/GUI/Model/Session/RealLimitsItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/RealLimitsItems.cpp
+//! @file      GUI/Model/Session/RealLimitsItems.cpp
 //! @brief     Defines RealLimitsItems's classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/RealLimitsItems.h"
+#include "GUI/Model/Session/RealLimitsItems.h"
 
 namespace {
 const QString tooltip_min_value = "Minimum allowed value, value included.";
diff --git a/GUI/Models/RealLimitsItems.h b/GUI/Model/Session/RealLimitsItems.h
similarity index 90%
rename from GUI/Models/RealLimitsItems.h
rename to GUI/Model/Session/RealLimitsItems.h
index a11ad7aa5187783c9786f0879069f1965bb9579d..1283fb2ceec58290f0e07d4f6c758bb19412ab76 100644
--- a/GUI/Models/RealLimitsItems.h
+++ b/GUI/Model/Session/RealLimitsItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/RealLimitsItems.h
+//! @file      GUI/Model/Session/RealLimitsItems.h
 //! @brief     Defines RealLimitsItems's classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_REALLIMITSITEMS_H
-#define BORNAGAIN_GUI_MODELS_REALLIMITSITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_REALLIMITSITEMS_H
+#define BORNAGAIN_GUI_MODEL_SESSION_REALLIMITSITEMS_H
 
 #include <optional>
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class RealLimitsItem : public SessionItem {
 private:
@@ -89,4 +89,4 @@ public:
     using RealLimitsItem::setUpperLimit;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_REALLIMITSITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_REALLIMITSITEMS_H
diff --git a/GUI/Models/SessionDecorationModel.cpp b/GUI/Model/Session/SessionDecorationModel.cpp
similarity index 94%
rename from GUI/Models/SessionDecorationModel.cpp
rename to GUI/Model/Session/SessionDecorationModel.cpp
index 1eb85ab5a3c21fb3707570ba0eafebe03f7aa059..3dfb2919e3034ab619989ff0138886022cf3a1f9 100644
--- a/GUI/Models/SessionDecorationModel.cpp
+++ b/GUI/Model/Session/SessionDecorationModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionDecorationModel.cpp
+//! @file      GUI/Model/Session/SessionDecorationModel.cpp
 //! @brief     Defines class SessionDecorationModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SessionDecorationModel.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Session/SessionDecorationModel.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Session/SessionModel.h"
 #include <QColor>
 #include <QIcon>
 #include <QPixmap>
diff --git a/GUI/Models/SessionDecorationModel.h b/GUI/Model/Session/SessionDecorationModel.h
similarity index 84%
rename from GUI/Models/SessionDecorationModel.h
rename to GUI/Model/Session/SessionDecorationModel.h
index e569679655fba41372096192e2fd0ddaa0cdf59b..ae8297fa573d25e519e19d85b202da80d1c2a98f 100644
--- a/GUI/Models/SessionDecorationModel.h
+++ b/GUI/Model/Session/SessionDecorationModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionDecorationModel.h
+//! @file      GUI/Model/Session/SessionDecorationModel.h
 //! @brief     Defines class SessionDecorationModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SESSIONDECORATIONMODEL_H
-#define BORNAGAIN_GUI_MODELS_SESSIONDECORATIONMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_SESSIONDECORATIONMODEL_H
+#define BORNAGAIN_GUI_MODEL_SESSION_SESSIONDECORATIONMODEL_H
 
 #include <QIdentityProxyModel>
 
@@ -40,4 +40,4 @@ private:
     SessionModel* m_model;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SESSIONDECORATIONMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_SESSIONDECORATIONMODEL_H
diff --git a/GUI/Models/SessionFlags.h b/GUI/Model/Session/SessionFlags.h
similarity index 87%
rename from GUI/Models/SessionFlags.h
rename to GUI/Model/Session/SessionFlags.h
index 014374f68697bdd9301290a74a483f63a8a60a1d..fc2137df920a3990513520a5366e3a8f5e1ea551 100644
--- a/GUI/Models/SessionFlags.h
+++ b/GUI/Model/Session/SessionFlags.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionFlags.h
+//! @file      GUI/Model/Session/SessionFlags.h
 //! @brief     Defines class SessionFlags
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SESSIONFLAGS_H
-#define BORNAGAIN_GUI_MODELS_SESSIONFLAGS_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_SESSIONFLAGS_H
+#define BORNAGAIN_GUI_MODEL_SESSION_SESSIONFLAGS_H
 
 #include <qnamespace.h>
 
@@ -47,4 +47,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(SessionFlags::ModelColumn)
 Q_DECLARE_OPERATORS_FOR_FLAGS(SessionFlags::ItemDataRole)
 Q_DECLARE_OPERATORS_FOR_FLAGS(SessionFlags::ItemAppearance)
 
-#endif // BORNAGAIN_GUI_MODELS_SESSIONFLAGS_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_SESSIONFLAGS_H
diff --git a/GUI/Models/SessionGraphicsItem.cpp b/GUI/Model/Session/SessionGraphicsItem.cpp
similarity index 92%
rename from GUI/Models/SessionGraphicsItem.cpp
rename to GUI/Model/Session/SessionGraphicsItem.cpp
index f131cdd69a97c723963b545d4e1ddc31d7245adf..0432e63f3d8920e23ed0e10380d2667b529de108 100644
--- a/GUI/Models/SessionGraphicsItem.cpp
+++ b/GUI/Model/Session/SessionGraphicsItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionGraphicsItem.cpp
+//! @file      GUI/Model/Session/SessionGraphicsItem.cpp
 //! @brief     Implements class SessionGraphicsItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SessionGraphicsItem.h"
+#include "GUI/Model/Session/SessionGraphicsItem.h"
 
 SessionGraphicsItem::SessionGraphicsItem(const QString& model_type) : SessionItem(model_type)
 {
diff --git a/GUI/Models/SessionGraphicsItem.h b/GUI/Model/Session/SessionGraphicsItem.h
similarity index 79%
rename from GUI/Models/SessionGraphicsItem.h
rename to GUI/Model/Session/SessionGraphicsItem.h
index 19b13fcbd7d8c47a337540efc83f6e09d16984b9..28ce7cda63b655c494216799fdf21ff202974e00 100644
--- a/GUI/Models/SessionGraphicsItem.h
+++ b/GUI/Model/Session/SessionGraphicsItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionGraphicsItem.h
+//! @file      GUI/Model/Session/SessionGraphicsItem.h
 //! @brief     Defines class SessionGraphicsItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SESSIONGRAPHICSITEM_H
-#define BORNAGAIN_GUI_MODELS_SESSIONGRAPHICSITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_SESSIONGRAPHICSITEM_H
+#define BORNAGAIN_GUI_MODEL_SESSION_SESSIONGRAPHICSITEM_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class BA_CORE_API_ SessionGraphicsItem : public SessionItem {
 
@@ -36,4 +36,4 @@ protected:
     explicit SessionGraphicsItem(const QString& model_type);
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SESSIONGRAPHICSITEM_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_SESSIONGRAPHICSITEM_H
diff --git a/GUI/Models/SessionItem.cpp b/GUI/Model/Session/SessionItem.cpp
similarity index 97%
rename from GUI/Models/SessionItem.cpp
rename to GUI/Model/Session/SessionItem.cpp
index b606338e36e464be64caafb0dd60687d7586d557..51098d6d37035ece603000961acf14dd9723fb6a 100644
--- a/GUI/Models/SessionItem.cpp
+++ b/GUI/Model/Session/SessionItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionItem.cpp
+//! @file      GUI/Model/Session/SessionItem.cpp
 //! @brief     Implements class SessionItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/ItemFactory.h"
-#include "GUI/Models/ParameterTreeItems.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/SessionItemData.h"
-#include "GUI/Models/SessionItemTags.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Group/ItemFactory.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Session/SessionItemData.h"
+#include "GUI/Model/Session/SessionItemTags.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
 
 //! Constructs new item with given model type. The type must be defined.
 SessionItem::SessionItem(const QString& modelType)
diff --git a/GUI/Models/SessionItem.h b/GUI/Model/Session/SessionItem.h
similarity index 98%
rename from GUI/Models/SessionItem.h
rename to GUI/Model/Session/SessionItem.h
index 7ac45b46390f3cf68ce9fee2baa72d15d8201570..c69672071539b9149109fd17579e4e2df7701023 100644
--- a/GUI/Models/SessionItem.h
+++ b/GUI/Model/Session/SessionItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionItem.h
+//! @file      GUI/Model/Session/SessionItem.h
 //! @brief     Defines class SessionItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SESSIONITEM_H
-#define BORNAGAIN_GUI_MODELS_SESSIONITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEM_H
+#define BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEM_H
 
 #include "Base/Utils/Assert.h"
 #include "Fit/Param/RealLimits.h"
-#include "GUI/Models/ModelMapper.h"
+#include "GUI/Model/Session/ModelMapper.h" // no forward declare, used too often
 #include "Wrap/WinDllMacros.h"
 #include <QStringList>
 #include <memory>
@@ -423,4 +423,4 @@ template <typename T> bool SessionItem::hasModelType() const
     return modelType() == T::M_TYPE;
 }
 
-#endif // BORNAGAIN_GUI_MODELS_SESSIONITEM_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEM_H
diff --git a/GUI/Models/SessionItemData.cpp b/GUI/Model/Session/SessionItemData.cpp
similarity index 92%
rename from GUI/Models/SessionItemData.cpp
rename to GUI/Model/Session/SessionItemData.cpp
index 95ae52bf2e5aa032fc94709e3074c57a7d534945..06436c173a063ca189e5427bc565ca53c1a02ca0 100644
--- a/GUI/Models/SessionItemData.cpp
+++ b/GUI/Model/Session/SessionItemData.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionItemData.cpp
+//! @file      GUI/Model/Session/SessionItemData.cpp
 //! @brief     Implements class SessionItemData
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SessionItemData.h"
-#include "GUI/Models/SessionItemUtils.h"
+#include "GUI/Model/Session/SessionItemData.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
 
 SessionItemData::ItemData::ItemData(int r, const QVariant& v) : role(r), data(v) {}
 
diff --git a/GUI/Models/SessionItemData.h b/GUI/Model/Session/SessionItemData.h
similarity index 82%
rename from GUI/Models/SessionItemData.h
rename to GUI/Model/Session/SessionItemData.h
index 73b9ac4e7565b2dcf565e5f3780ad82b5511a624..b047ea37841e58b411763b9c794a420d77e6a2cd 100644
--- a/GUI/Models/SessionItemData.h
+++ b/GUI/Model/Session/SessionItemData.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionItemData.h
+//! @file      GUI/Model/Session/SessionItemData.h
 //! @brief     Defines class SessionItemData
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SESSIONITEMDATA_H
-#define BORNAGAIN_GUI_MODELS_SESSIONITEMDATA_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEMDATA_H
+#define BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEMDATA_H
 
 #include <QVariant>
 #include <QVector>
@@ -40,4 +40,4 @@ private:
     QVector<ItemData> m_values;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SESSIONITEMDATA_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEMDATA_H
diff --git a/GUI/Models/SessionItemTags.cpp b/GUI/Model/Session/SessionItemTags.cpp
similarity index 97%
rename from GUI/Models/SessionItemTags.cpp
rename to GUI/Model/Session/SessionItemTags.cpp
index 8f5312cbaf8b6b58fee60d54b78c717177a4e3a7..e436e7a7fee90286d0c79c303041bb4995022183 100644
--- a/GUI/Models/SessionItemTags.cpp
+++ b/GUI/Model/Session/SessionItemTags.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionItemTags.cpp
+//! @file      GUI/Model/Session/SessionItemTags.cpp
 //! @brief     Implement class SessionItemTags
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SessionItemTags.h"
-#include "GUI/Models/Error.h"
+#include "GUI/Model/Session/SessionItemTags.h"
+#include "GUI/Util/Error.h"
 
 //! Register tag with given parameters. Returns true in case of success. Returns
 //! false if parameters are invalid or such tag was already registered.
diff --git a/GUI/Models/SessionItemTags.h b/GUI/Model/Session/SessionItemTags.h
similarity index 89%
rename from GUI/Models/SessionItemTags.h
rename to GUI/Model/Session/SessionItemTags.h
index dd91b344d30360c40688810b9218ddfb3e1bb90c..b10d6c1c3499735ad5e3d316efad6091261b65a2 100644
--- a/GUI/Models/SessionItemTags.h
+++ b/GUI/Model/Session/SessionItemTags.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionItemTags.h
+//! @file      GUI/Model/Session/SessionItemTags.h
 //! @brief     Defines class SessionItemTags
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SESSIONITEMTAGS_H
-#define BORNAGAIN_GUI_MODELS_SESSIONITEMTAGS_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEMTAGS_H
+#define BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEMTAGS_H
 
 #include <QString>
 #include <QStringList>
@@ -61,4 +61,4 @@ private:
     QVector<TagInfo> m_tags;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SESSIONITEMTAGS_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEMTAGS_H
diff --git a/GUI/Models/SessionItemUtils.cpp b/GUI/Model/Session/SessionItemUtils.cpp
similarity index 91%
rename from GUI/Models/SessionItemUtils.cpp
rename to GUI/Model/Session/SessionItemUtils.cpp
index c0019498dac403ef59f527ecf15d029ab9239a87..62f5ddabd6f9a1bfa34eede1f2dbe2f6ee316ae6 100644
--- a/GUI/Models/SessionItemUtils.cpp
+++ b/GUI/Model/Session/SessionItemUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionItemUtils.cpp
+//! @file      GUI/Model/Session/SessionItemUtils.cpp
 //! @brief     Implements namespace SessionItemUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/SessionGraphicsItem.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Session/SessionGraphicsItem.h"
 #include <QColor>
 #include <QIcon>
 #include <QPixmap>
diff --git a/GUI/Models/SessionItemUtils.h b/GUI/Model/Session/SessionItemUtils.h
similarity index 89%
rename from GUI/Models/SessionItemUtils.h
rename to GUI/Model/Session/SessionItemUtils.h
index 333d6b8736a76c4aa31fef3eeab116cb5f380e89..ceb523ca9a724dd39e70ec3355352dd03d846c99 100644
--- a/GUI/Models/SessionItemUtils.h
+++ b/GUI/Model/Session/SessionItemUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionItemUtils.h
+//! @file      GUI/Model/Session/SessionItemUtils.h
 //! @brief     Defines namespace GUI::Session::ItemUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SESSIONITEMUTILS_H
-#define BORNAGAIN_GUI_MODELS_SESSIONITEMUTILS_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEMUTILS_H
+#define BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEMUTILS_H
 
 #include "Base/Vector/Vectors3D.h"
 #include <QString>
@@ -56,4 +56,4 @@ bool HasOwnAbundance(const SessionItem* item);
 
 } // namespace GUI::Session::ItemUtils
 
-#endif // BORNAGAIN_GUI_MODELS_SESSIONITEMUTILS_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEMUTILS_H
diff --git a/GUI/Models/SessionModel.cpp b/GUI/Model/Session/SessionModel.cpp
similarity index 96%
rename from GUI/Models/SessionModel.cpp
rename to GUI/Model/Session/SessionModel.cpp
index 3b1f7539c316a97b1c930ce1317d4bb8ab73bb23..a34c1a32442c9b80ba85c5b87b3cd03ddeae364d 100644
--- a/GUI/Models/SessionModel.cpp
+++ b/GUI/Model/Session/SessionModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionModel.cpp
+//! @file      GUI/Model/Session/SessionModel.cpp
 //! @brief     Implements class SessionModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,22 +12,22 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/ItemFactory.h"
-#include "GUI/Models/SessionItemTags.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Model/Group/ItemFactory.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Session/SessionItemTags.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/Path.h"
 #include <QFile>
 #include <QMimeData>
 #include <QtCore/QXmlStreamWriter>
 
-using GUI::Session::ItemUtils::ParentRow;
-
 namespace {
 const int MaxCompression = 9;
 }
 
+
 SessionModel::SessionModel(QString model_tag, QObject* parent)
     : QAbstractItemModel(parent), m_root_item(0), m_name("DefaultName"), m_model_tag(model_tag)
 {
@@ -144,7 +144,7 @@ QModelIndex SessionModel::parent(const QModelIndex& child) const
             if (parent_item == m_root_item)
                 return QModelIndex();
 
-            return createIndex(ParentRow(*parent_item), 0, parent_item);
+            return createIndex(GUI::Session::ItemUtils::ParentRow(*parent_item), 0, parent_item);
         }
     }
     return QModelIndex();
@@ -265,7 +265,6 @@ SessionItem* SessionModel::insertNewItem(QString model_type, SessionItem* parent
     if (parent_item != m_root_item) {
         if (tag.isEmpty())
             tag = parent_item->defaultTag();
-
         if (!parent_item->sessionItemTags()->isValid(tag, model_type))
             return nullptr;
     }
@@ -336,7 +335,7 @@ void SessionModel::save(const QString& filename)
     writer.setAutoFormatting(true);
     writer.writeStartDocument();
     writer.writeStartElement("BornAgain");
-    writer.writeAttribute("Version", GUI::Helpers::getBornAgainVersionString());
+    writer.writeAttribute("Version", GUI::Util::Path::getBornAgainVersionString());
     GUI::Session::XML::writeItemAndChildItems(&writer, m_root_item);
     writer.writeEndElement(); // BornAgain
     writer.writeEndDocument();
diff --git a/GUI/Models/SessionModel.h b/GUI/Model/Session/SessionModel.h
similarity index 95%
rename from GUI/Models/SessionModel.h
rename to GUI/Model/Session/SessionModel.h
index 786d03422af633ecc0e516366bf1c502a580608f..fcda02e72a6d72ba89f3c473ab25a1c114737ce0 100644
--- a/GUI/Models/SessionModel.h
+++ b/GUI/Model/Session/SessionModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionModel.h
+//! @file      GUI/Model/Session/SessionModel.h
 //! @brief     Defines class SessionModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SESSIONMODEL_H
-#define BORNAGAIN_GUI_MODELS_SESSIONMODEL_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_SESSIONMODEL_H
+#define BORNAGAIN_GUI_MODEL_SESSION_SESSIONMODEL_H
 
-#include "GUI/Models/SessionFlags.h"
-#include "GUI/Models/SessionItem.h"
-#include "GUI/Models/SessionXML.h"
+#include "GUI/Model/Session/SessionFlags.h"
+#include "GUI/Model/Session/SessionItem.h"
+#include "GUI/Model/Session/SessionXML.h"
 #include <QStringList>
 
 //! Base class for a GUI data collection.
@@ -217,4 +217,4 @@ inline void SessionModel::setDraggedItemType(const QString& type)
     m_dragged_item_type = type;
 }
 
-#endif // BORNAGAIN_GUI_MODELS_SESSIONMODEL_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_SESSIONMODEL_H
diff --git a/GUI/Models/SessionXML.cpp b/GUI/Model/Session/SessionXML.cpp
similarity index 91%
rename from GUI/Models/SessionXML.cpp
rename to GUI/Model/Session/SessionXML.cpp
index 6b8a6ecfd3f35f032ce7eaec7fa6d3fe2c630674..7b4188027e8805fdf927f40fc54f95974447cfef 100644
--- a/GUI/Models/SessionXML.cpp
+++ b/GUI/Model/Session/SessionXML.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionXML.cpp
+//! @file      GUI/Model/Session/SessionXML.cpp
 //! @brief     Implements reader and writer classes for SessionModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,30 +12,51 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/MaterialItem.h"
-#include "GUI/Models/SessionItemTags.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/utils/DeserializationException.h"
-#include "GUI/utils/MessageService.h"
-#include <QtCore/QXmlStreamWriter>
-
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Session/SessionItemTags.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/Util/DeserializationException.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/MessageService.h"
 #include <QColor>
+#include <QtCore/QXmlStreamWriter>
 
 namespace {
+
 const QString bool_type_name = "bool";
 const QString double_type_name = "double";
 const QString int_type_name = "int";
 const QString uint_type_name = "uint";
 const QString qstring_type_name = "QString";
 
-void report_error(MessageService* messageService, SessionItem* item, const QString& message);
+void report_error(MessageService* messageService, SessionItem* item, const QString& message)
+{
+    if (!messageService)
+        throw Error(QString("Warning: ") + message);
+    messageService->addWarning(item->model(), message);
+}
+
+SessionItem* createItem(SessionItem* item, const QString& modelType, const QString& tag)
+{
+    if (item->hasModelType<GroupItem>()) {
+        if (auto groupItem = dynamic_cast<GroupItem*>(item))
+            return groupItem->getItemOfType(modelType);
+        return nullptr;
+    }
+    if (item->sessionItemTags()->isSingleItemTag(tag))
+        return item->getItem(tag);
+    try {
+        return item->model()->insertNewItem(modelType, item, -1, tag);
+    } catch (const std::exception&) {
+        return nullptr; // error will be reported later
+    }
+}
 
-SessionItem* createItem(SessionItem* item, const QString& modelType, const QString& tag);
 } // namespace
 
+
 void GUI::Session::XML::writeTo(QXmlStreamWriter* writer, SessionItem* parent)
 {
     writer->writeStartElement(parent->model()->getModelTag());
@@ -109,10 +130,9 @@ void GUI::Session::XML::writeVariant(QXmlStreamWriter* writer, QVariant variant,
             writer->writeAttribute(GUI::Session::XML::ParameterExtAttribute,
                                    combo.stringOfValues());
 
-        } else {
+        } else
             throw Error("GUI::Session::XML::writeVariant: Parameter type not supported "
                         + type_name);
-        }
 
         writer->writeEndElement(); // end ParameterTag
     }
@@ -182,7 +202,6 @@ void GUI::Session::XML::readItems(QXmlStreamReader* reader, SessionItem* parent,
         } else if (reader->isEndElement()) {
             if (reader->name() == GUI::Session::XML::ItemTag && parent)
                 parent = parent->parent();
-
             if (reader->name() == start_type)
                 break;
         }
@@ -272,41 +291,8 @@ QString GUI::Session::XML::readProperty(QXmlStreamReader* reader, SessionItem* i
         throw Error(message);
     }
 
-    if (variant.isValid()) {
+    if (variant.isValid())
         item->setRoleProperty(role, variant);
-    }
 
     return parameter_name;
 }
-
-namespace {
-void report_error(MessageService* messageService, SessionItem* item, const QString& message)
-{
-    if (messageService) {
-        messageService->addWarning(item->model(), message);
-    } else {
-        throw Error(QString("Warning: ") + message);
-    }
-}
-
-SessionItem* createItem(SessionItem* item, const QString& modelType, const QString& tag)
-{
-    SessionItem* result(nullptr);
-
-    if (item->hasModelType<GroupItem>()) {
-        if (auto groupItem = dynamic_cast<GroupItem*>(item))
-            result = groupItem->getItemOfType(modelType);
-    } else {
-        if (item->sessionItemTags()->isSingleItemTag(tag)) {
-            result = item->getItem(tag);
-        } else {
-            try {
-                result = item->model()->insertNewItem(modelType, item, -1, tag);
-            } catch (const std::exception&) {
-                result = nullptr; // error will be reported later
-            }
-        }
-    }
-    return result;
-}
-} // namespace
diff --git a/GUI/Models/SessionXML.h b/GUI/Model/Session/SessionXML.h
similarity index 92%
rename from GUI/Models/SessionXML.h
rename to GUI/Model/Session/SessionXML.h
index 6cc118caafbae33cd1e2171433a8bcb85d479134..776c4162f05662d812e9e8b71a72a4978ebdea0b 100644
--- a/GUI/Models/SessionXML.h
+++ b/GUI/Model/Session/SessionXML.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SessionXML.h
+//! @file      GUI/Model/Session/SessionXML.h
 //! @brief     Defines reader and writer classes for SessionModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SESSIONXML_H
-#define BORNAGAIN_GUI_MODELS_SESSIONXML_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_SESSIONXML_H
+#define BORNAGAIN_GUI_MODEL_SESSION_SESSIONXML_H
 
 #include <QVariant>
 
@@ -63,4 +63,4 @@ QString readProperty(QXmlStreamReader* reader, SessionItem* item,
 
 } // namespace GUI::Session::XML
 
-#endif // BORNAGAIN_GUI_MODELS_SESSIONXML_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_SESSIONXML_H
diff --git a/GUI/Models/SimulationOptionsItem.cpp b/GUI/Model/Session/SimulationOptionsItem.cpp
similarity index 97%
rename from GUI/Models/SimulationOptionsItem.cpp
rename to GUI/Model/Session/SimulationOptionsItem.cpp
index 27049f3b962c92b50570ad55f0caaace0b24a490..ba2bb9f55fb6bb40572b25dea237d4b477927cf0 100644
--- a/GUI/Models/SimulationOptionsItem.cpp
+++ b/GUI/Model/Session/SimulationOptionsItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SimulationOptionsItem.cpp
+//! @file      GUI/Model/Session/SimulationOptionsItem.cpp
 //! @brief     Defines class SimulationOptionsItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/SimulationOptionsItem.h"
-#include "GUI/Models/ComboProperty.h"
+#include "GUI/Model/Session/SimulationOptionsItem.h"
+#include "GUI/Util/ComboProperty.h"
 #include <thread>
 
 // !! Attention !! Do not change the following texts, despite they are not matching the
diff --git a/GUI/Models/SimulationOptionsItem.h b/GUI/Model/Session/SimulationOptionsItem.h
similarity index 87%
rename from GUI/Models/SimulationOptionsItem.h
rename to GUI/Model/Session/SimulationOptionsItem.h
index 1cb06d3a8f407dc00b38aa365a6744bdcea5677c..983351aca8e33a24a265cde7c5754f472afa90f8 100644
--- a/GUI/Models/SimulationOptionsItem.h
+++ b/GUI/Model/Session/SimulationOptionsItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/SimulationOptionsItem.h
+//! @file      GUI/Model/Session/SimulationOptionsItem.h
 //! @brief     Defines class SimulationOptionsItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_SIMULATIONOPTIONSITEM_H
-#define BORNAGAIN_GUI_MODELS_SIMULATIONOPTIONSITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_SESSION_SIMULATIONOPTIONSITEM_H
+#define BORNAGAIN_GUI_MODEL_SESSION_SIMULATIONOPTIONSITEM_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 #include <QMap>
 
 //! The SimulationOptionsItem class holds simulation status (run policy, number of threads,
@@ -58,4 +58,4 @@ public:
     bool includeSpecularPeak() const;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_SIMULATIONOPTIONSITEM_H
+#endif // BORNAGAIN_GUI_MODEL_SESSION_SIMULATIONOPTIONSITEM_H
diff --git a/GUI/Model/State/SessionData.cpp b/GUI/Model/State/SessionData.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..cb62dce1383ec35129398ec2d4e1f88f5cc429b9
--- /dev/null
+++ b/GUI/Model/State/SessionData.cpp
@@ -0,0 +1,28 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/Model/State/SessionData.cpp
+//! @brief     Implements struct SessionData
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2021
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#include "GUI/Model/State/SessionData.h"
+#include <QStandardPaths>
+
+SessionData* gSessionData; //!< global pointer to the single instance
+
+SessionData::SessionData()
+{
+    gSessionData = this;
+}
+
+QString SessionData::appDataFolder()
+{
+    return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
+}
diff --git a/GUI/Model/State/SessionData.h b/GUI/Model/State/SessionData.h
new file mode 100644
index 0000000000000000000000000000000000000000..240859f5e83daf165b3c0097917b038e29b9d405
--- /dev/null
+++ b/GUI/Model/State/SessionData.h
@@ -0,0 +1,35 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/Model/State/SessionData.h
+//! @brief     Defines struct SessionData
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2021
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#ifndef BORNAGAIN_GUI_MODEL_STATE_SESSIONDATA_H
+#define BORNAGAIN_GUI_MODEL_STATE_SESSIONDATA_H
+
+#include "GUI/Model/Instrument/InstrumentLibrary.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+
+struct SessionData {
+    SessionData();
+
+    InstrumentLibrary instrumentLibrary;
+    ProjectDocument* projectDocument{nullptr};
+
+    //! The folder where persistent application data shall be stored. E.g. in Windows this is the
+    //! AppData/Roaming location.
+    //! Used e.g. for storing the instrument library.
+    static QString appDataFolder();
+};
+
+extern SessionData* gSessionData; //!< global pointer to the single instance
+
+#endif // BORNAGAIN_GUI_MODEL_STATE_SESSIONDATA_H
diff --git a/GUI/Models/RotationItems.cpp b/GUI/Model/Trafo/RotationItems.cpp
similarity index 96%
rename from GUI/Models/RotationItems.cpp
rename to GUI/Model/Trafo/RotationItems.cpp
index 347330f85de4d1cb796b567d18af6b0c59f2bd04..cc4f42e02837cc64be701869cb3561a7eb01954c 100644
--- a/GUI/Models/RotationItems.cpp
+++ b/GUI/Model/Trafo/RotationItems.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/RotationItems.cpp
+//! @file      GUI/Model/Trafo/RotationItems.cpp
 //! @brief     Implements class RotationItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/RotationItems.h"
+#include "GUI/Model/Trafo/RotationItems.h"
 #include "Base/Const/Units.h"
 #include "Base/Vector/Transform3D.h"
-#include "GUI/Models/DoubleDescriptor.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 #include "Sample/Scattering/Rotations.h"
 
 using namespace Units;
diff --git a/GUI/Models/RotationItems.h b/GUI/Model/Trafo/RotationItems.h
similarity index 90%
rename from GUI/Models/RotationItems.h
rename to GUI/Model/Trafo/RotationItems.h
index 50998615a75099e0e2797ce931c8d084d2a4d553..6256ec6302fd7ca775228138168d23c3fc65396a 100644
--- a/GUI/Models/RotationItems.h
+++ b/GUI/Model/Trafo/RotationItems.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/RotationItems.h
+//! @file      GUI/Model/Trafo/RotationItems.h
 //! @brief     Defines class RotationItems
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_ROTATIONITEMS_H
-#define BORNAGAIN_GUI_MODELS_ROTATIONITEMS_H
+#ifndef BORNAGAIN_GUI_MODEL_TRAFO_ROTATIONITEMS_H
+#define BORNAGAIN_GUI_MODEL_TRAFO_ROTATIONITEMS_H
 
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class IRotation;
 class Transform3D;
@@ -92,4 +92,4 @@ protected:
     virtual unique_ptr<IRotation> createRotation() const override;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_ROTATIONITEMS_H
+#endif // BORNAGAIN_GUI_MODEL_TRAFO_ROTATIONITEMS_H
diff --git a/GUI/Models/TransformationItem.cpp b/GUI/Model/Trafo/TransformationItem.cpp
similarity index 87%
rename from GUI/Models/TransformationItem.cpp
rename to GUI/Model/Trafo/TransformationItem.cpp
index 79ccf7a54b9deeeeb606c18f4c7559e628950337..d2aa65bb00682121704fbac25556de2a6fcae950 100644
--- a/GUI/Models/TransformationItem.cpp
+++ b/GUI/Model/Trafo/TransformationItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/TransformationItem.cpp
+//! @file      GUI/Model/Trafo/TransformationItem.cpp
 //! @brief     Implements class TransformationItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/TransformationItem.h"
-#include "GUI/Models/GroupInfo.h"
-#include "GUI/Models/RotationItems.h"
+#include "GUI/Model/Trafo/TransformationItem.h"
+#include "GUI/Model/Group/GroupInfo.h"
+#include "GUI/Model/Trafo/RotationItems.h"
 
 TransformationItem::TransformationItem() : SessionGraphicsItem(M_TYPE)
 {
diff --git a/GUI/Models/TransformationItem.h b/GUI/Model/Trafo/TransformationItem.h
similarity index 81%
rename from GUI/Models/TransformationItem.h
rename to GUI/Model/Trafo/TransformationItem.h
index 77a4746c86e84ba5c6b04950f6dd0dfcb8128e71..bb35832943f004c6d07ca226a56a4aaa9d2ac02b 100644
--- a/GUI/Models/TransformationItem.h
+++ b/GUI/Model/Trafo/TransformationItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/TransformationItem.h
+//! @file      GUI/Model/Trafo/TransformationItem.h
 //! @brief     Defines class TransformationItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_TRANSFORMATIONITEM_H
-#define BORNAGAIN_GUI_MODELS_TRANSFORMATIONITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_TRAFO_TRANSFORMATIONITEM_H
+#define BORNAGAIN_GUI_MODEL_TRAFO_TRANSFORMATIONITEM_H
 
-#include "GUI/Models/SessionGraphicsItem.h"
+#include "GUI/Model/Session/SessionGraphicsItem.h"
 
 class RotationItem;
 
@@ -42,4 +42,4 @@ template <typename T> T* TransformationItem::setRotationType()
     return setGroupPropertyType<T>(P_ROT);
 }
 
-#endif // BORNAGAIN_GUI_MODELS_TRANSFORMATIONITEM_H
+#endif // BORNAGAIN_GUI_MODEL_TRAFO_TRANSFORMATIONITEM_H
diff --git a/GUI/Models/DoubleDescriptor.cpp b/GUI/Model/Types/DoubleDescriptor.cpp
similarity index 93%
rename from GUI/Models/DoubleDescriptor.cpp
rename to GUI/Model/Types/DoubleDescriptor.cpp
index 96d75dc6d0cfd31093892a5caa2ebba9668c0ad2..9845219da65664b847987be3366ce62a557847d8 100644
--- a/GUI/Models/DoubleDescriptor.cpp
+++ b/GUI/Model/Types/DoubleDescriptor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DoubleDescriptor.cpp
+//! @file      GUI/Model/Types/DoubleDescriptor.cpp
 //! @brief     Implements class DoubleDescriptor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
+#include "GUI/Model/Job/ModelPath.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 DoubleDescriptor::DoubleDescriptor(const QString& label, SessionItem* item,
                                    const variant<QString, Unit>& unit)
diff --git a/GUI/Models/DoubleDescriptor.h b/GUI/Model/Types/DoubleDescriptor.h
similarity index 92%
rename from GUI/Models/DoubleDescriptor.h
rename to GUI/Model/Types/DoubleDescriptor.h
index 9a6f2cfa381efe40d85d8a1ae9b59be58f6d52dd..690daf387504d4574eba7132d6d8c67f75a3b78d 100644
--- a/GUI/Models/DoubleDescriptor.h
+++ b/GUI/Model/Types/DoubleDescriptor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/DoubleDescriptor.h
+//! @file      GUI/Model/Types/DoubleDescriptor.h
 //! @brief     Defines class DoubleDescriptor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_DOUBLEDESCRIPTOR_H
-#define BORNAGAIN_GUI_MODELS_DOUBLEDESCRIPTOR_H
+#ifndef BORNAGAIN_GUI_MODEL_TYPES_DOUBLEDESCRIPTOR_H
+#define BORNAGAIN_GUI_MODEL_TYPES_DOUBLEDESCRIPTOR_H
 
 #include "Fit/Param/RealLimits.h"
-#include "GUI/Models/Unit.h"
+#include "GUI/Model/Types/Unit.h"
 #include <QString>
 #include <functional>
 #include <variant>
@@ -80,7 +80,7 @@ public:
     function<QString()> path = nullptr; //<! Path describing  this value. Used e.g. for undo/redo
 };
 
-typedef QList<DoubleDescriptor> DoubleDescriptors;
+using DoubleDescriptors = QList<DoubleDescriptor>;
 
 
-#endif // BORNAGAIN_GUI_MODELS_DOUBLEDESCRIPTOR_H
+#endif // BORNAGAIN_GUI_MODEL_TYPES_DOUBLEDESCRIPTOR_H
diff --git a/GUI/Models/ItemWithDistribution.h b/GUI/Model/Types/ItemWithDistribution.h
similarity index 80%
rename from GUI/Models/ItemWithDistribution.h
rename to GUI/Model/Types/ItemWithDistribution.h
index 209092e1da9625c46f4c9432bf921c87a7ae5de9..cd9acbd97a68259e0c9a048516db5380da548381 100644
--- a/GUI/Models/ItemWithDistribution.h
+++ b/GUI/Model/Types/ItemWithDistribution.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ItemWithDistribution.h
+//! @file      GUI/Model/Types/ItemWithDistribution.h
 //! @brief     Defines abstract item with a distribution
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_ITEMWITHDISTRIBUTION_H
-#define BORNAGAIN_GUI_MODELS_ITEMWITHDISTRIBUTION_H
+#ifndef BORNAGAIN_GUI_MODEL_TYPES_ITEMWITHDISTRIBUTION_H
+#define BORNAGAIN_GUI_MODEL_TYPES_ITEMWITHDISTRIBUTION_H
 
 #include "Wrap/WinDllMacros.h"
 
@@ -33,4 +33,4 @@ public:
     virtual ~ItemWithDistribution() = default;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_ITEMWITHDISTRIBUTION_H
+#endif // BORNAGAIN_GUI_MODEL_TYPES_ITEMWITHDISTRIBUTION_H
diff --git a/GUI/Models/UIntDescriptor.cpp b/GUI/Model/Types/UIntDescriptor.cpp
similarity index 92%
rename from GUI/Models/UIntDescriptor.cpp
rename to GUI/Model/Types/UIntDescriptor.cpp
index d4f57e6d6226ee3d0c6e081d0722bf3edb846883..74306cffbadc57611b359e28d11bbb63ef194c46 100644
--- a/GUI/Models/UIntDescriptor.cpp
+++ b/GUI/Model/Types/UIntDescriptor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/UIntDescriptor.cpp
+//! @file      GUI/Model/Types/UIntDescriptor.cpp
 //! @brief     Implements class UIntDescriptor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/UIntDescriptor.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Types/UIntDescriptor.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 UIntDescriptor::UIntDescriptor(const QString& label, SessionItem* item,
                                const variant<QString, Unit>& unit)
diff --git a/GUI/Models/UIntDescriptor.h b/GUI/Model/Types/UIntDescriptor.h
similarity index 92%
rename from GUI/Models/UIntDescriptor.h
rename to GUI/Model/Types/UIntDescriptor.h
index e0433fde72d575134bda90829358ba0fc198a610..5f1ea7560e4b9e7931ab5f9b274aea2671c9b9a3 100644
--- a/GUI/Models/UIntDescriptor.h
+++ b/GUI/Model/Types/UIntDescriptor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/UIntDescriptor.h
+//! @file      GUI/Model/Types/UIntDescriptor.h
 //! @brief     Defines class UIntDescriptor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_UINTDESCRIPTOR_H
-#define BORNAGAIN_GUI_MODELS_UINTDESCRIPTOR_H
+#ifndef BORNAGAIN_GUI_MODEL_TYPES_UINTDESCRIPTOR_H
+#define BORNAGAIN_GUI_MODEL_TYPES_UINTDESCRIPTOR_H
 
 #include "Fit/Param/RealLimits.h"
-#include "GUI/Models/Unit.h"
+#include "GUI/Model/Types/Unit.h"
 #include <QString>
 #include <functional>
 #include <variant>
@@ -69,4 +69,4 @@ public:
     function<QString()> path = nullptr; //<! Path describing  this value. Used e.g. for undo/redo
 };
 
-#endif // BORNAGAIN_GUI_MODELS_UINTDESCRIPTOR_H
+#endif // BORNAGAIN_GUI_MODEL_TYPES_UINTDESCRIPTOR_H
diff --git a/GUI/Models/Unit.cpp b/GUI/Model/Types/Unit.cpp
similarity index 97%
rename from GUI/Models/Unit.cpp
rename to GUI/Model/Types/Unit.cpp
index d40ed2da388572194d6d30bd51bab1fb8a74c767..c362830360eb6581b42d718fa40fde3fbbca48c6 100644
--- a/GUI/Models/Unit.cpp
+++ b/GUI/Model/Types/Unit.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/Unit.cpp
+//! @file      GUI/Model/Types/Unit.cpp
 //! @brief     Implements class Unit
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/Unit.h"
+#include "GUI/Model/Types/Unit.h"
 #include "Base/Const/Units.h"
 #include "Base/Utils/Assert.h"
 #include <QString>
diff --git a/GUI/Models/Unit.h b/GUI/Model/Types/Unit.h
similarity index 89%
rename from GUI/Models/Unit.h
rename to GUI/Model/Types/Unit.h
index 597935db447756e8f0a5db7f6bbe5038edce4b2b..98f30ec0c713dc36d61d91078aa34777bae2fcc1 100644
--- a/GUI/Models/Unit.h
+++ b/GUI/Model/Types/Unit.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/Unit.h
+//! @file      GUI/Model/Types/Unit.h
 //! @brief     Defines class Unit
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_UNIT_H
-#define BORNAGAIN_GUI_MODELS_UNIT_H
+#ifndef BORNAGAIN_GUI_MODEL_TYPES_UNIT_H
+#define BORNAGAIN_GUI_MODEL_TYPES_UNIT_H
 
 class QString;
 
@@ -43,4 +43,4 @@ double convert(double d, Unit from, Unit to);
 //! Returns the string for the given unit
 QString unitAsString(const Unit& unit);
 
-#endif // BORNAGAIN_GUI_MODELS_UNIT_H
+#endif // BORNAGAIN_GUI_MODEL_TYPES_UNIT_H
diff --git a/GUI/Models/VectorDescriptor.h b/GUI/Model/Types/VectorDescriptor.h
similarity index 84%
rename from GUI/Models/VectorDescriptor.h
rename to GUI/Model/Types/VectorDescriptor.h
index b33d1be524f9640a011b1308638fdc7d7b71e515..46eb6b17ba21f61e133e9d4d286c52697857a4f7 100644
--- a/GUI/Models/VectorDescriptor.h
+++ b/GUI/Model/Types/VectorDescriptor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/VectorDescriptor.h
+//! @file      GUI/Model/Types/VectorDescriptor.h
 //! @brief     Defines class VectorDescriptor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_VECTORDESCRIPTOR_H
-#define BORNAGAIN_GUI_MODELS_VECTORDESCRIPTOR_H
+#ifndef BORNAGAIN_GUI_MODEL_TYPES_VECTORDESCRIPTOR_H
+#define BORNAGAIN_GUI_MODEL_TYPES_VECTORDESCRIPTOR_H
 
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
+#include "GUI/Model/Types/VectorItem.h"
 
 //! Describes properties of a 3D vector, consisting of three double values.
 //!
@@ -45,4 +45,4 @@ public:
     DoubleDescriptor z;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_VECTORDESCRIPTOR_H
+#endif // BORNAGAIN_GUI_MODEL_TYPES_VECTORDESCRIPTOR_H
diff --git a/GUI/Models/VectorItem.cpp b/GUI/Model/Types/VectorItem.cpp
similarity index 96%
rename from GUI/Models/VectorItem.cpp
rename to GUI/Model/Types/VectorItem.cpp
index f95c9eaaebb08a13231633acf66484c0f8dcece7..3b1d06773a2e7918689560914edbc86056559e6b 100644
--- a/GUI/Models/VectorItem.cpp
+++ b/GUI/Model/Types/VectorItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/VectorItem.cpp
+//! @file      GUI/Model/Types/VectorItem.cpp
 //! @brief     Implements class VectorItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Types/VectorItem.h"
 
 VectorItem::VectorItem() : SessionItem(M_TYPE)
 {
diff --git a/GUI/Models/VectorItem.h b/GUI/Model/Types/VectorItem.h
similarity index 84%
rename from GUI/Models/VectorItem.h
rename to GUI/Model/Types/VectorItem.h
index 3b1320a68b4dc5ff3c28ea768c5aa3c3fb2b3d30..5ee7bff29eca11c2dbed5acad645a2ea1a7f5392 100644
--- a/GUI/Models/VectorItem.h
+++ b/GUI/Model/Types/VectorItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/VectorItem.h
+//! @file      GUI/Model/Types/VectorItem.h
 //! @brief     Defines class VectorItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_VECTORITEM_H
-#define BORNAGAIN_GUI_MODELS_VECTORITEM_H
+#ifndef BORNAGAIN_GUI_MODEL_TYPES_VECTORITEM_H
+#define BORNAGAIN_GUI_MODEL_TYPES_VECTORITEM_H
 
 #include "Base/Vector/Vectors3D.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 class BA_CORE_API_ VectorItem : public SessionItem {
 private:
@@ -50,4 +50,4 @@ private:
     void updateLabel();
 };
 
-#endif // BORNAGAIN_GUI_MODELS_VECTORITEM_H
+#endif // BORNAGAIN_GUI_MODEL_TYPES_VECTORITEM_H
diff --git a/GUI/Models/FitParameterHelper.h b/GUI/Models/FitParameterHelper.h
deleted file mode 100644
index cc0cbb214ad96080c0bf85dfaf958b5b1a606620..0000000000000000000000000000000000000000
--- a/GUI/Models/FitParameterHelper.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      GUI/Models/FitParameterHelper.h
-//! @brief     Defines class FitParameterHelper
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2018
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#ifndef BORNAGAIN_GUI_MODELS_FITPARAMETERHELPER_H
-#define BORNAGAIN_GUI_MODELS_FITPARAMETERHELPER_H
-
-#include <QStringList>
-
-class ParameterItem;
-class FitParameterItem;
-class FitParameterContainerItem;
-
-//! The FitParameterHelper class contains set of convenience static methods to handle
-//! various fitting items in given JobItem.
-
-class FitParameterHelper {
-public:
-    static void createFitParameter(FitParameterContainerItem* container,
-                                   ParameterItem* parameterItem);
-
-    static void removeFromFitParameters(FitParameterContainerItem* container,
-                                        ParameterItem* parameterItem);
-    static void addToFitParameter(FitParameterContainerItem* container,
-                                  ParameterItem* parameterItem, const QString& fitParName);
-
-    static FitParameterItem* getFitParameterItem(FitParameterContainerItem* container,
-                                                 ParameterItem* parameterItem);
-
-    static QStringList getFitParameterNames(FitParameterContainerItem* container);
-    static QString getParameterItemPath(const ParameterItem* parameterItem);
-    static ParameterItem* getParameterItem(FitParameterContainerItem* container,
-                                           const QString& link);
-};
-
-#endif // BORNAGAIN_GUI_MODELS_FITPARAMETERHELPER_H
diff --git a/GUI/Models/MaterialItemUtils.cpp b/GUI/Models/MaterialItemUtils.cpp
deleted file mode 100644
index bb597230a5d9397d152d924394df3f66197d69cf..0000000000000000000000000000000000000000
--- a/GUI/Models/MaterialItemUtils.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      GUI/Models/MaterialItemUtils.cpp
-//! @brief     Implements class MaterialItemUtils
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2018
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MaterialItemContainer.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/MaterialModelStore.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "Sample/Material/Material.h"
-
-#include <boost/polymorphic_cast.hpp>
-using boost::polymorphic_cast;
-
-#include <deque>
-#include <random>
-
-QColor GUI::Model::MaterialItemUtils::suggestMaterialColor(const QString& name)
-{
-    if (name.contains("Vacuum"))
-        return QColor(179, 242, 255);
-    if (name.contains("Substrate"))
-        return QColor(205, 102, 0);
-    if (name.contains("Default"))
-        return QColor(Qt::green);
-    if (name.contains("Particle"))
-        return QColor(146, 198, 255);
-    return randomMaterialColor();
-}
-
-QColor GUI::Model::MaterialItemUtils::randomMaterialColor()
-{
-    static std::random_device r;
-    std::default_random_engine re(r());
-    std::uniform_int_distribution<int> ru(0, 255);
-
-    return QColor(ru(re), ru(re), ru(re));
-}
-
-QString GUI::Model::MaterialItemUtils::defaultMaterialIdentifier()
-{
-    if (!GUI::Model::MaterialModelStore::materialModel())
-        return QString();
-
-    auto materials = GUI::Model::MaterialModelStore::materialModel()->topItems<MaterialItem>();
-    return materials.isEmpty() ? QString() : materials.front()->identifier();
-}
-
-std::unique_ptr<Material>
-GUI::Model::MaterialItemUtils::createDomainMaterial(const QString& materialIdentifier)
-{
-    MaterialItem* materialItem = findMaterial(materialIdentifier);
-    return materialItem->createMaterial();
-}
-
-std::unique_ptr<Material>
-GUI::Model::MaterialItemUtils::createDomainMaterial(const QString& materialIdentifier,
-                                                    const MaterialItemContainer& container)
-{
-    const MaterialItem* material_item = container.findMaterialById(materialIdentifier);
-    if (!material_item)
-        throw Error("MaterialUtils::createDomainMaterial() -> Error. Can't find "
-                    "material with identifier '"
-                    + materialIdentifier + "'.");
-    return material_item->createMaterial();
-}
-
-MaterialItem* GUI::Model::MaterialItemUtils::findMaterial(const QString& materialIdentifier)
-{
-    if (!GUI::Model::MaterialModelStore::materialModel())
-        throw Error("GUI::Model::MaterialItemUtils::findMaterial() -> Error. "
-                    "Attempt to access non-existing material model");
-
-    auto material =
-        GUI::Model::MaterialModelStore::materialModel()->materialFromIdentifier(materialIdentifier);
-
-    if (!material)
-        throw Error("MaterialUtils::findMaterial() -> Error. Can't find "
-                    "material with identifier '"
-                    + materialIdentifier + "'.");
-    return material;
-}
-
-QVector<ItemWithMaterial*>
-GUI::Model::MaterialItemUtils::itemsWithMaterial(ParticleLayoutItem* item)
-{
-    QVector<ItemWithMaterial*> itemsWithMaterial;
-
-    QVector<ItemWithParticles*> itemsWithParticles{item->particles()};
-    while (!itemsWithParticles.empty()) {
-        auto* item = itemsWithParticles.takeFirst();
-        if (!item)
-            continue;
-
-        if (item->hasModelType<ParticleCompositionItem>())
-            itemsWithParticles << polymorphic_cast<ParticleCompositionItem*>(item)->particles();
-        else if (item->hasModelType<MesoCrystalItem>())
-            itemsWithParticles << polymorphic_cast<MesoCrystalItem*>(item)->basisParticle();
-        else if (item->hasModelType<ParticleItem>())
-            itemsWithMaterial << dynamic_cast<ParticleItem*>(item);
-        else if (item->hasModelType<ParticleCoreShellItem>()) {
-            if (auto core = dynamic_cast<ParticleCoreShellItem*>(item)->core())
-                itemsWithMaterial << core;
-            if (auto shell = dynamic_cast<ParticleCoreShellItem*>(item)->shell())
-                itemsWithMaterial << shell;
-        } else
-            throw Error("Error in GUI::Model::MaterialItemUtils::materialProperties: cannot handle "
-                        "passed model type '"
-                        + item->modelType() + "'");
-    }
-    return itemsWithMaterial;
-}
diff --git a/GUI/Models/ComboProperty.cpp b/GUI/Util/ComboProperty.cpp
similarity index 98%
rename from GUI/Models/ComboProperty.cpp
rename to GUI/Util/ComboProperty.cpp
index b2f56eb63764a6e98b87f04251d7f904663552e1..2ea0870faf1b75a64992dea8c1e567d52606f8bc 100644
--- a/GUI/Models/ComboProperty.cpp
+++ b/GUI/Util/ComboProperty.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ComboProperty.cpp
+//! @file      GUI/Util/ComboProperty.cpp
 //! @brief     Implements class ComboProperty
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/ComboProperty.h"
+#include "GUI/Util/ComboProperty.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Models/Error.h"
+#include "GUI/Util/Error.h"
 
 namespace {
 const QString value_separator = ";";
diff --git a/GUI/Models/ComboProperty.h b/GUI/Util/ComboProperty.h
similarity index 92%
rename from GUI/Models/ComboProperty.h
rename to GUI/Util/ComboProperty.h
index 534907533d0d0f835f9d37bd75b1271738ffc500..92aec0fdd92b3aa1f04b02f04c8014e789178ddf 100644
--- a/GUI/Models/ComboProperty.h
+++ b/GUI/Util/ComboProperty.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/ComboProperty.h
+//! @file      GUI/Util/ComboProperty.h
 //! @brief     Defines class ComboProperty
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_COMBOPROPERTY_H
-#define BORNAGAIN_GUI_MODELS_COMBOPROPERTY_H
+#ifndef BORNAGAIN_GUI_UTIL_COMBOPROPERTY_H
+#define BORNAGAIN_GUI_UTIL_COMBOPROPERTY_H
 
 #include <QStringList>
 #include <QVariant>
@@ -72,4 +72,4 @@ private:
 
 Q_DECLARE_METATYPE(ComboProperty)
 
-#endif // BORNAGAIN_GUI_MODELS_COMBOPROPERTY_H
+#endif // BORNAGAIN_GUI_UTIL_COMBOPROPERTY_H
diff --git a/GUI/utils/DeserializationException.cpp b/GUI/Util/DeserializationException.cpp
similarity index 89%
rename from GUI/utils/DeserializationException.cpp
rename to GUI/Util/DeserializationException.cpp
index 865985b99988168172b1987367a068f5ca7037e8..fab575a53f0fb05c8ca0bf3322f8b955d1951759 100644
--- a/GUI/utils/DeserializationException.cpp
+++ b/GUI/Util/DeserializationException.cpp
@@ -1,38 +1,38 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      GUI/utils/DeserializationException.cpp
-//! @brief     Implements class DeserializationException
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2021
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#include "GUI/utils/DeserializationException.h"
-#include <QString>
-
-DeserializationException::DeserializationException(const QString& t) : m_text(t) {}
-
-DeserializationException DeserializationException::tooOld()
-{
-    return DeserializationException("The found file is too old.");
-}
-
-DeserializationException DeserializationException::tooNew()
-{
-    return DeserializationException("The found file is too new.");
-}
-
-DeserializationException DeserializationException::streamError()
-{
-    return DeserializationException("The data seems to be corrupted.");
-}
-
-QString DeserializationException::text() const
-{
-    return m_text;
-}
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/Util/DeserializationException.cpp
+//! @brief     Implements class DeserializationException
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2021
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#include "GUI/Util/DeserializationException.h"
+#include <QString>
+
+DeserializationException::DeserializationException(const QString& t) : m_text(t) {}
+
+DeserializationException DeserializationException::tooOld()
+{
+    return DeserializationException("The found file is too old.");
+}
+
+DeserializationException DeserializationException::tooNew()
+{
+    return DeserializationException("The found file is too new.");
+}
+
+DeserializationException DeserializationException::streamError()
+{
+    return DeserializationException("The data seems to be corrupted.");
+}
+
+QString DeserializationException::text() const
+{
+    return m_text;
+}
diff --git a/GUI/utils/DeserializationException.h b/GUI/Util/DeserializationException.h
similarity index 80%
rename from GUI/utils/DeserializationException.h
rename to GUI/Util/DeserializationException.h
index bde8be45cb940895aa6680e3a408232bfccee2b5..f55df8f36a261aba365782968ee6df81f6b73632 100644
--- a/GUI/utils/DeserializationException.h
+++ b/GUI/Util/DeserializationException.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/DeserializationException.h
+//! @file      GUI/Util/DeserializationException.h
 //! @brief     Defines class DeserializationException
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_UTILS_DESERIALIZATIONEXCEPTION_H
-#define BORNAGAIN_GUI_UTILS_DESERIALIZATIONEXCEPTION_H
+#ifndef BORNAGAIN_GUI_UTIL_DESERIALIZATIONEXCEPTION_H
+#define BORNAGAIN_GUI_UTIL_DESERIALIZATIONEXCEPTION_H
 
 #include <QString>
 
@@ -32,4 +32,4 @@ private:
     QString m_text;
 };
 
-#endif // BORNAGAIN_GUI_UTILS_DESERIALIZATIONEXCEPTION_H
+#endif // BORNAGAIN_GUI_UTIL_DESERIALIZATIONEXCEPTION_H
diff --git a/GUI/Models/Error.cpp b/GUI/Util/Error.cpp
similarity index 91%
rename from GUI/Models/Error.cpp
rename to GUI/Util/Error.cpp
index b6881446d5b07c55679fffd00c1d1f7414bae5b2..1285a4aff15324b3c5b05735b9c5fd3a522a8a38 100644
--- a/GUI/Models/Error.cpp
+++ b/GUI/Util/Error.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/Error.cpp
+//! @file      GUI/Util/Error.cpp
 //! @brief     Implements Error class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/Error.h"
+#include "GUI/Util/Error.h"
 
 Error::Error(const QString& message) noexcept : m_messageAsLatin1(message.toLatin1()) {}
 
diff --git a/GUI/Models/Error.h b/GUI/Util/Error.h
similarity index 84%
rename from GUI/Models/Error.h
rename to GUI/Util/Error.h
index 29ea6035c890965b16c42a60c5c454cf3aeb016b..3ae3a39a39251bf664b6d057a60683591cb82cf1 100644
--- a/GUI/Models/Error.h
+++ b/GUI/Util/Error.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Models/Error.h
+//! @file      GUI/Util/Error.h
 //! @brief     Defines error class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MODELS_ERROR_H
-#define BORNAGAIN_GUI_MODELS_ERROR_H
+#ifndef BORNAGAIN_GUI_UTIL_ERROR_H
+#define BORNAGAIN_GUI_UTIL_ERROR_H
 
 #include <QByteArray>
 #include <QString>
@@ -27,4 +27,4 @@ private:
     QByteArray m_messageAsLatin1;
 };
 
-#endif // BORNAGAIN_GUI_MODELS_ERROR_H
+#endif // BORNAGAIN_GUI_UTIL_ERROR_H
diff --git a/GUI/utils/ItemDelegateForHTML.cpp b/GUI/Util/ItemDelegateForHTML.cpp
similarity index 97%
rename from GUI/utils/ItemDelegateForHTML.cpp
rename to GUI/Util/ItemDelegateForHTML.cpp
index ccc44c8845ff2f190384235e329e9e14bf732d95..665ce54fad7660b18cb1ecb32da8b3a874873591 100644
--- a/GUI/utils/ItemDelegateForHTML.cpp
+++ b/GUI/Util/ItemDelegateForHTML.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/ItemDelegateForHTML.cpp
+//! @file      GUI/Util/ItemDelegateForHTML.cpp
 //! @brief     Implements class ItemDelegateForHTML
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -13,7 +13,7 @@
 //  ************************************************************************************************
 
 
-#include "GUI/utils/ItemDelegateForHTML.h"
+#include "GUI/Util/ItemDelegateForHTML.h"
 #include <QAbstractItemView>
 #include <QAbstractTextDocumentLayout>
 #include <QApplication>
diff --git a/GUI/utils/ItemDelegateForHTML.h b/GUI/Util/ItemDelegateForHTML.h
similarity index 85%
rename from GUI/utils/ItemDelegateForHTML.h
rename to GUI/Util/ItemDelegateForHTML.h
index 9f4350c3a35fdbde59fd763bccb5643ed32a81ca..33355ccab5c91cadcafed0c0fb804584e4bbdfca 100644
--- a/GUI/utils/ItemDelegateForHTML.h
+++ b/GUI/Util/ItemDelegateForHTML.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/ItemDelegateForHTML.h
+//! @file      GUI/Util/ItemDelegateForHTML.h
 //! @brief     Defines class ItemDelegateForHTML
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_UTILS_ITEMDELEGATEFORHTML_H
-#define BORNAGAIN_GUI_UTILS_ITEMDELEGATEFORHTML_H
+#ifndef BORNAGAIN_GUI_UTIL_ITEMDELEGATEFORHTML_H
+#define BORNAGAIN_GUI_UTIL_ITEMDELEGATEFORHTML_H
 
 #include <QStyledItemDelegate>
 
@@ -35,4 +35,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_UTILS_ITEMDELEGATEFORHTML_H
\ No newline at end of file
+#endif // BORNAGAIN_GUI_UTIL_ITEMDELEGATEFORHTML_H
\ No newline at end of file
diff --git a/GUI/utils/LayoutUtils.cpp b/GUI/Util/LayoutUtils.cpp
similarity index 86%
rename from GUI/utils/LayoutUtils.cpp
rename to GUI/Util/LayoutUtils.cpp
index af50f4cef281070e3fe5160d8a95246ea068eebe..b1bcbe2f58024bbaaed3e8738fd7ef9bbcbbf379 100644
--- a/GUI/utils/LayoutUtils.cpp
+++ b/GUI/Util/LayoutUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/LayoutUtils.cpp
+//! @file      GUI/Util/LayoutUtils.cpp
 //! @brief     Implements LayoutUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/utils/LayoutUtils.h"
+#include "GUI/Util/LayoutUtils.h"
 #include <QBoxLayout>
 #include <QGridLayout>
 #include <QLayoutItem>
 #include <QWidget>
 
-void GUI::Utils::Layout::clearLayout(QLayout* layout, bool deleteWidgets)
+void GUI::Util::Layout::clearLayout(QLayout* layout, bool deleteWidgets)
 {
     if (!layout)
         return;
@@ -29,7 +29,7 @@ void GUI::Utils::Layout::clearLayout(QLayout* layout, bool deleteWidgets)
                 delete widget;
         }
         if (QLayout* childLayout = item->layout())
-            GUI::Utils::Layout::clearLayout(childLayout, deleteWidgets);
+            GUI::Util::Layout::clearLayout(childLayout, deleteWidgets);
         delete item;
     }
 }
@@ -55,7 +55,7 @@ void deleteChildWidgets(QLayoutItem* item);
  * will stay the same after this function has been called).
  */
 
-void GUI::Utils::Layout::removeRow(QGridLayout* layout, int row, bool deleteWidgets)
+void GUI::Util::Layout::removeRow(QGridLayout* layout, int row, bool deleteWidgets)
 {
     remove(layout, row, -1, deleteWidgets);
     layout->setRowMinimumHeight(row, 0);
@@ -71,17 +71,17 @@ void GUI::Utils::Layout::removeRow(QGridLayout* layout, int row, bool deleteWidg
  * indices will stay the same after this function has been called).
  */
 
-void GUI::Utils::Layout::removeColumn(QGridLayout* layout, int column, bool deleteWidgets)
+void GUI::Util::Layout::removeColumn(QGridLayout* layout, int column, bool deleteWidgets)
 {
     remove(layout, -1, column, deleteWidgets);
     layout->setColumnMinimumWidth(column, 0);
     layout->setColumnStretch(column, 0);
 }
 
-void GUI::Utils::Layout::clearGridLayout(QGridLayout* layout, bool deleteWidgets)
+void GUI::Util::Layout::clearGridLayout(QGridLayout* layout, bool deleteWidgets)
 {
     for (int i_row = 0; i_row < layout->rowCount(); ++i_row) {
-        GUI::Utils::Layout::removeRow(layout, i_row, deleteWidgets);
+        GUI::Util::Layout::removeRow(layout, i_row, deleteWidgets);
     }
 }
 
@@ -128,7 +128,7 @@ void deleteChildWidgets(QLayoutItem* item)
 
 } // namespace
 
-QWidget* GUI::Utils::Layout::placeHolder()
+QWidget* GUI::Util::Layout::placeHolder()
 {
     auto result = new QWidget;
     result->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
diff --git a/GUI/utils/LayoutUtils.h b/GUI/Util/LayoutUtils.h
similarity index 81%
rename from GUI/utils/LayoutUtils.h
rename to GUI/Util/LayoutUtils.h
index 46b3ecfb49d2dbf8f2f04a93d918e018535f4851..343ea025cf0e7a02ca8d72e0cf0758ed46e5aba8 100644
--- a/GUI/utils/LayoutUtils.h
+++ b/GUI/Util/LayoutUtils.h
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/LayoutUtils.h
-//! @brief     Defines namespace GUI::Utils::Layout
+//! @file      GUI/Util/LayoutUtils.h
+//! @brief     Defines namespace GUI::Util::Layout
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_UTILS_LAYOUTUTILS_H
-#define BORNAGAIN_GUI_UTILS_LAYOUTUTILS_H
+#ifndef BORNAGAIN_GUI_UTIL_LAYOUTUTILS_H
+#define BORNAGAIN_GUI_UTIL_LAYOUTUTILS_H
 
 class QLayout;
 class QGridLayout;
@@ -22,7 +22,7 @@ class QWidget;
 //! Utility functions to add/remove widgets to the layout on the fly.
 //! Taken from https://stackoverflow.com/questions/5395266/removing-widgets-from-qgridlayout
 
-namespace GUI::Utils::Layout {
+namespace GUI::Util::Layout {
 
 //! Removes content from box layout.
 void clearLayout(QLayout* layout, bool deleteWidgets = true);
@@ -39,6 +39,6 @@ void clearGridLayout(QGridLayout* layout, bool deleteWidgets = true);
 //! Returns empty widget to occupy place in layout.
 QWidget* placeHolder();
 
-} // namespace GUI::Utils::Layout
+} // namespace GUI::Util::Layout
 
-#endif // BORNAGAIN_GUI_UTILS_LAYOUTUTILS_H
+#endif // BORNAGAIN_GUI_UTIL_LAYOUTUTILS_H
diff --git a/GUI/utils/MessageService.cpp b/GUI/Util/MessageService.cpp
similarity index 94%
rename from GUI/utils/MessageService.cpp
rename to GUI/Util/MessageService.cpp
index b9b3862ff919b32bf9543f427928bd37cdab7ab2..ee578327848fa1de7252585e481fe4f213867a91 100644
--- a/GUI/utils/MessageService.cpp
+++ b/GUI/Util/MessageService.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/MessageService.cpp
+//! @file      GUI/Util/MessageService.cpp
 //! @brief     Implements MessageService class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/utils/MessageService.h"
+#include "GUI/Util/MessageService.h"
 #include <QObject>
 
 QStringList MessageService::descriptions(const Messages& messages, bool includeSenders) const
diff --git a/GUI/utils/MessageService.h b/GUI/Util/MessageService.h
similarity index 87%
rename from GUI/utils/MessageService.h
rename to GUI/Util/MessageService.h
index b9f656896cd3f5a26397bcea27ac5d0f8c3cb1d3..11df280cb884aa1036fe8c88c0fb26150daafcc5 100644
--- a/GUI/utils/MessageService.h
+++ b/GUI/Util/MessageService.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/MessageService.h
+//! @file      GUI/Util/MessageService.h
 //! @brief     Defines MessageService class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_UTILS_MESSAGESERVICE_H
-#define BORNAGAIN_GUI_UTILS_MESSAGESERVICE_H
+#ifndef BORNAGAIN_GUI_UTIL_MESSAGESERVICE_H
+#define BORNAGAIN_GUI_UTIL_MESSAGESERVICE_H
 
 #include <QList>
 #include <QPair>
@@ -41,4 +41,4 @@ private:
     Messages m_errors;
 };
 
-#endif // BORNAGAIN_GUI_UTILS_MESSAGESERVICE_H
+#endif // BORNAGAIN_GUI_UTIL_MESSAGESERVICE_H
diff --git a/GUI/utils/hostosinfo.h b/GUI/Util/OSInfo.h
similarity index 91%
rename from GUI/utils/hostosinfo.h
rename to GUI/Util/OSInfo.h
index fac4db04b09f2aa958862e990f35aec2317d8418..cf3add26990532f1aa8c1eea2dba88cc728a9208 100644
--- a/GUI/utils/hostosinfo.h
+++ b/GUI/Util/OSInfo.h
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/hostosinfo.h
-//! @brief     Defines namespace GUI::Utils::OS
+//! @file      GUI/Util/OSInfo.h
+//! @brief     Defines namespace GUI::Util::OS
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_UTILS_HOSTOSINFO_H
-#define BORNAGAIN_GUI_UTILS_HOSTOSINFO_H
+#ifndef BORNAGAIN_GUI_UTIL_OSINFO_H
+#define BORNAGAIN_GUI_UTIL_OSINFO_H
 
 #include <QString>
 
-namespace GUI::Utils::OS {
+namespace GUI::Util::OS {
 
 #define QTC_WIN_EXE_SUFFIX ".exe"
 
@@ -111,6 +111,6 @@ bool HostOsInfo::isAnyUnixHost()
 #endif
 }
 
-} // namespace GUI::Utils::OS
+} // namespace GUI::Util::OS
 
-#endif // BORNAGAIN_GUI_UTILS_HOSTOSINFO_H
+#endif // BORNAGAIN_GUI_UTIL_OSINFO_H
diff --git a/GUI/utils/Helpers.cpp b/GUI/Util/Path.cpp
similarity index 70%
rename from GUI/utils/Helpers.cpp
rename to GUI/Util/Path.cpp
index 5fd0a9496cfb22461909e243e7a37188528c40b1..4a6359147ef2577838e3cfcaf56604327b920454 100644
--- a/GUI/utils/Helpers.cpp
+++ b/GUI/Util/Path.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/Helpers.cpp
+//! @file      GUI/Util/Path.cpp
 //! @brief     Implements Helpers functions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,16 +12,17 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/utils/Helpers.h"
+#include "GUI/Util/Path.h"
 #include "BAVersion.h"
+#include "GUI/Util/OSInfo.h"
 #include <QDateTime>
 #include <QDir>
 #include <QFileInfo>
 #include <QMap>
-#include <QUuid>
 #include <QVector>
 
 namespace {
+
 QMap<QString, QString> initializeCharacterMap()
 {
     QMap<QString, QString> result;
@@ -36,11 +37,25 @@ QMap<QString, QString> initializeCharacterMap()
 }
 
 const QMap<QString, QString> invalidCharacterMap = initializeCharacterMap();
-} // Anonymous namespace
 
-namespace GUI::Helpers {
+} // namespace
+
+
+QString GUI::Util::Path::withTildeHomePath(const QString& path)
+{
+    if (GUI::Util::OS::HostOsInfo::isWindowsHost())
+        return path;
+
+    static const QString homePath = QDir::homePath();
 
-QString getBornAgainVersionString()
+    QFileInfo fi(QDir::cleanPath(path));
+    QString outPath = fi.absoluteFilePath();
+    if (outPath.startsWith(homePath))
+        return QLatin1Char('~') + outPath.mid(homePath.size());
+    return path;
+}
+
+QString GUI::Util::Path::getBornAgainVersionString()
 {
     return QString::fromStdString(BornAgain::GetVersionNumber());
 }
@@ -54,17 +69,17 @@ QString getBornAgainVersionString()
 //! > greaterthan
 //! | pipe
 //! ? questionmark
-QString getValidFileName(const QString& proposed_name)
+QString GUI::Util::Path::getValidFileName(const QString& proposed_name)
 {
     QString result = proposed_name;
-    for (auto it = invalidCharacterMap.begin(); it != invalidCharacterMap.end(); ++it) {
+    for (auto it = invalidCharacterMap.begin(); it != invalidCharacterMap.end(); ++it)
         result.replace(it.key(), it.value());
-    }
     return result;
 }
 
 //! parses version string into 3 numbers, returns true in the case of success
-bool parseVersion(const QString& version, int& major_num, int& minor_num, int& patch_num)
+bool GUI::Util::Path::parseVersion(const QString& version, int& major_num, int& minor_num,
+                                   int& patch_num)
 {
     major_num = minor_num = patch_num = 0;
     bool success(true);
@@ -83,7 +98,7 @@ bool parseVersion(const QString& version, int& major_num, int& minor_num, int& p
     return success;
 }
 
-int versionCode(const QString& version)
+int GUI::Util::Path::versionCode(const QString& version)
 {
     int result(-1);
 
@@ -97,49 +112,24 @@ int versionCode(const QString& version)
 }
 
 //! returns true if current BornAgain version match minimal required version
-bool isVersionMatchMinimal(const QString& version, const QString& minimal_version)
+bool GUI::Util::Path::isVersionMatchMinimal(const QString& version, const QString& minimal_version)
 {
     return versionCode(version) >= versionCode(minimal_version);
 }
 
 //! Returns file directory from the full file path
-QString fileDir(const QString& fileName)
+QString GUI::Util::Path::fileDir(const QString& fileName)
 {
     QFileInfo info(fileName);
-    if (info.exists()) {
+    if (info.exists())
         return info.dir().path();
-    }
     return "";
 }
 
 //! Returns base name of file.
 
-QString baseName(const QString& fileName)
+QString GUI::Util::Path::baseName(const QString& fileName)
 {
     QFileInfo info(fileName);
     return info.baseName();
 }
-
-QVector<double> fromStdVector(const std::vector<double>& data)
-{
-    QVector<double> result;
-    result.reserve(int(data.size()));
-    std::copy(data.begin(), data.end(), std::back_inserter(result));
-    return result;
-}
-
-QStringList fromStdStrings(const std::vector<std::string>& container)
-{
-    QStringList result;
-    for (std::string str : container) {
-        result.append(QString::fromStdString(str));
-    }
-    return result;
-}
-
-QString createUuid()
-{
-    return QUuid::createUuid().toString();
-}
-
-} // namespace GUI::Helpers
diff --git a/GUI/utils/Helpers.h b/GUI/Util/Path.h
similarity index 63%
rename from GUI/utils/Helpers.h
rename to GUI/Util/Path.h
index abe651e20bcfa17f89811a251cee027bd6cfff7e..2612704d79c70efa1e7b44689527bf17e471287f 100644
--- a/GUI/utils/Helpers.h
+++ b/GUI/Util/Path.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/Helpers.h
+//! @file      GUI/Util/Path.h
 //! @brief     Defines class Helpers functions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_UTILS_HELPERS_H
-#define BORNAGAIN_GUI_UTILS_HELPERS_H
+#ifndef BORNAGAIN_GUI_UTIL_PATH_H
+#define BORNAGAIN_GUI_UTIL_PATH_H
 
-#include <QStringList>
-#include <ostream>
-#include <vector>
+#include <QString>
 
-namespace GUI::Helpers {
+namespace GUI::Util::Path {
+
+QString withTildeHomePath(const QString& path);
 
 QString getBornAgainVersionString();
 
@@ -34,18 +34,6 @@ int versionCode(const QString& version);
 
 bool isVersionMatchMinimal(const QString& version, const QString& minimal_version);
 
-QStringList fromStdStrings(const std::vector<std::string>& container);
-
-QVector<double> fromStdVector(const std::vector<double>& data);
-
-QString createUuid();
-
-} // namespace GUI::Helpers
-
-inline std::ostream& operator<<(std::ostream& stream, const QString& str)
-{
-    stream << str.toStdString();
-    return stream;
-}
+} // namespace GUI::Util::Path
 
-#endif // BORNAGAIN_GUI_UTILS_HELPERS_H
+#endif // BORNAGAIN_GUI_UTIL_PATH_H
diff --git a/GUI/Util/String.cpp b/GUI/Util/String.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..278c4e8a09f31a3bbb46b4224a7793957727dea3
--- /dev/null
+++ b/GUI/Util/String.cpp
@@ -0,0 +1,25 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/Util/String.cpp
+//! @brief     Implements functions from Utils namespace
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2018
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#include "GUI/Util/String.h"
+#include "GUI/Util/OSInfo.h"
+#include <QDir>
+
+QStringList GUI::Util::String::fromStdStrings(const std::vector<std::string>& container)
+{
+    QStringList result;
+    for (std::string str : container)
+        result.append(QString::fromStdString(str));
+    return result;
+}
diff --git a/GUI/utils/qstringutils.h b/GUI/Util/String.h
similarity index 56%
rename from GUI/utils/qstringutils.h
rename to GUI/Util/String.h
index 56e9cd03815556cc9d4c691415233e76484871ef..21706160d32e2f642e0be0fe121ba33f902196b9 100644
--- a/GUI/utils/qstringutils.h
+++ b/GUI/Util/String.h
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/qstringutils.h
-//! @brief     Defines functions from namespace GUI::Utils::String
+//! @file      GUI/Util/String.h
+//! @brief     Defines functions from namespace GUI::Util::String
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,15 +12,18 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_UTILS_QSTRINGUTILS_H
-#define BORNAGAIN_GUI_UTILS_QSTRINGUTILS_H
+#ifndef BORNAGAIN_GUI_UTIL_STRING_H
+#define BORNAGAIN_GUI_UTIL_STRING_H
 
 #include <QString>
+#include <vector>
 
-namespace GUI::Utils::String {
+namespace GUI::Util::String {
 
-QString withTildeHomePath(const QString& path);
+QStringList fromStdStrings(const std::vector<std::string>& container);
 
-} // namespace GUI::Utils::String
+QString readTextFile(const QString& fileName);
 
-#endif // BORNAGAIN_GUI_UTILS_QSTRINGUTILS_H
+} // namespace GUI::Util::String
+
+#endif // BORNAGAIN_GUI_UTIL_STRING_H
diff --git a/GUI/Views/Tools/mainwindow_constants.h b/GUI/Util/mainwindow_constants.h
similarity index 90%
rename from GUI/Views/Tools/mainwindow_constants.h
rename to GUI/Util/mainwindow_constants.h
index 72c1123deceb417be6a58136c79871f08baa56ad..0e6bc68e786b3f48b79d9856aa858e1a94c30f7b 100644
--- a/GUI/Views/Tools/mainwindow_constants.h
+++ b/GUI/Util/mainwindow_constants.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/Tools/mainwindow_constants.h
+//! @file      GUI/Util/mainwindow_constants.h
 //! @brief     Defines namespace GUI::Constants
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_TOOLS_MAINWINDOW_CONSTANTS_H
-#define BORNAGAIN_GUI_VIEWS_TOOLS_MAINWINDOW_CONSTANTS_H
+#ifndef BORNAGAIN_GUI_UTIL_MAINWINDOW_CONSTANTS_H
+#define BORNAGAIN_GUI_UTIL_MAINWINDOW_CONSTANTS_H
 
 #include <QString>
 
@@ -65,4 +65,4 @@ const int styled_toolbar_height = 25;
 
 } // namespace GUI::Constants
 
-#endif // BORNAGAIN_GUI_VIEWS_TOOLS_MAINWINDOW_CONSTANTS_H
+#endif // BORNAGAIN_GUI_UTIL_MAINWINDOW_CONSTANTS_H
diff --git a/GUI/Views/CommonWidgets/DockWidgetInfo.cpp b/GUI/View/Common/DockWidgetInfo.cpp
similarity index 90%
rename from GUI/Views/CommonWidgets/DockWidgetInfo.cpp
rename to GUI/View/Common/DockWidgetInfo.cpp
index 62691898f55ad60cb8b8afdd1d32972c7fe8b7f1..1c6ecc62c5bd592a16b892d7004e1f5c6ec1966e 100644
--- a/GUI/Views/CommonWidgets/DockWidgetInfo.cpp
+++ b/GUI/View/Common/DockWidgetInfo.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/DockWidgetInfo.cpp
+//! @file      GUI/View/Common/DockWidgetInfo.cpp
 //! @brief     Implements class DockWidgetInfo
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/DockWidgetInfo.h"
+#include "GUI/View/Common/DockWidgetInfo.h"
 #include <QDockWidget>
 #include <QWidget>
 
diff --git a/GUI/Views/CommonWidgets/DockWidgetInfo.h b/GUI/View/Common/DockWidgetInfo.h
similarity index 80%
rename from GUI/Views/CommonWidgets/DockWidgetInfo.h
rename to GUI/View/Common/DockWidgetInfo.h
index 5492ac4ff0c10d92dcb6c4be84bdf098a171f55f..e734e979e1c4d77baaac3f588270b9fd687a39ce 100644
--- a/GUI/Views/CommonWidgets/DockWidgetInfo.h
+++ b/GUI/View/Common/DockWidgetInfo.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/DockWidgetInfo.h
+//! @file      GUI/View/Common/DockWidgetInfo.h
 //! @brief     Defines class DockWidgetInfo
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOCKWIDGETINFO_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOCKWIDGETINFO_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_DOCKWIDGETINFO_H
+#define BORNAGAIN_GUI_VIEW_COMMON_DOCKWIDGETINFO_H
 
 #include <qnamespace.h>
 
@@ -37,4 +37,4 @@ private:
     Qt::DockWidgetArea m_area;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOCKWIDGETINFO_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_DOCKWIDGETINFO_H
diff --git a/GUI/Views/CommonWidgets/DocksController.cpp b/GUI/View/Common/DocksController.cpp
similarity index 98%
rename from GUI/Views/CommonWidgets/DocksController.cpp
rename to GUI/View/Common/DocksController.cpp
index ad5af54d7a753a0fc16f30ad00bec9d4efc9256b..c53abb217f437720776ad42b94e5122951e1bc0d 100644
--- a/GUI/Views/CommonWidgets/DocksController.cpp
+++ b/GUI/View/Common/DocksController.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/DocksController.cpp
+//! @file      GUI/View/Common/DocksController.cpp
 //! @brief     Implements class DocksController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/DocksController.h"
+#include "GUI/View/Common/DocksController.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Models/Error.h"
+#include "GUI/Util/Error.h"
 #include <QAbstractItemView>
 #include <QAction>
 #include <QDockWidget>
diff --git a/GUI/Views/CommonWidgets/DocksController.h b/GUI/View/Common/DocksController.h
similarity index 87%
rename from GUI/Views/CommonWidgets/DocksController.h
rename to GUI/View/Common/DocksController.h
index 5972e1725cb28a207672fd2bb9823a0d8b83d657..28504494f7463b2a1795155bde087bc5259bec67 100644
--- a/GUI/Views/CommonWidgets/DocksController.h
+++ b/GUI/View/Common/DocksController.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/DocksController.h
+//! @file      GUI/View/Common/DocksController.h
 //! @brief     Defines class DocksController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOCKSCONTROLLER_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOCKSCONTROLLER_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_DOCKSCONTROLLER_H
+#define BORNAGAIN_GUI_VIEW_COMMON_DOCKSCONTROLLER_H
 
-#include "GUI/Views/CommonWidgets/DockWidgetInfo.h"
+#include "GUI/View/Common/DockWidgetInfo.h"
 #include <QObject>
 #include <QSize>
 #include <map>
@@ -72,4 +72,4 @@ private:
     bool m_handleDockVisibilityChanges = true;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOCKSCONTROLLER_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_DOCKSCONTROLLER_H
diff --git a/GUI/Views/CommonWidgets/InfoPanel.cpp b/GUI/View/Common/InfoPanel.cpp
similarity index 95%
rename from GUI/Views/CommonWidgets/InfoPanel.cpp
rename to GUI/View/Common/InfoPanel.cpp
index c8643c5fe3855a90a2f2a42cb2d6c83c77f34478..5790e46b9c4084aee67494f7cb8f0ef1d364d334 100644
--- a/GUI/Views/CommonWidgets/InfoPanel.cpp
+++ b/GUI/View/Common/InfoPanel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/InfoPanel.cpp
+//! @file      GUI/View/Common/InfoPanel.cpp
 //! @brief     Declares class InfoPanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/InfoPanel.h"
-#include "GUI/Views/CommonWidgets/InfoPanelToolBar.h"
+#include "GUI/View/Common/InfoPanel.h"
+#include "GUI/View/Common/InfoPanelToolBar.h"
 #include <QBoxLayout>
 #include <QResizeEvent>
 #include <QStackedWidget>
diff --git a/GUI/Views/CommonWidgets/InfoPanel.h b/GUI/View/Common/InfoPanel.h
similarity index 86%
rename from GUI/Views/CommonWidgets/InfoPanel.h
rename to GUI/View/Common/InfoPanel.h
index d676554584a408dbd661954dc4c4851dc8684ee5..c9d4f583e2cc03cbd8e2d194ba7737e85f405644 100644
--- a/GUI/Views/CommonWidgets/InfoPanel.h
+++ b/GUI/View/Common/InfoPanel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/InfoPanel.h
+//! @file      GUI/View/Common/InfoPanel.h
 //! @brief     Defines class InfoPanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_INFOPANEL_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_INFOPANEL_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_INFOPANEL_H
+#define BORNAGAIN_GUI_VIEW_COMMON_INFOPANEL_H
 
 #include <QFrame>
 
@@ -51,4 +51,4 @@ protected:
     int m_cached_height;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_INFOPANEL_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_INFOPANEL_H
diff --git a/GUI/Views/CommonWidgets/InfoPanelToolBar.cpp b/GUI/View/Common/InfoPanelToolBar.cpp
similarity index 94%
rename from GUI/Views/CommonWidgets/InfoPanelToolBar.cpp
rename to GUI/View/Common/InfoPanelToolBar.cpp
index 581e7234de5fdfae313ceefcbbc77aef8da98bf5..af1aa5997f6f16d138af0800b9dbebb4227d76c5 100644
--- a/GUI/Views/CommonWidgets/InfoPanelToolBar.cpp
+++ b/GUI/View/Common/InfoPanelToolBar.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/InfoPanelToolBar.cpp
+//! @file      GUI/View/Common/InfoPanelToolBar.cpp
 //! @brief     Declares class InfoPanelToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/InfoPanelToolBar.h"
+#include "GUI/View/Common/InfoPanelToolBar.h"
 #include <QAction>
 #include <QHBoxLayout>
 #include <QToolButton>
diff --git a/GUI/Views/CommonWidgets/InfoPanelToolBar.h b/GUI/View/Common/InfoPanelToolBar.h
similarity index 76%
rename from GUI/Views/CommonWidgets/InfoPanelToolBar.h
rename to GUI/View/Common/InfoPanelToolBar.h
index bca753304a516a35a402b675ea18abc2a3e6b814..c12e7acd24e884e1a469f0e903cbbd21d182eb9b 100644
--- a/GUI/Views/CommonWidgets/InfoPanelToolBar.h
+++ b/GUI/View/Common/InfoPanelToolBar.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/InfoPanelToolBar.h
+//! @file      GUI/View/Common/InfoPanelToolBar.h
 //! @brief     Defines class InfoPanelToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_INFOPANELTOOLBAR_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_INFOPANELTOOLBAR_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_INFOPANELTOOLBAR_H
+#define BORNAGAIN_GUI_VIEW_COMMON_INFOPANELTOOLBAR_H
 
-#include "GUI/Views/CommonWidgets/StyledToolBar.h"
+#include "GUI/View/Common/StyledToolBar.h"
 
 class QAction;
 
@@ -41,4 +41,4 @@ private:
     bool m_expanded;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_INFOPANELTOOLBAR_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_INFOPANELTOOLBAR_H
diff --git a/GUI/Views/CommonWidgets/ItemComboToolBar.cpp b/GUI/View/Common/ItemComboToolBar.cpp
similarity index 96%
rename from GUI/Views/CommonWidgets/ItemComboToolBar.cpp
rename to GUI/View/Common/ItemComboToolBar.cpp
index 3b40ad0ebe255b875f440303fcfdf60b3f0190aa..555b2f43f468eaf12dbe9446b9e1bc027dc8b360 100644
--- a/GUI/Views/CommonWidgets/ItemComboToolBar.cpp
+++ b/GUI/View/Common/ItemComboToolBar.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ItemComboToolBar.cpp
+//! @file      GUI/View/Common/ItemComboToolBar.cpp
 //! @brief     Implements class ItemComboToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/ItemComboToolBar.h"
+#include "GUI/View/Common/ItemComboToolBar.h"
 #include "Base/Utils/Assert.h"
 #include <QAction>
 #include <QComboBox>
diff --git a/GUI/Views/CommonWidgets/ItemComboToolBar.h b/GUI/View/Common/ItemComboToolBar.h
similarity index 83%
rename from GUI/Views/CommonWidgets/ItemComboToolBar.h
rename to GUI/View/Common/ItemComboToolBar.h
index 5d99cc915061e0378c8ab229f7a67171e4281d47..25b4fdd072c3e30ce174cbeaf8bf655a05fe7163 100644
--- a/GUI/Views/CommonWidgets/ItemComboToolBar.h
+++ b/GUI/View/Common/ItemComboToolBar.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ItemComboToolBar.h
+//! @file      GUI/View/Common/ItemComboToolBar.h
 //! @brief     Defines class ItemComboToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMCOMBOTOOLBAR_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMCOMBOTOOLBAR_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_ITEMCOMBOTOOLBAR_H
+#define BORNAGAIN_GUI_VIEW_COMMON_ITEMCOMBOTOOLBAR_H
 
-#include "GUI/Views/CommonWidgets/StyledToolBar.h"
+#include "GUI/View/Common/StyledToolBar.h"
 #include <QList>
 
 class QAction;
@@ -51,4 +51,4 @@ private:
     QAction* m_comboBoxAction;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMCOMBOTOOLBAR_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_ITEMCOMBOTOOLBAR_H
diff --git a/GUI/Views/CommonWidgets/ItemComboWidget.cpp b/GUI/View/Common/ItemComboWidget.cpp
similarity index 96%
rename from GUI/Views/CommonWidgets/ItemComboWidget.cpp
rename to GUI/View/Common/ItemComboWidget.cpp
index 521f1215b9c931ebc3d84c06685a197277a5dedc..db71d612bf1d9c24456bfb14b9563539a3d5f4da 100644
--- a/GUI/Views/CommonWidgets/ItemComboWidget.cpp
+++ b/GUI/View/Common/ItemComboWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ItemComboWidget.cpp
+//! @file      GUI/View/Common/ItemComboWidget.cpp
 //! @brief     Implements class ItemComboWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/ItemComboWidget.h"
+#include "GUI/View/Common/ItemComboWidget.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Views/CommonWidgets/ItemComboToolBar.h"
+#include "GUI/View/Common/ItemComboToolBar.h"
 #include <QComboBox>
 #include <QEvent>
 #include <QStackedWidget>
diff --git a/GUI/Views/CommonWidgets/ItemComboWidget.h b/GUI/View/Common/ItemComboWidget.h
similarity index 89%
rename from GUI/Views/CommonWidgets/ItemComboWidget.h
rename to GUI/View/Common/ItemComboWidget.h
index dfcd7ea780eaf857d207fabf19208604856d8595..26e4601395b2c33413b1067c29317573e7ff13bb 100644
--- a/GUI/Views/CommonWidgets/ItemComboWidget.h
+++ b/GUI/View/Common/ItemComboWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ItemComboWidget.h
+//! @file      GUI/View/Common/ItemComboWidget.h
 //! @brief     Defines class ItemComboWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMCOMBOWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMCOMBOWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_ITEMCOMBOWIDGET_H
+#define BORNAGAIN_GUI_VIEW_COMMON_ITEMCOMBOWIDGET_H
 
 #include "Base/Utils/IFactory.h"
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 #include <QMap>
 #include <QString>
 #include <QWidget>
@@ -72,4 +72,4 @@ private:
     QWidget* m_blankWidget;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMCOMBOWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_ITEMCOMBOWIDGET_H
diff --git a/GUI/Views/CommonWidgets/ItemSelectorWidget.cpp b/GUI/View/Common/ItemSelectorWidget.cpp
similarity index 93%
rename from GUI/Views/CommonWidgets/ItemSelectorWidget.cpp
rename to GUI/View/Common/ItemSelectorWidget.cpp
index 9d5ea2747144441bb5d6d375e27bad70f575520e..a9bd7a3ea44f0bc05ad0ddff9fc8a6303a65c62c 100644
--- a/GUI/Views/CommonWidgets/ItemSelectorWidget.cpp
+++ b/GUI/View/Common/ItemSelectorWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ItemSelectorWidget.cpp
+//! @file      GUI/View/Common/ItemSelectorWidget.cpp
 //! @brief     Implements class ItemSelectorWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/ItemSelectorWidget.h"
-#include "GUI/Models/SessionDecorationModel.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/View/Common/ItemSelectorWidget.h"
+#include "GUI/Model/Session/SessionDecorationModel.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/mainwindow_constants.h"
 #include <QListView>
 #include <QVBoxLayout>
 
diff --git a/GUI/Views/CommonWidgets/ItemSelectorWidget.h b/GUI/View/Common/ItemSelectorWidget.h
similarity index 88%
rename from GUI/Views/CommonWidgets/ItemSelectorWidget.h
rename to GUI/View/Common/ItemSelectorWidget.h
index 9844759b5829b8551a80fa4b8b48507ed057f590..492bf86a7fb9fef289e885dc8db9d339f35150ec 100644
--- a/GUI/Views/CommonWidgets/ItemSelectorWidget.h
+++ b/GUI/View/Common/ItemSelectorWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ItemSelectorWidget.h
+//! @file      GUI/View/Common/ItemSelectorWidget.h
 //! @brief     Defines class ItemSelectorWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMSELECTORWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMSELECTORWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_ITEMSELECTORWIDGET_H
+#define BORNAGAIN_GUI_VIEW_COMMON_ITEMSELECTORWIDGET_H
 
 #include <QItemSelectionModel>
 #include <QWidget>
@@ -69,4 +69,4 @@ protected:
     std::unique_ptr<SessionDecorationModel> m_decorationModel;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMSELECTORWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_ITEMSELECTORWIDGET_H
diff --git a/GUI/Views/CommonWidgets/ItemStackPresenter.h b/GUI/View/Common/ItemStackPresenter.h
similarity index 91%
rename from GUI/Views/CommonWidgets/ItemStackPresenter.h
rename to GUI/View/Common/ItemStackPresenter.h
index bc8cd31a5db04a1b892bc29493c35e1b2f87e814..bd11b248894c72b1df6d09a24948eb5eb65ec7e2 100644
--- a/GUI/Views/CommonWidgets/ItemStackPresenter.h
+++ b/GUI/View/Common/ItemStackPresenter.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ItemStackPresenter.h
+//! @file      GUI/View/Common/ItemStackPresenter.h
 //! @brief     Defines class ItemStackPresenter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMSTACKPRESENTER_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMSTACKPRESENTER_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_ITEMSTACKPRESENTER_H
+#define BORNAGAIN_GUI_VIEW_COMMON_ITEMSTACKPRESENTER_H
 
 #include "Base/Utils/Assert.h"
-#include "GUI/Views/CommonWidgets/ItemStackWidget.h"
+#include "GUI/View/Common/ItemStackWidget.h"
 #include <QMap>
 #include <QStackedWidget>
 
@@ -132,4 +132,4 @@ template <class T> void ItemStackPresenter<T>::removeWidgets()
     m_itemToWidget.clear();
 }
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMSTACKPRESENTER_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_ITEMSTACKPRESENTER_H
diff --git a/GUI/Views/CommonWidgets/ItemStackWidget.cpp b/GUI/View/Common/ItemStackWidget.cpp
similarity index 94%
rename from GUI/Views/CommonWidgets/ItemStackWidget.cpp
rename to GUI/View/Common/ItemStackWidget.cpp
index 41b99a637c2d32c2844fd64c251196dda7aac793..07a1165ea563fc998a82d38dd194b24e04040708 100644
--- a/GUI/Views/CommonWidgets/ItemStackWidget.cpp
+++ b/GUI/View/Common/ItemStackWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ItemStackWidget.cpp
+//! @file      GUI/View/Common/ItemStackWidget.cpp
 //! @brief     Implements class ItemStackWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/ItemStackWidget.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/View/Common/ItemStackWidget.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/Error.h"
 #include <QStackedWidget>
 #include <QVBoxLayout>
 
diff --git a/GUI/Views/CommonWidgets/ItemStackWidget.h b/GUI/View/Common/ItemStackWidget.h
similarity index 87%
rename from GUI/Views/CommonWidgets/ItemStackWidget.h
rename to GUI/View/Common/ItemStackWidget.h
index 5f40431f84498894d1655e1495f85d9d1897ab6d..a1d1ce780fc3d772fa1f42d451819abf21eab9cd 100644
--- a/GUI/Views/CommonWidgets/ItemStackWidget.h
+++ b/GUI/View/Common/ItemStackWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ItemStackWidget.h
+//! @file      GUI/View/Common/ItemStackWidget.h
 //! @brief     Defines class ItemStackWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMSTACKWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMSTACKWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_ITEMSTACKWIDGET_H
+#define BORNAGAIN_GUI_VIEW_COMMON_ITEMSTACKWIDGET_H
 
 #include <QWidget>
 
@@ -56,4 +56,4 @@ protected:
     QSize m_size_hint;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ITEMSTACKWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_ITEMSTACKWIDGET_H
diff --git a/GUI/Views/CommonWidgets/ItemViewOverlayButtons.cpp b/GUI/View/Common/ItemViewOverlayButtons.cpp
similarity index 98%
rename from GUI/Views/CommonWidgets/ItemViewOverlayButtons.cpp
rename to GUI/View/Common/ItemViewOverlayButtons.cpp
index 48cfb3646a836dd2a9a8cfe7f3fd62e7e2ecf9fe..93348953b217af1e32a61ab310f6b7a2ac31eaa8 100644
--- a/GUI/Views/CommonWidgets/ItemViewOverlayButtons.cpp
+++ b/GUI/View/Common/ItemViewOverlayButtons.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ItemViewOverlayButtons.cpp
+//! @file      GUI/View/Common/ItemViewOverlayButtons.cpp
 //! @brief     Implements class ItemViewOverlayButtons
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "ItemViewOverlayButtons.h"
+#include "GUI/View/Common/ItemViewOverlayButtons.h"
 #include <QAbstractItemView>
 #include <QAction>
 #include <QApplication>
diff --git a/GUI/Views/CommonWidgets/ItemViewOverlayButtons.h b/GUI/View/Common/ItemViewOverlayButtons.h
similarity index 81%
rename from GUI/Views/CommonWidgets/ItemViewOverlayButtons.h
rename to GUI/View/Common/ItemViewOverlayButtons.h
index 94846ef78cefb1bc40490d5223701c3d45d98a54..996d489c031ce1820cf8c77340fce2f36c93ff93 100644
--- a/GUI/Views/CommonWidgets/ItemViewOverlayButtons.h
+++ b/GUI/View/Common/ItemViewOverlayButtons.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ItemViewOverlayButtons.h
+//! @file      GUI/View/Common/ItemViewOverlayButtons.h
 //! @brief     Defines class ItemViewOverlayButtons
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_TREEVIEWOVERLAYBUTTONS_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_TREEVIEWOVERLAYBUTTONS_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_ITEMVIEWOVERLAYBUTTONS_H
+#define BORNAGAIN_GUI_VIEW_COMMON_ITEMVIEWOVERLAYBUTTONS_H
 
 #include <QObject>
 #include <functional>
@@ -42,4 +42,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_TREEVIEWOVERLAYBUTTONS_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_ITEMVIEWOVERLAYBUTTONS_H
diff --git a/GUI/Views/CommonWidgets/ModelTreeView.cpp b/GUI/View/Common/ModelTreeView.cpp
similarity index 84%
rename from GUI/Views/CommonWidgets/ModelTreeView.cpp
rename to GUI/View/Common/ModelTreeView.cpp
index 718ab420278f011089b27d2027c9c6a08d94390e..7af84cdfa246faed8d8df0f930d5f445ac15935a 100644
--- a/GUI/Views/CommonWidgets/ModelTreeView.cpp
+++ b/GUI/View/Common/ModelTreeView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ModelTreeView.cpp
+//! @file      GUI/View/Common/ModelTreeView.cpp
 //! @brief     Implements class ModelTreeView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/ModelTreeView.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/SessionDecorationModel.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
+#include "GUI/View/Common/ModelTreeView.h"
+#include "GUI/Model/Session/SessionDecorationModel.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QTreeView>
 #include <QVBoxLayout>
 
@@ -36,7 +36,7 @@ ModelTreeView::ModelTreeView(QWidget* parent, SessionModel* model)
     layout->setSpacing(0);
     layout->addWidget(m_tree);
 
-    GUI::Utils::Style::setPropertyStyle(m_tree);
+    GUI::Util::Style::setPropertyStyle(m_tree);
 
     m_decorationProxy->setSessionModel(model);
     m_tree->setModel(m_decorationProxy);
diff --git a/GUI/Views/CommonWidgets/ModelTreeView.h b/GUI/View/Common/ModelTreeView.h
similarity index 84%
rename from GUI/Views/CommonWidgets/ModelTreeView.h
rename to GUI/View/Common/ModelTreeView.h
index 3863ae66727d6605b9c1853f56245b1d80faa908..a10255fe68b5ae2c16bb5a4e8b98ebdcf36f1ee2 100644
--- a/GUI/Views/CommonWidgets/ModelTreeView.h
+++ b/GUI/View/Common/ModelTreeView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ModelTreeView.h
+//! @file      GUI/View/Common/ModelTreeView.h
 //! @brief     Defines class ModelTreeView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_MODELTREEVIEW_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_MODELTREEVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_MODELTREEVIEW_H
+#define BORNAGAIN_GUI_VIEW_COMMON_MODELTREEVIEW_H
 
 #include <QWidget>
 
@@ -43,4 +43,4 @@ private:
     bool m_is_expanded;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_MODELTREEVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_MODELTREEVIEW_H
diff --git a/GUI/Views/CommonWidgets/ScientificSpinBox.cpp b/GUI/View/Common/ScientificSpinBox.cpp
similarity index 97%
rename from GUI/Views/CommonWidgets/ScientificSpinBox.cpp
rename to GUI/View/Common/ScientificSpinBox.cpp
index d5ff7c9c9055fe4f962a73b5fd1140c4e934b715..9dc56aa24b7238e4ffa1cd216408fd80722f32e8 100644
--- a/GUI/Views/CommonWidgets/ScientificSpinBox.cpp
+++ b/GUI/View/Common/ScientificSpinBox.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ScientificSpinBox.cpp
+//! @file      GUI/View/Common/ScientificSpinBox.cpp
 //! @brief     Implements class ScientificSpinBox
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/ScientificSpinBox.h"
+#include "GUI/View/Common/ScientificSpinBox.h"
 #include <QLineEdit>
 #include <cmath>
 
diff --git a/GUI/Views/CommonWidgets/ScientificSpinBox.h b/GUI/View/Common/ScientificSpinBox.h
similarity index 88%
rename from GUI/Views/CommonWidgets/ScientificSpinBox.h
rename to GUI/View/Common/ScientificSpinBox.h
index f18816fa4cf12bec7a3cdb1e597bd52a78664197..8f635afc1651b32a10efb7208cf18e2093e54985 100644
--- a/GUI/Views/CommonWidgets/ScientificSpinBox.h
+++ b/GUI/View/Common/ScientificSpinBox.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/ScientificSpinBox.h
+//! @file      GUI/View/Common/ScientificSpinBox.h
 //! @brief     Defines class ScientificSpinBox
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_SCIENTIFICSPINBOX_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_SCIENTIFICSPINBOX_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_SCIENTIFICSPINBOX_H
+#define BORNAGAIN_GUI_VIEW_COMMON_SCIENTIFICSPINBOX_H
 
 #include <QAbstractSpinBox>
 
@@ -66,4 +66,4 @@ private:
     QDoubleValidator m_validator;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_SCIENTIFICSPINBOX_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_SCIENTIFICSPINBOX_H
diff --git a/GUI/Views/CommonWidgets/SessionItemController.cpp b/GUI/View/Common/SessionItemController.cpp
similarity index 94%
rename from GUI/Views/CommonWidgets/SessionItemController.cpp
rename to GUI/View/Common/SessionItemController.cpp
index 65c942574c3ae0008d0562a2a061d973a3596aff..0e0d20a00d88e7c0ae39c874ee609740ef25c70c 100644
--- a/GUI/Views/CommonWidgets/SessionItemController.cpp
+++ b/GUI/View/Common/SessionItemController.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/SessionItemController.cpp
+//! @file      GUI/View/Common/SessionItemController.cpp
 //! @brief     Implements class SessionItemController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/SessionItemController.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/View/Common/SessionItemController.h"
+#include "GUI/Model/Session/SessionItem.h"
 
 SessionItemController::SessionItemController(QObject* prt)
     : QObject(prt), m_item(nullptr), m_parent_subscribed(false)
diff --git a/GUI/Views/CommonWidgets/SessionItemController.h b/GUI/View/Common/SessionItemController.h
similarity index 84%
rename from GUI/Views/CommonWidgets/SessionItemController.h
rename to GUI/View/Common/SessionItemController.h
index e79e0266ee29b1f230e6791a7971d8fabcf70ce8..98339e43514c07c6ee42db7a130c4f1fd11fc2fc 100644
--- a/GUI/Views/CommonWidgets/SessionItemController.h
+++ b/GUI/View/Common/SessionItemController.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/SessionItemController.h
+//! @file      GUI/View/Common/SessionItemController.h
 //! @brief     Defines class SessionItemController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_SESSIONITEMCONTROLLER_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_SESSIONITEMCONTROLLER_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_SESSIONITEMCONTROLLER_H
+#define BORNAGAIN_GUI_VIEW_COMMON_SESSIONITEMCONTROLLER_H
 
 #include <QObject>
 #include <functional>
@@ -53,4 +53,4 @@ private:
     bool m_parent_subscribed;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_SESSIONITEMCONTROLLER_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_SESSIONITEMCONTROLLER_H
diff --git a/GUI/Views/CommonWidgets/SessionItemWidget.cpp b/GUI/View/Common/SessionItemWidget.cpp
similarity index 89%
rename from GUI/Views/CommonWidgets/SessionItemWidget.cpp
rename to GUI/View/Common/SessionItemWidget.cpp
index d1affc641c5b531b29697ab87990b6169bac7be5..825066d3af79f2f853de10b59b611cd793f21ae4 100644
--- a/GUI/Views/CommonWidgets/SessionItemWidget.cpp
+++ b/GUI/View/Common/SessionItemWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/SessionItemWidget.cpp
+//! @file      GUI/View/Common/SessionItemWidget.cpp
 //! @brief     Declares class ItemComboWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
-#include "GUI/Views/CommonWidgets/SessionItemController.h"
+#include "GUI/View/Common/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemController.h"
 
 SessionItemWidget::SessionItemWidget(QWidget* parent)
     : QWidget(parent), m_itemController(new SessionItemController(this))
diff --git a/GUI/Views/CommonWidgets/SessionItemWidget.h b/GUI/View/Common/SessionItemWidget.h
similarity index 85%
rename from GUI/Views/CommonWidgets/SessionItemWidget.h
rename to GUI/View/Common/SessionItemWidget.h
index 5193560b2dff34483b33202e968bea7cc7da44a1..368f8d9fae486bc4e414488f54bbdce9ea501f1b 100644
--- a/GUI/Views/CommonWidgets/SessionItemWidget.h
+++ b/GUI/View/Common/SessionItemWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/SessionItemWidget.h
+//! @file      GUI/View/Common/SessionItemWidget.h
 //! @brief     Defines class ItemComboWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_SESSIONITEMWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_SESSIONITEMWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_SESSIONITEMWIDGET_H
+#define BORNAGAIN_GUI_VIEW_COMMON_SESSIONITEMWIDGET_H
 
 #include <QWidget>
 
@@ -49,4 +49,4 @@ private:
     SessionItemController* m_itemController;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_SESSIONITEMWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_SESSIONITEMWIDGET_H
diff --git a/GUI/Views/CommonWidgets/StyledToolBar.cpp b/GUI/View/Common/StyledToolBar.cpp
similarity index 93%
rename from GUI/Views/CommonWidgets/StyledToolBar.cpp
rename to GUI/View/Common/StyledToolBar.cpp
index f85239b0759381b1a1179c50acca8b7644d1ff12..a6dc5d2a6b2d108bc0f1a0882982f780d4b344de 100644
--- a/GUI/Views/CommonWidgets/StyledToolBar.cpp
+++ b/GUI/View/Common/StyledToolBar.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/StyledToolBar.cpp
+//! @file      GUI/View/Common/StyledToolBar.cpp
 //! @brief     Implements class StyledToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/StyledToolBar.h"
+#include "GUI/View/Common/StyledToolBar.h"
 #include <QLabel>
 #include <QStyle>
 
diff --git a/GUI/Views/CommonWidgets/StyledToolBar.h b/GUI/View/Common/StyledToolBar.h
similarity index 80%
rename from GUI/Views/CommonWidgets/StyledToolBar.h
rename to GUI/View/Common/StyledToolBar.h
index 69374bc093ae2903649fe88d91275c4bf553ed2a..d207b8a79344e0ff9fb84a0de61345303bf3059a 100644
--- a/GUI/Views/CommonWidgets/StyledToolBar.h
+++ b/GUI/View/Common/StyledToolBar.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/StyledToolBar.h
+//! @file      GUI/View/Common/StyledToolBar.h
 //! @brief     Defines class StyledToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_STYLEDTOOLBAR_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_STYLEDTOOLBAR_H
+#ifndef BORNAGAIN_GUI_VIEW_COMMON_STYLEDTOOLBAR_H
+#define BORNAGAIN_GUI_VIEW_COMMON_STYLEDTOOLBAR_H
 
 #include <QToolBar>
 
@@ -32,4 +32,4 @@ protected:
     void contextMenuEvent(QContextMenuEvent*);
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_STYLEDTOOLBAR_H
+#endif // BORNAGAIN_GUI_VIEW_COMMON_STYLEDTOOLBAR_H
diff --git a/GUI/Views/JobWidgets/FitComparisonController.cpp b/GUI/View/Compare/FitComparisonController.cpp
similarity index 93%
rename from GUI/Views/JobWidgets/FitComparisonController.cpp
rename to GUI/View/Compare/FitComparisonController.cpp
index 3682d001f0cb9e7f187303a603910b60b39ab5e7..2c9a785675851d73d02d1c985764bb343c2dda17 100644
--- a/GUI/Views/JobWidgets/FitComparisonController.cpp
+++ b/GUI/View/Compare/FitComparisonController.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/FitComparisonController.cpp
+//! @file      GUI/View/Compare/FitComparisonController.cpp
 //! @brief     Implements class FitComparisonController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/FitComparisonController.h"
+#include "GUI/View/Compare/FitComparisonController.h"
 #include "Device/Data/DataUtils.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/Views/IntensityDataWidgets/PropertyRepeater.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/View/Intensity/PropertyRepeater.h"
 
 namespace {
 // different limits on relative difference plot are required
diff --git a/GUI/Views/JobWidgets/FitComparisonController.h b/GUI/View/Compare/FitComparisonController.h
similarity index 84%
rename from GUI/Views/JobWidgets/FitComparisonController.h
rename to GUI/View/Compare/FitComparisonController.h
index 974cc88a5b26f962781f1ed8aad1300a83522e80..285dc791a6ec6506be985a70f0dee6b426f9f694 100644
--- a/GUI/Views/JobWidgets/FitComparisonController.h
+++ b/GUI/View/Compare/FitComparisonController.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/FitComparisonController.h
+//! @file      GUI/View/Compare/FitComparisonController.h
 //! @brief     Defines class FitComparisonController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONCONTROLLER_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONCONTROLLER_H
+#ifndef BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONCONTROLLER_H
+#define BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONCONTROLLER_H
 
 #include <QObject>
 
@@ -49,4 +49,4 @@ private:
     PropertyRepeater* m_zAxisRepeater;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONCONTROLLER_H
+#endif // BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONCONTROLLER_H
diff --git a/GUI/Views/JobWidgets/FitComparisonViewController.cpp b/GUI/View/Compare/FitComparisonViewController.cpp
similarity index 90%
rename from GUI/Views/JobWidgets/FitComparisonViewController.cpp
rename to GUI/View/Compare/FitComparisonViewController.cpp
index 9b33b31f3ba67935905f8c0233090f272ffdc49a..f97a4c377f02e526339af2aebbd90bf9bb9a9c9d 100644
--- a/GUI/Views/JobWidgets/FitComparisonViewController.cpp
+++ b/GUI/View/Compare/FitComparisonViewController.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/FitComparisonViewController.cpp
+//! @file      GUI/View/Compare/FitComparisonViewController.cpp
 //! @brief     Implements classes DiffItemController, FitComparison1DViewController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,24 +12,25 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/FitComparisonViewController.h"
+#include "GUI/View/Compare/FitComparisonViewController.h"
 #include "Device/Data/DataUtils.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/Data1DViewItem.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/DataPropertyContainer.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/Views/IntensityDataWidgets/PropertyRepeater.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/Data1DViewItem.h"
+#include "GUI/Model/Data/DataPropertyContainer.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/View/Intensity/PropertyRepeater.h"
 
 namespace {
+
 const double relative_diff_min_1d = 1e-05;
 const double relative_diff_max_1d = 4.0;
+
 } // namespace
 
+
 FitComparison1DViewController::FitComparison1DViewController(QObject* parent)
     : QObject(parent)
     , m_diff_item_controller(new DiffItemController(SpecularDataItem::M_TYPE, this))
diff --git a/GUI/Views/JobWidgets/FitComparisonViewController.h b/GUI/View/Compare/FitComparisonViewController.h
similarity index 86%
rename from GUI/Views/JobWidgets/FitComparisonViewController.h
rename to GUI/View/Compare/FitComparisonViewController.h
index 60206b733ea8a0dc4fc0303a996f47641274f62c..1a4c5dd93c899708589af1b014a4836fdfbe9be2 100644
--- a/GUI/Views/JobWidgets/FitComparisonViewController.h
+++ b/GUI/View/Compare/FitComparisonViewController.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/FitComparisonViewController.h
+//! @file      GUI/View/Compare/FitComparisonViewController.h
 //! @brief     Defines classes DiffItemController, FitComparison1DViewController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONVIEWCONTROLLER_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONVIEWCONTROLLER_H
+#ifndef BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONVIEWCONTROLLER_H
+#define BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONVIEWCONTROLLER_H
 
 #include <QObject>
 
@@ -63,4 +63,4 @@ private:
     PropertyRepeater* m_xAxisRepeater;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONVIEWCONTROLLER_H
+#endif // BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONVIEWCONTROLLER_H
diff --git a/GUI/Views/JobWidgets/FitComparisonWidget.cpp b/GUI/View/Compare/FitComparisonWidget.cpp
similarity index 86%
rename from GUI/Views/JobWidgets/FitComparisonWidget.cpp
rename to GUI/View/Compare/FitComparisonWidget.cpp
index 1137ebe29108e4155acd7801d302bb8d8812d6e4..c62447071a61e70d052f505fcc6f6dc0239af3bc 100644
--- a/GUI/Views/JobWidgets/FitComparisonWidget.cpp
+++ b/GUI/View/Compare/FitComparisonWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/FitComparisonWidget.cpp
+//! @file      GUI/View/Compare/FitComparisonWidget.cpp
 //! @brief     Implements class FitComparisonWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,17 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/FitComparisonWidget.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMap.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMapCanvas.h"
-#include "GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.h"
-#include "GUI/Views/IntensityDataWidgets/PlotStatusLabel.h"
-#include "GUI/Views/JobWidgets/FitComparisonController.h"
-#include "GUI/Views/JobWidgets/FitFlowWidget.h"
+#include "GUI/View/Compare/FitComparisonWidget.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/View/Compare/FitComparisonController.h"
+#include "GUI/View/Compare/FitFlowWidget.h"
+#include "GUI/View/Intensity/ColorMap.h"
+#include "GUI/View/Intensity/ColorMapCanvas.h"
+#include "GUI/View/Intensity/IntensityDataPropertyWidget.h"
+#include "GUI/View/Intensity/PlotStatusLabel.h"
 #include <QAction>
 #include <QGridLayout>
 #include <QVBoxLayout>
diff --git a/GUI/Views/JobWidgets/FitComparisonWidget.h b/GUI/View/Compare/FitComparisonWidget.h
similarity index 85%
rename from GUI/Views/JobWidgets/FitComparisonWidget.h
rename to GUI/View/Compare/FitComparisonWidget.h
index 51fbcd2c5ebed1b0354de709c13dfb07303aae93..b78b718d1223f13cd9d96005d9d82c68a98540d7 100644
--- a/GUI/Views/JobWidgets/FitComparisonWidget.h
+++ b/GUI/View/Compare/FitComparisonWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/FitComparisonWidget.h
+//! @file      GUI/View/Compare/FitComparisonWidget.h
 //! @brief     Defines class FitComparisonWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONWIDGET_H
+#define BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONWIDGET_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 #include <QMap>
 
 class JobItem;
@@ -65,4 +65,4 @@ private:
     FitComparisonController2D* m_comparisonController;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONWIDGET_H
diff --git a/GUI/Views/JobWidgets/FitComparisonWidget1D.cpp b/GUI/View/Compare/FitComparisonWidget1D.cpp
similarity index 84%
rename from GUI/Views/JobWidgets/FitComparisonWidget1D.cpp
rename to GUI/View/Compare/FitComparisonWidget1D.cpp
index aa049deb0df4598ee1dabe877ae43ae9f24a5158..bd5111fda23075c07a254d592dbbeb45c0e84548 100644
--- a/GUI/Views/JobWidgets/FitComparisonWidget1D.cpp
+++ b/GUI/View/Compare/FitComparisonWidget1D.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/FitComparisonWidget1D.cpp
+//! @file      GUI/View/Compare/FitComparisonWidget1D.cpp
 //! @brief     Implements class FitComparisonWidget1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,18 +12,17 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/FitComparisonWidget1D.h"
-#include "GUI/Models/Data1DViewItem.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.h"
-#include "GUI/Views/IntensityDataWidgets/Plot1D.h"
-#include "GUI/Views/IntensityDataWidgets/PlotStatusLabel.h"
-#include "GUI/Views/JobWidgets/FitComparisonViewController.h"
-#include "GUI/Views/JobWidgets/FitFlowWidget.h"
-#include "GUI/Views/SpecularDataWidgets/Plot1DCanvas.h"
+#include "GUI/View/Compare/FitComparisonWidget1D.h"
+#include "GUI/Model/Data/Data1DViewItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/View/Compare/FitComparisonViewController.h"
+#include "GUI/View/Compare/FitFlowWidget.h"
+#include "GUI/View/Intensity/IntensityDataPropertyWidget.h"
+#include "GUI/View/Intensity/Plot1D.h"
+#include "GUI/View/Intensity/PlotStatusLabel.h"
+#include "GUI/View/SpecularData/Plot1DCanvas.h"
 #include <QAction>
 #include <QGridLayout>
 #include <QVBoxLayout>
diff --git a/GUI/Views/JobWidgets/FitComparisonWidget1D.h b/GUI/View/Compare/FitComparisonWidget1D.h
similarity index 83%
rename from GUI/Views/JobWidgets/FitComparisonWidget1D.h
rename to GUI/View/Compare/FitComparisonWidget1D.h
index ea853cf3fea2fd2edb1c1bc7dcf8e939fcb10acb..25d0d77aa7230d9f2066efb8b41ad1a705f72dd7 100644
--- a/GUI/Views/JobWidgets/FitComparisonWidget1D.h
+++ b/GUI/View/Compare/FitComparisonWidget1D.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/FitComparisonWidget1D.h
+//! @file      GUI/View/Compare/FitComparisonWidget1D.h
 //! @brief     Defines class FitComparisonWidget1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONWIDGET1D_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONWIDGET1D_H
+#ifndef BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONWIDGET1D_H
+#define BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONWIDGET1D_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 
 class Data1DViewItem;
 class FitComparison1DViewController;
@@ -58,4 +58,4 @@ private:
     FitComparison1DViewController* m_comparisonController;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITCOMPARISONWIDGET1D_H
+#endif // BORNAGAIN_GUI_VIEW_COMPARE_FITCOMPARISONWIDGET1D_H
diff --git a/GUI/Views/JobWidgets/FitFlowWidget.cpp b/GUI/View/Compare/FitFlowWidget.cpp
similarity index 89%
rename from GUI/Views/JobWidgets/FitFlowWidget.cpp
rename to GUI/View/Compare/FitFlowWidget.cpp
index 6ead271ea2351089ba0ed5adad0889a101068cec..0f83866a897efce4e3914b615ad89c90b1542fe9 100644
--- a/GUI/Views/JobWidgets/FitFlowWidget.cpp
+++ b/GUI/View/Compare/FitFlowWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/FitFlowWidget.cpp
+//! @file      GUI/View/Compare/FitFlowWidget.cpp
 //! @brief     Implement class FitFlowWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/FitFlowWidget.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Views/JobWidgets/HistogramPlot.h"
+#include "GUI/View/Compare/FitFlowWidget.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/View/Intensity/HistogramPlot.h"
 #include <QVBoxLayout>
 
 FitFlowWidget::FitFlowWidget(QWidget* parent)
diff --git a/GUI/Views/JobWidgets/FitFlowWidget.h b/GUI/View/Compare/FitFlowWidget.h
similarity index 79%
rename from GUI/Views/JobWidgets/FitFlowWidget.h
rename to GUI/View/Compare/FitFlowWidget.h
index d3f18724bba215f24375ed7ecf516de6a5f42c57..a954d9e20e0cafa08192d404bf7f8a9b54f2fbc5 100644
--- a/GUI/Views/JobWidgets/FitFlowWidget.h
+++ b/GUI/View/Compare/FitFlowWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/FitFlowWidget.h
+//! @file      GUI/View/Compare/FitFlowWidget.h
 //! @brief     Defines class FitFlowWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITFLOWWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITFLOWWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_COMPARE_FITFLOWWIDGET_H
+#define BORNAGAIN_GUI_VIEW_COMPARE_FITFLOWWIDGET_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 
 class HistogramPlot;
 class FitSuiteItem;
@@ -40,4 +40,4 @@ private:
     QVector<double> m_y;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_FITFLOWWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_COMPARE_FITFLOWWIDGET_H
diff --git a/GUI/Views/CommonWidgets/DoubleLineEdit.cpp b/GUI/View/Edit/DoubleLineEdit.cpp
similarity index 91%
rename from GUI/Views/CommonWidgets/DoubleLineEdit.cpp
rename to GUI/View/Edit/DoubleLineEdit.cpp
index c4110275e85e2949c403e5b9b9c9f672a2ff7828..97d4bccddce9d0200be0f161bf5277bd96577252 100644
--- a/GUI/Views/CommonWidgets/DoubleLineEdit.cpp
+++ b/GUI/View/Edit/DoubleLineEdit.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/DoubleLineEdit.cpp
+//! @file      GUI/View/Edit/DoubleLineEdit.cpp
 //! @brief     Implements class DoubleLineEdit
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/DoubleLineEdit.h"
-#include "GUI/Views/CommonWidgets/GUIHelpers.h"
+#include "GUI/View/Edit/DoubleLineEdit.h"
 #include <QDoubleValidator>
 
 DoubleLineEdit::DoubleLineEdit(QWidget* parent, const DoubleDescriptor& d)
diff --git a/GUI/Views/CommonWidgets/DoubleLineEdit.h b/GUI/View/Edit/DoubleLineEdit.h
similarity index 85%
rename from GUI/Views/CommonWidgets/DoubleLineEdit.h
rename to GUI/View/Edit/DoubleLineEdit.h
index d865ba8463da38a7227f97e23b66ac0fd0077dde..24135b954ab29ae315d739466cfebd6163b57447 100644
--- a/GUI/Views/CommonWidgets/DoubleLineEdit.h
+++ b/GUI/View/Edit/DoubleLineEdit.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/DoubleLineEdit.h
+//! @file      GUI/View/Edit/DoubleLineEdit.h
 //! @brief     Defines class DoubleLineEdit
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOUBLELINEEDIT_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOUBLELINEEDIT_H
+#ifndef BORNAGAIN_GUI_VIEW_EDIT_DOUBLELINEEDIT_H
+#define BORNAGAIN_GUI_VIEW_EDIT_DOUBLELINEEDIT_H
 
-#include "GUI/Models/DoubleDescriptor.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 #include <QLineEdit>
 
 class QDoubleValidator;
@@ -51,4 +51,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOUBLELINEEDIT_H
+#endif // BORNAGAIN_GUI_VIEW_EDIT_DOUBLELINEEDIT_H
diff --git a/GUI/Views/CommonWidgets/DoubleSpinBox.cpp b/GUI/View/Edit/DoubleSpinBox.cpp
similarity index 92%
rename from GUI/Views/CommonWidgets/DoubleSpinBox.cpp
rename to GUI/View/Edit/DoubleSpinBox.cpp
index c3ed8f23fb90e720e4f20cb9085e38c5f1c30833..7b176a3d16280edbdbb1c526b5fa4cc9d52ab447 100644
--- a/GUI/Views/CommonWidgets/DoubleSpinBox.cpp
+++ b/GUI/View/Edit/DoubleSpinBox.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/DoubleSpinBox.cpp
+//! @file      GUI/View/Edit/DoubleSpinBox.cpp
 //! @brief     Implements class DoubleSpinBox
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/DoubleSpinBox.h"
-#include "GUI/Views/CommonWidgets/GUIHelpers.h"
+#include "GUI/View/Edit/DoubleSpinBox.h"
+#include "GUI/View/Tool/EditUtil.h"
 #include <QWheelEvent>
 
 DoubleSpinBox::DoubleSpinBox(QWidget* parent, const DoubleDescriptor& d)
     : QDoubleSpinBox(parent), m_valueDescriptor(d)
 {
     setFocusPolicy(Qt::StrongFocus);
-    GUI::View::Helpers::configSpinbox(this, d.decimals, d.limits);
+    GUI::View::EditUtil::configSpinbox(this, d.decimals, d.limits);
     setToolTip(d.tooltip);
     setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
 
diff --git a/GUI/Views/CommonWidgets/DoubleSpinBox.h b/GUI/View/Edit/DoubleSpinBox.h
similarity index 89%
rename from GUI/Views/CommonWidgets/DoubleSpinBox.h
rename to GUI/View/Edit/DoubleSpinBox.h
index 922ec6124c407e3fa4ca4b2ac81ba415bde9eb5a..8b9d0629d65b424dedafab54b53a96a9b2ef3f85 100644
--- a/GUI/Views/CommonWidgets/DoubleSpinBox.h
+++ b/GUI/View/Edit/DoubleSpinBox.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/DoubleSpinBox.h
+//! @file      GUI/View/Edit/DoubleSpinBox.h
 //! @brief     Defines class DoubleSpinBox
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOUBLESPINBOX_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOUBLESPINBOX_H
+#ifndef BORNAGAIN_GUI_VIEW_EDIT_DOUBLESPINBOX_H
+#define BORNAGAIN_GUI_VIEW_EDIT_DOUBLESPINBOX_H
 
-#include "GUI/Models/DoubleDescriptor.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 #include <QDoubleSpinBox>
 
 //! SpinBox for DoubleDescriptors, supporting units.
@@ -73,4 +73,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DOUBLESPINBOX_H
+#endif // BORNAGAIN_GUI_VIEW_EDIT_DOUBLESPINBOX_H
diff --git a/GUI/Views/FitWidgets/FitActivityPanel.cpp b/GUI/View/Fit/FitActivityPanel.cpp
similarity index 81%
rename from GUI/Views/FitWidgets/FitActivityPanel.cpp
rename to GUI/View/Fit/FitActivityPanel.cpp
index e79d7cf68a6b6be1c62432bd48d414162e28eaf3..45e65e9eeecd2b784d18bf16f88ac91c7dba4646 100644
--- a/GUI/Views/FitWidgets/FitActivityPanel.cpp
+++ b/GUI/View/Fit/FitActivityPanel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitActivityPanel.cpp
+//! @file      GUI/View/Fit/FitActivityPanel.cpp
 //! @brief     Implements class FitActivityPanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,24 +12,22 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/FitActivityPanel.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Views/FitWidgets/FitSessionController.h"
-#include "GUI/Views/FitWidgets/FitSessionManager.h"
-#include "GUI/Views/FitWidgets/FitSessionWidget.h"
-#include "GUI/Views/FitWidgets/JobRealTimeWidget.h"
-#include "GUI/Views/FitWidgets/RunFitControlWidget.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/View/Fit/FitActivityPanel.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Fit/FitSessionController.h"
+#include "GUI/View/Fit/FitSessionManager.h"
+#include "GUI/View/Fit/FitSessionWidget.h"
+#include "GUI/View/Fit/JobRealTimeWidget.h"
+#include "GUI/View/Fit/RunFitControlWidget.h"
 #include <QLabel>
 #include <QPushButton>
 #include <QStackedWidget>
 #include <QVBoxLayout>
 
 FitActivityPanel::FitActivityPanel(QWidget* parent)
-    : QWidget(parent)
-    , m_realTimeWidget(nullptr)
-    , m_fitSessionManager(new FitSessionManager(this))
+    : QWidget(parent), m_realTimeWidget(nullptr), m_fitSessionManager(new FitSessionManager(this))
 {
     setWindowTitle(GUI::Constants::JobFitPanelName);
     setObjectName("FitActivityPanel");
@@ -47,7 +45,7 @@ FitActivityPanel::FitActivityPanel(QWidget* parent)
     m_nofitLabel = new QLabel("Job has no real data linked to it for fitting.", m_stack);
     m_nofitLabel->setAlignment(Qt::AlignCenter);
     m_stack->addWidget(m_nofitLabel);
-    
+
     m_fitSessionWidget = new FitSessionWidget(m_stack);
     m_stack->addWidget(m_fitSessionWidget);
 }
diff --git a/GUI/Views/FitWidgets/FitActivityPanel.h b/GUI/View/Fit/FitActivityPanel.h
similarity index 87%
rename from GUI/Views/FitWidgets/FitActivityPanel.h
rename to GUI/View/Fit/FitActivityPanel.h
index 443bb7da937262085d0fd1e4b1171d396c1aa5ad..5b34882e89432acaf291d189249801d04de7194f 100644
--- a/GUI/Views/FitWidgets/FitActivityPanel.h
+++ b/GUI/View/Fit/FitActivityPanel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitActivityPanel.h
+//! @file      GUI/View/Fit/FitActivityPanel.h
 //! @brief     Defines class FitActivityPanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITACTIVITYPANEL_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITACTIVITYPANEL_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_FITACTIVITYPANEL_H
+#define BORNAGAIN_GUI_VIEW_FIT_FITACTIVITYPANEL_H
 
 #include <QWidget>
 
@@ -58,4 +58,4 @@ private:
     FitSessionManager* m_fitSessionManager;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITACTIVITYPANEL_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_FITACTIVITYPANEL_H
diff --git a/GUI/Views/FitWidgets/FitLog.cpp b/GUI/View/Fit/FitLog.cpp
similarity index 91%
rename from GUI/Views/FitWidgets/FitLog.cpp
rename to GUI/View/Fit/FitLog.cpp
index 6c5da155beeedc44c89cdf17d986b908d511dcbe..1b8cebf143abc0a9d453bf9e4aa51ebf4b6e2520 100644
--- a/GUI/Views/FitWidgets/FitLog.cpp
+++ b/GUI/View/Fit/FitLog.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitLog.cpp
+//! @file      GUI/View/Fit/FitLog.cpp
 //! @brief     Implements class FitLog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/FitLog.h"
+#include "GUI/View/Fit/FitLog.h"
 
 FitLog::FitLog(QObject* parent) : QObject(parent) {}
 
diff --git a/GUI/Views/FitWidgets/FitLog.h b/GUI/View/Fit/FitLog.h
similarity index 86%
rename from GUI/Views/FitWidgets/FitLog.h
rename to GUI/View/Fit/FitLog.h
index d78cfd70099e63e61bb22ae32762201fc2950443..b29b06832a4d2d8b08ed75a977588c92fe55517a 100644
--- a/GUI/Views/FitWidgets/FitLog.h
+++ b/GUI/View/Fit/FitLog.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitLog.h
+//! @file      GUI/View/Fit/FitLog.h
 //! @brief     Defines class FitLog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITLOG_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITLOG_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_FITLOG_H
+#define BORNAGAIN_GUI_VIEW_FIT_FITLOG_H
 
 #include <QObject>
 
@@ -46,4 +46,4 @@ private:
     std::vector<Message> m_messages;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITLOG_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_FITLOG_H
diff --git a/GUI/Views/FitWidgets/FitObjectiveBuilder.cpp b/GUI/View/Fit/FitObjectiveBuilder.cpp
similarity index 88%
rename from GUI/Views/FitWidgets/FitObjectiveBuilder.cpp
rename to GUI/View/Fit/FitObjectiveBuilder.cpp
index 02c6d440c22b499940c59296feffddf3cc9a6f57..6dae4682b0c4b1d9297c62941fbda8b7b88ef314 100644
--- a/GUI/Views/FitWidgets/FitObjectiveBuilder.cpp
+++ b/GUI/View/Fit/FitObjectiveBuilder.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitObjectiveBuilder.cpp
+//! @file      GUI/View/Fit/FitObjectiveBuilder.cpp
 //! @brief     Implements class SimulationBuilder
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,22 +12,22 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/FitObjectiveBuilder.h"
+#include "GUI/View/Fit/FitObjectiveBuilder.h"
 #include "Core/Fitting/FitObjective.h"
 #include "Core/Fitting/ObjectiveMetric.h"
 #include "Core/Simulation/ISimulation.h"
 #include "Fit/Kernel/Minimizer.h"
 #include "Fit/Minimizer/IMinimizer.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/DomainSimulationBuilder.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FitParameterItems.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/MinimizerItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Views/FitWidgets/GUIFitObserver.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Domain/DomainSimulationBuilder.h"
+#include "GUI/Model/Fit/FitParameterItems.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Fit/MinimizerItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/Path.h"
+#include "GUI/View/Fit/GUIFitObserver.h"
 
 FitObjectiveBuilder::FitObjectiveBuilder(JobItem* jobItem) : m_jobItem(jobItem)
 {
@@ -126,7 +126,7 @@ std::unique_ptr<OutputData<double>> FitObjectiveBuilder::createOutputData() cons
 
 void FitObjectiveBuilder::update_fit_parameters(const mumufit::Parameters& params) const
 {
-    QVector<double> values = GUI::Helpers::fromStdVector(params.values());
+    QVector<double> values = QVector<double>::fromStdVector(params.values());
 
     auto fitParContainer = m_jobItem->fitParameterContainerItem();
     fitParContainer->setValuesInParameterContainer(values, m_jobItem->parameterContainerItem());
diff --git a/GUI/Views/FitWidgets/FitObjectiveBuilder.h b/GUI/View/Fit/FitObjectiveBuilder.h
similarity index 86%
rename from GUI/Views/FitWidgets/FitObjectiveBuilder.h
rename to GUI/View/Fit/FitObjectiveBuilder.h
index bd06c1e14da05b909666162b8d70ab95ffbedda8..e62d663a768f398b3f321a6a25597e84516188d8 100644
--- a/GUI/Views/FitWidgets/FitObjectiveBuilder.h
+++ b/GUI/View/Fit/FitObjectiveBuilder.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitObjectiveBuilder.h
+//! @file      GUI/View/Fit/FitObjectiveBuilder.h
 //! @brief     Defines class FitObjectiveBuilder
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITOBJECTIVEBUILDER_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITOBJECTIVEBUILDER_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_FITOBJECTIVEBUILDER_H
+#define BORNAGAIN_GUI_VIEW_FIT_FITOBJECTIVEBUILDER_H
 
 #include <memory>
 
@@ -57,4 +57,4 @@ private:
     std::unique_ptr<FitObjective> m_fit_objective;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITOBJECTIVEBUILDER_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_FITOBJECTIVEBUILDER_H
diff --git a/GUI/Views/FitWidgets/FitParameterWidget.cpp b/GUI/View/Fit/FitParameterWidget.cpp
similarity index 95%
rename from GUI/Views/FitWidgets/FitParameterWidget.cpp
rename to GUI/View/Fit/FitParameterWidget.cpp
index 5bf4bb4d792de6dae83d14deca36c540f3958bf9..7662e1b5a97561e9d2517be5e1013f7dfc74a140 100644
--- a/GUI/Views/FitWidgets/FitParameterWidget.cpp
+++ b/GUI/View/Fit/FitParameterWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitParameterWidget.cpp
+//! @file      GUI/View/Fit/FitParameterWidget.cpp
 //! @brief     Implements class FitParameterWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,20 +12,20 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/FitParameterWidget.h"
-#include "GUI/Models/FilterPropertyProxy.h"
-#include "GUI/Models/FitParameterHelper.h"
-#include "GUI/Models/FitParameterItems.h"
-#include "GUI/Models/FitParameterProxyModel.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/ParameterTreeItems.h"
-#include "GUI/Views/FitWidgets/ParameterTuningWidget.h"
-#include "GUI/Views/InfoWidgets/OverlayLabelController.h"
-#include "GUI/Views/SessionModelDelegate.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
-#include "GUI/utils/CustomEventFilters.h"
+#include "GUI/View/Fit/FitParameterWidget.h"
+#include "GUI/Model/Fit/FitParameterHelper.h"
+#include "GUI/Model/Fit/FitParameterItems.h"
+#include "GUI/Model/Fit/FitParameterProxyModel.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/Group/FilterPropertyProxy.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Fit/ParameterTuningWidget.h"
+#include "GUI/View/Info/OverlayLabelController.h"
+#include "GUI/View/PropertyEditor/CustomEventFilters.h"
+#include "GUI/View/PropertyEditor/SessionModelDelegate.h"
 #include <QAction>
 #include <QMenu>
 #include <QTreeView>
diff --git a/GUI/Views/FitWidgets/FitParameterWidget.h b/GUI/View/Fit/FitParameterWidget.h
similarity index 90%
rename from GUI/Views/FitWidgets/FitParameterWidget.h
rename to GUI/View/Fit/FitParameterWidget.h
index da374b6d6ce787239edc4de758a46316c3ab060a..ae806b527b7c00d9566db321bfce2a9773fd139d 100644
--- a/GUI/Views/FitWidgets/FitParameterWidget.h
+++ b/GUI/View/Fit/FitParameterWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitParameterWidget.h
+//! @file      GUI/View/Fit/FitParameterWidget.h
 //! @brief     Defines class FitParameterWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITPARAMETERWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITPARAMETERWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_FITPARAMETERWIDGET_H
+#define BORNAGAIN_GUI_VIEW_FIT_FITPARAMETERWIDGET_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 #include <memory>
 
 class JobItem;
@@ -95,4 +95,4 @@ private:
     OverlayLabelController* m_infoLabel;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITPARAMETERWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_FITPARAMETERWIDGET_H
diff --git a/GUI/Views/FitWidgets/FitProgressInfo.cpp b/GUI/View/Fit/FitProgressInfo.cpp
similarity index 85%
rename from GUI/Views/FitWidgets/FitProgressInfo.cpp
rename to GUI/View/Fit/FitProgressInfo.cpp
index 62c4bb7d10b4917cc2d954e76b3324374f28221f..390d7c525d0281593c7031264d45c41884d8f104 100644
--- a/GUI/Views/FitWidgets/FitProgressInfo.cpp
+++ b/GUI/View/Fit/FitProgressInfo.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitProgressInfo.cpp
+//! @file      GUI/View/Fit/FitProgressInfo.cpp
 //! @brief     Implements class FitProgressInfo
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,6 +12,6 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/FitProgressInfo.h"
+#include "GUI/View/Fit/FitProgressInfo.h"
 
 FitProgressInfo::FitProgressInfo() : m_chi2(0.0), m_iteration_count(0) {}
diff --git a/GUI/Views/FitWidgets/FitProgressInfo.h b/GUI/View/Fit/FitProgressInfo.h
similarity index 85%
rename from GUI/Views/FitWidgets/FitProgressInfo.h
rename to GUI/View/Fit/FitProgressInfo.h
index 695281354ec9c39aa124570da7a874ef239d2bb0..af2d0ab1f8200eadebc4265583dde8608d2df750 100644
--- a/GUI/Views/FitWidgets/FitProgressInfo.h
+++ b/GUI/View/Fit/FitProgressInfo.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitProgressInfo.h
+//! @file      GUI/View/Fit/FitProgressInfo.h
 //! @brief     Defines class FitProgressInfo
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITPROGRESSINFO_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITPROGRESSINFO_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_FITPROGRESSINFO_H
+#define BORNAGAIN_GUI_VIEW_FIT_FITPROGRESSINFO_H
 
 #include <string>
 #include <vector>
@@ -41,4 +41,4 @@ private:
     std::vector<double> m_sim_values;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITPROGRESSINFO_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_FITPROGRESSINFO_H
diff --git a/GUI/Views/FitWidgets/FitResultsWidget.cpp b/GUI/View/Fit/FitResultsWidget.cpp
similarity index 86%
rename from GUI/Views/FitWidgets/FitResultsWidget.cpp
rename to GUI/View/Fit/FitResultsWidget.cpp
index fd9a0d91d8a1e9babcf85eb66e6cc5d468cdc475..b6b47596d162aea868fdc645ac77e81d565596ac 100644
--- a/GUI/Views/FitWidgets/FitResultsWidget.cpp
+++ b/GUI/View/Fit/FitResultsWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitResultsWidget.cpp
+//! @file      GUI/View/Fit/FitResultsWidget.cpp
 //! @brief     Implements class FitResultsWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/FitResultsWidget.h"
+#include "GUI/View/Fit/FitResultsWidget.h"
 
 FitResultsWidget::FitResultsWidget(QWidget* parent) : QWidget(parent)
 {
diff --git a/GUI/Views/FitWidgets/FitResultsWidget.h b/GUI/View/Fit/FitResultsWidget.h
similarity index 76%
rename from GUI/Views/FitWidgets/FitResultsWidget.h
rename to GUI/View/Fit/FitResultsWidget.h
index abe6488016e725ec696b312db945ee5e429c4ee6..921a4600c8bcaf360b360f8ef9e190981763fa60 100644
--- a/GUI/Views/FitWidgets/FitResultsWidget.h
+++ b/GUI/View/Fit/FitResultsWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitResultsWidget.h
+//! @file      GUI/View/Fit/FitResultsWidget.h
 //! @brief     Defines class FitResultsWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITRESULTSWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITRESULTSWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_FITRESULTSWIDGET_H
+#define BORNAGAIN_GUI_VIEW_FIT_FITRESULTSWIDGET_H
 
 #include <QWidget>
 
@@ -26,4 +26,4 @@ public:
     FitResultsWidget(QWidget* parent = 0);
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITRESULTSWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_FITRESULTSWIDGET_H
diff --git a/GUI/Views/FitWidgets/FitSessionController.cpp b/GUI/View/Fit/FitSessionController.cpp
similarity index 89%
rename from GUI/Views/FitWidgets/FitSessionController.cpp
rename to GUI/View/Fit/FitSessionController.cpp
index 132f214b51b30bd45e3197c861c992f62cf61153..c9c2a5e10178ff6bb16a32caafec800fc5b2249d 100644
--- a/GUI/Views/FitWidgets/FitSessionController.cpp
+++ b/GUI/View/Fit/FitSessionController.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitSessionController.cpp
+//! @file      GUI/View/Fit/FitSessionController.cpp
 //! @brief     Implements class FitSessionController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,17 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/FitSessionController.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FitParameterItems.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Views/FitWidgets/FitLog.h"
-#include "GUI/Views/FitWidgets/FitObjectiveBuilder.h"
-#include "GUI/Views/FitWidgets/FitWorkerLauncher.h"
-#include "GUI/Views/FitWidgets/GUIFitObserver.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/View/Fit/FitSessionController.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Fit/FitParameterItems.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/Path.h"
+#include "GUI/View/Fit/FitLog.h"
+#include "GUI/View/Fit/FitObjectiveBuilder.h"
+#include "GUI/View/Fit/FitWorkerLauncher.h"
+#include "GUI/View/Fit/GUIFitObserver.h"
 
 namespace {
 const bool use_fit_objective = true;
@@ -164,7 +164,7 @@ void FitSessionController::updateIterationCount(const FitProgressInfo& info)
 
 void FitSessionController::updateFitParameterValues(const FitProgressInfo& info)
 {
-    QVector<double> values = GUI::Helpers::fromStdVector(info.parValues());
+    QVector<double> values = QVector<double>::fromStdVector(info.parValues());
     FitParameterContainerItem* fitParContainer = m_jobItem->fitParameterContainerItem();
     fitParContainer->setValuesInParameterContainer(values, m_jobItem->parameterContainerItem());
 }
@@ -174,7 +174,7 @@ void FitSessionController::updateLog(const FitProgressInfo& info)
     QString message = QString("NCalls:%1 chi2:%2 \n").arg(info.iterationCount()).arg(info.chi2());
     FitParameterContainerItem* fitParContainer = m_jobItem->fitParameterContainerItem();
     int index(0);
-    QVector<double> values = GUI::Helpers::fromStdVector(info.parValues());
+    QVector<double> values = QVector<double>::fromStdVector(info.parValues());
     for (FitParameterItem* item : fitParContainer->fitParameterItems()) {
         if (item->linkItems().empty())
             continue;
diff --git a/GUI/Views/FitWidgets/FitSessionController.h b/GUI/View/Fit/FitSessionController.h
similarity index 88%
rename from GUI/Views/FitWidgets/FitSessionController.h
rename to GUI/View/Fit/FitSessionController.h
index df51943e495e61ca019701ffe9a275b8fdd7639b..97930a3a1763403c9935eef50c97148a7e07a39d 100644
--- a/GUI/Views/FitWidgets/FitSessionController.h
+++ b/GUI/View/Fit/FitSessionController.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitSessionController.h
+//! @file      GUI/View/Fit/FitSessionController.h
 //! @brief     Defines class FitSessionController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITSESSIONCONTROLLER_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITSESSIONCONTROLLER_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_FITSESSIONCONTROLLER_H
+#define BORNAGAIN_GUI_VIEW_FIT_FITSESSIONCONTROLLER_H
 
 #include <QObject>
 #include <memory>
@@ -65,4 +65,4 @@ private:
     bool m_block_progress_update;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITSESSIONCONTROLLER_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_FITSESSIONCONTROLLER_H
diff --git a/GUI/Views/FitWidgets/FitSessionManager.cpp b/GUI/View/Fit/FitSessionManager.cpp
similarity index 82%
rename from GUI/Views/FitWidgets/FitSessionManager.cpp
rename to GUI/View/Fit/FitSessionManager.cpp
index 8c5ad284f08c4063804ee221d86feaa40c6e10f4..cd2c19ccf5834ee41396ba18017f216247f24b67 100644
--- a/GUI/Views/FitWidgets/FitSessionManager.cpp
+++ b/GUI/View/Fit/FitSessionManager.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitSessionManager.cpp
+//! @file      GUI/View/Fit/FitSessionManager.cpp
 //! @brief     Implements class FitSessionManager
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/FitSessionManager.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Views/FitWidgets/FitLog.h"
-#include "GUI/Views/FitWidgets/FitSessionController.h"
+#include "GUI/View/Fit/FitSessionManager.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/Fit/FitLog.h"
+#include "GUI/View/Fit/FitSessionController.h"
 
-FitSessionManager::FitSessionManager(QObject* parent)
-    : QObject(parent), m_activeController(nullptr)
+FitSessionManager::FitSessionManager(QObject* parent) : QObject(parent), m_activeController(nullptr)
 {
 }
 
diff --git a/GUI/Views/FitWidgets/FitSessionManager.h b/GUI/View/Fit/FitSessionManager.h
similarity index 84%
rename from GUI/Views/FitWidgets/FitSessionManager.h
rename to GUI/View/Fit/FitSessionManager.h
index 55182e9fb1518347eeefada86e449b07790b46ba..a87c7a27e71226316d7f1dd428ede5bd78e61036 100644
--- a/GUI/Views/FitWidgets/FitSessionManager.h
+++ b/GUI/View/Fit/FitSessionManager.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitSessionManager.h
+//! @file      GUI/View/Fit/FitSessionManager.h
 //! @brief     Defines class FitSessionManager
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITSESSIONMANAGER_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITSESSIONMANAGER_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_FITSESSIONMANAGER_H
+#define BORNAGAIN_GUI_VIEW_FIT_FITSESSIONMANAGER_H
 
 #include <QMap>
 #include <QObject>
@@ -41,4 +41,4 @@ private:
     QMap<SessionItem*, FitSessionController*> m_item_to_controller;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITSESSIONMANAGER_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_FITSESSIONMANAGER_H
diff --git a/GUI/Views/FitWidgets/FitSessionWidget.cpp b/GUI/View/Fit/FitSessionWidget.cpp
similarity index 87%
rename from GUI/Views/FitWidgets/FitSessionWidget.cpp
rename to GUI/View/Fit/FitSessionWidget.cpp
index ac9229333360850f9b3965dbf4e1df512682912b..e68f369148431e221e950f5386d6a314af6e10cb 100644
--- a/GUI/Views/FitWidgets/FitSessionWidget.cpp
+++ b/GUI/View/Fit/FitSessionWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitSessionWidget.cpp
+//! @file      GUI/View/Fit/FitSessionWidget.cpp
 //! @brief     Implements class FitSessionWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/FitSessionWidget.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Views/FitWidgets/FitParameterWidget.h"
-#include "GUI/Views/FitWidgets/FitResultsWidget.h"
-#include "GUI/Views/FitWidgets/FitSessionController.h"
-#include "GUI/Views/FitWidgets/MinimizerSettingsWidget.h"
-#include "GUI/Views/FitWidgets/RunFitControlWidget.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/View/Fit/FitSessionWidget.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Fit/FitParameterWidget.h"
+#include "GUI/View/Fit/FitResultsWidget.h"
+#include "GUI/View/Fit/FitSessionController.h"
+#include "GUI/View/Fit/MinimizerSettingsWidget.h"
+#include "GUI/View/Fit/RunFitControlWidget.h"
 #include <QTabWidget>
 #include <QVBoxLayout>
 
diff --git a/GUI/Views/FitWidgets/FitSessionWidget.h b/GUI/View/Fit/FitSessionWidget.h
similarity index 85%
rename from GUI/Views/FitWidgets/FitSessionWidget.h
rename to GUI/View/Fit/FitSessionWidget.h
index 8a99ddbf76c8f2fe585950f0f92c089955a7c222..c2760f08f36b78b3fcb6ca343f283f3c8aa346fb 100644
--- a/GUI/Views/FitWidgets/FitSessionWidget.h
+++ b/GUI/View/Fit/FitSessionWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitSessionWidget.h
+//! @file      GUI/View/Fit/FitSessionWidget.h
 //! @brief     Defines class FitSessionWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITSESSIONWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITSESSIONWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_FITSESSIONWIDGET_H
+#define BORNAGAIN_GUI_VIEW_FIT_FITSESSIONWIDGET_H
 
-#include "GUI/Views/FitWidgets/FitProgressInfo.h"
+#include "GUI/View/Fit/FitProgressInfo.h"
 #include <QWidget>
 
 class QTabWidget;
@@ -55,4 +55,4 @@ private:
     FitSessionController* m_sessionController;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITSESSIONWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_FITSESSIONWIDGET_H
diff --git a/GUI/Views/FitWidgets/FitWorker.cpp b/GUI/View/Fit/FitWorker.cpp
similarity index 85%
rename from GUI/Views/FitWidgets/FitWorker.cpp
rename to GUI/View/Fit/FitWorker.cpp
index 6fe0d485431adbc80b5e62618054a47931ca10eb..9c98526fd42f5175305641c3b9b98c52515419ae 100644
--- a/GUI/Views/FitWidgets/FitWorker.cpp
+++ b/GUI/View/Fit/FitWorker.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitWorker.cpp
+//! @file      GUI/View/Fit/FitWorker.cpp
 //! @brief     Implements class FitWorker
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/FitWorker.h"
-#include "GUI/Views/FitWidgets/FitObjectiveBuilder.h"
+#include "GUI/View/Fit/FitWorker.h"
+#include "GUI/View/Fit/FitObjectiveBuilder.h"
 #include <QDateTime>
 
 void FitWorker::startFit()
diff --git a/GUI/Views/FitWidgets/FitWorker.h b/GUI/View/Fit/FitWorker.h
similarity index 83%
rename from GUI/Views/FitWidgets/FitWorker.h
rename to GUI/View/Fit/FitWorker.h
index 60184815a9bb608dddcfd040159f847c3c224e86..d774bd75b3f373d28c85dac4cd3284341d42bb2a 100644
--- a/GUI/Views/FitWidgets/FitWorker.h
+++ b/GUI/View/Fit/FitWorker.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitWorker.h
+//! @file      GUI/View/Fit/FitWorker.h
 //! @brief     Implements class FitWorker
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITWORKER_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITWORKER_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_FITWORKER_H
+#define BORNAGAIN_GUI_VIEW_FIT_FITWORKER_H
 
 #include <QObject>
 #include <memory>
@@ -44,4 +44,4 @@ private:
     std::shared_ptr<FitObjectiveBuilder> m_fit_objective;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITWORKER_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_FITWORKER_H
diff --git a/GUI/Views/FitWidgets/FitWorkerLauncher.cpp b/GUI/View/Fit/FitWorkerLauncher.cpp
similarity index 89%
rename from GUI/Views/FitWidgets/FitWorkerLauncher.cpp
rename to GUI/View/Fit/FitWorkerLauncher.cpp
index 6a528b55542e152bee05bf2e3d5c377e4bdfab54..ad43927e344e051662563d0e035b1ea59ae6166c 100644
--- a/GUI/Views/FitWidgets/FitWorkerLauncher.cpp
+++ b/GUI/View/Fit/FitWorkerLauncher.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitWorkerLauncher.cpp
+//! @file      GUI/View/Fit/FitWorkerLauncher.cpp
 //! @brief     Implements class FitWorkerLauncher
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/FitWorkerLauncher.h"
-#include "GUI/Views/FitWidgets/FitWorker.h"
+#include "GUI/View/Fit/FitWorkerLauncher.h"
+#include "GUI/View/Fit/FitWorker.h"
 #include <QThread>
 
-FitWorkerLauncher::FitWorkerLauncher(QObject* parent)
-    : QObject(parent), m_is_fit_running(false)
-{
-}
+FitWorkerLauncher::FitWorkerLauncher(QObject* parent) : QObject(parent), m_is_fit_running(false) {}
 
 void FitWorkerLauncher::runFitting(std::shared_ptr<FitObjectiveBuilder> suite)
 {
diff --git a/GUI/Views/FitWidgets/FitWorkerLauncher.h b/GUI/View/Fit/FitWorkerLauncher.h
similarity index 85%
rename from GUI/Views/FitWidgets/FitWorkerLauncher.h
rename to GUI/View/Fit/FitWorkerLauncher.h
index 336a022d750bbe7dbcfd16d7496c9d57581880f9..1a98237955c5649e114e57f9b6076cdb69f873ec 100644
--- a/GUI/Views/FitWidgets/FitWorkerLauncher.h
+++ b/GUI/View/Fit/FitWorkerLauncher.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/FitWorkerLauncher.h
+//! @file      GUI/View/Fit/FitWorkerLauncher.h
 //! @brief     Implements class FitWorkerLauncher
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITWORKERLAUNCHER_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITWORKERLAUNCHER_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_FITWORKERLAUNCHER_H
+#define BORNAGAIN_GUI_VIEW_FIT_FITWORKERLAUNCHER_H
 
-#include <QObject>
 #include <QDateTime>
+#include <QObject>
 #include <atomic>
 #include <memory>
 
@@ -56,4 +56,4 @@ private:
     QDateTime m_fit_end;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_FITWORKERLAUNCHER_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_FITWORKERLAUNCHER_H
diff --git a/GUI/Views/FitWidgets/GUIFitObserver.cpp b/GUI/View/Fit/GUIFitObserver.cpp
similarity index 96%
rename from GUI/Views/FitWidgets/GUIFitObserver.cpp
rename to GUI/View/Fit/GUIFitObserver.cpp
index 24f0b8a72a2a6f6c8c9bbf52cbeae7b0f9538e2b..55849651b79f3dd265603bc4c7cdd6fb6dcd1fbd 100644
--- a/GUI/Views/FitWidgets/GUIFitObserver.cpp
+++ b/GUI/View/Fit/GUIFitObserver.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/GUIFitObserver.cpp
+//! @file      GUI/View/Fit/GUIFitObserver.cpp
 //! @brief     Implements class GUIFitObserver
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/GUIFitObserver.h"
+#include "GUI/View/Fit/GUIFitObserver.h"
 #include "Core/Fitting/FitObjective.h"
 #include "Core/Fitting/IterationInfo.h"
 #include "Core/Fitting/SimDataPair.h"
diff --git a/GUI/Views/FitWidgets/GUIFitObserver.h b/GUI/View/Fit/GUIFitObserver.h
similarity index 84%
rename from GUI/Views/FitWidgets/GUIFitObserver.h
rename to GUI/View/Fit/GUIFitObserver.h
index 1d7baf1ea90f28b9b01fb137693b23a6510989b3..ecf7acc911dc98263ed9c546426ec7305b469c3d 100644
--- a/GUI/Views/FitWidgets/GUIFitObserver.h
+++ b/GUI/View/Fit/GUIFitObserver.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/GUIFitObserver.h
+//! @file      GUI/View/Fit/GUIFitObserver.h
 //! @brief     Implements class GUIFitObserver
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_GUIFITOBSERVER_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_GUIFITOBSERVER_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_GUIFITOBSERVER_H
+#define BORNAGAIN_GUI_VIEW_FIT_GUIFITOBSERVER_H
 
-#include "GUI/Views/FitWidgets/FitProgressInfo.h"
+#include "GUI/View/Fit/FitProgressInfo.h"
 #include <QObject>
 #include <condition_variable>
 #include <mutex>
@@ -57,4 +57,4 @@ private:
     FitProgressInfo m_iteration_info;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_GUIFITOBSERVER_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_GUIFITOBSERVER_H
diff --git a/GUI/Views/JobWidgets/JobMessagePanel.cpp b/GUI/View/Fit/JobMessagePanel.cpp
similarity index 88%
rename from GUI/Views/JobWidgets/JobMessagePanel.cpp
rename to GUI/View/Fit/JobMessagePanel.cpp
index 4e55543413a95db211b1fe50e7a52b8707ab242d..7d2f5c9a06942ce77211c2acafa303648f025a3c 100644
--- a/GUI/Views/JobWidgets/JobMessagePanel.cpp
+++ b/GUI/View/Fit/JobMessagePanel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobMessagePanel.cpp
+//! @file      GUI/View/Fit/JobMessagePanel.cpp
 //! @brief     Implements class JobMessagePanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/JobMessagePanel.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/View/Fit/JobMessagePanel.h"
+#include "GUI/Util/mainwindow_constants.h"
 #include <QScrollBar>
 #include <QStackedWidget>
 #include <QTextEdit>
@@ -43,8 +43,8 @@ QColor color(FitLogLevel level)
 } // namespace
 
 
-JobMessagePanel::JobMessagePanel(QWidget* parent) : InfoPanel(parent), m_log(nullptr),
-                                                    m_plainLog(new QTextEdit)
+JobMessagePanel::JobMessagePanel(QWidget* parent)
+    : InfoPanel(parent), m_log(nullptr), m_plainLog(new QTextEdit)
 {
     setWindowTitle(GUI::Constants::JobMessagePanelName);
     setObjectName("JobMessagePanel");
diff --git a/GUI/Views/JobWidgets/JobMessagePanel.h b/GUI/View/Fit/JobMessagePanel.h
similarity index 76%
rename from GUI/Views/JobWidgets/JobMessagePanel.h
rename to GUI/View/Fit/JobMessagePanel.h
index 0cbf4f7979bb67cb8472609bcff7f973618ceac1..28f1c8b47d640a013503cad4d74596cd018bad41 100644
--- a/GUI/Views/JobWidgets/JobMessagePanel.h
+++ b/GUI/View/Fit/JobMessagePanel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobMessagePanel.h
+//! @file      GUI/View/Fit/JobMessagePanel.h
 //! @brief     Defines class JobMessagePanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBMESSAGEPANEL_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBMESSAGEPANEL_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_JOBMESSAGEPANEL_H
+#define BORNAGAIN_GUI_VIEW_FIT_JOBMESSAGEPANEL_H
 
-#include "GUI/Views/CommonWidgets/InfoPanel.h"
-#include "GUI/Views/FitWidgets/FitLog.h"
+#include "GUI/View/Common/InfoPanel.h"
+#include "GUI/View/Fit/FitLog.h"
 #include <QColor>
 
 class QTextEdit;
@@ -39,4 +39,4 @@ private:
     QTextEdit* m_plainLog;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBMESSAGEPANEL_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_JOBMESSAGEPANEL_H
diff --git a/GUI/Views/FitWidgets/JobRealTimeToolBar.cpp b/GUI/View/Fit/JobRealTimeToolBar.cpp
similarity index 91%
rename from GUI/Views/FitWidgets/JobRealTimeToolBar.cpp
rename to GUI/View/Fit/JobRealTimeToolBar.cpp
index 11995217cffd85598c2fa58224c957e0437e4231..9880d1786e663bc9d650e2e03d2ddfb96fdbf506 100644
--- a/GUI/Views/FitWidgets/JobRealTimeToolBar.cpp
+++ b/GUI/View/Fit/JobRealTimeToolBar.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/JobRealTimeToolBar.cpp
+//! @file      GUI/View/Fit/JobRealTimeToolBar.cpp
 //! @brief     Implements class JobRealTimeToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/JobRealTimeToolBar.h"
+#include "GUI/View/Fit/JobRealTimeToolBar.h"
 #include <QToolButton>
 
 JobRealTimeToolBar::JobRealTimeToolBar(QWidget* parent)
diff --git a/GUI/Views/FitWidgets/JobRealTimeToolBar.h b/GUI/View/Fit/JobRealTimeToolBar.h
similarity index 75%
rename from GUI/Views/FitWidgets/JobRealTimeToolBar.h
rename to GUI/View/Fit/JobRealTimeToolBar.h
index 14c93f65caa32a65cee5a09932d1dfb7930f56f2..194b42ec3548d7fc8e341c08f993da6e48421372 100644
--- a/GUI/Views/FitWidgets/JobRealTimeToolBar.h
+++ b/GUI/View/Fit/JobRealTimeToolBar.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/JobRealTimeToolBar.h
+//! @file      GUI/View/Fit/JobRealTimeToolBar.h
 //! @brief     Defines class JobRealTimeToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_JOBREALTIMETOOLBAR_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_JOBREALTIMETOOLBAR_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_JOBREALTIMETOOLBAR_H
+#define BORNAGAIN_GUI_VIEW_FIT_JOBREALTIMETOOLBAR_H
 
-#include "GUI/Views/CommonWidgets/StyledToolBar.h"
+#include "GUI/View/Common/StyledToolBar.h"
 
 class QToolButton;
 
@@ -34,4 +34,4 @@ private:
     QToolButton* m_resetParametersButton;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_JOBREALTIMETOOLBAR_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_JOBREALTIMETOOLBAR_H
diff --git a/GUI/Views/FitWidgets/JobRealTimeWidget.cpp b/GUI/View/Fit/JobRealTimeWidget.cpp
similarity index 87%
rename from GUI/Views/FitWidgets/JobRealTimeWidget.cpp
rename to GUI/View/Fit/JobRealTimeWidget.cpp
index 4235ff801c11bfc5a112a9d58e52a4ff810f8b3b..fab732a7d0b379896ab651f324916329f9c3cb63 100644
--- a/GUI/Views/FitWidgets/JobRealTimeWidget.cpp
+++ b/GUI/View/Fit/JobRealTimeWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/JobRealTimeWidget.cpp
+//! @file      GUI/View/Fit/JobRealTimeWidget.cpp
 //! @brief     Implements class JobRealTimeWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/JobRealTimeWidget.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Views/FitWidgets/ParameterTuningWidget.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/View/Fit/JobRealTimeWidget.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Fit/ParameterTuningWidget.h"
 #include <QVBoxLayout>
 
 namespace {
diff --git a/GUI/Views/FitWidgets/JobRealTimeWidget.h b/GUI/View/Fit/JobRealTimeWidget.h
similarity index 80%
rename from GUI/Views/FitWidgets/JobRealTimeWidget.h
rename to GUI/View/Fit/JobRealTimeWidget.h
index f36478aac679714d12088d20f1011e5addbdee77..b2a9d313da3279b6ee91d9acca175520a35ee97a 100644
--- a/GUI/Views/FitWidgets/JobRealTimeWidget.h
+++ b/GUI/View/Fit/JobRealTimeWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/JobRealTimeWidget.h
+//! @file      GUI/View/Fit/JobRealTimeWidget.h
 //! @brief     Defines class JobRealTimeWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_JOBREALTIMEWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_JOBREALTIMEWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_JOBREALTIMEWIDGET_H
+#define BORNAGAIN_GUI_VIEW_FIT_JOBREALTIMEWIDGET_H
 
-#include "GUI/Views/CommonWidgets/ItemStackPresenter.h"
+#include "GUI/View/Common/ItemStackPresenter.h"
 
 class JobModel;
 class JobItem;
@@ -43,4 +43,4 @@ private:
     ItemStackPresenter<ParameterTuningWidget>* m_stackedWidget;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_JOBREALTIMEWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_JOBREALTIMEWIDGET_H
diff --git a/GUI/Views/FitWidgets/MinimizerSettingsWidget.cpp b/GUI/View/Fit/MinimizerSettingsWidget.cpp
similarity index 83%
rename from GUI/Views/FitWidgets/MinimizerSettingsWidget.cpp
rename to GUI/View/Fit/MinimizerSettingsWidget.cpp
index d2264c26be12f15ecc0ff402cc1b8d6256fe614e..4f41f0d29db9f5231895c8d4a07f3f2ba8affcc7 100644
--- a/GUI/Views/FitWidgets/MinimizerSettingsWidget.cpp
+++ b/GUI/View/Fit/MinimizerSettingsWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/MinimizerSettingsWidget.cpp
+//! @file      GUI/View/Fit/MinimizerSettingsWidget.cpp
 //! @brief     Implements class MinimizerSettingsWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/MinimizerSettingsWidget.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/MinimizerItem.h"
-#include "GUI/Views/PropertyEditor/ComponentEditor.h"
+#include "GUI/View/Fit/MinimizerSettingsWidget.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Fit/MinimizerItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/View/PropertyEditor/ComponentEditor.h"
 #include <QPushButton>
 #include <QVBoxLayout>
 
diff --git a/GUI/Views/FitWidgets/MinimizerSettingsWidget.h b/GUI/View/Fit/MinimizerSettingsWidget.h
similarity index 81%
rename from GUI/Views/FitWidgets/MinimizerSettingsWidget.h
rename to GUI/View/Fit/MinimizerSettingsWidget.h
index 2927a6b63afc5c218e350e1b64aa5a5a5624a353..f34c195853f18cc1c0ef725d37edc6b39ff64f4f 100644
--- a/GUI/Views/FitWidgets/MinimizerSettingsWidget.h
+++ b/GUI/View/Fit/MinimizerSettingsWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/MinimizerSettingsWidget.h
+//! @file      GUI/View/Fit/MinimizerSettingsWidget.h
 //! @brief     Defines class MinimizerSettingsWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_MINIMIZERSETTINGSWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_MINIMIZERSETTINGSWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_MINIMIZERSETTINGSWIDGET_H
+#define BORNAGAIN_GUI_VIEW_FIT_MINIMIZERSETTINGSWIDGET_H
 
 #include <QWidget>
 
@@ -41,4 +41,4 @@ private:
     ComponentEditor* m_componentEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_MINIMIZERSETTINGSWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_MINIMIZERSETTINGSWIDGET_H
diff --git a/GUI/Views/FitWidgets/ParameterTuningDelegate.cpp b/GUI/View/Fit/ParameterTuningDelegate.cpp
similarity index 95%
rename from GUI/Views/FitWidgets/ParameterTuningDelegate.cpp
rename to GUI/View/Fit/ParameterTuningDelegate.cpp
index 4d9525f612ff532b449875c5386781d68d637ace..cb69526ef822fae0bc06eec82edc0c66b6f47b08 100644
--- a/GUI/Views/FitWidgets/ParameterTuningDelegate.cpp
+++ b/GUI/View/Fit/ParameterTuningDelegate.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/ParameterTuningDelegate.cpp
+//! @file      GUI/View/Fit/ParameterTuningDelegate.cpp
 //! @brief     Implements class ParameterTuningDelegate
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/ParameterTuningDelegate.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/ParameterTreeItems.h"
-#include "GUI/Models/ParameterTuningModel.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/CommonWidgets/ScientificSpinBox.h"
+#include "GUI/View/Fit/ParameterTuningDelegate.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/Fit/ParameterTuningModel.h"
+#include "GUI/Model/Job/ModelPath.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/View/Common/ScientificSpinBox.h"
 #include <QAbstractItemModel>
 #include <QApplication>
 #include <QHBoxLayout>
diff --git a/GUI/Views/FitWidgets/ParameterTuningDelegate.h b/GUI/View/Fit/ParameterTuningDelegate.h
similarity index 91%
rename from GUI/Views/FitWidgets/ParameterTuningDelegate.h
rename to GUI/View/Fit/ParameterTuningDelegate.h
index 385776c1704c63dcc17b9e0cad3e33f727f18dd9..692f51f455a14c2fd438a896da27b45bf1cbdf3b 100644
--- a/GUI/Views/FitWidgets/ParameterTuningDelegate.h
+++ b/GUI/View/Fit/ParameterTuningDelegate.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/ParameterTuningDelegate.h
+//! @file      GUI/View/Fit/ParameterTuningDelegate.h
 //! @brief     Defines class ParameterTuningDelegate
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_PARAMETERTUNINGDELEGATE_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_PARAMETERTUNINGDELEGATE_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_PARAMETERTUNINGDELEGATE_H
+#define BORNAGAIN_GUI_VIEW_FIT_PARAMETERTUNINGDELEGATE_H
 
 #include "Fit/Param/RealLimits.h"
 #include <QItemDelegate>
@@ -86,4 +86,4 @@ private:
     bool m_isReadOnly;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_PARAMETERTUNINGDELEGATE_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_PARAMETERTUNINGDELEGATE_H
diff --git a/GUI/Views/FitWidgets/ParameterTuningWidget.cpp b/GUI/View/Fit/ParameterTuningWidget.cpp
similarity index 92%
rename from GUI/Views/FitWidgets/ParameterTuningWidget.cpp
rename to GUI/View/Fit/ParameterTuningWidget.cpp
index e3eedde0fe90ecec0fe1b100d323e524506026b6..f9c08bae0ba8c1978dda6cd79c86d18b66f6b531 100644
--- a/GUI/Views/FitWidgets/ParameterTuningWidget.cpp
+++ b/GUI/View/Fit/ParameterTuningWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/ParameterTuningWidget.cpp
+//! @file      GUI/View/Fit/ParameterTuningWidget.cpp
 //! @brief     Implements class ParameterTuningWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,17 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/ParameterTuningWidget.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/ParameterTreeItems.h"
-#include "GUI/Models/ParameterTuningModel.h"
-#include "GUI/Views/FitWidgets/JobRealTimeToolBar.h"
-#include "GUI/Views/FitWidgets/ParameterTuningDelegate.h"
-#include "GUI/Views/FitWidgets/SliderSettingsWidget.h"
-#include "GUI/Views/InfoWidgets/CautionSign.h"
+#include "GUI/View/Fit/ParameterTuningWidget.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Fit/ParameterTreeItems.h"
+#include "GUI/Model/Fit/ParameterTuningModel.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/Fit/JobRealTimeToolBar.h"
+#include "GUI/View/Fit/ParameterTuningDelegate.h"
+#include "GUI/View/Fit/SliderSettingsWidget.h"
+#include "GUI/View/Info/CautionSign.h"
 #include <QTreeView>
 #include <QVBoxLayout>
 
diff --git a/GUI/Views/FitWidgets/ParameterTuningWidget.h b/GUI/View/Fit/ParameterTuningWidget.h
similarity index 87%
rename from GUI/Views/FitWidgets/ParameterTuningWidget.h
rename to GUI/View/Fit/ParameterTuningWidget.h
index a5b8234a0be39fc4edb8236cc9c232730ac965e1..a054a656d56ccaea678e97192f74ad9934b0b9b8 100644
--- a/GUI/Views/FitWidgets/ParameterTuningWidget.h
+++ b/GUI/View/Fit/ParameterTuningWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/ParameterTuningWidget.h
+//! @file      GUI/View/Fit/ParameterTuningWidget.h
 //! @brief     Defines class ParameterTuningWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_PARAMETERTUNINGWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_PARAMETERTUNINGWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_PARAMETERTUNINGWIDGET_H
+#define BORNAGAIN_GUI_VIEW_FIT_PARAMETERTUNINGWIDGET_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 
 class JobRealTimeToolBar;
 class JobModel;
@@ -77,4 +77,4 @@ private:
     CautionSign* m_cautionSign;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_PARAMETERTUNINGWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_PARAMETERTUNINGWIDGET_H
diff --git a/GUI/Views/FitWidgets/RunFitControlWidget.cpp b/GUI/View/Fit/RunFitControlWidget.cpp
similarity index 94%
rename from GUI/Views/FitWidgets/RunFitControlWidget.cpp
rename to GUI/View/Fit/RunFitControlWidget.cpp
index 7c2429acbf666839d3a760d2ece34df6ec20550d..06ff242acfbfd3d3bed8a56ae1bbb2ad892e2908 100644
--- a/GUI/Views/FitWidgets/RunFitControlWidget.cpp
+++ b/GUI/View/Fit/RunFitControlWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/RunFitControlWidget.cpp
+//! @file      GUI/View/Fit/RunFitControlWidget.cpp
 //! @brief     Implements class RunFitControlWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/RunFitControlWidget.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/InfoWidgets/CautionSign.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/View/Fit/RunFitControlWidget.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Info/CautionSign.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 #include <QFont>
 #include <QHBoxLayout>
 #include <QLabel>
diff --git a/GUI/Views/FitWidgets/RunFitControlWidget.h b/GUI/View/Fit/RunFitControlWidget.h
similarity index 85%
rename from GUI/Views/FitWidgets/RunFitControlWidget.h
rename to GUI/View/Fit/RunFitControlWidget.h
index f1b6374d313b9dcea4c07b68d491a40dbf6ab40f..6e2e94af92317df913aab093083a002e2dd0b8f5 100644
--- a/GUI/Views/FitWidgets/RunFitControlWidget.h
+++ b/GUI/View/Fit/RunFitControlWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/RunFitControlWidget.h
+//! @file      GUI/View/Fit/RunFitControlWidget.h
 //! @brief     Defines class RunFitControlWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_RUNFITCONTROLWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_RUNFITCONTROLWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_RUNFITCONTROLWIDGET_H
+#define BORNAGAIN_GUI_VIEW_FIT_RUNFITCONTROLWIDGET_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 #include <QWidget>
 
 class JobItem;
@@ -67,4 +67,4 @@ private:
     CautionSign* m_cautionSign;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_RUNFITCONTROLWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_RUNFITCONTROLWIDGET_H
diff --git a/GUI/Views/FitWidgets/SliderSettingsWidget.cpp b/GUI/View/Fit/SliderSettingsWidget.cpp
similarity index 96%
rename from GUI/Views/FitWidgets/SliderSettingsWidget.cpp
rename to GUI/View/Fit/SliderSettingsWidget.cpp
index 9366e42cee6695baf36b81a71e78302bbf548218..c55254658b2771eb750b44231842ec7763375a9f 100644
--- a/GUI/Views/FitWidgets/SliderSettingsWidget.cpp
+++ b/GUI/View/Fit/SliderSettingsWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/SliderSettingsWidget.cpp
+//! @file      GUI/View/Fit/SliderSettingsWidget.cpp
 //! @brief     Implements class SliderSettingsWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/FitWidgets/SliderSettingsWidget.h"
+#include "GUI/View/Fit/SliderSettingsWidget.h"
 #include <QCheckBox>
 #include <QGroupBox>
 #include <QHBoxLayout>
diff --git a/GUI/Views/FitWidgets/SliderSettingsWidget.h b/GUI/View/Fit/SliderSettingsWidget.h
similarity index 81%
rename from GUI/Views/FitWidgets/SliderSettingsWidget.h
rename to GUI/View/Fit/SliderSettingsWidget.h
index 18fcbd69ed942d0c4c8055e109bc7711ce6055b0..fab3172ab68fbff4e20af84625f7730d5ae5beac 100644
--- a/GUI/Views/FitWidgets/SliderSettingsWidget.h
+++ b/GUI/View/Fit/SliderSettingsWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/FitWidgets/SliderSettingsWidget.h
+//! @file      GUI/View/Fit/SliderSettingsWidget.h
 //! @brief     Defines class SliderSettingsWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_FITWIDGETS_SLIDERSETTINGSWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_FITWIDGETS_SLIDERSETTINGSWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_FIT_SLIDERSETTINGSWIDGET_H
+#define BORNAGAIN_GUI_VIEW_FIT_SLIDERSETTINGSWIDGET_H
 
 #include <QWidget>
 
@@ -42,4 +42,4 @@ private:
     QCheckBox* m_lockzCheckBox;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_FITWIDGETS_SLIDERSETTINGSWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_FIT_SLIDERSETTINGSWIDGET_H
diff --git a/GUI/Views/ImportDataWidgets/ImportDataUtils.cpp b/GUI/View/Import/ImportDataUtils.cpp
similarity index 75%
rename from GUI/Views/ImportDataWidgets/ImportDataUtils.cpp
rename to GUI/View/Import/ImportDataUtils.cpp
index 458c82e6b3536a2d64edf14216a4c0dd1abcfaae..7fc4bcf346c625aa4690d90d6ff06f790a2c7e87 100644
--- a/GUI/Views/ImportDataWidgets/ImportDataUtils.cpp
+++ b/GUI/View/Import/ImportDataUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/ImportDataUtils.cpp
+//! @file      GUI/View/Import/ImportDataUtils.cpp
 //! @brief     Implements ImportDataUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ImportDataWidgets/ImportDataUtils.h"
+#include "GUI/View/Import/ImportDataUtils.h"
 #include "Device/Data/OutputData.h"
 #include "Device/InputOutput/DataFormatUtils.h"
-#include "GUI/DataLoaders/QREDataLoader.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/utils/OutputDataUtils.h"
+#include "GUI/Model/Data/ImportDataInfo.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/IO/OutputDataUtils.h"
+#include "GUI/View/Loaders/QREDataLoader.h"
 #include <QApplication>
 #include <QMessageBox>
 
@@ -29,16 +29,6 @@ const QString filter_string_ba = "Intensity File (*.int *.gz *.tif *.tiff *.txt
 const QString filter_string_ascii = "Intensity File (*.int *.int.gz *.txt *.csv *.dat *.ascii);;"
                                     "Ascii column-wise data (*.*)";
 
-int rank(const RealDataItem& item)
-{
-    return static_cast<int>(item.shape().size());
-}
-
-int rank(const InstrumentItem& item)
-{
-    return static_cast<int>(item.shape().size());
-}
-
 //! Imports for 2D or 1D data, using given loader.
 //! Allocates OutputData, and returns owning pointer.
 //! Currently used for all 2D, and some 1D data files.
@@ -52,7 +42,7 @@ ImportKnownData(const QString& fileName,
     try {
         std::unique_ptr<OutputData<double>> data(
             IntensityDataIOFactory::readOutputData(fileName.toStdString(), loader));
-        result = GUI::Utils::Output::binifyAxes(*data);
+        result = GUI::Util::Output::binifyAxes(*data);
     } catch (std::exception& ex) {
         QString message = QString("Error while trying to read file\n\n'%1'\n\n%2")
                               .arg(fileName)
@@ -135,30 +125,3 @@ QString GUI::View::ImportDataUtils::Import1dData(RealDataItem* realDataItem,
 
     return QString();
 }
-
-bool GUI::View::ImportDataUtils::Compatible(const InstrumentItem& instrumentItem,
-                                            const RealDataItem& realDataItem)
-{
-    return rank(instrumentItem) == rank(realDataItem);
-}
-
-QString GUI::View::ImportDataUtils::printShapeMessage(const std::vector<int>& instrument_shape,
-                                                      const std::vector<int>& data_shape)
-{
-    auto to_str = [](const std::vector<int>& shape) {
-        std::string result;
-        for (size_t i = 0, size = shape.size(); i < size; ++i) {
-            result += std::to_string(shape[i]);
-            if (i + 1 != size)
-                result += ", ";
-        }
-        return result;
-    };
-
-    std::string message_string = "instrument [";
-    message_string += to_str(instrument_shape);
-    message_string += "], data [";
-    message_string += to_str(data_shape);
-    message_string += "]";
-    return QString::fromStdString(std::move(message_string));
-}
diff --git a/GUI/Views/ImportDataWidgets/ImportDataUtils.h b/GUI/View/Import/ImportDataUtils.h
similarity index 71%
rename from GUI/Views/ImportDataWidgets/ImportDataUtils.h
rename to GUI/View/Import/ImportDataUtils.h
index 3a2557520d9669c952db908c66e043366ad347f0..9c96a58a32c3be967d3c54bb5fc9b52b4ddcd4cd 100644
--- a/GUI/Views/ImportDataWidgets/ImportDataUtils.h
+++ b/GUI/View/Import/ImportDataUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/ImportDataUtils.h
+//! @file      GUI/View/Import/ImportDataUtils.h
 //! @brief     Defines ImportDataUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_IMPORTDATAUTILS_H
-#define BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_IMPORTDATAUTILS_H
+#ifndef BORNAGAIN_GUI_VIEW_IMPORT_IMPORTDATAUTILS_H
+#define BORNAGAIN_GUI_VIEW_IMPORT_IMPORTDATAUTILS_H
 
 #include "Device/Histo/IntensityDataIOFactory.h"
-#include "GUI/Models/ImportDataInfo.h"
 #include <QString>
 #include <memory>
-#include <vector>
 
 template <class T> class OutputData;
 class RealDataItem;
@@ -44,12 +42,6 @@ std::unique_ptr<OutputData<double>> Import2dData(const QString& fileName,
 //! (or null if none selected).
 QString Import1dData(RealDataItem* realDataItem, const AbstractDataLoader* selectedLoader);
 
-//! Check whether data item is compatible with instrument (same rank)
-bool Compatible(const InstrumentItem& instrumentItem, const RealDataItem& realDataItem);
-
-//! Composes a message with the shapes of InstrumentItem and RealDataItem.
-QString printShapeMessage(const std::vector<int>& instrument_shape,
-                          const std::vector<int>& data_shape);
 }; // namespace GUI::View::ImportDataUtils
 
-#endif // BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_IMPORTDATAUTILS_H
+#endif // BORNAGAIN_GUI_VIEW_IMPORT_IMPORTDATAUTILS_H
diff --git a/GUI/Views/ImportDataView.cpp b/GUI/View/Import/ImportDataView.cpp
similarity index 88%
rename from GUI/Views/ImportDataView.cpp
rename to GUI/View/Import/ImportDataView.cpp
index 7fe10743884478f8a7c04a7733af8fb3ac84dd5c..2f8b0085c0e31bb912510e4cd596f7b213f7aed7 100644
--- a/GUI/Views/ImportDataView.cpp
+++ b/GUI/View/Import/ImportDataView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataView.cpp
+//! @file      GUI/View/Import/ImportDataView.cpp
 //! @brief     Implements class ImportDataView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ImportDataView.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/Views/ImportDataWidgets/RealDataSelectorWidget.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/View/Import/ImportDataView.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Import/RealDataSelectorWidget.h"
 #include <QAction>
 #include <QSplitter>
 #include <QVBoxLayout>
diff --git a/GUI/Views/ImportDataView.h b/GUI/View/Import/ImportDataView.h
similarity index 79%
rename from GUI/Views/ImportDataView.h
rename to GUI/View/Import/ImportDataView.h
index 4f1b362aa2fc3774d458bc1d104396b5c6ca35bd..325c80479f5f67c2fc863d06d7e12760d1d0379a 100644
--- a/GUI/Views/ImportDataView.h
+++ b/GUI/View/Import/ImportDataView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataView.h
+//! @file      GUI/View/Import/ImportDataView.h
 //! @brief     Defines class ImportDataView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_IMPORTDATAVIEW_H
-#define BORNAGAIN_GUI_VIEWS_IMPORTDATAVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_IMPORT_IMPORTDATAVIEW_H
+#define BORNAGAIN_GUI_VIEW_IMPORT_IMPORTDATAVIEW_H
 
-#include "GUI/Views/CommonWidgets/ItemStackPresenter.h"
-#include "GUI/Views/ImportDataWidgets/RealDataPresenter.h"
+#include "GUI/View/Common/ItemStackPresenter.h"
+#include "GUI/View/Import/RealDataPresenter.h"
 
 class RealDataModel;
 class RealDataSelectorWidget;
@@ -42,4 +42,4 @@ private:
     ProjectDocument* m_document;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_IMPORTDATAVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_IMPORT_IMPORTDATAVIEW_H
diff --git a/GUI/Views/ImportDataWidgets/RealDataMaskWidget.cpp b/GUI/View/Import/RealDataMaskWidget.cpp
similarity index 87%
rename from GUI/Views/ImportDataWidgets/RealDataMaskWidget.cpp
rename to GUI/View/Import/RealDataMaskWidget.cpp
index 25ff0f50e4d164d38aa710660708280f9fbffbb8..7c79fc5df0637b0c39825e416ec4444f1cbfa013 100644
--- a/GUI/Views/ImportDataWidgets/RealDataMaskWidget.cpp
+++ b/GUI/View/Import/RealDataMaskWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/RealDataMaskWidget.cpp
+//! @file      GUI/View/Import/RealDataMaskWidget.cpp
 //! @brief     Implements class RealDataMaskWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ImportDataWidgets/RealDataMaskWidget.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Views/MaskWidgets/MaskEditor.h"
+#include "GUI/View/Import/RealDataMaskWidget.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/View/Mask/MaskEditor.h"
 #include <QAction>
 #include <QBoxLayout>
 
diff --git a/GUI/Views/ImportDataWidgets/RealDataMaskWidget.h b/GUI/View/Import/RealDataMaskWidget.h
similarity index 78%
rename from GUI/Views/ImportDataWidgets/RealDataMaskWidget.h
rename to GUI/View/Import/RealDataMaskWidget.h
index 8e2227414498c8339ab729548a5cc2f0bf174fda..8837db5715d68037633591740b7395fd38ecd0e4 100644
--- a/GUI/Views/ImportDataWidgets/RealDataMaskWidget.h
+++ b/GUI/View/Import/RealDataMaskWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/RealDataMaskWidget.h
+//! @file      GUI/View/Import/RealDataMaskWidget.h
 //! @brief     Defines class RealDataMaskWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATAMASKWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATAMASKWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_IMPORT_REALDATAMASKWIDGET_H
+#define BORNAGAIN_GUI_VIEW_IMPORT_REALDATAMASKWIDGET_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 
 class SessionItem;
 class MaskEditor;
@@ -44,4 +44,4 @@ private:
     MaskEditor* m_maskEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATAMASKWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_IMPORT_REALDATAMASKWIDGET_H
diff --git a/GUI/Views/ImportDataWidgets/RealDataPresenter.cpp b/GUI/View/Import/RealDataPresenter.cpp
similarity index 77%
rename from GUI/Views/ImportDataWidgets/RealDataPresenter.cpp
rename to GUI/View/Import/RealDataPresenter.cpp
index 6b714b4c433b38762a421c28784a61c72e48cafc..e527b9c44e07b213319d1f64fea6c40fb07bb9b5 100644
--- a/GUI/Views/ImportDataWidgets/RealDataPresenter.cpp
+++ b/GUI/View/Import/RealDataPresenter.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/RealDataPresenter.cpp
+//! @file      GUI/View/Import/RealDataPresenter.cpp
 //! @brief     Implements class RealDataPresenter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ImportDataWidgets/RealDataPresenter.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Views/ImportDataWidgets/RealDataMaskWidget.h"
-#include "GUI/Views/IntensityDataWidgets/IntensityDataWidget.h"
-#include "GUI/Views/ProjectionsWidgets/IntensityDataProjectionsWidget.h"
-#include "GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.h"
-#include "GUI/Views/SpecularDataWidgets/SpecularDataWidget.h"
+#include "GUI/View/Import/RealDataPresenter.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/Import/RealDataMaskWidget.h"
+#include "GUI/View/Intensity/IntensityDataWidget.h"
+#include "GUI/View/Projection/IntensityDataProjectionsWidget.h"
+#include "GUI/View/SpecularData/SpecularDataImportWidget.h"
+#include "GUI/View/SpecularData/SpecularDataWidget.h"
 #include <QAction>
 
 RealDataPresenter::RealDataPresenter(QWidget* parent) : ItemComboWidget(parent)
diff --git a/GUI/Views/ImportDataWidgets/RealDataPresenter.h b/GUI/View/Import/RealDataPresenter.h
similarity index 76%
rename from GUI/Views/ImportDataWidgets/RealDataPresenter.h
rename to GUI/View/Import/RealDataPresenter.h
index bed67de9405d0c4f4dbac73852831d834a255fbc..d977faa27b4bd0b00c1fa38625babd51cf9fdbcd 100644
--- a/GUI/Views/ImportDataWidgets/RealDataPresenter.h
+++ b/GUI/View/Import/RealDataPresenter.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/RealDataPresenter.h
+//! @file      GUI/View/Import/RealDataPresenter.h
 //! @brief     Defines class RealDataPresenter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATAPRESENTER_H
-#define BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATAPRESENTER_H
+#ifndef BORNAGAIN_GUI_VIEW_IMPORT_REALDATAPRESENTER_H
+#define BORNAGAIN_GUI_VIEW_IMPORT_REALDATAPRESENTER_H
 
-#include "GUI/Views/CommonWidgets/ItemComboWidget.h"
+#include "GUI/View/Common/ItemComboWidget.h"
 
 class RealDataMaskWidget;
 class QAction;
@@ -34,4 +34,4 @@ protected:
     QStringList activePresentationList(SessionItem* item);
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATAPRESENTER_H
+#endif // BORNAGAIN_GUI_VIEW_IMPORT_REALDATAPRESENTER_H
diff --git a/GUI/Views/ImportDataWidgets/RealDataPropertiesWidget.cpp b/GUI/View/Import/RealDataPropertiesWidget.cpp
similarity index 92%
rename from GUI/Views/ImportDataWidgets/RealDataPropertiesWidget.cpp
rename to GUI/View/Import/RealDataPropertiesWidget.cpp
index a4cbedb1ed95351b3061c31bdd045b4d81cdbfae..a808662ce9d17fa485213046e25ad4831714f369 100644
--- a/GUI/Views/ImportDataWidgets/RealDataPropertiesWidget.cpp
+++ b/GUI/View/Import/RealDataPropertiesWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/RealDataPropertiesWidget.cpp
+//! @file      GUI/View/Import/RealDataPropertiesWidget.cpp
 //! @brief     Implements class RealDataPropertiesWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ImportDataWidgets/RealDataPropertiesWidget.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/View/Import/RealDataPropertiesWidget.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Instrument/LinkInstrumentManager.h"
+#include "GUI/Model/Project/ProjectDocument.h"
 #include <QComboBox>
 #include <QLabel>
 #include <QVBoxLayout>
@@ -97,8 +97,8 @@ void RealDataPropertiesWidget::onInstrumentComboIndexChanged(int /*index*/)
     if (newSelectedInstrumentId == m_currentDataItem->instrumentId())
         return;
 
-    if (m_document->linkInstrumentManager()->canLinkDataToInstrument(m_currentDataItem,
-                                                                     newSelectedInstrumentId)) {
+    if (m_document->linkInstrumentManager()->canLinkDataToInstrument(
+            m_currentDataItem, newSelectedInstrumentId, this)) {
         m_currentDataItem->setInstrumentId(newSelectedInstrumentId);
         InstrumentItem* newSelectedInstrument =
             m_document->instrumentModel()->findInstrumentById(newSelectedInstrumentId);
diff --git a/GUI/Views/ImportDataWidgets/RealDataPropertiesWidget.h b/GUI/View/Import/RealDataPropertiesWidget.h
similarity index 83%
rename from GUI/Views/ImportDataWidgets/RealDataPropertiesWidget.h
rename to GUI/View/Import/RealDataPropertiesWidget.h
index f96f56a90d7b63cb84fb23c0550920658d910bca..baf562e9365538205e2dcf8f658996952cfd442e 100644
--- a/GUI/Views/ImportDataWidgets/RealDataPropertiesWidget.h
+++ b/GUI/View/Import/RealDataPropertiesWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/RealDataPropertiesWidget.h
+//! @file      GUI/View/Import/RealDataPropertiesWidget.h
 //! @brief     Defines class RealDataPropertiesWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATAPROPERTIESWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATAPROPERTIESWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_IMPORT_REALDATAPROPERTIESWIDGET_H
+#define BORNAGAIN_GUI_VIEW_IMPORT_REALDATAPROPERTIESWIDGET_H
 
 #include <QWidget>
 
@@ -49,4 +49,4 @@ private:
     ProjectDocument* m_document;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATAPROPERTIESWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_IMPORT_REALDATAPROPERTIESWIDGET_H
diff --git a/GUI/Views/ImportDataWidgets/RealDataSelectorWidget.cpp b/GUI/View/Import/RealDataSelectorWidget.cpp
similarity index 93%
rename from GUI/Views/ImportDataWidgets/RealDataSelectorWidget.cpp
rename to GUI/View/Import/RealDataSelectorWidget.cpp
index 01166ac0681e4916b925300768135bc59285b64f..a5b8c58a1a464654dc04726bc3afc77ca8a5555c 100644
--- a/GUI/Views/ImportDataWidgets/RealDataSelectorWidget.cpp
+++ b/GUI/View/Import/RealDataSelectorWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/RealDataSelectorWidget.cpp
+//! @file      GUI/View/Import/RealDataSelectorWidget.cpp
 //! @brief     Implements class RealDataSelectorWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,24 +12,21 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ImportDataWidgets/RealDataSelectorWidget.h"
+#include "GUI/View/Import/RealDataSelectorWidget.h"
 #include "Device/Data/DataUtils.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/AbstractDataLoader1D.h"
-#include "GUI/Models/DataLoaders1D.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/Views/CommonWidgets/GUIHelpers.h"
-#include "GUI/Views/CommonWidgets/ItemViewOverlayButtons.h"
-#include "GUI/Views/CommonWidgets/StyledToolBar.h"
-#include "GUI/Views/ImportDataWidgets/ImportDataUtils.h"
-#include "GUI/Views/ImportDataWidgets/RealDataPropertiesWidget.h"
-#include "GUI/Views/ImportDataWidgets/RealDataTreeModel.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectdocument.h"
-#include "GUI/mainwindow/projectmanager.h"
-#include <QApplication>
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/IO/AbstractDataLoader1D.h"
+#include "GUI/Model/IO/DataLoaders1D.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/Common/ItemViewOverlayButtons.h"
+#include "GUI/View/Common/StyledToolBar.h"
+#include "GUI/View/Import/ImportDataUtils.h"
+#include "GUI/View/Import/RealDataPropertiesWidget.h"
+#include "GUI/View/Import/RealDataTreeModel.h"
+#include "GUI/View/Main/ProjectManager.h"
+#include "GUI/View/Info/MessageBox.h"
 #include <QFileDialog>
 #include <QItemSelectionModel>
 #include <QLineEdit>
diff --git a/GUI/Views/ImportDataWidgets/RealDataSelectorWidget.h b/GUI/View/Import/RealDataSelectorWidget.h
similarity index 88%
rename from GUI/Views/ImportDataWidgets/RealDataSelectorWidget.h
rename to GUI/View/Import/RealDataSelectorWidget.h
index ff726f27da1a00252cd32390da1a93a25bfbf994..feaed26261fc93e7414dceae110ef041f4ccff50 100644
--- a/GUI/Views/ImportDataWidgets/RealDataSelectorWidget.h
+++ b/GUI/View/Import/RealDataSelectorWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/RealDataSelectorWidget.h
+//! @file      GUI/View/Import/RealDataSelectorWidget.h
 //! @brief     Defines class RealDataSelectorWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATASELECTORWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATASELECTORWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_IMPORT_REALDATASELECTORWIDGET_H
+#define BORNAGAIN_GUI_VIEW_IMPORT_REALDATASELECTORWIDGET_H
 
 #include <QModelIndex>
 #include <QWidget>
@@ -78,4 +78,4 @@ public:
     QAction* m_removeDataAction;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATASELECTORWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_IMPORT_REALDATASELECTORWIDGET_H
diff --git a/GUI/Views/ImportDataWidgets/RealDataTreeModel.cpp b/GUI/View/Import/RealDataTreeModel.cpp
similarity index 92%
rename from GUI/Views/ImportDataWidgets/RealDataTreeModel.cpp
rename to GUI/View/Import/RealDataTreeModel.cpp
index c2975533ba7766074dae8f6e6911b52fafbdb6ae..555641ecac95e1a0d5e2c380f32c6ed7f5dfd0fb 100644
--- a/GUI/Views/ImportDataWidgets/RealDataTreeModel.cpp
+++ b/GUI/View/Import/RealDataTreeModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/RealDataTreeModel.cpp
+//! @file      GUI/View/Import/RealDataTreeModel.cpp
 //! @brief     Implements class RealDataTreeModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ImportDataWidgets/RealDataTreeModel.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Application/ApplicationSettings.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RealDataModel.h"
+#include "GUI/View/Import/RealDataTreeModel.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/RealDataModel.h"
 #include <QApplication>
 #include <QtCore>
 #include <QtGui>
@@ -27,7 +26,7 @@ RealDataTreeModel::RealDataTreeModel(QObject* parent, RealDataModel* model)
     for (auto rank : m_visibleRanks)
         m_items[rank - 1] = model->realDataItems(rank);
 
-    updateSubsriptions();
+    updateSubscriptions();
 
     connect(m_model, &RealDataModel::modelAboutToBeReset, this, &RealDataTreeModel::clear,
             Qt::UniqueConnection);
@@ -35,16 +34,17 @@ RealDataTreeModel::RealDataTreeModel(QObject* parent, RealDataModel* model)
 
 void RealDataTreeModel::setVisibleRanks(QSet<int> visibleRanks)
 {
-    if (m_visibleRanks != visibleRanks) {
-        m_visibleRanks = visibleRanks;
+    if (m_visibleRanks == visibleRanks)
+        return;
 
-        beginResetModel();
-        for (auto rank : m_visibleRanks)
-            m_items[rank - 1] = m_model->realDataItems(rank);
-        endResetModel();
+    m_visibleRanks = visibleRanks;
 
-        updateSubsriptions();
-    }
+    beginResetModel();
+    for (auto rank : m_visibleRanks)
+        m_items[rank - 1] = m_model->realDataItems(rank);
+    endResetModel();
+
+    updateSubscriptions();
 }
 
 void RealDataTreeModel::refreshAfterModelChange()
@@ -57,7 +57,7 @@ void RealDataTreeModel::refreshAfterModelChange()
         }
     }
 
-    updateSubsriptions();
+    updateSubscriptions();
 }
 
 void RealDataTreeModel::clear()
@@ -66,7 +66,7 @@ void RealDataTreeModel::clear()
     m_items[0].clear();
     m_items[1].clear();
     endResetModel();
-    updateSubsriptions();
+    updateSubscriptions();
 }
 
 void RealDataTreeModel::removeItem(RealDataItem* item)
@@ -108,7 +108,7 @@ RealDataItem* RealDataTreeModel::insertDataItem(int rank)
     beginInsertRows(indexOfHeadline(rank), rowOfItem, rowOfItem);
     m_items[rank - 1] = m_model->realDataItems(rank);
     endInsertRows();
-    updateSubsriptions();
+    updateSubscriptions();
     return newItem;
 }
 
@@ -310,7 +310,7 @@ bool RealDataTreeModel::isHeadline(const QModelIndex& index) const
     return index.internalPointer() == nullptr;
 }
 
-void RealDataTreeModel::updateSubsriptions()
+void RealDataTreeModel::updateSubscriptions()
 {
     for (auto item : m_items[0])
         connect(
diff --git a/GUI/Views/ImportDataWidgets/RealDataTreeModel.h b/GUI/View/Import/RealDataTreeModel.h
similarity index 88%
rename from GUI/Views/ImportDataWidgets/RealDataTreeModel.h
rename to GUI/View/Import/RealDataTreeModel.h
index 529b504618158b3c77f5a2601038592bddbe0d27..160c5f347d2d3c0c6bc483a3ce1d38e01d5dc5d5 100644
--- a/GUI/Views/ImportDataWidgets/RealDataTreeModel.h
+++ b/GUI/View/Import/RealDataTreeModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ImportDataWidgets/RealDataTreeModel.h
+//! @file      GUI/View/Import/RealDataTreeModel.h
 //! @brief     Defines class RealDataTreeModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATATREEMODEL_H
-#define BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATATREEMODEL_H
+#ifndef BORNAGAIN_GUI_VIEW_IMPORT_REALDATATREEMODEL_H
+#define BORNAGAIN_GUI_VIEW_IMPORT_REALDATATREEMODEL_H
 
 #include <QAbstractItemModel>
 #include <QSet>
@@ -53,7 +53,7 @@ public:
     bool isHeadline(const QModelIndex& index) const;
 
 private:
-    void updateSubsriptions();
+    void updateSubscriptions();
     void onContentsProcessed(RealDataItem* item);
     void clear();
 
@@ -63,4 +63,4 @@ private:
     QSet<int> m_visibleRanks;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_IMPORTDATAWIDGETS_REALDATATREEMODEL_H
+#endif // BORNAGAIN_GUI_VIEW_IMPORT_REALDATATREEMODEL_H
diff --git a/GUI/Views/InfoWidgets/CautionSign.cpp b/GUI/View/Info/CautionSign.cpp
similarity index 95%
rename from GUI/Views/InfoWidgets/CautionSign.cpp
rename to GUI/View/Info/CautionSign.cpp
index 4a9999b2069a880c2cdd88ed3d282068698014bb..e892003522aeb41806c4e618aeea8a80d837fa0a 100644
--- a/GUI/Views/InfoWidgets/CautionSign.cpp
+++ b/GUI/View/Info/CautionSign.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/CautionSign.cpp
+//! @file      GUI/View/Info/CautionSign.cpp
 //! @brief     Implements class CautionSign
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InfoWidgets/CautionSign.h"
+#include "GUI/View/Info/CautionSign.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Views/InfoWidgets/CautionSignWidget.h"
+#include "GUI/View/Info/CautionSignWidget.h"
 #include <QAbstractScrollArea>
 #include <QEvent>
 #include <QScrollBar>
diff --git a/GUI/Views/InfoWidgets/CautionSign.h b/GUI/View/Info/CautionSign.h
similarity index 85%
rename from GUI/Views/InfoWidgets/CautionSign.h
rename to GUI/View/Info/CautionSign.h
index 5b73be31729f0002944c877c7bde19650134eee8..e49eec8cca7e0b13bcf3661226abb8bc9c665950 100644
--- a/GUI/Views/InfoWidgets/CautionSign.h
+++ b/GUI/View/Info/CautionSign.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/CautionSign.h
+//! @file      GUI/View/Info/CautionSign.h
 //! @brief     Defines class CautionSign
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INFOWIDGETS_CAUTIONSIGN_H
-#define BORNAGAIN_GUI_VIEWS_INFOWIDGETS_CAUTIONSIGN_H
+#ifndef BORNAGAIN_GUI_VIEW_INFO_CAUTIONSIGN_H
+#define BORNAGAIN_GUI_VIEW_INFO_CAUTIONSIGN_H
 
 #include <QObject>
 
@@ -50,4 +50,4 @@ private:
     bool m_clear_just_had_happened;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INFOWIDGETS_CAUTIONSIGN_H
+#endif // BORNAGAIN_GUI_VIEW_INFO_CAUTIONSIGN_H
diff --git a/GUI/Views/InfoWidgets/CautionSignWidget.cpp b/GUI/View/Info/CautionSignWidget.cpp
similarity index 93%
rename from GUI/Views/InfoWidgets/CautionSignWidget.cpp
rename to GUI/View/Info/CautionSignWidget.cpp
index fdd9db1f746a3d53335d6508d97cc9c615d7d75d..07f3846a5eecbac395332e35355d47d1ce5dc5e4 100644
--- a/GUI/Views/InfoWidgets/CautionSignWidget.cpp
+++ b/GUI/View/Info/CautionSignWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/CautionSignWidget.cpp
+//! @file      GUI/View/Info/CautionSignWidget.cpp
 //! @brief     Implements class CautionSignWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InfoWidgets/CautionSignWidget.h"
+#include "GUI/View/Info/CautionSignWidget.h"
 #include <QMessageBox>
 #include <QPainter>
 #include <QRect>
diff --git a/GUI/Views/InfoWidgets/CautionSignWidget.h b/GUI/View/Info/CautionSignWidget.h
similarity index 83%
rename from GUI/Views/InfoWidgets/CautionSignWidget.h
rename to GUI/View/Info/CautionSignWidget.h
index 11041d17fa5bdc38933bbdf03086f3aea219f504..9dfb18eefbf202694d257dac0a209219898af804 100644
--- a/GUI/Views/InfoWidgets/CautionSignWidget.h
+++ b/GUI/View/Info/CautionSignWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/CautionSignWidget.h
+//! @file      GUI/View/Info/CautionSignWidget.h
 //! @brief     Defines class CautionSignWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INFOWIDGETS_CAUTIONSIGNWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_INFOWIDGETS_CAUTIONSIGNWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_INFO_CAUTIONSIGNWIDGET_H
+#define BORNAGAIN_GUI_VIEW_INFO_CAUTIONSIGNWIDGET_H
 
 #include <QPixmap>
 #include <QString>
@@ -40,4 +40,4 @@ private:
     QString m_caution_message;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INFOWIDGETS_CAUTIONSIGNWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_INFO_CAUTIONSIGNWIDGET_H
diff --git a/GUI/Views/InfoWidgets/ComboSelectorDialog.cpp b/GUI/View/Info/ComboSelectorDialog.cpp
similarity index 96%
rename from GUI/Views/InfoWidgets/ComboSelectorDialog.cpp
rename to GUI/View/Info/ComboSelectorDialog.cpp
index 0716a946394ad1e52b97977b19f95e7aaee4a1a7..38949038e68ece6cc9f6662dc8523536ea4b9f63 100644
--- a/GUI/Views/InfoWidgets/ComboSelectorDialog.cpp
+++ b/GUI/View/Info/ComboSelectorDialog.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/ComboSelectorDialog.cpp
+//! @file      GUI/View/Info/ComboSelectorDialog.cpp
 //! @brief     Implements class ComboSelectorDialog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InfoWidgets/ComboSelectorDialog.h"
-#include <QApplication>
+#include "GUI/View/Info/ComboSelectorDialog.h"
+#include <QApplication> // qApp
 #include <QComboBox>
 #include <QLabel>
 #include <QMessageBox>
diff --git a/GUI/Views/InfoWidgets/ComboSelectorDialog.h b/GUI/View/Info/ComboSelectorDialog.h
similarity index 83%
rename from GUI/Views/InfoWidgets/ComboSelectorDialog.h
rename to GUI/View/Info/ComboSelectorDialog.h
index c3a6d15abce4b57dca2cf55ad54f4a84eb725ff2..5982615649c4283467590e139bc800382caeba16 100644
--- a/GUI/Views/InfoWidgets/ComboSelectorDialog.h
+++ b/GUI/View/Info/ComboSelectorDialog.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/ComboSelectorDialog.h
+//! @file      GUI/View/Info/ComboSelectorDialog.h
 //! @brief     Defines class ComboSelectorDialog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INFOWIDGETS_COMBOSELECTORDIALOG_H
-#define BORNAGAIN_GUI_VIEWS_INFOWIDGETS_COMBOSELECTORDIALOG_H
+#ifndef BORNAGAIN_GUI_VIEW_INFO_COMBOSELECTORDIALOG_H
+#define BORNAGAIN_GUI_VIEW_INFO_COMBOSELECTORDIALOG_H
 
 #include <QDialog>
 #include <QString>
@@ -45,4 +45,4 @@ private:
     QLabel* m_bottomLabel;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INFOWIDGETS_COMBOSELECTORDIALOG_H
+#endif // BORNAGAIN_GUI_VIEW_INFO_COMBOSELECTORDIALOG_H
diff --git a/GUI/Views/InfoWidgets/DetailedMessageBox.cpp b/GUI/View/Info/DetailedMessageBox.cpp
similarity index 96%
rename from GUI/Views/InfoWidgets/DetailedMessageBox.cpp
rename to GUI/View/Info/DetailedMessageBox.cpp
index 03a75b01f4a4e58f5b18d191df24c8fce59e3212..9f189811ce400fe9788fc581d931b9eecffc4114 100644
--- a/GUI/Views/InfoWidgets/DetailedMessageBox.cpp
+++ b/GUI/View/Info/DetailedMessageBox.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/DetailedMessageBox.cpp
+//! @file      GUI/View/Info/DetailedMessageBox.cpp
 //! @brief     Implements class DetailedMessageBox
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InfoWidgets/DetailedMessageBox.h"
+#include "GUI/View/Info/DetailedMessageBox.h"
 #include <QApplication>
 #include <QLabel>
 #include <QMessageBox>
diff --git a/GUI/Views/InfoWidgets/DetailedMessageBox.h b/GUI/View/Info/DetailedMessageBox.h
similarity index 84%
rename from GUI/Views/InfoWidgets/DetailedMessageBox.h
rename to GUI/View/Info/DetailedMessageBox.h
index 7a727be76cdfaad05812a66f715eb259662a6ad2..cc243de9eb96210206c11873f9a4e18aab4d87af 100644
--- a/GUI/Views/InfoWidgets/DetailedMessageBox.h
+++ b/GUI/View/Info/DetailedMessageBox.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/DetailedMessageBox.h
+//! @file      GUI/View/Info/DetailedMessageBox.h
 //! @brief     Defines class DetailedMessageBox
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INFOWIDGETS_DETAILEDMESSAGEBOX_H
-#define BORNAGAIN_GUI_VIEWS_INFOWIDGETS_DETAILEDMESSAGEBOX_H
+#ifndef BORNAGAIN_GUI_VIEW_INFO_DETAILEDMESSAGEBOX_H
+#define BORNAGAIN_GUI_VIEW_INFO_DETAILEDMESSAGEBOX_H
 
 #include <QDialog>
 #include <QString>
@@ -43,4 +43,4 @@ private:
     QTextEdit* m_textEdit;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INFOWIDGETS_DETAILEDMESSAGEBOX_H
+#endif // BORNAGAIN_GUI_VIEW_INFO_DETAILEDMESSAGEBOX_H
diff --git a/GUI/Views/CommonWidgets/GUIHelpers.cpp b/GUI/View/Info/MessageBox.cpp
similarity index 67%
rename from GUI/Views/CommonWidgets/GUIHelpers.cpp
rename to GUI/View/Info/MessageBox.cpp
index f7175c6832ae547ad45073451b39ea7fe4f8defb..1a49e64b2179b7a2bb80b47c69d4f59cf4768cbb 100644
--- a/GUI/Views/CommonWidgets/GUIHelpers.cpp
+++ b/GUI/View/Info/MessageBox.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/GUIHelpers.cpp
+//! @file      GUI/View/Info/MessageBox.cpp
 //! @brief     Implements GUIHelpers functions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,30 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/GUIHelpers.h"
-#include "Fit/Param/RealLimits.h"
-#include "GUI/Models/Error.h"
+#include "GUI/View/Info/MessageBox.h"
 #include <QApplication>
-#include <QDoubleSpinBox>
-#include <QDoubleValidator>
-#include <QFile>
-#include <QLineEdit>
 #include <QMessageBox>
 #include <QPushButton>
-#include <QTextStream>
-#include <QValidator>
-#include <cmath>
 
 namespace GUI::View::Helpers {
 
-//! Single step for QDoubleSpinBox.
-double singleStep(int decimals)
-{
-    // For item with decimals=3 (i.e. 0.001) single step will be 0.1
-    return 1. / std::pow(10., decimals - 1);
-}
-
-
 void information(QWidget* parent, const QString& title, const QString& text,
                  const QString& detailedText)
 {
@@ -102,41 +85,4 @@ bool okToDelete(QWidget* parent, const QString& title, const QString& text,
     return messageBox->clickedButton() == deleteButton;
 }
 
-QString readTextFile(const QString& fileName)
-{
-    QFile file(fileName);
-    if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
-        throw Error("PyImportAssistant::readFile() -> Error. Can't read file '" + fileName + "'");
-    QTextStream in(&file);
-    return in.readAll();
-}
-
-void configScientificDoubleEdit(QLineEdit* edit, const RealLimits& limits)
-{
-    auto validator = new QDoubleValidator(0.0, 1e+200, 1000, edit);
-    validator->setNotation(QDoubleValidator::ScientificNotation);
-
-    const double minimum =
-        limits.hasLowerLimit() ? std::max(limits.lowerLimit(), -1e+200) : -1e+200;
-    const double maximum =
-        limits.hasUpperLimit() ? std::min(limits.upperLimit(), +1e+200) : +1e+200;
-    validator->setRange(minimum, maximum, 1000);
-
-    edit->setValidator(validator);
-}
-
-void configSpinbox(QDoubleSpinBox* spinBox, int decimals, const RealLimits& limits)
-{
-    spinBox->setMaximum(std::numeric_limits<double>::max());
-    spinBox->setMinimum(std::numeric_limits<double>::lowest());
-
-    if (limits.hasLowerLimit())
-        spinBox->setMinimum(limits.lowerLimit());
-    if (limits.hasUpperLimit())
-        spinBox->setMaximum(static_cast<int>(limits.upperLimit()));
-
-    spinBox->setDecimals(decimals);
-    spinBox->setSingleStep(singleStep(decimals));
-}
-
 } // namespace GUI::View::Helpers
diff --git a/GUI/Views/CommonWidgets/GUIHelpers.h b/GUI/View/Info/MessageBox.h
similarity index 74%
rename from GUI/Views/CommonWidgets/GUIHelpers.h
rename to GUI/View/Info/MessageBox.h
index 6d663ccd0665d1ee78c2520eb3965342c6cd3786..a44b02b0893147e138aea55e2807301ade3726e0 100644
--- a/GUI/Views/CommonWidgets/GUIHelpers.h
+++ b/GUI/View/Info/MessageBox.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/GUIHelpers.h
+//! @file      GUI/View/Info/MessageBox.h
 //! @brief     Defines class GUIHelpers functions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_GUIHELPERS_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_GUIHELPERS_H
+#ifndef BORNAGAIN_GUI_VIEW_INFO_MESSAGEBOX_H
+#define BORNAGAIN_GUI_VIEW_INFO_MESSAGEBOX_H
 
 #include <QWidget>
 
@@ -36,13 +36,6 @@ bool question(QWidget* parent, const QString& title, const QString& text,
 bool okToDelete(QWidget* parent, const QString& title, const QString& text,
                 const QString& detailedText = "");
 
-QString readTextFile(const QString& fileName);
-
-void configScientificDoubleEdit(QLineEdit* edit, const RealLimits& limits);
-
-void configSpinbox(QDoubleSpinBox* spinBox, int decimals, const RealLimits& limits);
-
-
 } // namespace GUI::View::Helpers
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_GUIHELPERS_H
+#endif // BORNAGAIN_GUI_VIEW_INFO_MESSAGEBOX_H
diff --git a/GUI/Views/InfoWidgets/OverlayLabelController.cpp b/GUI/View/Info/OverlayLabelController.cpp
similarity index 91%
rename from GUI/Views/InfoWidgets/OverlayLabelController.cpp
rename to GUI/View/Info/OverlayLabelController.cpp
index 834ccccabd051d775b214e5bb4344581563b8b32..e8a076ef2334fcbf737bcf06c39393236cbaa8e9 100644
--- a/GUI/Views/InfoWidgets/OverlayLabelController.cpp
+++ b/GUI/View/Info/OverlayLabelController.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/OverlayLabelController.cpp
+//! @file      GUI/View/Info/OverlayLabelController.cpp
 //! @brief     Implements class OverlayLabelController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InfoWidgets/OverlayLabelController.h"
+#include "GUI/View/Info/OverlayLabelController.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Views/InfoWidgets/OverlayLabelWidget.h"
+#include "GUI/View/Info/OverlayLabelWidget.h"
 #include <QAbstractScrollArea>
 #include <QEvent>
 #include <QRect>
diff --git a/GUI/Views/InfoWidgets/OverlayLabelController.h b/GUI/View/Info/OverlayLabelController.h
similarity index 82%
rename from GUI/Views/InfoWidgets/OverlayLabelController.h
rename to GUI/View/Info/OverlayLabelController.h
index effc2871c19889274a21c636089674be4ea9bea0..dbf724f6044dc487b6913fd7b11fc7944518a1aa 100644
--- a/GUI/Views/InfoWidgets/OverlayLabelController.h
+++ b/GUI/View/Info/OverlayLabelController.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/OverlayLabelController.h
+//! @file      GUI/View/Info/OverlayLabelController.h
 //! @brief     Defines class OverlayLabelController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INFOWIDGETS_OVERLAYLABELCONTROLLER_H
-#define BORNAGAIN_GUI_VIEWS_INFOWIDGETS_OVERLAYLABELCONTROLLER_H
+#ifndef BORNAGAIN_GUI_VIEW_INFO_OVERLAYLABELCONTROLLER_H
+#define BORNAGAIN_GUI_VIEW_INFO_OVERLAYLABELCONTROLLER_H
 
 #include <QObject>
 #include <QString>
@@ -46,4 +46,4 @@ private:
     QString m_text;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INFOWIDGETS_OVERLAYLABELCONTROLLER_H
+#endif // BORNAGAIN_GUI_VIEW_INFO_OVERLAYLABELCONTROLLER_H
diff --git a/GUI/Views/InfoWidgets/OverlayLabelWidget.cpp b/GUI/View/Info/OverlayLabelWidget.cpp
similarity index 84%
rename from GUI/Views/InfoWidgets/OverlayLabelWidget.cpp
rename to GUI/View/Info/OverlayLabelWidget.cpp
index 8ae83b8bb3b8fb5bb83c5a2839fde87d53f211e4..997c876c4d58b590636d6cb6835c0bc0a81a2e7b 100644
--- a/GUI/Views/InfoWidgets/OverlayLabelWidget.cpp
+++ b/GUI/View/Info/OverlayLabelWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/OverlayLabelWidget.cpp
+//! @file      GUI/View/Info/OverlayLabelWidget.cpp
 //! @brief     Implements class OverlayLabelWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InfoWidgets/OverlayLabelWidget.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
+#include "GUI/View/Info/OverlayLabelWidget.h"
+#include "GUI/View/Tool/DesignerHelper.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QColor>
 #include <QFont>
 #include <QPainter>
@@ -43,7 +43,7 @@ void OverlayLabelWidget::paintEvent(QPaintEvent* event)
     QFont serifFont("Monospace", DesignerHelper::getSectionFontSize(), QFont::Normal, true);
     painter.setFont(serifFont);
     //    painter.drawRect(m_bounding_rect);
-    auto margin = GUI::Utils::Style::SizeOfLetterM().width();
+    auto margin = GUI::Util::Style::SizeOfLetterM().width();
     painter.drawText(m_bounding_rect.marginsRemoved(QMargins(margin, margin, margin, margin)),
                      Qt::AlignCenter, m_text);
 }
diff --git a/GUI/Views/InfoWidgets/OverlayLabelWidget.h b/GUI/View/Info/OverlayLabelWidget.h
similarity index 82%
rename from GUI/Views/InfoWidgets/OverlayLabelWidget.h
rename to GUI/View/Info/OverlayLabelWidget.h
index 587fe950414e549b8e3824f5ef5bb5351beb1b57..9f77888d117555a5c38f7484f23a4ed5431fb37e 100644
--- a/GUI/Views/InfoWidgets/OverlayLabelWidget.h
+++ b/GUI/View/Info/OverlayLabelWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/OverlayLabelWidget.h
+//! @file      GUI/View/Info/OverlayLabelWidget.h
 //! @brief     Defines class OverlayLabelWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INFOWIDGETS_OVERLAYLABELWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_INFOWIDGETS_OVERLAYLABELWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_INFO_OVERLAYLABELWIDGET_H
+#define BORNAGAIN_GUI_VIEW_INFO_OVERLAYLABELWIDGET_H
 
 #include <QRect>
 #include <QString>
@@ -40,4 +40,4 @@ private:
     QRect m_bounding_rect;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INFOWIDGETS_OVERLAYLABELWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_INFO_OVERLAYLABELWIDGET_H
diff --git a/GUI/Views/InfoWidgets/ProjectLoadProblemDialog.cpp b/GUI/View/Info/ProjectLoadProblemDialog.cpp
similarity index 92%
rename from GUI/Views/InfoWidgets/ProjectLoadProblemDialog.cpp
rename to GUI/View/Info/ProjectLoadProblemDialog.cpp
index fbfbb1997c6da3fed22838f7977da2f6701ad27f..01b2f1bfd2e88a4dc62a3045442a99ef0ae695bc 100644
--- a/GUI/Views/InfoWidgets/ProjectLoadProblemDialog.cpp
+++ b/GUI/View/Info/ProjectLoadProblemDialog.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/ProjectLoadProblemDialog.cpp
+//! @file      GUI/View/Info/ProjectLoadProblemDialog.cpp
 //! @brief     Implements class ProjectLoadProblemDialog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InfoWidgets/ProjectLoadProblemDialog.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/View/Info/ProjectLoadProblemDialog.h"
+#include "GUI/Util/Path.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 #include <QBoxLayout>
 #include <QGridLayout>
 #include <QLabel>
@@ -118,13 +118,13 @@ QLayout* ProjectLoadProblemDialog::buttonLayout()
 //! Returns explanations what went wrong.
 QString ProjectLoadProblemDialog::explanationText() const
 {
-    if (m_projectDocumentVersion != GUI::Helpers::getBornAgainVersionString()) {
+    if (m_projectDocumentVersion != GUI::Util::Path::getBornAgainVersionString()) {
         return QString(
                    "Given project was created using BornAgain version %1 "
                    " which is different from version %2 you are currently using. "
                    "At the moment we provide only limited support for import from older versions.")
             .arg(m_projectDocumentVersion)
-            .arg(GUI::Helpers::getBornAgainVersionString());
+            .arg(GUI::Util::Path::getBornAgainVersionString());
     }
 
     return QString("Given project was created using BornAgain version %1 "
diff --git a/GUI/Views/InfoWidgets/ProjectLoadProblemDialog.h b/GUI/View/Info/ProjectLoadProblemDialog.h
similarity index 80%
rename from GUI/Views/InfoWidgets/ProjectLoadProblemDialog.h
rename to GUI/View/Info/ProjectLoadProblemDialog.h
index a9bb1b874249ed7dba0a1ab92b286ea9eaaabd1b..872954a8d58e572ed64ed58f0405f1bccf24b0b4 100644
--- a/GUI/Views/InfoWidgets/ProjectLoadProblemDialog.h
+++ b/GUI/View/Info/ProjectLoadProblemDialog.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/ProjectLoadProblemDialog.h
+//! @file      GUI/View/Info/ProjectLoadProblemDialog.h
 //! @brief     Defines class ProjectLoadProblemDialog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INFOWIDGETS_PROJECTLOADPROBLEMDIALOG_H
-#define BORNAGAIN_GUI_VIEWS_INFOWIDGETS_PROJECTLOADPROBLEMDIALOG_H
+#ifndef BORNAGAIN_GUI_VIEW_INFO_PROJECTLOADPROBLEMDIALOG_H
+#define BORNAGAIN_GUI_VIEW_INFO_PROJECTLOADPROBLEMDIALOG_H
 
 #include <QDialog>
 #include <QString>
@@ -34,4 +34,4 @@ private:
     QString m_projectDocumentVersion;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INFOWIDGETS_PROJECTLOADPROBLEMDIALOG_H
+#endif // BORNAGAIN_GUI_VIEW_INFO_PROJECTLOADPROBLEMDIALOG_H
diff --git a/GUI/Views/InfoWidgets/PythonSyntaxHighlighter.cpp b/GUI/View/Info/PythonSyntaxHighlighter.cpp
similarity index 98%
rename from GUI/Views/InfoWidgets/PythonSyntaxHighlighter.cpp
rename to GUI/View/Info/PythonSyntaxHighlighter.cpp
index ae82d0938c054534201974a17c59dbe7193003cd..4dcffe7c602190e1d1da9065cb358020891ea360 100644
--- a/GUI/Views/InfoWidgets/PythonSyntaxHighlighter.cpp
+++ b/GUI/View/Info/PythonSyntaxHighlighter.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/PythonSyntaxHighlighter.cpp
+//! @file      GUI/View/Info/PythonSyntaxHighlighter.cpp
 //! @brief     Defines class PythonSyntaxHighlighter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -35,7 +35,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#include "GUI/Views/InfoWidgets/PythonSyntaxHighlighter.h"
+#include "GUI/View/Info/PythonSyntaxHighlighter.h"
 
 PythonSyntaxHighlighter::PythonSyntaxHighlighter(QTextDocument* parent) : QSyntaxHighlighter(parent)
 {
diff --git a/GUI/Views/InfoWidgets/PythonSyntaxHighlighter.h b/GUI/View/Info/PythonSyntaxHighlighter.h
similarity index 92%
rename from GUI/Views/InfoWidgets/PythonSyntaxHighlighter.h
rename to GUI/View/Info/PythonSyntaxHighlighter.h
index 17c44f5459c3aef4a417522b4348a7c86190caf8..8abd496affdcae3211193d678d68ccd19538b9e0 100644
--- a/GUI/Views/InfoWidgets/PythonSyntaxHighlighter.h
+++ b/GUI/View/Info/PythonSyntaxHighlighter.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InfoWidgets/PythonSyntaxHighlighter.h
+//! @file      GUI/View/Info/PythonSyntaxHighlighter.h
 //! @brief     Defines class PythonSyntaxHighlighter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -35,8 +35,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OU
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
 
-#ifndef BORNAGAIN_GUI_VIEWS_INFOWIDGETS_PYTHONSYNTAXHIGHLIGHTER_H
-#define BORNAGAIN_GUI_VIEWS_INFOWIDGETS_PYTHONSYNTAXHIGHLIGHTER_H
+#ifndef BORNAGAIN_GUI_VIEW_INFO_PYTHONSYNTAXHIGHLIGHTER_H
+#define BORNAGAIN_GUI_VIEW_INFO_PYTHONSYNTAXHIGHLIGHTER_H
 
 #include <QSyntaxHighlighter>
 
@@ -86,4 +86,4 @@ private:
     QRegExp triDoubleQuote;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INFOWIDGETS_PYTHONSYNTAXHIGHLIGHTER_H
+#endif // BORNAGAIN_GUI_VIEW_INFO_PYTHONSYNTAXHIGHLIGHTER_H
diff --git a/GUI/Views/InstrumentWidgets/DepthProbeInstrumentEditor.cpp b/GUI/View/Instrument/DepthProbeInstrumentEditor.cpp
similarity index 72%
rename from GUI/Views/InstrumentWidgets/DepthProbeInstrumentEditor.cpp
rename to GUI/View/Instrument/DepthProbeInstrumentEditor.cpp
index dda604feea54b0499e8d79b73d754e62a8a3913b..c861c7b96f124c80821711f91f7bc1adc5440354 100644
--- a/GUI/Views/InstrumentWidgets/DepthProbeInstrumentEditor.cpp
+++ b/GUI/View/Instrument/DepthProbeInstrumentEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DepthProbeInstrumentEditor.cpp
+//! @file      GUI/View/Instrument/DepthProbeInstrumentEditor.cpp
 //! @brief     Implements class DepthProbeInstrumentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/DepthProbeInstrumentEditor.h"
-#include "GUI/Models/BeamWavelengthItem.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/InstrumentWidgets/DistributionEditor.h"
-#include "GUI/Views/InstrumentWidgets/InclinationAnglesEditor.h"
-#include "GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.h"
-#include "GUI/Views/InstrumentWidgets/SphericalAxisEditor.h"
+#include "GUI/View/Instrument/DepthProbeInstrumentEditor.h"
+#include "GUI/Model/Instrument/BeamWavelengthItem.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/View/Instrument/Detail/CreateDetails.h"
+#include "GUI/View/Instrument/DistributionEditor.h"
+#include "GUI/View/Instrument/InclinationAnglesEditor.h"
+#include "GUI/View/Instrument/PolarizationAnalysisEditor.h"
+#include "GUI/View/Instrument/SphericalAxisEditor.h"
 
 #include <QGridLayout>
 #include <QVBoxLayout>
@@ -38,8 +38,8 @@ DepthProbeInstrumentEditor::DepthProbeInstrumentEditor(QWidget* parent, Qt::Wind
     MeanConfig wave_cfg{boost::numeric::interval<double>(std::numeric_limits<double>::min(),
                                                          std::numeric_limits<double>::max()),
                         4, true};
-    m_wavelengthEditor =
-        new DistributionEditor("Wavelength [nm]", wave_cfg, Distributions::Symmetric, this);
+    m_wavelengthEditor = new DistributionEditor("Wavelength [nm]", wave_cfg,
+                                                GUI::ID::Distributions::Symmetric, this);
     grid->addWidget(m_wavelengthEditor, 1, 0);
 
     m_inclinationEditor = new InclinationAnglesEditor(this);
@@ -48,10 +48,10 @@ DepthProbeInstrumentEditor::DepthProbeInstrumentEditor(QWidget* parent, Qt::Wind
     m_depthAxisEditor = new SphericalAxisEditor("Depth axis [nm]", this);
     grid->addWidget(m_depthAxisEditor, 1, 2);
 
-    layout->addWidget(GUI::Utils::Style::createDetailsWidget(grid, "Parameters"));
+    layout->addWidget(GUI::Detail::createDetailsWidget(grid, "Parameters"));
 
     m_polpairAnalysisEditor = new PolarizationAnalysisEditor(this);
-    layout->addWidget(GUI::Utils::Style::createDetailsWidget(
+    layout->addWidget(GUI::Detail::createDetailsWidget(
         m_polpairAnalysisEditor, "Polarization analysis", /*expanded*/ false));
 
     layout->addStretch();
diff --git a/GUI/Views/InstrumentWidgets/DepthProbeInstrumentEditor.h b/GUI/View/Instrument/DepthProbeInstrumentEditor.h
similarity index 79%
rename from GUI/Views/InstrumentWidgets/DepthProbeInstrumentEditor.h
rename to GUI/View/Instrument/DepthProbeInstrumentEditor.h
index a22938d4af10183f0b583fe860b6de5cef8a77e5..d91e7784ad30bd77398f436db8e517bfee7dbdf5 100644
--- a/GUI/Views/InstrumentWidgets/DepthProbeInstrumentEditor.h
+++ b/GUI/View/Instrument/DepthProbeInstrumentEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DepthProbeInstrumentEditor.h
+//! @file      GUI/View/Instrument/DepthProbeInstrumentEditor.h
 //! @brief     Defines class DepthProbeInstrumentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DEPTHPROBEINSTRUMENTEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DEPTHPROBEINSTRUMENTEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_DEPTHPROBEINSTRUMENTEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_DEPTHPROBEINSTRUMENTEDITOR_H
 
 #include <QWidget>
 
@@ -37,4 +37,4 @@ private:
     PolarizationAnalysisEditor* m_polpairAnalysisEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DEPTHPROBEINSTRUMENTEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_DEPTHPROBEINSTRUMENTEDITOR_H
diff --git a/GUI/View/Instrument/Detail/CreateDetails.cpp b/GUI/View/Instrument/Detail/CreateDetails.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..2eba37413fa37299ce89155d1ce8f79e43c854f9
--- /dev/null
+++ b/GUI/View/Instrument/Detail/CreateDetails.cpp
@@ -0,0 +1,45 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/View/Instrument/Detail/CreateDetails.cpp
+//! @brief     Defines GUI::Detail namespace
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2018
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#include "GUI/View/Instrument/Detail/CreateDetails.h"
+#include "GUI/View/Instrument/Detail/detailswidget.h"
+
+namespace {
+
+GUI::FromQt::DetailsWidget* createEmptyDetailsWidget(const QString& name, bool expanded)
+{
+    auto result = new GUI::FromQt::DetailsWidget;
+    result->setSummaryText(name);
+    result->setSummaryFontBold(true);
+    if (expanded)
+        result->setState(GUI::FromQt::DetailsWidget::Expanded);
+    return result;
+}
+
+} // namespace
+
+
+QWidget* GUI::Detail::createDetailsWidget(QWidget* content, const QString& name, bool expanded)
+{
+    auto result = createEmptyDetailsWidget(name, expanded);
+    result->setWidget(content);
+    return result;
+}
+
+QWidget* GUI::Detail::createDetailsWidget(QLayout* layout, const QString& name, bool expanded)
+{
+    auto placeholder = new QWidget();
+    placeholder->setLayout(layout);
+    return createDetailsWidget(placeholder, name, expanded);
+}
diff --git a/GUI/View/Instrument/Detail/CreateDetails.h b/GUI/View/Instrument/Detail/CreateDetails.h
new file mode 100644
index 0000000000000000000000000000000000000000..ca23e34d6f83cb0abdd7a91cf9d6db43d04bbcb5
--- /dev/null
+++ b/GUI/View/Instrument/Detail/CreateDetails.h
@@ -0,0 +1,34 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/View/Instrument/Detail/CreateDetails.h
+//! @brief     Defines GUI::StyleUtils namespace
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2018
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_DETAIL_CREATEDETAILS_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_DETAIL_CREATEDETAILS_H
+
+#include <QString>
+
+class QWidget;
+class QLayout;
+class QWidget;
+
+namespace GUI::Detail {
+
+//! Creates details widget holding user content inside.
+QWidget* createDetailsWidget(QWidget* content, const QString& name, bool expanded = true);
+
+//! Creates details widget holding user layout inside.
+QWidget* createDetailsWidget(QLayout* content, const QString& name, bool expanded = true);
+
+} // namespace GUI::Detail
+
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_DETAIL_CREATEDETAILS_H
diff --git a/GUI/Views/CommonWidgets/detailsbutton.cpp b/GUI/View/Instrument/Detail/detailsbutton.cpp
similarity index 95%
rename from GUI/Views/CommonWidgets/detailsbutton.cpp
rename to GUI/View/Instrument/Detail/detailsbutton.cpp
index 4848448d8769e4c82e1384ed1984b661507ea164..012cf13d86060df304f4ae2f5ca13b38663f101b 100644
--- a/GUI/Views/CommonWidgets/detailsbutton.cpp
+++ b/GUI/View/Instrument/Detail/detailsbutton.cpp
@@ -23,11 +23,10 @@
 **
 ****************************************************************************/
 
-#include "GUI/Views/CommonWidgets/detailsbutton.h"
-#include "GUI/utils/hostosinfo.h"
+#include "GUI/View/Instrument/Detail/detailsbutton.h"
+#include "GUI/Util/OSInfo.h"
 
 #include <QGraphicsOpacityEffect>
-#include <QGuiApplication>
 #include <QPaintEvent>
 #include <QPainter>
 #include <QPropertyAnimation>
@@ -38,7 +37,7 @@ const bool FlatProjectsMode(false);
 const QColor DetailsButtonBackgroundColorHover("#eff0f1");
 } // namespace
 
-namespace GUI::Utils {
+namespace GUI::FromQt {
 
 FadingWidget::FadingWidget(QWidget* parent)
     : FadingPanel(parent), m_opacityEffect(new QGraphicsOpacityEffect)
@@ -88,7 +87,7 @@ QSize DetailsButton::sizeHint() const
 #else
     const int w = fontMetrics().width(text()) + 32;
 #endif
-    if (GUI::Utils::OS::HostOsInfo::isMacHost())
+    if (GUI::Util::OS::HostOsInfo::isMacHost())
         return QSize(w, 34);
     return QSize(w, 22);
 }
@@ -121,7 +120,7 @@ void DetailsButton::paintEvent(QPaintEvent* e)
     QPainter p(this);
 
     // draw hover animation
-    if (!GUI::Utils::OS::HostOsInfo::isMacHost() && !isDown() && m_fader > 0) {
+    if (!GUI::Util::OS::HostOsInfo::isMacHost() && !isDown() && m_fader > 0) {
         QColor c = DetailsButtonBackgroundColorHover;
         c.setAlpha(int(m_fader * c.alpha()));
 
@@ -210,4 +209,4 @@ QPixmap DetailsButton::cacheRendering(const QSize& size, bool checked)
     return pixmap;
 }
 
-} // namespace GUI::Utils
+} // namespace GUI::FromQt
diff --git a/GUI/Views/CommonWidgets/detailsbutton.h b/GUI/View/Instrument/Detail/detailsbutton.h
similarity index 90%
rename from GUI/Views/CommonWidgets/detailsbutton.h
rename to GUI/View/Instrument/Detail/detailsbutton.h
index df43e7c65f2f7eba047656a9791027a9819b13b1..34e79d081f7bfd7e6506cb6e2b6ba5e8ab7ac338 100644
--- a/GUI/Views/CommonWidgets/detailsbutton.h
+++ b/GUI/View/Instrument/Detail/detailsbutton.h
@@ -23,14 +23,14 @@
 **
 ****************************************************************************/
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DETAILSBUTTON_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DETAILSBUTTON_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_DETAIL_DETAILSBUTTON_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_DETAIL_DETAILSBUTTON_H
 
 #include <QAbstractButton>
 
 class QGraphicsOpacityEffect;
 
-namespace GUI::Utils {
+namespace GUI::FromQt {
 
 class FadingPanel : public QWidget {
     Q_OBJECT
@@ -79,6 +79,6 @@ private:
     float m_fader;
 };
 
-} // namespace GUI::Utils
+} // namespace GUI::FromQt
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DETAILSBUTTON_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_DETAIL_DETAILSBUTTON_H
diff --git a/GUI/Views/CommonWidgets/detailswidget.cpp b/GUI/View/Instrument/Detail/detailswidget.cpp
similarity index 97%
rename from GUI/Views/CommonWidgets/detailswidget.cpp
rename to GUI/View/Instrument/Detail/detailswidget.cpp
index 0edab9bcd15efd486022ae881739291a38ff34c7..ae2c83a5d1407f24c2f3028dd6ee59841f9f92ca 100644
--- a/GUI/Views/CommonWidgets/detailswidget.cpp
+++ b/GUI/View/Instrument/Detail/detailswidget.cpp
@@ -23,9 +23,9 @@
 **
 ****************************************************************************/
 
-#include "GUI/Views/CommonWidgets/detailswidget.h"
-#include "GUI/Views/CommonWidgets/detailsbutton.h"
-#include "GUI/utils/hostosinfo.h"
+#include "GUI/View/Instrument/Detail/detailswidget.h"
+#include "GUI/Util/OSInfo.h"
+#include "GUI/View/Instrument/Detail/detailsbutton.h"
 
 #include <QApplication>
 #include <QCheckBox>
@@ -36,7 +36,7 @@
 #include <QStyle>
 #include <qglobal.h>
 /*!
-    \class GUI::Utils::DetailsWidget
+    \class GUI::Util::DetailsWidget
 
     \brief The DetailsWidget class implements a button to expand a \e Details
     area.
@@ -59,7 +59,7 @@ namespace {
 const bool FlatProjectsMode(false);
 }
 
-namespace GUI::Utils {
+namespace GUI::FromQt {
 
 const int MARGIN = 8;
 
@@ -201,7 +201,7 @@ void DetailsWidgetPrivate::changeHoverState(bool hovered)
 {
     if (!m_toolWidget)
         return;
-    if (GUI::Utils::OS::HostOsInfo::isMacHost())
+    if (GUI::Util::OS::HostOsInfo::isMacHost())
         m_toolWidget->setOpacity(hovered ? 1.0 : 0);
     else
         m_toolWidget->fadeTo(hovered ? 1.0 : 0);
@@ -393,7 +393,7 @@ void DetailsWidget::setToolWidget(FadingPanel* widget)
     d->m_toolWidget->adjustSize();
     d->m_grid->addWidget(d->m_toolWidget, 0, 1, 1, 1, Qt::AlignRight);
 
-    if (GUI::Utils::OS::HostOsInfo::isMacHost())
+    if (GUI::Util::OS::HostOsInfo::isMacHost())
         d->m_toolWidget->setOpacity(1.0);
     d->changeHoverState(d->m_hovered);
 }
@@ -403,4 +403,4 @@ QWidget* DetailsWidget::toolWidget() const
     return d->m_toolWidget;
 }
 
-} // namespace GUI::Utils
+} // namespace GUI::FromQt
diff --git a/GUI/Views/CommonWidgets/detailswidget.h b/GUI/View/Instrument/Detail/detailswidget.h
similarity index 92%
rename from GUI/Views/CommonWidgets/detailswidget.h
rename to GUI/View/Instrument/Detail/detailswidget.h
index 59dbf118da4d3da24a3e48a53d8a82b56ee900ee..6ed40e3ebabc122c8a20d661c4ef863da7ff7b59 100644
--- a/GUI/Views/CommonWidgets/detailswidget.h
+++ b/GUI/View/Instrument/Detail/detailswidget.h
@@ -23,12 +23,12 @@
 **
 ****************************************************************************/
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DETAILSWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DETAILSWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_DETAIL_DETAILSWIDGET_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_DETAIL_DETAILSWIDGET_H
 
 #include <QWidget>
 
-namespace GUI::Utils {
+namespace GUI::FromQt {
 
 class DetailsWidgetPrivate;
 class FadingPanel;
@@ -93,6 +93,6 @@ private:
     DetailsWidgetPrivate* d;
 };
 
-} // namespace GUI::Utils
+} // namespace GUI::FromQt
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DETAILSWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_DETAIL_DETAILSWIDGET_H
diff --git a/GUI/Views/InstrumentWidgets/DetectorAlignmentEditor.cpp b/GUI/View/Instrument/DetectorAlignmentEditor.cpp
similarity index 98%
rename from GUI/Views/InstrumentWidgets/DetectorAlignmentEditor.cpp
rename to GUI/View/Instrument/DetectorAlignmentEditor.cpp
index 20a609549cafc9d6cd6ba5d3f54047042170e4bc..9fa4461be64ef406d66d962644250b51ff2c43e8 100644
--- a/GUI/Views/InstrumentWidgets/DetectorAlignmentEditor.cpp
+++ b/GUI/View/Instrument/DetectorAlignmentEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DetectorAlignmentEditor.cpp
+//! @file      GUI/View/Instrument/DetectorAlignmentEditor.cpp
 //! @brief     Implements class DetectorAlignmentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/DetectorAlignmentEditor.h"
-#include "GUI/Models/RectangularDetectorItem.h"
-#include "GUI/Views/InstrumentWidgets/VectorEditor.h"
+#include "GUI/View/Instrument/DetectorAlignmentEditor.h"
+#include "GUI/Model/Instrument/RectangularDetectorItem.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/View/Instrument/VectorEditor.h"
 
 #include <QComboBox>
 #include <QDoubleSpinBox>
diff --git a/GUI/Views/InstrumentWidgets/DetectorAlignmentEditor.h b/GUI/View/Instrument/DetectorAlignmentEditor.h
similarity index 81%
rename from GUI/Views/InstrumentWidgets/DetectorAlignmentEditor.h
rename to GUI/View/Instrument/DetectorAlignmentEditor.h
index 705e933a45a7e70d3e5bd3ce71ddceee73d48e81..33d65937e69a6aa7666bcc7286e29f32dbb63b83 100644
--- a/GUI/Views/InstrumentWidgets/DetectorAlignmentEditor.h
+++ b/GUI/View/Instrument/DetectorAlignmentEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DetectorAlignmentEditor.h
+//! @file      GUI/View/Instrument/DetectorAlignmentEditor.h
 //! @brief     A widget for editing the alignment of a detector
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DETECTORALIGNMENTEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DETECTORALIGNMENTEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_DETECTORALIGNMENTEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_DETECTORALIGNMENTEDITOR_H
 
 #include <QWidget>
 
@@ -45,4 +45,4 @@ private:
     RectangularDetectorItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DETECTORALIGNMENTEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_DETECTORALIGNMENTEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/DetectorEditor.cpp b/GUI/View/Instrument/DetectorEditor.cpp
similarity index 88%
rename from GUI/Views/InstrumentWidgets/DetectorEditor.cpp
rename to GUI/View/Instrument/DetectorEditor.cpp
index 0961269b0cbcc8a63d4de9942591b592d51158d0..913d4f1dd538650e3c73ef290da25ace4f81da84 100644
--- a/GUI/Views/InstrumentWidgets/DetectorEditor.cpp
+++ b/GUI/View/Instrument/DetectorEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DetectorEditor.cpp
+//! @file      GUI/View/Instrument/DetectorEditor.cpp
 //! @brief     Implements class DetectorEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/DetectorEditor.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/RectangularDetectorItem.h"
-#include "GUI/Models/SphericalDetectorItem.h"
-#include "GUI/Views/InstrumentWidgets/RectangularDetectorEditor.h"
-#include "GUI/Views/InstrumentWidgets/SphericalDetectorEditor.h"
+#include "GUI/View/Instrument/DetectorEditor.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/RectangularDetectorItem.h"
+#include "GUI/Model/Instrument/SphericalDetectorItem.h"
+#include "GUI/View/Instrument/RectangularDetectorEditor.h"
+#include "GUI/View/Instrument/SphericalDetectorEditor.h"
 
 #include <QComboBox>
 #include <QFormLayout>
diff --git a/GUI/Views/InstrumentWidgets/DetectorEditor.h b/GUI/View/Instrument/DetectorEditor.h
similarity index 84%
rename from GUI/Views/InstrumentWidgets/DetectorEditor.h
rename to GUI/View/Instrument/DetectorEditor.h
index 73ec84d9989f89a1514ceec0facb20e37a31697b..6be54c3f89631a88055150828a92852c81a4b31d 100644
--- a/GUI/Views/InstrumentWidgets/DetectorEditor.h
+++ b/GUI/View/Instrument/DetectorEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DetectorEditor.h
+//! @file      GUI/View/Instrument/DetectorEditor.h
 //! @brief     Defines class DetectorEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DETECTOREDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DETECTOREDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_DETECTOREDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_DETECTOREDITOR_H
 
 #include <QWidget>
 
@@ -46,4 +46,4 @@ private:
     Instrument2DItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DETECTOREDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_DETECTOREDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/DistributionEditor.cpp b/GUI/View/Instrument/DistributionEditor.cpp
similarity index 93%
rename from GUI/Views/InstrumentWidgets/DistributionEditor.cpp
rename to GUI/View/Instrument/DistributionEditor.cpp
index e5de99e7da4bb8aa5ba1a7ff738d99c1c475c349..dd27a782915213e147d7b80c647676785f5da5cd 100644
--- a/GUI/Views/InstrumentWidgets/DistributionEditor.cpp
+++ b/GUI/View/Instrument/DistributionEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DistributionEditor.cpp
+//! @file      GUI/View/Instrument/DistributionEditor.cpp
 //! @brief     Implements classes DistributionSelector and DistributionEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/DistributionEditor.h"
-#include "GUI/Models/DistributionItems.h"
-#include "GUI/Models/ItemWithDistribution.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/InstrumentWidgets/DistributionForms.h"
-#include "GUI/Views/InstrumentWidgets/EditDistributionDialog.h"
-#include "GUI/Views/PropertyEditor/GroupInfoBox.h"
+#include "GUI/View/Instrument/DistributionEditor.h"
+#include "GUI/Model/Group/DistributionItems.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Model/Types/ItemWithDistribution.h"
+#include "GUI/View/Instrument/DistributionForms.h"
+#include "GUI/View/Instrument/EditDistributionDialog.h"
+#include "GUI/View/PropertyEditor/GroupInfoBox.h"
 
 #include <QComboBox>
 #include <QFormLayout>
@@ -129,7 +129,7 @@ void assign(const ItemWithDistribution* src, ItemWithDistribution* dst, const bo
 //--------------------------------------------------------------------------------------------------
 
 DistributionSelector::DistributionSelector(const std::optional<MeanConfig>& mean_config,
-                                           Distributions distributions, QWidget* parent,
+                                           GUI::ID::Distributions distributions, QWidget* parent,
                                            Qt::WindowFlags f)
     : QWidget(parent, f), m_item(nullptr), m_meanConfig(mean_config), m_distributions(distributions)
 {
@@ -149,7 +149,7 @@ DistributionSelector::DistributionSelector(const std::optional<MeanConfig>& mean
     m_stack->addWidget(cosform);
     m_forms.emplace(DistributionCosineItem::M_TYPE, cosform);
 
-    if (m_distributions == Distributions::All) {
+    if (m_distributions == GUI::ID::Distributions::All) {
         m_combo->addItem("Gate", DistributionGateItem::M_TYPE);
         GateDistributionForm* gateform = new GateDistributionForm(this);
         connect(gateform, &GateDistributionForm::distributionChanged, this,
@@ -165,7 +165,7 @@ DistributionSelector::DistributionSelector(const std::optional<MeanConfig>& mean
     m_stack->addWidget(gaussform);
     m_forms.emplace(DistributionGaussianItem::M_TYPE, gaussform);
 
-    if (m_distributions == Distributions::All) {
+    if (m_distributions == GUI::ID::Distributions::All) {
         m_combo->addItem("Log normal", DistributionLogNormalItem::M_TYPE);
         LogNormalDistributionForm* lognormform = new LogNormalDistributionForm(this);
         connect(lognormform, &LogNormalDistributionForm::distributionChanged, this,
@@ -188,7 +188,7 @@ DistributionSelector::DistributionSelector(const std::optional<MeanConfig>& mean
     m_stack->addWidget(noneform);
     m_forms.emplace(DistributionNoneItem::M_TYPE, noneform);
 
-    if (m_distributions == Distributions::All) {
+    if (m_distributions == GUI::ID::Distributions::All) {
         m_combo->addItem("Trapezoid", DistributionTrapezoidItem::M_TYPE);
         TrapezoidDistributionForm* trapezoidform = new TrapezoidDistributionForm(this);
         connect(trapezoidform, &TrapezoidDistributionForm::distributionChanged, this,
@@ -217,7 +217,7 @@ const std::optional<MeanConfig>& DistributionSelector::meanConfig() const
     return m_meanConfig;
 }
 
-Distributions DistributionSelector::distributions() const
+GUI::ID::Distributions DistributionSelector::distributions() const
 {
     return m_distributions;
 }
@@ -262,7 +262,7 @@ void DistributionSelector::onDistributionSelected(int index)
 
 DistributionEditor::DistributionEditor(const QString& title,
                                        const std::optional<MeanConfig>& mean_config,
-                                       Distributions distributions, QWidget* parent,
+                                       GUI::ID::Distributions distributions, QWidget* parent,
                                        Qt::WindowFlags f)
     : QWidget(parent, f), m_title(title)
 {
diff --git a/GUI/Views/InstrumentWidgets/DistributionEditor.h b/GUI/View/Instrument/DistributionEditor.h
similarity index 81%
rename from GUI/Views/InstrumentWidgets/DistributionEditor.h
rename to GUI/View/Instrument/DistributionEditor.h
index 6e2dab492c897ced449a3e9fe14cc474513318fc..a0a66b2bfffe4e647e4aeb5fbc771f41bf2bfee0 100644
--- a/GUI/Views/InstrumentWidgets/DistributionEditor.h
+++ b/GUI/View/Instrument/DistributionEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DistributionEditor.h
+//! @file      GUI/View/Instrument/DistributionEditor.h
 //! @brief     A widget for selecting a distribution and setting its parameters
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DISTRIBUTIONEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DISTRIBUTIONEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONEDITOR_H
 
+#include "GUI/View/Tool/ID.h"
 #include <QWidget>
 
 class QComboBox;
@@ -35,9 +36,6 @@ struct MeanConfig {
     bool scientific;                        // whether to use a scientific number notation
 };
 
-/// enum used to configure which distributions should be available in the selector
-enum class Distributions { All, Symmetric };
-
 /// Widget for selecting a distribution (combo box) and input of the corresponding values
 /// with respect to the given distribution (e.g. mean and deviation for gauss distribution)
 
@@ -51,12 +49,13 @@ public:
     /// \pre ! mean_config && distributions == Distributions::Symmetric
     ///      (i.e. the combination of all distributions without mean input is currently not
     ///       supported)
-    DistributionSelector(const std::optional<MeanConfig>& mean_config, Distributions distributions,
-                         QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
+    DistributionSelector(const std::optional<MeanConfig>& mean_config,
+                         GUI::ID::Distributions distributions, QWidget* parent = nullptr,
+                         Qt::WindowFlags f = Qt::WindowFlags());
     void setItem(ItemWithDistribution* item);
     ItemWithDistribution* item() const;
     const std::optional<MeanConfig>& meanConfig() const;
-    Distributions distributions() const;
+    GUI::ID::Distributions distributions() const;
     void clearItem();
     void refresh();
 
@@ -72,7 +71,7 @@ private:
     std::map<QString, DistributionForm*> m_forms;
     ItemWithDistribution* m_item;
     std::optional<MeanConfig> m_meanConfig;
-    Distributions m_distributions;
+    GUI::ID::Distributions m_distributions;
 };
 
 
@@ -84,7 +83,7 @@ class DistributionEditor : public QWidget {
 
 public:
     DistributionEditor(const QString& title, const std::optional<MeanConfig>& mean_config,
-                       Distributions distributions, QWidget* parent = nullptr,
+                       GUI::ID::Distributions distributions, QWidget* parent = nullptr,
                        Qt::WindowFlags f = Qt::WindowFlags());
     void setItem(ItemWithDistribution* item);
     void clearItem();
@@ -103,4 +102,4 @@ private:
 /// utility function to show the EditDistributionDialog for a selector
 void showEditDistributionDialog(DistributionSelector* selector, const QString& title);
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DISTRIBUTIONEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/DistributionForms.cpp b/GUI/View/Instrument/DistributionForms.cpp
similarity index 98%
rename from GUI/Views/InstrumentWidgets/DistributionForms.cpp
rename to GUI/View/Instrument/DistributionForms.cpp
index 64c041b28ead746259b2e577c886b7d0805c712c..ba829d23b0c2013adce99b1257c8976604559abf 100644
--- a/GUI/Views/InstrumentWidgets/DistributionForms.cpp
+++ b/GUI/View/Instrument/DistributionForms.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DistributionForms.cpp
+//! @file      GUI/View/Instrument/DistributionForms.cpp
 //! @brief     Implements class InstrumentSelectorWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/DistributionForms.h"
-#include "GUI/Models/DistributionItems.h"
-#include "GUI/Models/ItemWithDistribution.h"
-#include "GUI/Views/CommonWidgets/ScientificSpinBox.h"
-#include "GUI/Views/InstrumentWidgets/DistributionEditor.h"
+#include "GUI/View/Instrument/DistributionForms.h"
+#include "GUI/Model/Group/DistributionItems.h"
+#include "GUI/Model/Types/ItemWithDistribution.h"
+#include "GUI/View/Common/ScientificSpinBox.h"
+#include "GUI/View/Instrument/DistributionEditor.h"
 
 #include <QDoubleSpinBox>
 #include <QFormLayout>
diff --git a/GUI/Views/InstrumentWidgets/DistributionForms.h b/GUI/View/Instrument/DistributionForms.h
similarity index 95%
rename from GUI/Views/InstrumentWidgets/DistributionForms.h
rename to GUI/View/Instrument/DistributionForms.h
index 915d4246c94c7abc4162b5b0ae08cb938b303b30..63aac774f16597f5a872d53a8c0c779cf4b5d936 100644
--- a/GUI/Views/InstrumentWidgets/DistributionForms.h
+++ b/GUI/View/Instrument/DistributionForms.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DistributionForms.h
+//! @file      GUI/View/Instrument/DistributionForms.h
 //! @brief     The forms for the various distributions used by DistributionSelector
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DISTRIBUTIONFORMS_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DISTRIBUTIONFORMS_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONFORMS_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONFORMS_H
 
 #include <QWidget>
 
@@ -195,4 +195,4 @@ private:
     DistributionTrapezoidItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DISTRIBUTIONFORMS_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONFORMS_H
diff --git a/GUI/Views/InstrumentWidgets/DistributionPlot.cpp b/GUI/View/Instrument/DistributionPlot.cpp
similarity index 97%
rename from GUI/Views/InstrumentWidgets/DistributionPlot.cpp
rename to GUI/View/Instrument/DistributionPlot.cpp
index 9036dc2d4f32b83f946fd888f18f598c21a60076..5229d5d84618cc6da3b641dab76800d78aeeacfb 100644
--- a/GUI/Views/InstrumentWidgets/DistributionPlot.cpp
+++ b/GUI/View/Instrument/DistributionPlot.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DistributionPlot.cpp
+//! @file      GUI/View/Instrument/DistributionPlot.cpp
 //! @brief     Implements class DistributionPlot
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/DistributionPlot.h"
-#include "GUI/Models/DistributionItems.h"
-#include "GUI/Models/RealLimitsItems.h"
-#include "GUI/Views/InfoWidgets/CautionSign.h"
+#include "GUI/View/Instrument/DistributionPlot.h"
+#include "GUI/Model/Group/DistributionItems.h"
+#include "GUI/Model/Session/RealLimitsItems.h"
+#include "GUI/View/Info/CautionSign.h"
 #include "Param/Distrib/Distributions.h"
 #include <QLabel>
 #include <QVBoxLayout>
diff --git a/GUI/Views/InstrumentWidgets/DistributionPlot.h b/GUI/View/Instrument/DistributionPlot.h
similarity index 88%
rename from GUI/Views/InstrumentWidgets/DistributionPlot.h
rename to GUI/View/Instrument/DistributionPlot.h
index c44941b912a42fef9409b7de6c34d1314369b980..7bd8ee14a7d87169879709f8d7690c52f3a946d7 100644
--- a/GUI/Views/InstrumentWidgets/DistributionPlot.h
+++ b/GUI/View/Instrument/DistributionPlot.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/DistributionPlot.h
+//! @file      GUI/View/Instrument/DistributionPlot.h
 //! @brief     Defines class DistributionPlot
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DISTRIBUTIONPLOT_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DISTRIBUTIONPLOT_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONPLOT_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONPLOT_H
 
 #include <QWidget>
 #include <qcustomplot.h>
@@ -66,4 +66,4 @@ private:
     CautionSign* m_cautionSign;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_DISTRIBUTIONPLOT_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_DISTRIBUTIONPLOT_H
diff --git a/GUI/Views/InstrumentWidgets/EditDistributionDialog.cpp b/GUI/View/Instrument/EditDistributionDialog.cpp
similarity index 81%
rename from GUI/Views/InstrumentWidgets/EditDistributionDialog.cpp
rename to GUI/View/Instrument/EditDistributionDialog.cpp
index 5a8da654013bdf491a7f66a47c2bd3c7dff2e70e..8b8983b67c05dff6c33752f815b5581ea11b9e8d 100644
--- a/GUI/Views/InstrumentWidgets/EditDistributionDialog.cpp
+++ b/GUI/View/Instrument/EditDistributionDialog.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/EditDistributionDialog.cpp
+//! @file      GUI/View/Instrument/EditDistributionDialog.cpp
 //! @brief     Implements class EditDistributionDialog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/EditDistributionDialog.h"
-#include "GUI/Models/ItemWithDistribution.h"
-#include "GUI/Views/InstrumentWidgets/DistributionEditor.h"
-#include "GUI/Views/InstrumentWidgets/DistributionPlot.h"
+#include "GUI/View/Instrument/EditDistributionDialog.h"
+#include "GUI/Model/Types/ItemWithDistribution.h"
+#include "GUI/View/Instrument/DistributionEditor.h"
+#include "GUI/View/Instrument/DistributionPlot.h"
 
 #include <QDialogButtonBox>
 #include <QSplitter>
@@ -24,8 +24,8 @@
 
 EditDistributionDialog::EditDistributionDialog(ItemWithDistribution* item, const QString& title,
                                                const std::optional<MeanConfig>& mean_config,
-                                               Distributions distributions, QWidget* parent,
-                                               Qt::WindowFlags f)
+                                               GUI::ID::Distributions distributions,
+                                               QWidget* parent, Qt::WindowFlags f)
     : QDialog(parent, f), m_item(item)
 {
     setMinimumSize(256, 256);
diff --git a/GUI/Views/InstrumentWidgets/EditDistributionDialog.h b/GUI/View/Instrument/EditDistributionDialog.h
similarity index 73%
rename from GUI/Views/InstrumentWidgets/EditDistributionDialog.h
rename to GUI/View/Instrument/EditDistributionDialog.h
index e4d6e4954836b75ea0528c9258f13b371fb8073e..a3bbe9e223a87dd831ac45f6a301f4fbdc93e482 100644
--- a/GUI/Views/InstrumentWidgets/EditDistributionDialog.h
+++ b/GUI/View/Instrument/EditDistributionDialog.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/EditDistributionDialog.h
+//! @file      GUI/View/Instrument/EditDistributionDialog.h
 //! @brief     Defines class EditDistributionDialog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,16 +12,17 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_EDITDISTRIBUTIONDIALOG_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_EDITDISTRIBUTIONDIALOG_H
-
-#include "GUI/Views/InstrumentWidgets/DistributionEditor.h"
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_EDITDISTRIBUTIONDIALOG_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_EDITDISTRIBUTIONDIALOG_H
 
+#include "GUI/View/Tool/ID.h"
 #include <QDialog>
+#include <optional>
+
 class DistributionPlot;
 class DistributionSelector;
 class ItemWithDistribution;
-
+struct MeanConfig;
 
 //! The dialog which shows an editor to change parameters of DistributionItem
 class EditDistributionDialog : public QDialog {
@@ -30,7 +31,7 @@ class EditDistributionDialog : public QDialog {
 public:
     EditDistributionDialog(ItemWithDistribution* item, const QString& title,
                            const std::optional<MeanConfig>& mean_config,
-                           Distributions distributions, QWidget* parent = nullptr,
+                           GUI::ID::Distributions distributions, QWidget* parent = nullptr,
                            Qt::WindowFlags f = Qt::WindowFlags());
 
 private slots:
@@ -42,4 +43,4 @@ private:
     ItemWithDistribution* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_EDITDISTRIBUTIONDIALOG_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_EDITDISTRIBUTIONDIALOG_H
diff --git a/GUI/Views/InstrumentWidgets/EnvironmentEditor.cpp b/GUI/View/Instrument/EnvironmentEditor.cpp
similarity index 96%
rename from GUI/Views/InstrumentWidgets/EnvironmentEditor.cpp
rename to GUI/View/Instrument/EnvironmentEditor.cpp
index 3f8fcfdf99e3912e39dbb9a1a4efc7ad27215aa2..7bd3c43e107b020e1e6e8565b69c1519e092c798 100644
--- a/GUI/Views/InstrumentWidgets/EnvironmentEditor.cpp
+++ b/GUI/View/Instrument/EnvironmentEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/EnvironmentEditor.cpp
+//! @file      GUI/View/Instrument/EnvironmentEditor.cpp
 //! @brief     Implements class EnvironmentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/EnvironmentEditor.h"
-#include "GUI/Models/BackgroundItems.h"
-#include "GUI/Models/InstrumentItems.h"
+#include "GUI/View/Instrument/EnvironmentEditor.h"
+#include "GUI/Model/Instrument/BackgroundItems.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
 
 #include <QComboBox>
 #include <QDoubleSpinBox>
diff --git a/GUI/Views/InstrumentWidgets/EnvironmentEditor.h b/GUI/View/Instrument/EnvironmentEditor.h
similarity index 81%
rename from GUI/Views/InstrumentWidgets/EnvironmentEditor.h
rename to GUI/View/Instrument/EnvironmentEditor.h
index a1576fb262bb7dc24112eb7071579f7c8e07ca03..15dd411589746f542efa4ea628ad27591bef3bf9 100644
--- a/GUI/Views/InstrumentWidgets/EnvironmentEditor.h
+++ b/GUI/View/Instrument/EnvironmentEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/EnvironmentEditor.h
+//! @file      GUI/View/Instrument/EnvironmentEditor.h
 //! @brief     Defines class EnvironmentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_ENVIRONMENTEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_ENVIRONMENTEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_ENVIRONMENTEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_ENVIRONMENTEDITOR_H
 
 #include <QWidget>
 
@@ -43,4 +43,4 @@ private:
     InstrumentItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_ENVIRONMENTEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_ENVIRONMENTEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/FootprintCorrectionEditor.cpp b/GUI/View/Instrument/FootprintCorrectionEditor.cpp
similarity index 97%
rename from GUI/Views/InstrumentWidgets/FootprintCorrectionEditor.cpp
rename to GUI/View/Instrument/FootprintCorrectionEditor.cpp
index ac3509a1139828102c79bf156f57ba48e8db4fa9..cc2ec901091d7ad122895b8ca4f3c7be63dbe59c 100644
--- a/GUI/Views/InstrumentWidgets/FootprintCorrectionEditor.cpp
+++ b/GUI/View/Instrument/FootprintCorrectionEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/FootprintCorrectionEditor.cpp
+//! @file      GUI/View/Instrument/FootprintCorrectionEditor.cpp
 //! @brief     Implements class FootprintCorrectionEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/FootprintCorrectionEditor.h"
-#include "GUI/Models/FootprintItems.h"
-#include "GUI/Models/InstrumentItems.h"
+#include "GUI/View/Instrument/FootprintCorrectionEditor.h"
+#include "GUI/Model/Instrument/FootprintItems.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
 
 #include <QComboBox>
 #include <QDoubleSpinBox>
diff --git a/GUI/Views/InstrumentWidgets/FootprintCorrectionEditor.h b/GUI/View/Instrument/FootprintCorrectionEditor.h
similarity index 81%
rename from GUI/Views/InstrumentWidgets/FootprintCorrectionEditor.h
rename to GUI/View/Instrument/FootprintCorrectionEditor.h
index 2a871788db616a1f34e1cf5779b691fcf605a163..e3499177696fc37fdb77d7296c38976cf43cceb6 100644
--- a/GUI/Views/InstrumentWidgets/FootprintCorrectionEditor.h
+++ b/GUI/View/Instrument/FootprintCorrectionEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/FootprintCorrectionEditor.h
+//! @file      GUI/View/Instrument/FootprintCorrectionEditor.h
 //! @brief     Defines class FootprintCorrectionEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_FOOTPRINTCORRECTIONEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_FOOTPRINTCORRECTIONEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_FOOTPRINTCORRECTIONEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_FOOTPRINTCORRECTIONEDITOR_H
 
 #include <QWidget>
 
@@ -46,4 +46,4 @@ private:
     SpecularBeamItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_FOOTPRINTCORRECTIONEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_FOOTPRINTCORRECTIONEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/GISASBeamEditor.cpp b/GUI/View/Instrument/GISASBeamEditor.cpp
similarity index 79%
rename from GUI/Views/InstrumentWidgets/GISASBeamEditor.cpp
rename to GUI/View/Instrument/GISASBeamEditor.cpp
index 9e65e96d11504ad1eb146e292dd39906056ad4d6..559c7c0db8a262bcbf4e2f825eee69a43bd7d2d9 100644
--- a/GUI/Views/InstrumentWidgets/GISASBeamEditor.cpp
+++ b/GUI/View/Instrument/GISASBeamEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/GISASBeamEditor.cpp
+//! @file      GUI/View/Instrument/GISASBeamEditor.cpp
 //! @brief     Implements class GISASBeamEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/GISASBeamEditor.h"
-#include "GUI/Models/BeamAngleItems.h"
-#include "GUI/Models/BeamItems.h"
-#include "GUI/Models/BeamWavelengthItem.h"
-#include "GUI/Views/InstrumentWidgets/DistributionEditor.h"
+#include "GUI/View/Instrument/GISASBeamEditor.h"
+#include "GUI/Model/Instrument/BeamAngleItems.h"
+#include "GUI/Model/Instrument/BeamItems.h"
+#include "GUI/Model/Instrument/BeamWavelengthItem.h"
+#include "GUI/View/Instrument/DistributionEditor.h"
 
 #include <QDoubleValidator>
 #include <QFormLayout>
@@ -46,19 +46,19 @@ GISASBeamEditor::GISASBeamEditor(QWidget* parent, Qt::WindowFlags f)
                                                          std::numeric_limits<double>::max()),
                         4, true};
     m_wavelengthEditor =
-        new DistributionEditor("Wavelength [nm]", wave_cfg, Distributions::All, this);
+        new DistributionEditor("Wavelength [nm]", wave_cfg, GUI::ID::Distributions::All, this);
     grid->addWidget(m_wavelengthEditor, 1, 0);
 
     // valid input range is [0,90]
     MeanConfig incl_cfg{boost::numeric::interval<double>(0.0, 90.0), 3, false};
-    m_inclinationEditor =
-        new DistributionEditor("Inclination angle [deg]", incl_cfg, Distributions::All, this);
+    m_inclinationEditor = new DistributionEditor("Inclination angle [deg]", incl_cfg,
+                                                 GUI::ID::Distributions::All, this);
     grid->addWidget(m_inclinationEditor, 1, 1);
 
     // valid input range is [-90,90]
     MeanConfig azim_cfg{boost::numeric::interval<double>(-90.0, 90.0), 3, false};
-    m_azimuthalEditor =
-        new DistributionEditor("Azimuthal angle [deg]", azim_cfg, Distributions::All, this);
+    m_azimuthalEditor = new DistributionEditor("Azimuthal angle [deg]", azim_cfg,
+                                               GUI::ID::Distributions::All, this);
     grid->addWidget(m_azimuthalEditor, 1, 2);
 }
 
diff --git a/GUI/Views/InstrumentWidgets/GISASBeamEditor.h b/GUI/View/Instrument/GISASBeamEditor.h
similarity index 81%
rename from GUI/Views/InstrumentWidgets/GISASBeamEditor.h
rename to GUI/View/Instrument/GISASBeamEditor.h
index 383d65ab6895afd9423f4a7527dcc4578e0ab6b3..f1902b8ba342e7c5e4f1fe5d1689d0ed88a36683 100644
--- a/GUI/Views/InstrumentWidgets/GISASBeamEditor.h
+++ b/GUI/View/Instrument/GISASBeamEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/GISASBeamEditor.h
+//! @file      GUI/View/Instrument/GISASBeamEditor.h
 //! @brief     Defines class GISASBeamEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_GISASBEAMEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_GISASBEAMEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_GISASBEAMEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_GISASBEAMEDITOR_H
 
 #include <QWidget>
 
@@ -42,4 +42,4 @@ private:
     BeamItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_GISASBEAMEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_GISASBEAMEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/GISASInstrumentEditor.cpp b/GUI/View/Instrument/GISASInstrumentEditor.cpp
similarity index 59%
rename from GUI/Views/InstrumentWidgets/GISASInstrumentEditor.cpp
rename to GUI/View/Instrument/GISASInstrumentEditor.cpp
index fef9c761b63794678a77975902540fc7023c19d6..228ac03c0a8d51b977c3ba3afde4cc0258cdfee3 100644
--- a/GUI/Views/InstrumentWidgets/GISASInstrumentEditor.cpp
+++ b/GUI/View/Instrument/GISASInstrumentEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/GISASInstrumentEditor.cpp
+//! @file      GUI/View/Instrument/GISASInstrumentEditor.cpp
 //! @brief     Implements class GISASInstrumentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/GISASInstrumentEditor.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/InstrumentWidgets/DetectorEditor.h"
-#include "GUI/Views/InstrumentWidgets/EnvironmentEditor.h"
-#include "GUI/Views/InstrumentWidgets/GISASBeamEditor.h"
-#include "GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.h"
+#include "GUI/View/Instrument/GISASInstrumentEditor.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/View/Instrument/Detail/CreateDetails.h"
+#include "GUI/View/Instrument/DetectorEditor.h"
+#include "GUI/View/Instrument/EnvironmentEditor.h"
+#include "GUI/View/Instrument/GISASBeamEditor.h"
+#include "GUI/View/Instrument/PolarizationAnalysisEditor.h"
 
 #include <QVBoxLayout>
 
@@ -28,19 +28,18 @@ GISASInstrumentEditor::GISASInstrumentEditor(QWidget* parent, Qt::WindowFlags f)
     QVBoxLayout* layout = new QVBoxLayout(this);
 
     m_beamEditor = new GISASBeamEditor(this);
-    layout->addWidget(GUI::Utils::Style::createDetailsWidget(m_beamEditor, "Beam parameters"));
+    layout->addWidget(GUI::Detail::createDetailsWidget(m_beamEditor, "Beam parameters"));
 
     m_detectorEditor = new DetectorEditor(this);
-    layout->addWidget(
-        GUI::Utils::Style::createDetailsWidget(m_detectorEditor, "Detector parameters"));
+    layout->addWidget(GUI::Detail::createDetailsWidget(m_detectorEditor, "Detector parameters"));
 
     m_polpairAnalysisEditor = new PolarizationAnalysisEditor(this);
-    layout->addWidget(GUI::Utils::Style::createDetailsWidget(
+    layout->addWidget(GUI::Detail::createDetailsWidget(
         m_polpairAnalysisEditor, "Polarization analysis", /*expanded*/ false));
 
     m_environmentEditor = new EnvironmentEditor(this);
-    layout->addWidget(GUI::Utils::Style::createDetailsWidget(m_environmentEditor, "Environment",
-                                                             /*expanded*/ false));
+    layout->addWidget(GUI::Detail::createDetailsWidget(m_environmentEditor, "Environment",
+                                                       /*expanded*/ false));
 
     layout->addStretch();
 }
diff --git a/GUI/Views/InstrumentWidgets/GISASInstrumentEditor.h b/GUI/View/Instrument/GISASInstrumentEditor.h
similarity index 80%
rename from GUI/Views/InstrumentWidgets/GISASInstrumentEditor.h
rename to GUI/View/Instrument/GISASInstrumentEditor.h
index 7050603366f9cb49a1f0ffa2d110d1b81857e61b..587dd852c4e25de0ee875b727a903a2e8d6c5958 100644
--- a/GUI/Views/InstrumentWidgets/GISASInstrumentEditor.h
+++ b/GUI/View/Instrument/GISASInstrumentEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/GISASInstrumentEditor.h
+//! @file      GUI/View/Instrument/GISASInstrumentEditor.h
 //! @brief     Defines class GISASInstrumentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_GISASINSTRUMENTEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_GISASINSTRUMENTEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_GISASINSTRUMENTEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_GISASINSTRUMENTEDITOR_H
 
 #include <QWidget>
 
@@ -39,4 +39,4 @@ private:
     EnvironmentEditor* m_environmentEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_GISASINSTRUMENTEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_GISASINSTRUMENTEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/InclinationAnglesEditor.cpp b/GUI/View/Instrument/InclinationAnglesEditor.cpp
similarity index 87%
rename from GUI/Views/InstrumentWidgets/InclinationAnglesEditor.cpp
rename to GUI/View/Instrument/InclinationAnglesEditor.cpp
index 80a0edbb3ac588a130d0986479155c0416762559..e660b493d956cc1c742d248080ab19b3387e4f7e 100644
--- a/GUI/Views/InstrumentWidgets/InclinationAnglesEditor.cpp
+++ b/GUI/View/Instrument/InclinationAnglesEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InclinationAnglesEditor.cpp
+//! @file      GUI/View/Instrument/InclinationAnglesEditor.cpp
 //! @brief     Defines class InclinationAnglesEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/InclinationAnglesEditor.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/PointwiseAxisItem.h"
-#include "GUI/Models/SpecularBeamInclinationItem.h"
-#include "GUI/Views/InstrumentWidgets/DistributionEditor.h"
-#include "GUI/Views/InstrumentWidgets/SphericalAxisEditor.h"
-#include "GUI/Views/PropertyEditor/GroupInfoBox.h"
+#include "GUI/View/Instrument/InclinationAnglesEditor.h"
+#include "GUI/Model/Data/PointwiseAxisItem.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Instrument/SpecularBeamInclinationItem.h"
+#include "GUI/View/Instrument/DistributionEditor.h"
+#include "GUI/View/Instrument/SphericalAxisEditor.h"
+#include "GUI/View/PropertyEditor/GroupInfoBox.h"
 
 #include <QComboBox>
 #include <QFormLayout>
@@ -47,7 +47,8 @@ InclinationAnglesEditor::InclinationAnglesEditor(QWidget* parent, Qt::WindowFlag
     connect(gbox, &GroupInfoBox::clicked, this, &InclinationAnglesEditor::showDialog);
     layout->addWidget(gbox);
 
-    m_distributionEditor = new DistributionSelector(std::nullopt, Distributions::Symmetric, gbox);
+    m_distributionEditor =
+        new DistributionSelector(std::nullopt, GUI::ID::Distributions::Symmetric, gbox);
     gform->addRow(m_distributionEditor);
 
     m_typeComboBox = new QComboBox(gbox);
diff --git a/GUI/Views/InstrumentWidgets/InclinationAnglesEditor.h b/GUI/View/Instrument/InclinationAnglesEditor.h
similarity index 82%
rename from GUI/Views/InstrumentWidgets/InclinationAnglesEditor.h
rename to GUI/View/Instrument/InclinationAnglesEditor.h
index 9b829e5b62b8cf32bdee6ce76b281147a142dc0e..22beb9ae4b7037b3a69ae22fc0e56cac748fbbdb 100644
--- a/GUI/Views/InstrumentWidgets/InclinationAnglesEditor.h
+++ b/GUI/View/Instrument/InclinationAnglesEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InclinationAnglesEditor.h
+//! @file      GUI/View/Instrument/InclinationAnglesEditor.h
 //! @brief     Defines class InclinationAnglesEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INCLINATIONANGLESEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INCLINATIONANGLESEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_INCLINATIONANGLESEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_INCLINATIONANGLESEDITOR_H
 
 #include <QWidget>
 
@@ -46,4 +46,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INCLINATIONANGLESEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_INCLINATIONANGLESEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/InstrumentEditor.cpp b/GUI/View/Instrument/InstrumentEditor.cpp
similarity index 91%
rename from GUI/Views/InstrumentWidgets/InstrumentEditor.cpp
rename to GUI/View/Instrument/InstrumentEditor.cpp
index 4bd008392d96190584488afd1adec34f443fc32b..388f1bfd4080243ccc20d0c3787656520fbb1a49 100644
--- a/GUI/Views/InstrumentWidgets/InstrumentEditor.cpp
+++ b/GUI/View/Instrument/InstrumentEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InstrumentEditor.cpp
+//! @file      GUI/View/Instrument/InstrumentEditor.cpp
 //! @brief     Implements class InstrumentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/InstrumentEditor.h"
+#include "GUI/View/Instrument/InstrumentEditor.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Views/InstrumentWidgets/DepthProbeInstrumentEditor.h"
-#include "GUI/Views/InstrumentWidgets/GISASInstrumentEditor.h"
-#include "GUI/Views/InstrumentWidgets/OffSpecularInstrumentEditor.h"
-#include "GUI/Views/InstrumentWidgets/SpecularInstrumentEditor.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/View/Instrument/DepthProbeInstrumentEditor.h"
+#include "GUI/View/Instrument/GISASInstrumentEditor.h"
+#include "GUI/View/Instrument/OffSpecularInstrumentEditor.h"
+#include "GUI/View/Instrument/SpecularInstrumentEditor.h"
 
 #include <QFormLayout>
 #include <QLabel>
diff --git a/GUI/Views/InstrumentWidgets/InstrumentEditor.h b/GUI/View/Instrument/InstrumentEditor.h
similarity index 86%
rename from GUI/Views/InstrumentWidgets/InstrumentEditor.h
rename to GUI/View/Instrument/InstrumentEditor.h
index c60a0857cbd8019d385bb45b49f1e8e8766ce373..9eeae24c92d17710259fd8ab4d2313933d923c06 100644
--- a/GUI/Views/InstrumentWidgets/InstrumentEditor.h
+++ b/GUI/View/Instrument/InstrumentEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InstrumentEditor.h
+//! @file      GUI/View/Instrument/InstrumentEditor.h
 //! @brief     Defines class InstrumentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTEDITOR_H
 
 #include <QWidget>
 
@@ -59,4 +59,4 @@ private:
     InstrumentItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.cpp b/GUI/View/Instrument/InstrumentLibraryEditor.cpp
similarity index 92%
rename from GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.cpp
rename to GUI/View/Instrument/InstrumentLibraryEditor.cpp
index ec6af1bad872129424ac7c7e3a022882980855a3..3a9ac22cbc5c7f4822368b0c8a0ffc05bbb883e1 100644
--- a/GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.cpp
+++ b/GUI/View/Instrument/InstrumentLibraryEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.cpp
+//! @file      GUI/View/Instrument/InstrumentLibraryEditor.cpp
 //! @brief     Implements class InstrumentLibraryEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Views/CommonWidgets/ItemViewOverlayButtons.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/utils/ItemDelegateForHTML.h"
+#include "GUI/View/Instrument/InstrumentLibraryEditor.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/Util/ItemDelegateForHTML.h"
+#include "GUI/View/Common/ItemViewOverlayButtons.h"
+#include "GUI/View/Instrument/Detail/CreateDetails.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include "ui_InstrumentLibraryEditor.h"
 #include <QAction>
 #include <QFormLayout>
@@ -29,7 +30,7 @@
 InstrumentLibraryEditor::InstrumentLibraryEditor(QWidget* parent)
     : QDialog(parent)
     , m_ui(new Ui::InstrumentLibraryEditor)
-    , m_treeModel(new TreeModel(this, baApp->instrumentLibrary().model()))
+    , m_treeModel(new TreeModel(this, gSessionData->instrumentLibrary.model()))
     , m_chosenItem(nullptr)
 {
     m_ui->setupUi(this);
@@ -59,7 +60,7 @@ InstrumentLibraryEditor::InstrumentLibraryEditor(QWidget* parent)
 
     // ensure a current item when widget is shown
     // setCurrentItem(m_treeModel->topMostItem());
-    GUI::Utils::Style::setResizable(this);
+    GUI::Util::Style::setResizable(this);
     baApp->settings().loadWindowSizeAndPos(this);
 }
 
@@ -111,8 +112,8 @@ InstrumentItem* InstrumentLibraryEditor::execChoose()
 void InstrumentLibraryEditor::execAdd(const InstrumentItem& instrumentToAdd)
 {
     const QString& newName =
-        baApp->instrumentLibrary().suggestName(instrumentToAdd.instrumentName());
-    auto addedInstrument = baApp->instrumentLibrary().add(newName, instrumentToAdd);
+        gSessionData->instrumentLibrary.suggestName(instrumentToAdd.instrumentName());
+    auto addedInstrument = gSessionData->instrumentLibrary.add(newName, instrumentToAdd);
 
     setWindowTitle("Instrument Library - Add instrument");
 
diff --git a/GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.h b/GUI/View/Instrument/InstrumentLibraryEditor.h
similarity index 86%
rename from GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.h
rename to GUI/View/Instrument/InstrumentLibraryEditor.h
index d213951386d23e24b0848670c06cf40e2551c56a..072de59a30c85164e0a55f9a0c05d1e18d09c04f 100644
--- a/GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.h
+++ b/GUI/View/Instrument/InstrumentLibraryEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.h
+//! @file      GUI/View/Instrument/InstrumentLibraryEditor.h
 //! @brief     Defines class InstrumentLibraryEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTLIBRARYEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTLIBRARYEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTLIBRARYEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTLIBRARYEDITOR_H
 
-#include "GUI/Models/InstrumentsTreeModel.h"
+#include "GUI/Model/Instrument/InstrumentsTreeModel.h"
 #include <QDialog>
 
 class InstrumentItem;
@@ -71,4 +71,4 @@ private:
     InstrumentItem* m_chosenItem;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTLIBRARYEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTLIBRARYEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.ui b/GUI/View/Instrument/InstrumentLibraryEditor.ui
similarity index 100%
rename from GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.ui
rename to GUI/View/Instrument/InstrumentLibraryEditor.ui
diff --git a/GUI/Views/InstrumentWidgets/InstrumentListModel.cpp b/GUI/View/Instrument/InstrumentListModel.cpp
similarity index 93%
rename from GUI/Views/InstrumentWidgets/InstrumentListModel.cpp
rename to GUI/View/Instrument/InstrumentListModel.cpp
index c152878cba0cd0bf6d47307f6e2244681744d216..32a1752ec0560f01fb88a3c138e0fa74a1321d0a 100644
--- a/GUI/Views/InstrumentWidgets/InstrumentListModel.cpp
+++ b/GUI/View/Instrument/InstrumentListModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InstrumentListModel.cpp
+//! @file      GUI/View/Instrument/InstrumentListModel.cpp
 //! @brief     Implements class InstrumentListModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/InstrumentListModel.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
+#include "GUI/View/Instrument/InstrumentListModel.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
 
 
 //--------------------------------------------------------------------------------------------------
@@ -186,9 +186,10 @@ template <class Instrument> QModelIndex InstrumentListModel::addNewInstrument()
 
 void InstrumentListModel::attachToInstrument(InstrumentItem* instrument)
 {
-    instrument->mapper()->setOnPropertyChange
-        (std::bind(&InstrumentListModel::notifyInstrumentPropertyChange, this, instrument,
-                   std::placeholders::_1), this);
+    instrument->mapper()->setOnPropertyChange(
+        std::bind(&InstrumentListModel::notifyInstrumentPropertyChange, this, instrument,
+                  std::placeholders::_1),
+        this);
 }
 
 void InstrumentListModel::detachFromInstrument(InstrumentItem* instrument)
@@ -203,6 +204,6 @@ void InstrumentListModel::notifyInstrumentPropertyChange(InstrumentItem* instrum
         QVector<InstrumentItem*> instruments = m_instruments->instrumentItems();
         int i = instruments.indexOf(instrument);
         if (i != -1)
-            emit dataChanged(index(i,0),index(i,0));
+            emit dataChanged(index(i, 0), index(i, 0));
     }
 }
diff --git a/GUI/Views/InstrumentWidgets/InstrumentListModel.h b/GUI/View/Instrument/InstrumentListModel.h
similarity index 87%
rename from GUI/Views/InstrumentWidgets/InstrumentListModel.h
rename to GUI/View/Instrument/InstrumentListModel.h
index 182f381bdf5c73b4dcb9236bace09faf82f45148..d299797e1fbf9c9876f69c432c33e980fc662457 100644
--- a/GUI/Views/InstrumentWidgets/InstrumentListModel.h
+++ b/GUI/View/Instrument/InstrumentListModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InstrumentListModel.h
+//! @file      GUI/View/Instrument/InstrumentListModel.h
 //! @brief     Defines class InstrumentListModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTLISTMODEL_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTLISTMODEL_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTLISTMODEL_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTLISTMODEL_H
 
 #include <QAbstractListModel>
 #include <QIcon>
@@ -64,4 +64,4 @@ private:
     QIcon m_depthProbeIcon;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTLISTMODEL_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTLISTMODEL_H
diff --git a/GUI/Views/InstrumentWidgets/InstrumentListView.cpp b/GUI/View/Instrument/InstrumentListView.cpp
similarity index 93%
rename from GUI/Views/InstrumentWidgets/InstrumentListView.cpp
rename to GUI/View/Instrument/InstrumentListView.cpp
index e9c64295323067c25579e8002b1c99e60d8dc700..f9fb2b4bd29308da58587889a197c4a3d05c62d2 100644
--- a/GUI/Views/InstrumentWidgets/InstrumentListView.cpp
+++ b/GUI/View/Instrument/InstrumentListView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InstrumentListView.cpp
+//! @file      GUI/View/Instrument/InstrumentListView.cpp
 //! @brief     Implements class InstrumentListView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/InstrumentListView.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Views/InstrumentWidgets/InstrumentLibraryEditor.h"
-#include "GUI/Views/InstrumentWidgets/InstrumentListModel.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/View/Instrument/InstrumentListView.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/View/Instrument/InstrumentLibraryEditor.h"
+#include "GUI/View/Instrument/InstrumentListModel.h"
 #include <QAction>
 #include <QListView>
 #include <QMessageBox>
@@ -210,7 +209,7 @@ void InstrumentListView::onStoreInLibrary()
     QModelIndex idx = m_listView->selectionModel()->selectedIndexes().front();
     InstrumentItem* instrument = m_model->instrumentForIndex(idx);
 
-    InstrumentLibraryEditor dlg(baWin);
+    InstrumentLibraryEditor dlg(parentWidget());
     dlg.setGisasEnabled(m_document->functionalities().testFlag(ProjectDocument::Gisas));
     dlg.setOffSpecEnabled(m_document->functionalities().testFlag(ProjectDocument::OffSpecular));
     dlg.setSpecularEnabled(m_document->functionalities().testFlag(ProjectDocument::Specular));
@@ -220,13 +219,13 @@ void InstrumentListView::onStoreInLibrary()
 
 void InstrumentListView::onLoadFromLibrary()
 {
-    if (baApp->instrumentLibrary().isEmpty()) {
-        QMessageBox::information(baWin, "Select from library",
+    if (gSessionData->instrumentLibrary.isEmpty()) {
+        QMessageBox::information(parentWidget(), "Select from library",
                                  "The library does not contain instruments so far.");
         return;
     }
 
-    InstrumentLibraryEditor dlg(baWin);
+    InstrumentLibraryEditor dlg(parentWidget());
     dlg.setGisasEnabled(m_document->functionalities().testFlag(ProjectDocument::Gisas));
     dlg.setOffSpecEnabled(m_document->functionalities().testFlag(ProjectDocument::OffSpecular));
     dlg.setSpecularEnabled(m_document->functionalities().testFlag(ProjectDocument::Specular));
diff --git a/GUI/Views/InstrumentWidgets/InstrumentListView.h b/GUI/View/Instrument/InstrumentListView.h
similarity index 88%
rename from GUI/Views/InstrumentWidgets/InstrumentListView.h
rename to GUI/View/Instrument/InstrumentListView.h
index 917c07163e66c37688ffee426ba59c3ea6915d31..31070136fa58bbd932aa59c8dea0d5c8809860d0 100644
--- a/GUI/Views/InstrumentWidgets/InstrumentListView.h
+++ b/GUI/View/Instrument/InstrumentListView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InstrumentListView.h
+//! @file      GUI/View/Instrument/InstrumentListView.h
 //! @brief     Defines class InstrumentListView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTLISTVIEW_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTLISTVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTLISTVIEW_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTLISTVIEW_H
 
 #include <QWidget>
 
@@ -77,4 +77,4 @@ private:
     QAction* m_loadFromLibraryAction;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTLISTVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTLISTVIEW_H
diff --git a/GUI/Views/InstrumentWidgets/InstrumentView.cpp b/GUI/View/Instrument/InstrumentView.cpp
similarity index 80%
rename from GUI/Views/InstrumentWidgets/InstrumentView.cpp
rename to GUI/View/Instrument/InstrumentView.cpp
index ece40599aa1d76f20bd08ae800ec507afba46d43..ec718d8e2c174ba87c7965c900cd87f422ae862a 100644
--- a/GUI/Views/InstrumentWidgets/InstrumentView.cpp
+++ b/GUI/View/Instrument/InstrumentView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InstrumentView.cpp
+//! @file      GUI/View/Instrument/InstrumentView.cpp
 //! @brief     Implements class InstrumentView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/InstrumentView.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Views/CommonWidgets/StyledToolBar.h"
-#include "GUI/Views/InstrumentWidgets/InstrumentEditor.h"
-#include "GUI/Views/InstrumentWidgets/InstrumentListView.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/View/Instrument/InstrumentView.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/View/Common/StyledToolBar.h"
+#include "GUI/View/Instrument/InstrumentEditor.h"
+#include "GUI/View/Instrument/InstrumentListView.h"
 #include <QBoxLayout>
 
 InstrumentView::InstrumentView(QWidget* parent, ProjectDocument* document)
diff --git a/GUI/Views/InstrumentWidgets/InstrumentView.h b/GUI/View/Instrument/InstrumentView.h
similarity index 81%
rename from GUI/Views/InstrumentWidgets/InstrumentView.h
rename to GUI/View/Instrument/InstrumentView.h
index 1aa48e137ecfe6004ea9a4c86ef8045e67de50ff..0fa9f0f89719f2aaf164bd5c3e554a0ff278f436 100644
--- a/GUI/Views/InstrumentWidgets/InstrumentView.h
+++ b/GUI/View/Instrument/InstrumentView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/InstrumentView.h
+//! @file      GUI/View/Instrument/InstrumentView.h
 //! @brief     Defines class InstrumentView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTVIEW_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTVIEW_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTVIEW_H
 
 #include <QWidget>
 
@@ -41,4 +41,4 @@ private:
     ProjectDocument* m_document;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_INSTRUMENTVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_INSTRUMENTVIEW_H
diff --git a/GUI/Views/InstrumentWidgets/OffSpecularBeamEditor.cpp b/GUI/View/Instrument/OffSpecularBeamEditor.cpp
similarity index 82%
rename from GUI/Views/InstrumentWidgets/OffSpecularBeamEditor.cpp
rename to GUI/View/Instrument/OffSpecularBeamEditor.cpp
index be3890377ee9cc447391b77e2d2f9211b003cff0..365922f283f8af20e029d9bfc0c49a777b840076 100644
--- a/GUI/Views/InstrumentWidgets/OffSpecularBeamEditor.cpp
+++ b/GUI/View/Instrument/OffSpecularBeamEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/OffSpecularBeamEditor.cpp
+//! @file      GUI/View/Instrument/OffSpecularBeamEditor.cpp
 //! @brief     Implements class OffSpecularBeamEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/OffSpecularBeamEditor.h"
-#include "GUI/Models/BeamAngleItems.h"
-#include "GUI/Models/BeamWavelengthItem.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Views/InstrumentWidgets/DistributionEditor.h"
-#include "GUI/Views/InstrumentWidgets/SphericalAxisEditor.h"
+#include "GUI/View/Instrument/OffSpecularBeamEditor.h"
+#include "GUI/Model/Instrument/BeamAngleItems.h"
+#include "GUI/Model/Instrument/BeamWavelengthItem.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/View/Instrument/DistributionEditor.h"
+#include "GUI/View/Instrument/SphericalAxisEditor.h"
 
 #include <QDoubleValidator>
 #include <QFormLayout>
@@ -50,7 +50,7 @@ OffSpecularBeamEditor::OffSpecularBeamEditor(QWidget* parent, Qt::WindowFlags f)
                                                          std::numeric_limits<double>::max()),
                         4, true};
     m_wavelengthEditor =
-        new DistributionEditor("Wavelength [nm]", wave_cfg, Distributions::All, this);
+        new DistributionEditor("Wavelength [nm]", wave_cfg, GUI::ID::Distributions::All, this);
     grid->addWidget(m_wavelengthEditor, 1, 0);
 
     m_inclinationEditor = new SphericalAxisEditor("Inclination angle [deg]", this);
@@ -58,8 +58,8 @@ OffSpecularBeamEditor::OffSpecularBeamEditor(QWidget* parent, Qt::WindowFlags f)
 
     // valid input range is [-90,90]
     MeanConfig azim_cfg{boost::numeric::interval<double>(-90.0, 90.0), 3, false};
-    m_azimuthalEditor =
-        new DistributionEditor("Azimuthal angle [deg]", azim_cfg, Distributions::All, this);
+    m_azimuthalEditor = new DistributionEditor("Azimuthal angle [deg]", azim_cfg,
+                                               GUI::ID::Distributions::All, this);
     grid->addWidget(m_azimuthalEditor, 1, 2);
 }
 
diff --git a/GUI/Views/InstrumentWidgets/OffSpecularBeamEditor.h b/GUI/View/Instrument/OffSpecularBeamEditor.h
similarity index 81%
rename from GUI/Views/InstrumentWidgets/OffSpecularBeamEditor.h
rename to GUI/View/Instrument/OffSpecularBeamEditor.h
index 0bccd38ccb7253ee1dcb2bf8e2157ae978613482..57cd7314e4230674dd2bf6e53ec7ec388a762908 100644
--- a/GUI/Views/InstrumentWidgets/OffSpecularBeamEditor.h
+++ b/GUI/View/Instrument/OffSpecularBeamEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/OffSpecularBeamEditor.h
+//! @file      GUI/View/Instrument/OffSpecularBeamEditor.h
 //! @brief     Defines class OffSpecularBeamEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_OFFSPECULARBEAMEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_OFFSPECULARBEAMEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_OFFSPECULARBEAMEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_OFFSPECULARBEAMEDITOR_H
 
 #include <QWidget>
 
@@ -43,4 +43,4 @@ private:
     OffSpecularInstrumentItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_OFFSPECULARBEAMEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_OFFSPECULARBEAMEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/OffSpecularInstrumentEditor.cpp b/GUI/View/Instrument/OffSpecularInstrumentEditor.cpp
similarity index 64%
rename from GUI/Views/InstrumentWidgets/OffSpecularInstrumentEditor.cpp
rename to GUI/View/Instrument/OffSpecularInstrumentEditor.cpp
index c7e5728061e34e5ea4dc8361960ae18d24297e0e..025b9b6b8d271934d992b9bdbfeb3772c86f7690 100644
--- a/GUI/Views/InstrumentWidgets/OffSpecularInstrumentEditor.cpp
+++ b/GUI/View/Instrument/OffSpecularInstrumentEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/OffSpecularInstrumentEditor.cpp
+//! @file      GUI/View/Instrument/OffSpecularInstrumentEditor.cpp
 //! @brief     Implements class OffSpecularInstrumentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/OffSpecularInstrumentEditor.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/InstrumentWidgets/DetectorEditor.h"
-#include "GUI/Views/InstrumentWidgets/OffSpecularBeamEditor.h"
-#include "GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.h"
+#include "GUI/View/Instrument/OffSpecularInstrumentEditor.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/View/Instrument/Detail/CreateDetails.h"
+#include "GUI/View/Instrument/DetectorEditor.h"
+#include "GUI/View/Instrument/OffSpecularBeamEditor.h"
+#include "GUI/View/Instrument/PolarizationAnalysisEditor.h"
 
 #include <QVBoxLayout>
 
@@ -27,14 +27,13 @@ OffSpecularInstrumentEditor::OffSpecularInstrumentEditor(QWidget* parent, Qt::Wi
     QVBoxLayout* layout = new QVBoxLayout(this);
 
     m_beamEditor = new OffSpecularBeamEditor(this);
-    layout->addWidget(GUI::Utils::Style::createDetailsWidget(m_beamEditor, "Beam parameters"));
+    layout->addWidget(GUI::Detail::createDetailsWidget(m_beamEditor, "Beam parameters"));
 
     m_detectorEditor = new DetectorEditor(this);
-    layout->addWidget(
-        GUI::Utils::Style::createDetailsWidget(m_detectorEditor, "Detector parameters"));
+    layout->addWidget(GUI::Detail::createDetailsWidget(m_detectorEditor, "Detector parameters"));
 
     m_polpairAnalysisEditor = new PolarizationAnalysisEditor(this);
-    layout->addWidget(GUI::Utils::Style::createDetailsWidget(
+    layout->addWidget(GUI::Detail::createDetailsWidget(
         m_polpairAnalysisEditor, "Polarization analysis", /*expanded*/ false));
 
     layout->addStretch();
diff --git a/GUI/Views/InstrumentWidgets/OffSpecularInstrumentEditor.h b/GUI/View/Instrument/OffSpecularInstrumentEditor.h
similarity index 78%
rename from GUI/Views/InstrumentWidgets/OffSpecularInstrumentEditor.h
rename to GUI/View/Instrument/OffSpecularInstrumentEditor.h
index 88a3de4663439cf3224e2768ca2b2d4f628c6348..a82d5a340324692bbc12f772fbd3a2a06ff83f46 100644
--- a/GUI/Views/InstrumentWidgets/OffSpecularInstrumentEditor.h
+++ b/GUI/View/Instrument/OffSpecularInstrumentEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/OffSpecularInstrumentEditor.h
+//! @file      GUI/View/Instrument/OffSpecularInstrumentEditor.h
 //! @brief     Defines class OffSpecularInstrumentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_OFFSPECULARINSTRUMENTEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_OFFSPECULARINSTRUMENTEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_OFFSPECULARINSTRUMENTEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_OFFSPECULARINSTRUMENTEDITOR_H
 
 #include <QWidget>
 
@@ -35,4 +35,4 @@ private:
     PolarizationAnalysisEditor* m_polpairAnalysisEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_OFFSPECULARINSTRUMENTEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_OFFSPECULARINSTRUMENTEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.cpp b/GUI/View/Instrument/PolarizationAnalysisEditor.cpp
similarity index 90%
rename from GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.cpp
rename to GUI/View/Instrument/PolarizationAnalysisEditor.cpp
index 986b6298ac7e2339b39bc87b41f67f9f59636f60..ca34e86e745f553006df66887140d862a0b18d21 100644
--- a/GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.cpp
+++ b/GUI/View/Instrument/PolarizationAnalysisEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.cpp
+//! @file      GUI/View/Instrument/PolarizationAnalysisEditor.cpp
 //! @brief     Implements class PolarizationAnalysisEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.h"
-#include "GUI/Models/DetectorItems.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/VectorItem.h"
-#include "GUI/Views/InstrumentWidgets/VectorEditor.h"
+#include "GUI/View/Instrument/PolarizationAnalysisEditor.h"
+#include "GUI/Model/Instrument/DetectorItems.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/View/Instrument/VectorEditor.h"
 
 #include <QCheckBox>
 #include <QDoubleSpinBox>
@@ -135,15 +135,14 @@ PolarizationAnalysisEditor::PolarizationAnalysisEditor(QWidget* parent, Qt::Wind
     QGridLayout* grid = new QGridLayout(m_polarizerAnalyzerWidget);
     grid->setMargin(0);
 
-    m_polarizerEditor =
-        new VectorEditor("Polarizer (Bloch vector)",
-                         "Polarization of the beam, given as the Bloch vector (%1)",
-                         m_polarizerAnalyzerWidget);
+    m_polarizerEditor = new VectorEditor("Polarizer (Bloch vector)",
+                                         "Polarization of the beam, given as the Bloch vector (%1)",
+                                         m_polarizerAnalyzerWidget);
     grid->addWidget(m_polarizerEditor, 0, 0);
 
-    m_analyzerEditor = new VectorEditor("Analyzer orientation",
-                                        "Direction of the polarization analysis (%1)",
-                                        m_polarizerAnalyzerWidget);
+    m_analyzerEditor =
+        new VectorEditor("Analyzer orientation", "Direction of the polarization analysis (%1)",
+                         m_polarizerAnalyzerWidget);
     grid->addWidget(m_analyzerEditor, 0, 1);
 
     m_propertiesEditor = new AnalyzerPropertiesEditor(m_polarizerAnalyzerWidget);
diff --git a/GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.h b/GUI/View/Instrument/PolarizationAnalysisEditor.h
similarity index 81%
rename from GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.h
rename to GUI/View/Instrument/PolarizationAnalysisEditor.h
index 4510699cc44092bda2a44d879614a7c9f98fccd3..1ad2e89fed81bff9c65688b217291be0b31f40e8 100644
--- a/GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.h
+++ b/GUI/View/Instrument/PolarizationAnalysisEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.h
+//! @file      GUI/View/Instrument/PolarizationAnalysisEditor.h
 //! @brief     Defines class PolarizationAnalysisEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_POLARIZATIONANALYSISEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_POLARIZATIONANALYSISEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_POLARIZATIONANALYSISEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_POLARIZATIONANALYSISEDITOR_H
 
 #include <QWidget>
 
@@ -46,4 +46,4 @@ private:
     InstrumentItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_POLARIZATIONANALYSISEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_POLARIZATIONANALYSISEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/RectangularDetectorEditor.cpp b/GUI/View/Instrument/RectangularDetectorEditor.cpp
similarity index 93%
rename from GUI/Views/InstrumentWidgets/RectangularDetectorEditor.cpp
rename to GUI/View/Instrument/RectangularDetectorEditor.cpp
index 76c736cf0ac0f919508667b799368b0ebc69dda0..699f62220cf8af4e84f0d07c9549d509fd30ec07 100644
--- a/GUI/Views/InstrumentWidgets/RectangularDetectorEditor.cpp
+++ b/GUI/View/Instrument/RectangularDetectorEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/RectangularDetectorEditor.cpp
+//! @file      GUI/View/Instrument/RectangularDetectorEditor.cpp
 //! @brief     Implements class RectangularDetectorEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/RectangularDetectorEditor.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/RectangularDetectorItem.h"
-#include "GUI/Models/VectorItem.h"
-#include "GUI/Views/InstrumentWidgets/DetectorAlignmentEditor.h"
-#include "GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.h"
+#include "GUI/View/Instrument/RectangularDetectorEditor.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Instrument/RectangularDetectorItem.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/View/Instrument/DetectorAlignmentEditor.h"
+#include "GUI/View/Instrument/ResolutionFunctionEditor.h"
 
 #include <QDoubleSpinBox>
 #include <QFormLayout>
diff --git a/GUI/Views/InstrumentWidgets/RectangularDetectorEditor.h b/GUI/View/Instrument/RectangularDetectorEditor.h
similarity index 79%
rename from GUI/Views/InstrumentWidgets/RectangularDetectorEditor.h
rename to GUI/View/Instrument/RectangularDetectorEditor.h
index 4e678e7aa118e7da78ed20d14c4d5500390f2ca6..64c931ab0d53302404a7cef787904e1c759223eb 100644
--- a/GUI/Views/InstrumentWidgets/RectangularDetectorEditor.h
+++ b/GUI/View/Instrument/RectangularDetectorEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/RectangularDetectorEditor.h
+//! @file      GUI/View/Instrument/RectangularDetectorEditor.h
 //! @brief     Defines class RectangularDetectorEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_RECTANGULARDETECTOREDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_RECTANGULARDETECTOREDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_RECTANGULARDETECTOREDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_RECTANGULARDETECTOREDITOR_H
 
 #include <QWidget>
 
@@ -36,4 +36,4 @@ private:
     DetectorAlignmentEditor* m_alignmentEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_RECTANGULARDETECTOREDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_RECTANGULARDETECTOREDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.cpp b/GUI/View/Instrument/ResolutionFunctionEditor.cpp
similarity index 96%
rename from GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.cpp
rename to GUI/View/Instrument/ResolutionFunctionEditor.cpp
index 2a8a19da60e0329fcea3ab5035c0703d96520724..0e9fddfd0bb582425cbbcf2acd98643ef9c68926 100644
--- a/GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.cpp
+++ b/GUI/View/Instrument/ResolutionFunctionEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.cpp
+//! @file      GUI/View/Instrument/ResolutionFunctionEditor.cpp
 //! @brief     Implements class ResolutionFunctionEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.h"
-#include "GUI/Models/DetectorItems.h"
-#include "GUI/Models/ResolutionFunctionItems.h"
+#include "GUI/View/Instrument/ResolutionFunctionEditor.h"
+#include "GUI/Model/Instrument/DetectorItems.h"
+#include "GUI/Model/Instrument/ResolutionFunctionItems.h"
 
 #include <QComboBox>
 #include <QDoubleSpinBox>
diff --git a/GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.h b/GUI/View/Instrument/ResolutionFunctionEditor.h
similarity index 82%
rename from GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.h
rename to GUI/View/Instrument/ResolutionFunctionEditor.h
index 2cdc02abe66b4b9084e86a7db51874262193ba28..7dfd8f096458a9a4358a21003fa7bebca3a9387c 100644
--- a/GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.h
+++ b/GUI/View/Instrument/ResolutionFunctionEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.h
+//! @file      GUI/View/Instrument/ResolutionFunctionEditor.h
 //! @brief     A widget for editing the alignment of a detector
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_RESOLUTIONFUNCTIONEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_RESOLUTIONFUNCTIONEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_RESOLUTIONFUNCTIONEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_RESOLUTIONFUNCTIONEDITOR_H
 
 #include <QWidget>
 
@@ -47,4 +47,4 @@ private:
     DetectorItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_RESOLUTIONFUNCTIONEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_RESOLUTIONFUNCTIONEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/SpecularBeamEditor.cpp b/GUI/View/Instrument/SpecularBeamEditor.cpp
similarity index 87%
rename from GUI/Views/InstrumentWidgets/SpecularBeamEditor.cpp
rename to GUI/View/Instrument/SpecularBeamEditor.cpp
index a8d85517177a65ac40c18be7ff285f2201b809a0..490582b413949fc219f6c2c6714687ac1e5853e3 100644
--- a/GUI/Views/InstrumentWidgets/SpecularBeamEditor.cpp
+++ b/GUI/View/Instrument/SpecularBeamEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/SpecularBeamEditor.cpp
+//! @file      GUI/View/Instrument/SpecularBeamEditor.cpp
 //! @brief     Defines class SpecularBeamEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/SpecularBeamEditor.h"
-#include "GUI/Models/BeamItems.h"
-#include "GUI/Models/BeamWavelengthItem.h"
-#include "GUI/Views/InstrumentWidgets/DistributionEditor.h"
-#include "GUI/Views/InstrumentWidgets/FootprintCorrectionEditor.h"
-#include "GUI/Views/InstrumentWidgets/InclinationAnglesEditor.h"
+#include "GUI/View/Instrument/SpecularBeamEditor.h"
+#include "GUI/Model/Instrument/BeamItems.h"
+#include "GUI/Model/Instrument/BeamWavelengthItem.h"
+#include "GUI/View/Instrument/DistributionEditor.h"
+#include "GUI/View/Instrument/FootprintCorrectionEditor.h"
+#include "GUI/View/Instrument/InclinationAnglesEditor.h"
 
 #include <QDoubleValidator>
 #include <QFormLayout>
@@ -57,8 +57,8 @@ SpecularBeamEditor::SpecularBeamEditor(QWidget* parent, Qt::WindowFlags f)
     MeanConfig wave_cfg{boost::numeric::interval<double>(std::numeric_limits<double>::min(),
                                                          std::numeric_limits<double>::max()),
                         4, true};
-    m_wavelengthEditor =
-        new DistributionEditor("Wavelength [nm]", wave_cfg, Distributions::Symmetric, this);
+    m_wavelengthEditor = new DistributionEditor("Wavelength [nm]", wave_cfg,
+                                                GUI::ID::Distributions::Symmetric, this);
     grid->addWidget(m_wavelengthEditor, 1, 0);
 
     m_inclinationEditor = new InclinationAnglesEditor(this);
diff --git a/GUI/Views/InstrumentWidgets/SpecularBeamEditor.h b/GUI/View/Instrument/SpecularBeamEditor.h
similarity index 82%
rename from GUI/Views/InstrumentWidgets/SpecularBeamEditor.h
rename to GUI/View/Instrument/SpecularBeamEditor.h
index 1476033ce9a758462721155438543f540fbaf30b..fe65f28629d14b903cbcad2af4e744516de26f8b 100644
--- a/GUI/Views/InstrumentWidgets/SpecularBeamEditor.h
+++ b/GUI/View/Instrument/SpecularBeamEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/SpecularBeamEditor.h
+//! @file      GUI/View/Instrument/SpecularBeamEditor.h
 //! @brief     Defines class SpecularBeamEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPECULARBEAMEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPECULARBEAMEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_SPECULARBEAMEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_SPECULARBEAMEDITOR_H
 
 #include <QWidget>
 
@@ -44,4 +44,4 @@ private:
     SpecularBeamItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPECULARBEAMEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_SPECULARBEAMEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/SpecularInstrumentEditor.cpp b/GUI/View/Instrument/SpecularInstrumentEditor.cpp
similarity index 62%
rename from GUI/Views/InstrumentWidgets/SpecularInstrumentEditor.cpp
rename to GUI/View/Instrument/SpecularInstrumentEditor.cpp
index 555e5fb0cdb0a9166e1cfdd6659a5978693dd250..1fe9805ab589ed21c65c560e89f4a61cb013bf76 100644
--- a/GUI/Views/InstrumentWidgets/SpecularInstrumentEditor.cpp
+++ b/GUI/View/Instrument/SpecularInstrumentEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/SpecularInstrumentEditor.cpp
+//! @file      GUI/View/Instrument/SpecularInstrumentEditor.cpp
 //! @brief     Implements class SpecularInstrumentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/SpecularInstrumentEditor.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/InstrumentWidgets/EnvironmentEditor.h"
-#include "GUI/Views/InstrumentWidgets/PolarizationAnalysisEditor.h"
-#include "GUI/Views/InstrumentWidgets/SpecularBeamEditor.h"
+#include "GUI/View/Instrument/SpecularInstrumentEditor.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/View/Instrument/Detail/CreateDetails.h"
+#include "GUI/View/Instrument/EnvironmentEditor.h"
+#include "GUI/View/Instrument/PolarizationAnalysisEditor.h"
+#include "GUI/View/Instrument/SpecularBeamEditor.h"
 
 #include <QVBoxLayout>
 
@@ -28,15 +28,15 @@ SpecularInstrumentEditor::SpecularInstrumentEditor(QWidget* parent, Qt::WindowFl
     QVBoxLayout* layout = new QVBoxLayout(this);
 
     m_beamEditor = new SpecularBeamEditor(this);
-    layout->addWidget(GUI::Utils::Style::createDetailsWidget(m_beamEditor, "Beam parameters"));
+    layout->addWidget(GUI::Detail::createDetailsWidget(m_beamEditor, "Beam parameters"));
 
     m_polpairAnalysisEditor = new PolarizationAnalysisEditor(this);
-    layout->addWidget(GUI::Utils::Style::createDetailsWidget(
+    layout->addWidget(GUI::Detail::createDetailsWidget(
         m_polpairAnalysisEditor, "Polarization analysis", /*expanded*/ false));
 
     m_environmentEditor = new EnvironmentEditor(this);
-    layout->addWidget(GUI::Utils::Style::createDetailsWidget(m_environmentEditor, "Environment",
-                                                             /*expanded*/ false));
+    layout->addWidget(GUI::Detail::createDetailsWidget(m_environmentEditor, "Environment",
+                                                       /*expanded*/ false));
 
     layout->addStretch();
 }
diff --git a/GUI/Views/InstrumentWidgets/SpecularInstrumentEditor.h b/GUI/View/Instrument/SpecularInstrumentEditor.h
similarity index 78%
rename from GUI/Views/InstrumentWidgets/SpecularInstrumentEditor.h
rename to GUI/View/Instrument/SpecularInstrumentEditor.h
index b5351cfe0ae557fc46ce03878b16a4d54d871265..fa3f4e12aef6a0caf818432d80c78749fabc3864 100644
--- a/GUI/Views/InstrumentWidgets/SpecularInstrumentEditor.h
+++ b/GUI/View/Instrument/SpecularInstrumentEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/SpecularInstrumentEditor.h
+//! @file      GUI/View/Instrument/SpecularInstrumentEditor.h
 //! @brief     Defines class SpecularInstrumentEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPECULARINSTRUMENTEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPECULARINSTRUMENTEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_SPECULARINSTRUMENTEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_SPECULARINSTRUMENTEDITOR_H
 
 #include <QWidget>
 
@@ -35,4 +35,4 @@ private:
     EnvironmentEditor* m_environmentEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPECULARINSTRUMENTEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_SPECULARINSTRUMENTEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/SphericalAxisEditor.cpp b/GUI/View/Instrument/SphericalAxisEditor.cpp
similarity index 96%
rename from GUI/Views/InstrumentWidgets/SphericalAxisEditor.cpp
rename to GUI/View/Instrument/SphericalAxisEditor.cpp
index 0514751f8b81a05d35ce7238e8911270c205d55a..f790b84d58fe7a994678be03f44d67f4fb319404 100644
--- a/GUI/Views/InstrumentWidgets/SphericalAxisEditor.cpp
+++ b/GUI/View/Instrument/SphericalAxisEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/SphericalAxisEditor.cpp
+//! @file      GUI/View/Instrument/SphericalAxisEditor.cpp
 //! @brief     Implement class SphericalAxisEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/SphericalAxisEditor.h"
-#include "GUI/Models/AxesItems.h"
+#include "GUI/View/Instrument/SphericalAxisEditor.h"
+#include "GUI/Model/Data/AxesItems.h"
 
 #include <QDoubleSpinBox>
 #include <QFormLayout>
diff --git a/GUI/Views/InstrumentWidgets/SphericalAxisEditor.h b/GUI/View/Instrument/SphericalAxisEditor.h
similarity index 86%
rename from GUI/Views/InstrumentWidgets/SphericalAxisEditor.h
rename to GUI/View/Instrument/SphericalAxisEditor.h
index 13b811747557aa1ae2ef02c1b0059155958a6687..3cffb4c32ca8750fb6b3dcb69a2704505ef6c992 100644
--- a/GUI/Views/InstrumentWidgets/SphericalAxisEditor.h
+++ b/GUI/View/Instrument/SphericalAxisEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/SphericalAxisEditor.h
+//! @file      GUI/View/Instrument/SphericalAxisEditor.h
 //! @brief     Defines class SphericalAxisEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPHERICALAXISEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPHERICALAXISEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_SPHERICALAXISEDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_SPHERICALAXISEDITOR_H
 
 #include <QWidget>
 
@@ -62,4 +62,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPHERICALAXISEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_SPHERICALAXISEDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/SphericalDetectorEditor.cpp b/GUI/View/Instrument/SphericalDetectorEditor.cpp
similarity index 86%
rename from GUI/Views/InstrumentWidgets/SphericalDetectorEditor.cpp
rename to GUI/View/Instrument/SphericalDetectorEditor.cpp
index e0967b60f091447fc687457a016af25ae66a3040..366f3c7394ca578092553586d2f561fccd268454 100644
--- a/GUI/Views/InstrumentWidgets/SphericalDetectorEditor.cpp
+++ b/GUI/View/Instrument/SphericalDetectorEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/SphericalDetectorEditor.cpp
+//! @file      GUI/View/Instrument/SphericalDetectorEditor.cpp
 //! @brief     Implement class SphericalDetectorEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/SphericalDetectorEditor.h"
-#include "GUI/Models/SphericalDetectorItem.h"
-#include "GUI/Views/InstrumentWidgets/ResolutionFunctionEditor.h"
-#include "GUI/Views/InstrumentWidgets/SphericalAxisEditor.h"
+#include "GUI/View/Instrument/SphericalDetectorEditor.h"
+#include "GUI/Model/Instrument/SphericalDetectorItem.h"
+#include "GUI/View/Instrument/ResolutionFunctionEditor.h"
+#include "GUI/View/Instrument/SphericalAxisEditor.h"
 
 #include <QGridLayout>
 
diff --git a/GUI/Views/InstrumentWidgets/SphericalDetectorEditor.h b/GUI/View/Instrument/SphericalDetectorEditor.h
similarity index 78%
rename from GUI/Views/InstrumentWidgets/SphericalDetectorEditor.h
rename to GUI/View/Instrument/SphericalDetectorEditor.h
index c07c0e57c8f770f02880f221141586a5c540e05d..415230f8603e242717bef12410a51fed06e9f76b 100644
--- a/GUI/Views/InstrumentWidgets/SphericalDetectorEditor.h
+++ b/GUI/View/Instrument/SphericalDetectorEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/SphericalDetectorEditor.h
+//! @file      GUI/View/Instrument/SphericalDetectorEditor.h
 //! @brief     Defines class SphericalDetectorEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPHERICALDETECTOREDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPHERICALDETECTOREDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_SPHERICALDETECTOREDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_SPHERICALDETECTOREDITOR_H
 
 #include <QWidget>
 
@@ -34,4 +34,4 @@ private:
     ResolutionFunctionEditor* m_resolutionFunctionEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_SPHERICALDETECTOREDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_SPHERICALDETECTOREDITOR_H
diff --git a/GUI/Views/InstrumentWidgets/VectorEditor.cpp b/GUI/View/Instrument/VectorEditor.cpp
similarity index 96%
rename from GUI/Views/InstrumentWidgets/VectorEditor.cpp
rename to GUI/View/Instrument/VectorEditor.cpp
index 59f1f92f2b97595b872e08330796a8a540e6492b..3b5f5fd790fb0e17e272d069a529cc64781f50d7 100644
--- a/GUI/Views/InstrumentWidgets/VectorEditor.cpp
+++ b/GUI/View/Instrument/VectorEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/VectorEditor.cpp
+//! @file      GUI/View/Instrument/VectorEditor.cpp
 //! @brief     Implements class VectorEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/InstrumentWidgets/VectorEditor.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/View/Instrument/VectorEditor.h"
+#include "GUI/Model/Types/VectorItem.h"
 
 #include <QDoubleSpinBox>
 #include <QFormLayout>
diff --git a/GUI/Views/InstrumentWidgets/VectorEditor.h b/GUI/View/Instrument/VectorEditor.h
similarity index 85%
rename from GUI/Views/InstrumentWidgets/VectorEditor.h
rename to GUI/View/Instrument/VectorEditor.h
index 4fef991d195cb43db87ede1df892860724bb70eb..0550b38c2145fdf32b586aeff15ef1e74da39889 100644
--- a/GUI/Views/InstrumentWidgets/VectorEditor.h
+++ b/GUI/View/Instrument/VectorEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/InstrumentWidgets/VectorEditor.h
+//! @file      GUI/View/Instrument/VectorEditor.h
 //! @brief     A widget for editing the coordinates of a vector
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_VECTOREDITOR_H
-#define BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_VECTOREDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_INSTRUMENT_VECTOREDITOR_H
+#define BORNAGAIN_GUI_VIEW_INSTRUMENT_VECTOREDITOR_H
 
 #include <QWidget>
 
@@ -49,4 +49,4 @@ private:
     VectorItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INSTRUMENTWIDGETS_VECTOREDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_INSTRUMENT_VECTOREDITOR_H
diff --git a/GUI/Views/IntensityDataWidgets/ColorMap.cpp b/GUI/View/Intensity/ColorMap.cpp
similarity index 96%
rename from GUI/Views/IntensityDataWidgets/ColorMap.cpp
rename to GUI/View/Intensity/ColorMap.cpp
index 2ee34c692452833c0cd0fd504f3606cce0d09f4d..9dfe0dd4d3d3a5607aed6652f6f0bdd98a67b401 100644
--- a/GUI/Views/IntensityDataWidgets/ColorMap.cpp
+++ b/GUI/View/Intensity/ColorMap.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/ColorMap.cpp
+//! @file      GUI/View/Intensity/ColorMap.cpp
 //! @brief     Implements class ColorMap
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/ColorMap.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Views/CommonWidgets/UpdateTimer.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMapUtils.h"
-#include "GUI/Views/IntensityDataWidgets/PlotEventInfo.h"
-#include "GUI/Views/IntensityDataWidgets/plot_constants.h"
+#include "GUI/View/Intensity/ColorMap.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/View/Intensity/ColorMapUtils.h"
+#include "GUI/View/Intensity/PlotConstants.h"
+#include "GUI/View/Intensity/PlotEventInfo.h"
+#include "GUI/View/Tool/UpdateTimer.h"
 
 namespace {
 const int replot_update_interval = 10;
@@ -236,7 +236,7 @@ void ColorMap::initColorMap()
 
     m_colorBarLayout->addElement(0, 0, m_colorScale);
     m_colorBarLayout->setMinimumSize(colorbar_width_logz, 10);
-    auto base_size = GUI::Utils::Style::SizeOfLetterM(this).width() * 0.5;
+    auto base_size = GUI::Util::Style::SizeOfLetterM(this).width() * 0.5;
     m_colorBarLayout->setMargins(QMargins(base_size, 0, base_size, 0));
 
     m_colorScale->axis()->axisRect()->setMargins(QMargins(0, 0, 0, 0));
diff --git a/GUI/Views/IntensityDataWidgets/ColorMap.h b/GUI/View/Intensity/ColorMap.h
similarity index 91%
rename from GUI/Views/IntensityDataWidgets/ColorMap.h
rename to GUI/View/Intensity/ColorMap.h
index 66a6eeabc210f8b0640247d0b720ff2864535037..1674640bbd37c9138bd1f64704d2bce0837177fa 100644
--- a/GUI/Views/IntensityDataWidgets/ColorMap.h
+++ b/GUI/View/Intensity/ColorMap.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/ColorMap.h
+//! @file      GUI/View/Intensity/ColorMap.h
 //! @brief     Defines class ColorMap
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_COLORMAP_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_COLORMAP_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_COLORMAP_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_COLORMAP_H
 
-#include "GUI/Views/IntensityDataWidgets/ScientificPlot.h"
+#include "GUI/View/Intensity/ScientificPlot.h"
 #include <QMap>
 #include <QPoint>
 #include <memory>
@@ -106,4 +106,4 @@ private:
     bool m_block_update;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_COLORMAP_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_COLORMAP_H
diff --git a/GUI/Views/IntensityDataWidgets/ColorMapCanvas.cpp b/GUI/View/Intensity/ColorMapCanvas.cpp
similarity index 83%
rename from GUI/Views/IntensityDataWidgets/ColorMapCanvas.cpp
rename to GUI/View/Intensity/ColorMapCanvas.cpp
index f57438e51846d37c26d93161bc2f7cf5c6c907d4..cf70c570ffe1e29910e42780da79e8a5d4d53356 100644
--- a/GUI/Views/IntensityDataWidgets/ColorMapCanvas.cpp
+++ b/GUI/View/Intensity/ColorMapCanvas.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/ColorMapCanvas.cpp
+//! @file      GUI/View/Intensity/ColorMapCanvas.cpp
 //! @brief     Declares class ColorMapCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/ColorMapCanvas.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMap.h"
-#include "GUI/Views/IntensityDataWidgets/FontScalingEvent.h"
-#include "GUI/Views/IntensityDataWidgets/PlotStatusLabel.h"
+#include "GUI/View/Intensity/ColorMapCanvas.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/View/Intensity/ColorMap.h"
+#include "GUI/View/Intensity/FontScalingEvent.h"
+#include "GUI/View/Intensity/PlotStatusLabel.h"
 #include <QLabel>
 #include <QVBoxLayout>
 
diff --git a/GUI/Views/IntensityDataWidgets/ColorMapCanvas.h b/GUI/View/Intensity/ColorMapCanvas.h
similarity index 80%
rename from GUI/Views/IntensityDataWidgets/ColorMapCanvas.h
rename to GUI/View/Intensity/ColorMapCanvas.h
index 6ad6eb21233c5bea5dc54b96eb8b01a6ab838148..dab35001d2dc472f8a70eb3080cc29f80b96c834 100644
--- a/GUI/Views/IntensityDataWidgets/ColorMapCanvas.h
+++ b/GUI/View/Intensity/ColorMapCanvas.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/ColorMapCanvas.h
+//! @file      GUI/View/Intensity/ColorMapCanvas.h
 //! @brief     Defines class ColorMapCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_COLORMAPCANVAS_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_COLORMAPCANVAS_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_COLORMAPCANVAS_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_COLORMAPCANVAS_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 
 class ColorMap;
 class FontScalingEvent;
@@ -49,4 +49,4 @@ private:
     PlotStatusLabel* m_statusLabel;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_COLORMAPCANVAS_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_COLORMAPCANVAS_H
diff --git a/GUI/Views/IntensityDataWidgets/ColorMapUtils.cpp b/GUI/View/Intensity/ColorMapUtils.cpp
similarity index 93%
rename from GUI/Views/IntensityDataWidgets/ColorMapUtils.cpp
rename to GUI/View/Intensity/ColorMapUtils.cpp
index 7a325389bfb9dcfca401a7da27ec553364a4d0ad..6f0ba2cf1e466d410cf1c3850160fb0570fb54fd 100644
--- a/GUI/Views/IntensityDataWidgets/ColorMapUtils.cpp
+++ b/GUI/View/Intensity/ColorMapUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/ColorMapUtils.cpp
+//! @file      GUI/View/Intensity/ColorMapUtils.cpp
 //! @brief     Implements ColorMapUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/ColorMapUtils.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
+#include "GUI/View/Intensity/ColorMapUtils.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/Tool/StyleUtils.h"
 
 using gradient_map_t = QMap<QString, QCPColorGradient::GradientPreset>;
 
@@ -50,7 +50,7 @@ QCPRange qcpRange(double xmin, double xmax, int nbins)
 
 QMargins defaultMargins(const QWidget& widget)
 {
-    auto base_size = GUI::Utils::Style::SizeOfLetterM(&widget);
+    auto base_size = GUI::Util::Style::SizeOfLetterM(&widget);
     int left = static_cast<int>(base_size.width() * 6.0);
     int top = static_cast<int>(base_size.height() * 1.5);
     int right = static_cast<int>(base_size.width() * 1.2);
diff --git a/GUI/Views/IntensityDataWidgets/ColorMapUtils.h b/GUI/View/Intensity/ColorMapUtils.h
similarity index 86%
rename from GUI/Views/IntensityDataWidgets/ColorMapUtils.h
rename to GUI/View/Intensity/ColorMapUtils.h
index 8ca39bd6a08752b5ec723d8d717fc06012afe985..d9432d482c11b1e5ff32e08fda3f3233a118e8a0 100644
--- a/GUI/Views/IntensityDataWidgets/ColorMapUtils.h
+++ b/GUI/View/Intensity/ColorMapUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/ColorMapUtils.h
+//! @file      GUI/View/Intensity/ColorMapUtils.h
 //! @brief     Defines ColorMapUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_COLORMAPUTILS_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_COLORMAPUTILS_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_COLORMAPUTILS_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_COLORMAPUTILS_H
 
 #include <QMap>
 #include <QMargins>
@@ -56,4 +56,4 @@ void setDefaultMargins(QCustomPlot* customPlot);
 
 } // namespace GUI::View::ColorMapUtils
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_COLORMAPUTILS_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_COLORMAPUTILS_H
diff --git a/GUI/Views/IntensityDataWidgets/FontScalingEvent.cpp b/GUI/View/Intensity/FontScalingEvent.cpp
similarity index 92%
rename from GUI/Views/IntensityDataWidgets/FontScalingEvent.cpp
rename to GUI/View/Intensity/FontScalingEvent.cpp
index 9d3ab9cf13e4fe177c211d61ff6a8810fab98c57..cbd3fbe4ad8a0a3bac04a6085bfaf506504b965c 100644
--- a/GUI/Views/IntensityDataWidgets/FontScalingEvent.cpp
+++ b/GUI/View/Intensity/FontScalingEvent.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/FontScalingEvent.cpp
+//! @file      GUI/View/Intensity/FontScalingEvent.cpp
 //! @brief     Implements class FontScalingEvent
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/FontScalingEvent.h"
+#include "GUI/View/Intensity/FontScalingEvent.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMap.h"
+#include "GUI/View/Intensity/ColorMap.h"
 #include <QResizeEvent>
 #include <qcustomplot.h>
 
diff --git a/GUI/Views/IntensityDataWidgets/FontScalingEvent.h b/GUI/View/Intensity/FontScalingEvent.h
similarity index 81%
rename from GUI/Views/IntensityDataWidgets/FontScalingEvent.h
rename to GUI/View/Intensity/FontScalingEvent.h
index ed3efd6e76ba1969a70b115f7bf8ffc92a34a625..d3de0e33aa86d791400e2224602353fcb41584b4 100644
--- a/GUI/Views/IntensityDataWidgets/FontScalingEvent.h
+++ b/GUI/View/Intensity/FontScalingEvent.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/FontScalingEvent.h
+//! @file      GUI/View/Intensity/FontScalingEvent.h
 //! @brief     Defines class FontScalingEvent
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_FONTSCALINGEVENT_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_FONTSCALINGEVENT_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_FONTSCALINGEVENT_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_FONTSCALINGEVENT_H
 
 #include <QFont>
 #include <QMap>
@@ -44,4 +44,4 @@ private:
     QMap<QString, QFont> m_fonts;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_FONTSCALINGEVENT_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_FONTSCALINGEVENT_H
diff --git a/GUI/Views/JobWidgets/HistogramPlot.cpp b/GUI/View/Intensity/HistogramPlot.cpp
similarity index 93%
rename from GUI/Views/JobWidgets/HistogramPlot.cpp
rename to GUI/View/Intensity/HistogramPlot.cpp
index 1c1feb07f53bb38bf7593050ec4ba1b86b531848..fdc888e8ae2cafcd55a9a5d25bde944b5d995004 100644
--- a/GUI/Views/JobWidgets/HistogramPlot.cpp
+++ b/GUI/View/Intensity/HistogramPlot.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/HistogramPlot.cpp
+//! @file      GUI/View/Intensity/HistogramPlot.cpp
 //! @brief     Implements class HistogramPlot
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/HistogramPlot.h"
-#include "GUI/Views/IntensityDataWidgets/plot_constants.h"
+#include "GUI/View/Intensity/HistogramPlot.h"
+#include "GUI/View/Intensity/PlotConstants.h"
 
 HistogramPlot::HistogramPlot(QWidget* parent) : QWidget(parent), m_customPlot(new QCustomPlot)
 
@@ -83,7 +83,7 @@ void HistogramPlot::initGraph()
     m_customPlot->graph()->setPen(pen);
     m_customPlot->graph()->setBrush(QBrush(QColor(255 / 4, 160, 50, 150)));
 
-    auto base_size = GUI::Utils::Style::SizeOfLetterM();
+    auto base_size = GUI::Util::Style::SizeOfLetterM();
     auto axisRectangle = m_customPlot->axisRect();
     axisRectangle->setAutoMargins(QCP::msTop | QCP::msBottom);
     axisRectangle->setMargins(QMargins(base_size.width() * 4, base_size.height() * 2,
diff --git a/GUI/Views/JobWidgets/HistogramPlot.h b/GUI/View/Intensity/HistogramPlot.h
similarity index 81%
rename from GUI/Views/JobWidgets/HistogramPlot.h
rename to GUI/View/Intensity/HistogramPlot.h
index 2689bccfb923a3ebe9a533632877b0a73f3660b7..b7eabc2849544f10963b441979610facd26dde45 100644
--- a/GUI/Views/JobWidgets/HistogramPlot.h
+++ b/GUI/View/Intensity/HistogramPlot.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/HistogramPlot.h
+//! @file      GUI/View/Intensity/HistogramPlot.h
 //! @brief     Defines class HistogramPlot
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_HISTOGRAMPLOT_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_HISTOGRAMPLOT_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_HISTOGRAMPLOT_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_HISTOGRAMPLOT_H
 
 #include <QWidget>
 #include <qcustomplot.h>
@@ -35,4 +35,4 @@ private:
     QCustomPlot* m_customPlot;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_HISTOGRAMPLOT_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_HISTOGRAMPLOT_H
diff --git a/GUI/Views/IntensityDataWidgets/IntensityDataCanvas.cpp b/GUI/View/Intensity/IntensityDataCanvas.cpp
similarity index 85%
rename from GUI/Views/IntensityDataWidgets/IntensityDataCanvas.cpp
rename to GUI/View/Intensity/IntensityDataCanvas.cpp
index beda226f989376d69d44d8a436f512f123427e8d..bcb0feda2baacaafd609c32d2739ae8a8f1f8d7f 100644
--- a/GUI/Views/IntensityDataWidgets/IntensityDataCanvas.cpp
+++ b/GUI/View/Intensity/IntensityDataCanvas.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/IntensityDataCanvas.cpp
+//! @file      GUI/View/Intensity/IntensityDataCanvas.cpp
 //! @brief     Implements class IntensityDataCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,16 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/IntensityDataCanvas.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Views/CommonWidgets/GUIHelpers.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMap.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMapCanvas.h"
-#include "GUI/Views/IntensityDataWidgets/SavePlotAssistant.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectmanager.h"
+#include "GUI/View/Intensity/IntensityDataCanvas.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/View/Intensity/ColorMap.h"
+#include "GUI/View/Intensity/ColorMapCanvas.h"
+#include "GUI/View/Intensity/SavePlotAssistant.h"
+#include "GUI/View/Info/MessageBox.h"
 #include <QAction>
 #include <QMouseEvent>
 #include <QSettings>
@@ -90,9 +89,8 @@ void IntensityDataCanvas::onResetViewAction()
 
 void IntensityDataCanvas::onSavePlotAction()
 {
-    QString dirname = ProjectManager::instance()->userExportDir();
-    SavePlotAssistant saveAssistant;
-    saveAssistant.savePlot(dirname, m_colorMap->customPlot(), intensityDataItem()->getOutputData());
+    QString dirname = gSessionData->projectDocument->userExportDir();
+    GUI::Plot::savePlot(dirname, m_colorMap->customPlot(), intensityDataItem()->getOutputData());
 }
 
 void IntensityDataCanvas::onMousePress(QMouseEvent* event)
@@ -119,8 +117,9 @@ void IntensityDataCanvas::rotateData()
         const QString title("Rotate data");
         const QString message("Rotation will break the link between the data and the instrument. "
                               "Detector masks or projections, if they exist, will be removed.");
-        if (!GUI::View::Helpers::question(baWin, title, message, "Do you wish to rotate the data?",
-                                          "Yes, please rotate", "No, cancel data rotation"))
+        if (!GUI::View::Helpers::question(parentWidget(), title, message,
+                                          "Do you wish to rotate the data?", "Yes, please rotate",
+                                          "No, cancel data rotation"))
             return;
     }
 
diff --git a/GUI/Views/IntensityDataWidgets/IntensityDataCanvas.h b/GUI/View/Intensity/IntensityDataCanvas.h
similarity index 82%
rename from GUI/Views/IntensityDataWidgets/IntensityDataCanvas.h
rename to GUI/View/Intensity/IntensityDataCanvas.h
index 0eb3fcde882b9680ef54a894f9614bfd210c5cf4..c299eaf74746f4b90d58af4042e525681135ed36 100644
--- a/GUI/Views/IntensityDataWidgets/IntensityDataCanvas.h
+++ b/GUI/View/Intensity/IntensityDataCanvas.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/IntensityDataCanvas.h
+//! @file      GUI/View/Intensity/IntensityDataCanvas.h
 //! @brief     Defines class IntensityDataCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATACANVAS_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATACANVAS_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATACANVAS_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATACANVAS_H
 
 #include "Device/Data/OutputData.h"
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 #include <memory>
 
 class SessionItem;
@@ -60,4 +60,4 @@ private:
     QAction* m_savePlotAction;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATACANVAS_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATACANVAS_H
diff --git a/GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.cpp b/GUI/View/Intensity/IntensityDataFFTPresenter.cpp
similarity index 89%
rename from GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.cpp
rename to GUI/View/Intensity/IntensityDataFFTPresenter.cpp
index d438708642c3f7f4cd6670a82f83a8cc4a2f623c..69132f091b03a1497c4c166cafb8823d49e9a3ab 100644
--- a/GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.cpp
+++ b/GUI/View/Intensity/IntensityDataFFTPresenter.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.cpp
+//! @file      GUI/View/Intensity/IntensityDataFFTPresenter.cpp
 //! @brief     Defines class IntensityDataFFTPresenter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.h"
+#include "GUI/View/Intensity/IntensityDataFFTPresenter.h"
 #include "Device/Data/DataUtils.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/Error.h"
 #include <QAction>
 #include <QApplication>
 #include <QWidget>
diff --git a/GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.h b/GUI/View/Intensity/IntensityDataFFTPresenter.h
similarity index 81%
rename from GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.h
rename to GUI/View/Intensity/IntensityDataFFTPresenter.h
index 7fabfc77bf335c94c4117dcac8027bb275cc69ee..446ec4a73152b0c9d21c1c722d82a6acbc5b4b47 100644
--- a/GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.h
+++ b/GUI/View/Intensity/IntensityDataFFTPresenter.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.h
+//! @file      GUI/View/Intensity/IntensityDataFFTPresenter.h
 //! @brief     Defines class IntensityDataFFTPresenter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATAFFTPRESENTER_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATAFFTPRESENTER_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATAFFTPRESENTER_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATAFFTPRESENTER_H
 
 #include <QObject>
 
@@ -51,4 +51,4 @@ private:
     bool m_in_fft_mode;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATAFFTPRESENTER_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATAFFTPRESENTER_H
diff --git a/GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.cpp b/GUI/View/Intensity/IntensityDataPropertyWidget.cpp
similarity index 81%
rename from GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.cpp
rename to GUI/View/Intensity/IntensityDataPropertyWidget.cpp
index 2473ba731a827c9d091fc89e4bc8ef18e5037cbd..cf0d75284b3fa99681bcecdaabfdb9b2bba45060 100644
--- a/GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.cpp
+++ b/GUI/View/Intensity/IntensityDataPropertyWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.cpp
+//! @file      GUI/View/Intensity/IntensityDataPropertyWidget.cpp
 //! @brief     Implements class IntensityDataPropertyWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/PropertyEditor/ComponentEditor.h"
+#include "GUI/View/Intensity/IntensityDataPropertyWidget.h"
+#include "GUI/View/PropertyEditor/ComponentEditor.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QAction>
 #include <QVBoxLayout>
 
@@ -43,14 +43,14 @@ IntensityDataPropertyWidget::IntensityDataPropertyWidget(QWidget* parent)
 
 QSize IntensityDataPropertyWidget::sizeHint() const
 {
-    return QSize(GUI::Utils::Style::PropertyPanelWidth() * 1.2,
-                 GUI::Utils::Style::PropertyPanelWidth() * 2);
+    return QSize(GUI::Util::Style::PropertyPanelWidth() * 1.2,
+                 GUI::Util::Style::PropertyPanelWidth() * 2);
 }
 
 QSize IntensityDataPropertyWidget::minimumSizeHint() const
 {
-    return QSize(GUI::Utils::Style::PropertyPanelWidth() * 1.2,
-                 GUI::Utils::Style::PropertyPanelWidth());
+    return QSize(GUI::Util::Style::PropertyPanelWidth() * 1.2,
+                 GUI::Util::Style::PropertyPanelWidth());
 }
 
 QList<QAction*> IntensityDataPropertyWidget::actionList()
diff --git a/GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.h b/GUI/View/Intensity/IntensityDataPropertyWidget.h
similarity index 77%
rename from GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.h
rename to GUI/View/Intensity/IntensityDataPropertyWidget.h
index 8c3a008a509bb156632c48fb40f8ede98f6433bf..43984ad09126c53a43c5e3413039c4af7ed0f33e 100644
--- a/GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.h
+++ b/GUI/View/Intensity/IntensityDataPropertyWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.h
+//! @file      GUI/View/Intensity/IntensityDataPropertyWidget.h
 //! @brief     Defines class IntensityDataPropertyWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATAPROPERTYWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATAPROPERTYWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATAPROPERTYWIDGET_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATAPROPERTYWIDGET_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 
 class IntensityDataItem;
 class ComponentEditor;
@@ -46,4 +46,4 @@ private:
     ComponentEditor* m_componentEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATAPROPERTYWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATAPROPERTYWIDGET_H
diff --git a/GUI/Views/IntensityDataWidgets/IntensityDataWidget.cpp b/GUI/View/Intensity/IntensityDataWidget.cpp
similarity index 87%
rename from GUI/Views/IntensityDataWidgets/IntensityDataWidget.cpp
rename to GUI/View/Intensity/IntensityDataWidget.cpp
index 2ac946254718f728703d05914659959095e68cdb..bb0f817cd0384467795860f6fe585acec91b2567 100644
--- a/GUI/Views/IntensityDataWidgets/IntensityDataWidget.cpp
+++ b/GUI/View/Intensity/IntensityDataWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/IntensityDataWidget.cpp
+//! @file      GUI/View/Intensity/IntensityDataWidget.cpp
 //! @brief     Implements class IntensityDataWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/IntensityDataWidget.h"
-#include "GUI/Models/DataItemUtils.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Views/IntensityDataWidgets/IntensityDataCanvas.h"
-#include "GUI/Views/IntensityDataWidgets/IntensityDataFFTPresenter.h"
-#include "GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.h"
+#include "GUI/View/Intensity/IntensityDataWidget.h"
+#include "GUI/Model/Data/DataItemUtils.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/View/Intensity/IntensityDataCanvas.h"
+#include "GUI/View/Intensity/IntensityDataFFTPresenter.h"
+#include "GUI/View/Intensity/IntensityDataPropertyWidget.h"
 #include <QBoxLayout>
 #include <QMenu>
 
diff --git a/GUI/Views/IntensityDataWidgets/IntensityDataWidget.h b/GUI/View/Intensity/IntensityDataWidget.h
similarity index 80%
rename from GUI/Views/IntensityDataWidgets/IntensityDataWidget.h
rename to GUI/View/Intensity/IntensityDataWidget.h
index ff518635df3f5361d9c53651f506da559e894aa1..c81db3b8ed29902088f802bb42534041e67a2fa1 100644
--- a/GUI/Views/IntensityDataWidgets/IntensityDataWidget.h
+++ b/GUI/View/Intensity/IntensityDataWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/IntensityDataWidget.h
+//! @file      GUI/View/Intensity/IntensityDataWidget.h
 //! @brief     Defines class IntensityDataWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATAWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATAWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATAWIDGET_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATAWIDGET_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 #include <memory>
 
 class SessionItem;
@@ -51,4 +51,4 @@ private:
     IntensityDataFFTPresenter* m_fftPresenter;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_INTENSITYDATAWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_INTENSITYDATAWIDGET_H
diff --git a/GUI/Views/IntensityDataWidgets/Plot1D.cpp b/GUI/View/Intensity/Plot1D.cpp
similarity index 94%
rename from GUI/Views/IntensityDataWidgets/Plot1D.cpp
rename to GUI/View/Intensity/Plot1D.cpp
index 21906401642ea682a6291cbb05258af23795102c..2c18c928607aabe803dbb98d7212f5c3824ae3d7 100644
--- a/GUI/Views/IntensityDataWidgets/Plot1D.cpp
+++ b/GUI/View/Intensity/Plot1D.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/Plot1D.cpp
+//! @file      GUI/View/Intensity/Plot1D.cpp
 //! @brief     Implements class Plot1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,16 +12,16 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/Plot1D.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/Data1DViewItem.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/DataProperties.h"
-#include "GUI/Models/DataPropertyContainer.h"
-#include "GUI/Views/CommonWidgets/UpdateTimer.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMapUtils.h"
-#include "GUI/Views/IntensityDataWidgets/PlotEventInfo.h"
-#include "GUI/Views/IntensityDataWidgets/plot_constants.h"
+#include "GUI/View/Intensity/Plot1D.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/Data1DViewItem.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Data/DataProperties.h"
+#include "GUI/Model/Data/DataPropertyContainer.h"
+#include "GUI/View/Intensity/ColorMapUtils.h"
+#include "GUI/View/Intensity/PlotConstants.h"
+#include "GUI/View/Intensity/PlotEventInfo.h"
+#include "GUI/View/Tool/UpdateTimer.h"
 
 namespace {
 const int replot_update_interval = 10;
diff --git a/GUI/Views/IntensityDataWidgets/Plot1D.h b/GUI/View/Intensity/Plot1D.h
similarity index 92%
rename from GUI/Views/IntensityDataWidgets/Plot1D.h
rename to GUI/View/Intensity/Plot1D.h
index 12d693ea73816888bccf780a1faa1e2f1390a6a1..14790ed6d39b7d5e0ca507d94cc1def283787035 100644
--- a/GUI/Views/IntensityDataWidgets/Plot1D.h
+++ b/GUI/View/Intensity/Plot1D.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/Plot1D.h
+//! @file      GUI/View/Intensity/Plot1D.h
 //! @brief     Defines class Plot1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOT1D_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOT1D_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_PLOT1D_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_PLOT1D_H
 
-#include "GUI/Views/IntensityDataWidgets/ScientificPlot.h"
+#include "GUI/View/Intensity/ScientificPlot.h"
 #include <qcustomplot.h>
 
 class BasicAxisItem;
@@ -112,4 +112,4 @@ private:
     bool m_block_update;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOT1D_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_PLOT1D_H
diff --git a/GUI/Views/IntensityDataWidgets/plot_constants.h b/GUI/View/Intensity/PlotConstants.h
similarity index 61%
rename from GUI/Views/IntensityDataWidgets/plot_constants.h
rename to GUI/View/Intensity/PlotConstants.h
index a7bae1451d701337bbe8a7d46f4bd728aacd6c39..383632f7ff66f30217c8eee2c9efdc1da0ae7f0d 100644
--- a/GUI/Views/IntensityDataWidgets/plot_constants.h
+++ b/GUI/View/Intensity/PlotConstants.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/plot_constants.h
+//! @file      GUI/View/Intensity/PlotConstants.h
 //! @brief     Defines various constants for plotting
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,29 +12,29 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOT_CONSTANTS_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOT_CONSTANTS_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_PLOTCONSTANTS_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_PLOTCONSTANTS_H
 
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QSize>
 
 namespace GUI::Constants {
 
 inline int plot_tick_label_size()
 {
-    return GUI::Utils::Style::SystemPointSize() * 0.9;
+    return GUI::Util::Style::SystemPointSize() * 0.9;
 }
 
 inline int plot_axes_label_size()
 {
-    return GUI::Utils::Style::SystemPointSize();
+    return GUI::Util::Style::SystemPointSize();
 }
 
 inline int plot_colorbar_size()
 {
-    return GUI::Utils::Style::SizeOfLetterM().width();
+    return GUI::Util::Style::SizeOfLetterM().width();
 }
 
 } // namespace GUI::Constants
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOT_CONSTANTS_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_PLOTCONSTANTS_H
diff --git a/GUI/Views/IntensityDataWidgets/PlotEventInfo.cpp b/GUI/View/Intensity/PlotEventInfo.cpp
similarity index 93%
rename from GUI/Views/IntensityDataWidgets/PlotEventInfo.cpp
rename to GUI/View/Intensity/PlotEventInfo.cpp
index 9f760dae3a2391db4b21bd955ac301c60df8bf1f..4a1f8ca8231f946e7c01107200787a4cd7210464 100644
--- a/GUI/Views/IntensityDataWidgets/PlotEventInfo.cpp
+++ b/GUI/View/Intensity/PlotEventInfo.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/PlotEventInfo.cpp
+//! @file      GUI/View/Intensity/PlotEventInfo.cpp
 //! @brief     Implementation of the class PlotEventInfo
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/PlotEventInfo.h"
+#include "GUI/View/Intensity/PlotEventInfo.h"
 #include "Base/Py/PyFmt.h"
 
 PlotEventInfo::PlotEventInfo(PLOT_TYPE type)
diff --git a/GUI/Views/IntensityDataWidgets/PlotEventInfo.h b/GUI/View/Intensity/PlotEventInfo.h
similarity index 84%
rename from GUI/Views/IntensityDataWidgets/PlotEventInfo.h
rename to GUI/View/Intensity/PlotEventInfo.h
index 4b42420038149aa1c58423eb18af0ed51c130796..e441e122f60cff464b31ee3a2b293f511779034b 100644
--- a/GUI/Views/IntensityDataWidgets/PlotEventInfo.h
+++ b/GUI/View/Intensity/PlotEventInfo.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/PlotEventInfo.h
+//! @file      GUI/View/Intensity/PlotEventInfo.h
 //! @brief     Defines the class PlotEventInfo
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOTEVENTINFO_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOTEVENTINFO_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_PLOTEVENTINFO_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_PLOTEVENTINFO_H
 
-#include "GUI/Views/IntensityDataWidgets/ScientificPlot.h"
+#include "GUI/View/Intensity/ScientificPlot.h"
 #include <QString>
 
 class ColorMap;
@@ -60,4 +60,4 @@ private:
     PLOT_TYPE m_info_type;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOTEVENTINFO_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_PLOTEVENTINFO_H
diff --git a/GUI/Views/IntensityDataWidgets/PlotStatusLabel.cpp b/GUI/View/Intensity/PlotStatusLabel.cpp
similarity index 92%
rename from GUI/Views/IntensityDataWidgets/PlotStatusLabel.cpp
rename to GUI/View/Intensity/PlotStatusLabel.cpp
index 5f998a0b009dbe3d478dbc09ae6883f2552f8b72..0b2fda766dd21a13a2d22d239a3d46e2e1d994e1 100644
--- a/GUI/Views/IntensityDataWidgets/PlotStatusLabel.cpp
+++ b/GUI/View/Intensity/PlotStatusLabel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/PlotStatusLabel.cpp
+//! @file      GUI/View/Intensity/PlotStatusLabel.cpp
 //! @brief     Implements class PlotStatusLabel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/PlotStatusLabel.h"
-#include "GUI/Views/IntensityDataWidgets/ScientificPlot.h"
+#include "GUI/View/Intensity/PlotStatusLabel.h"
+#include "GUI/View/Intensity/ScientificPlot.h"
 
 PlotStatusLabel::PlotStatusLabel(ScientificPlot* plot, QWidget* parent) : StatusLabel(parent)
 {
diff --git a/GUI/Views/IntensityDataWidgets/PlotStatusLabel.h b/GUI/View/Intensity/PlotStatusLabel.h
similarity index 82%
rename from GUI/Views/IntensityDataWidgets/PlotStatusLabel.h
rename to GUI/View/Intensity/PlotStatusLabel.h
index 6c9ec51e971289d8aa19ca1e44f9356fdd464286..9f5a02b5f61ad33be7b54f08129c42aa80d064fe 100644
--- a/GUI/Views/IntensityDataWidgets/PlotStatusLabel.h
+++ b/GUI/View/Intensity/PlotStatusLabel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/PlotStatusLabel.h
+//! @file      GUI/View/Intensity/PlotStatusLabel.h
 //! @brief     Defines class PlotStatusLabel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOTSTATUSLABEL_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOTSTATUSLABEL_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_PLOTSTATUSLABEL_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_PLOTSTATUSLABEL_H
 
-#include "GUI/Views/CommonWidgets/StatusLabel.h"
+#include "GUI/View/Intensity/StatusLabel.h"
 #include <QList>
 
 class ScientificPlot;
@@ -50,4 +50,4 @@ private:
     QList<ScientificPlot*> m_plots;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PLOTSTATUSLABEL_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_PLOTSTATUSLABEL_H
diff --git a/GUI/Views/IntensityDataWidgets/PropertyRepeater.cpp b/GUI/View/Intensity/PropertyRepeater.cpp
similarity index 94%
rename from GUI/Views/IntensityDataWidgets/PropertyRepeater.cpp
rename to GUI/View/Intensity/PropertyRepeater.cpp
index fb369d277733fa117feb6ebf0284addb6f9153ea..dbbbf5f516b5817de3f37c15cf5d15f772219f41 100644
--- a/GUI/Views/IntensityDataWidgets/PropertyRepeater.cpp
+++ b/GUI/View/Intensity/PropertyRepeater.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/PropertyRepeater.cpp
+//! @file      GUI/View/Intensity/PropertyRepeater.cpp
 //! @brief     Implements class PropertyRepeater
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/PropertyRepeater.h"
-#include "GUI/Models/IntensityDataItem.h"
+#include "GUI/View/Intensity/PropertyRepeater.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
 
 PropertyRepeater::PropertyRepeater(QObject* parent, bool repeat_child_properties)
     : QObject(parent), m_block_repeater(false), m_repeat_child_properties(repeat_child_properties)
diff --git a/GUI/Views/IntensityDataWidgets/PropertyRepeater.h b/GUI/View/Intensity/PropertyRepeater.h
similarity index 83%
rename from GUI/Views/IntensityDataWidgets/PropertyRepeater.h
rename to GUI/View/Intensity/PropertyRepeater.h
index 097356c3c87ddfe0322b37a34b62499ea0286b8a..98b085e809595a5f61eb0e6b9aec23149ce9ad4e 100644
--- a/GUI/Views/IntensityDataWidgets/PropertyRepeater.h
+++ b/GUI/View/Intensity/PropertyRepeater.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/PropertyRepeater.h
+//! @file      GUI/View/Intensity/PropertyRepeater.h
 //! @brief     Defines class PropertyRepeater
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PROPERTYREPEATER_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PROPERTYREPEATER_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_PROPERTYREPEATER_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_PROPERTYREPEATER_H
 
 #include <QMap>
 #include <QObject>
@@ -46,4 +46,4 @@ private:
     bool m_repeat_child_properties;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_PROPERTYREPEATER_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_PROPERTYREPEATER_H
diff --git a/GUI/Views/IntensityDataWidgets/SavePlotAssistant.cpp b/GUI/View/Intensity/SavePlotAssistant.cpp
similarity index 50%
rename from GUI/Views/IntensityDataWidgets/SavePlotAssistant.cpp
rename to GUI/View/Intensity/SavePlotAssistant.cpp
index 07ae14ebe313165ffe2e3fcb2c73f1803e39fd06..1d27424fa271095ac059676e50b7bf8c9fe19bd9 100644
--- a/GUI/Views/IntensityDataWidgets/SavePlotAssistant.cpp
+++ b/GUI/View/Intensity/SavePlotAssistant.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/SavePlotAssistant.cpp
+//! @file      GUI/View/Intensity/SavePlotAssistant.cpp
 //! @brief     Implements class SavePlotAssistant
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,17 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/SavePlotAssistant.h"
+#include "GUI/View/Intensity/SavePlotAssistant.h"
 #include "Base/Utils/Assert.h"
 #include "Device/Histo/IntensityDataIOFactory.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMap.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/View/Intensity/ColorMap.h"
 #include <QFileDialog>
 #include <QMessageBox>
+#include <QVector>
 
 namespace {
+
 const QString png_extension = ".png";
 const QString jpg_extension = ".jpg";
 const QString pdf_extension = ".pdf";
@@ -28,69 +30,55 @@ const QString int_extension = ".int";
 const QString tif_extension = ".tif";
 const QString txt_extension = ".txt";
 
-QVector<SavePlotAssistant::Format> initializeFormats()
-{
-    QVector<SavePlotAssistant::Format> result;
-    result.push_back(SavePlotAssistant::Format(png_extension, "png Image (*.png)"));
-    result.push_back(SavePlotAssistant::Format(jpg_extension, "jpg Image (*.jpg)"));
-    result.push_back(SavePlotAssistant::Format(pdf_extension, "pdf File (*.pdf)"));
-    result.push_back(SavePlotAssistant::Format(int_extension, "BornAgain ASCII format (*.int)"));
-    result.push_back(SavePlotAssistant::Format(txt_extension, "Simple ASCII table (*.txt)"));
-#ifdef BORNAGAIN_TIFF_SUPPORT
-    result.push_back(SavePlotAssistant::Format(tif_extension, "32-bits TIFF files (*.tif)"));
-#endif
-    return result;
-}
-
-} // namespace
+class Format {
+public:
+    Format() {}
+    Format(const QString& file_extention, const QString& filter);
+    QString m_file_extention;
+    QString m_filter;
+};
 
-QVector<SavePlotAssistant::Format> SavePlotAssistant::m_formats = initializeFormats();
-
-SavePlotAssistant::Format::Format(const QString& file_extention, const QString& filter)
+Format::Format(const QString& file_extention, const QString& filter)
     : m_file_extention(file_extention), m_filter(filter)
 {
 }
 
-void SavePlotAssistant::savePlot(const QString& dirname, QCustomPlot* plot,
-                                 OutputData<double>* output_data)
+const QVector<Format> outFormats = {
+    Format(png_extension, "png Image (*.png)"),
+    Format(jpg_extension, "jpg Image (*.jpg)"),
+    Format(pdf_extension, "pdf File (*.pdf)"),
+    Format(int_extension, "BornAgain ASCII format (*.int)"),
+    Format(txt_extension, "Simple ASCII table (*.txt)"),
+#ifdef BORNAGAIN_TIFF_SUPPORT
+    Format(tif_extension, "32-bits TIFF files (*.tif)"),
+#endif
+};
 
+bool isPngFile(const QString& fileName)
 {
-    QString selectedFilter("*.png");
-    QString defaultName = dirname + "/untitled";
-    QString fileName = QFileDialog::getSaveFileName(
-        0, "Save Plot", defaultName, getFilterString(), &selectedFilter,
-        baApp->settings().useNativeFileDialog() ? QFileDialog::Options()
-                                                : QFileDialog::DontUseNativeDialog);
+    return fileName.endsWith(png_extension, Qt::CaseInsensitive);
+}
 
-    QString nameToSave = composeFileName(fileName, selectedFilter);
+bool isJpgFile(const QString& fileName)
+{
+    return fileName.endsWith(jpg_extension, Qt::CaseInsensitive);
+}
 
-    if (!nameToSave.isEmpty()) {
-        try {
-            saveToFile(nameToSave, plot, output_data);
-        } catch (const std::exception& ex) {
-            QString message = "Attempt to save file with the name '";
-            message.append(nameToSave);
-            message.append("' has failed with following error message\n\n");
-            message.append(QString::fromStdString(ex.what()));
-            QMessageBox::warning(0, "Houston, we have a problem.", message);
-        }
-    }
+bool isPdfFile(const QString& fileName)
+{
+    return fileName.endsWith(pdf_extension, Qt::CaseInsensitive);
 }
 
-void SavePlotAssistant::saveToFile(const QString& fileName, QCustomPlot* plot,
-                                   OutputData<double>* output_data)
+void saveToFile(const QString& fileName, QCustomPlot* plot, OutputData<double>* output_data)
 {
-    if (isPngFile(fileName)) {
+    if (isPngFile(fileName))
         plot->savePng(fileName);
-    }
 
-    else if (isJpgFile(fileName)) {
+    else if (isJpgFile(fileName))
         plot->saveJpg(fileName);
-    }
 
-    else if (isPdfFile(fileName)) {
+    else if (isPdfFile(fileName))
         plot->savePdf(fileName, plot->width(), plot->height());
-    }
 
     else {
         ASSERT(output_data);
@@ -99,62 +87,67 @@ void SavePlotAssistant::saveToFile(const QString& fileName, QCustomPlot* plot,
 }
 
 //! Returns string contraining all defined filters in the format suitable for QFileDialog
-QString SavePlotAssistant::getFilterString() const
+QString getFilterString()
 {
     QString result;
-    for (int i = 0; i < m_formats.size(); ++i) {
-        result.append(m_formats[i].m_filter);
-        if (i != m_formats.size() - 1)
+    for (int i = 0; i < outFormats.size(); ++i) {
+        result.append(outFormats[i].m_filter);
+        if (i != outFormats.size() - 1)
             result.append(";;");
     }
     return result;
 }
 
-//! Compose file name to save plot from information provided by QFileDialog
-QString SavePlotAssistant::composeFileName(const QString& fileName, const QString& filterName) const
-{
-    QString result;
-    if (!fileName.isEmpty() && !filterName.isEmpty()) {
-        if (isValidExtension(fileName)) {
-            result = fileName;
-        } else {
-            result = fileName + getExtensionFromFilterName(filterName);
-        }
-    }
-    return result;
-}
-
-bool SavePlotAssistant::isValidExtension(const QString& fileName) const
+bool isValidExtension(const QString& fileName)
 {
-    for (int i = 0; i < m_formats.size(); ++i) {
-        if (fileName.endsWith(m_formats[i].m_file_extention, Qt::CaseInsensitive)) {
+    for (int i = 0; i < outFormats.size(); ++i)
+        if (fileName.endsWith(outFormats[i].m_file_extention, Qt::CaseInsensitive))
             return true;
-        }
-    }
     return false;
 }
 
-QString SavePlotAssistant::getExtensionFromFilterName(const QString& filterName) const
+QString getExtensionFromFilterName(const QString& filterName)
 {
-    for (int i = 0; i < m_formats.size(); ++i) {
-        if (m_formats[i].m_filter == filterName) {
-            return m_formats[i].m_file_extention;
-        }
-    }
+    for (int i = 0; i < outFormats.size(); ++i)
+        if (outFormats[i].m_filter == filterName)
+            return outFormats[i].m_file_extention;
     return "";
 }
 
-bool SavePlotAssistant::isPngFile(const QString& fileName) const
+//! Compose file name to save plot from information provided by QFileDialog
+QString composeFileName(const QString& fileName, const QString& filterName)
 {
-    return fileName.endsWith(png_extension, Qt::CaseInsensitive);
+    if (fileName.isEmpty() || filterName.isEmpty())
+        return "";
+    if (isValidExtension(fileName))
+        return fileName;
+    return fileName + getExtensionFromFilterName(filterName);
 }
 
-bool SavePlotAssistant::isJpgFile(const QString& fileName) const
-{
-    return fileName.endsWith(jpg_extension, Qt::CaseInsensitive);
-}
+} // namespace
+
+
+void GUI::Plot::savePlot(const QString& dirname, QCustomPlot* plot, OutputData<double>* output_data)
 
-bool SavePlotAssistant::isPdfFile(const QString& fileName) const
 {
-    return fileName.endsWith(pdf_extension, Qt::CaseInsensitive);
+    QString selectedFilter("*.png");
+    QString defaultName = dirname + "/untitled";
+    QString fileName = QFileDialog::getSaveFileName(
+        0, "Save Plot", defaultName, getFilterString(), &selectedFilter,
+        baApp->settings().useNativeFileDialog() ? QFileDialog::Options()
+                                                : QFileDialog::DontUseNativeDialog);
+
+    QString nameToSave = composeFileName(fileName, selectedFilter);
+
+    if (!nameToSave.isEmpty()) {
+        try {
+            saveToFile(nameToSave, plot, output_data);
+        } catch (const std::exception& ex) {
+            QString message = "Attempt to save file with the name '";
+            message.append(nameToSave);
+            message.append("' has failed with following error message\n\n");
+            message.append(QString::fromStdString(ex.what()));
+            QMessageBox::warning(0, "Houston, we have a problem.", message);
+        }
+    }
 }
diff --git a/GUI/View/Intensity/SavePlotAssistant.h b/GUI/View/Intensity/SavePlotAssistant.h
new file mode 100644
index 0000000000000000000000000000000000000000..64f8cb0375387e3b5849ae7777f8c3110cdd8344
--- /dev/null
+++ b/GUI/View/Intensity/SavePlotAssistant.h
@@ -0,0 +1,27 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/View/Intensity/SavePlotAssistant.h
+//! @brief     Defines class SavePlotAssistant
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2018
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_SAVEPLOTASSISTANT_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_SAVEPLOTASSISTANT_H
+
+#include <QString>
+
+class QCustomPlot;
+template <class T> class OutputData;
+
+namespace GUI::Plot {
+void savePlot(const QString& dirname, QCustomPlot* plot, OutputData<double>* output_data);
+};
+
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_SAVEPLOTASSISTANT_H
diff --git a/GUI/Views/IntensityDataWidgets/ScientificPlot.cpp b/GUI/View/Intensity/ScientificPlot.cpp
similarity index 92%
rename from GUI/Views/IntensityDataWidgets/ScientificPlot.cpp
rename to GUI/View/Intensity/ScientificPlot.cpp
index fd5968ffffd444968daa7a5d3102f4ac5cb6e4a2..e6282438dd9f27cd55e581cb295afde98ba5ad24 100644
--- a/GUI/Views/IntensityDataWidgets/ScientificPlot.cpp
+++ b/GUI/View/Intensity/ScientificPlot.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/ScientificPlot.cpp
+//! @file      GUI/View/Intensity/ScientificPlot.cpp
 //! @brief     Implements class ScientificPlot
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/ScientificPlotEvent.h"
+#include "GUI/View/Intensity/ScientificPlotEvent.h"
 #include <qcustomplot.h>
 
 ScientificPlot::ScientificPlot(QWidget* parent, PLOT_TYPE plot_type)
diff --git a/GUI/Views/IntensityDataWidgets/ScientificPlot.h b/GUI/View/Intensity/ScientificPlot.h
similarity index 86%
rename from GUI/Views/IntensityDataWidgets/ScientificPlot.h
rename to GUI/View/Intensity/ScientificPlot.h
index 960ec2fb45e90a34744bfcb56a908bb54a1937f4..563f7da5dd864e9f32ba4317a500904a12aacc81 100644
--- a/GUI/Views/IntensityDataWidgets/ScientificPlot.h
+++ b/GUI/View/Intensity/ScientificPlot.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/ScientificPlot.h
+//! @file      GUI/View/Intensity/ScientificPlot.h
 //! @brief     Declares class ScientificPlot
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_SCIENTIFICPLOT_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_SCIENTIFICPLOT_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_SCIENTIFICPLOT_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_SCIENTIFICPLOT_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 #include <memory>
 
 class PlotEventInfo;
@@ -66,4 +66,4 @@ private:
     ScientificPlotEvent* m_event;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_SCIENTIFICPLOT_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_SCIENTIFICPLOT_H
diff --git a/GUI/Views/IntensityDataWidgets/ScientificPlotEvent.cpp b/GUI/View/Intensity/ScientificPlotEvent.cpp
similarity index 95%
rename from GUI/Views/IntensityDataWidgets/ScientificPlotEvent.cpp
rename to GUI/View/Intensity/ScientificPlotEvent.cpp
index 986590f1179e7e368e8dd165ef7d282fa5806a3e..9b4551d4f061e0132dbce0d96b3c87e78cc8ff18 100644
--- a/GUI/Views/IntensityDataWidgets/ScientificPlotEvent.cpp
+++ b/GUI/View/Intensity/ScientificPlotEvent.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/ScientificPlotEvent.cpp
+//! @file      GUI/View/Intensity/ScientificPlotEvent.cpp
 //! @brief     Implements class ScientificPlotEvent
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/IntensityDataWidgets/ScientificPlotEvent.h"
+#include "GUI/View/Intensity/ScientificPlotEvent.h"
 #include <QMouseEvent>
 #include <qcustomplot.h>
 
diff --git a/GUI/Views/IntensityDataWidgets/ScientificPlotEvent.h b/GUI/View/Intensity/ScientificPlotEvent.h
similarity index 81%
rename from GUI/Views/IntensityDataWidgets/ScientificPlotEvent.h
rename to GUI/View/Intensity/ScientificPlotEvent.h
index 91af38c3e86f821324ab65d6c072cf765755ebc0..6a79d47989440ba3119dd80555d9894d0407d57a 100644
--- a/GUI/Views/IntensityDataWidgets/ScientificPlotEvent.h
+++ b/GUI/View/Intensity/ScientificPlotEvent.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/IntensityDataWidgets/ScientificPlotEvent.h
+//! @file      GUI/View/Intensity/ScientificPlotEvent.h
 //! @brief     Defines class ScientificPlotEvent
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_SCIENTIFICPLOTEVENT_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_SCIENTIFICPLOTEVENT_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_SCIENTIFICPLOTEVENT_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_SCIENTIFICPLOTEVENT_H
 
-#include "GUI/Views/IntensityDataWidgets/PlotEventInfo.h"
+#include "GUI/View/Intensity/PlotEventInfo.h"
 #include <QObject>
 #include <memory>
 
@@ -53,4 +53,4 @@ private:
     PlotEventInfo m_prevPos;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_SCIENTIFICPLOTEVENT_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_SCIENTIFICPLOTEVENT_H
diff --git a/GUI/Views/CommonWidgets/StatusLabel.cpp b/GUI/View/Intensity/StatusLabel.cpp
similarity index 86%
rename from GUI/Views/CommonWidgets/StatusLabel.cpp
rename to GUI/View/Intensity/StatusLabel.cpp
index 0e365132b1670294f850f451c905e060cc24600b..0081ce72afa708c989a09c181a587d15a9b1db45 100644
--- a/GUI/Views/CommonWidgets/StatusLabel.cpp
+++ b/GUI/View/Intensity/StatusLabel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/StatusLabel.cpp
+//! @file      GUI/View/Intensity/StatusLabel.cpp
 //! @brief     Implements class StatusLabel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/StatusLabel.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
+#include "GUI/View/Intensity/StatusLabel.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QColor>
 #include <QFont>
 #include <QPainter>
@@ -21,11 +21,11 @@
 namespace {
 int default_text_size()
 {
-    return GUI::Utils::Style::SystemPointSize();
+    return GUI::Util::Style::SystemPointSize();
 }
 int default_label_height()
 {
-    return GUI::Utils::Style::SizeOfLetterM().height() * 1.75;
+    return GUI::Util::Style::SizeOfLetterM().height() * 1.75;
 }
 } // namespace
 
diff --git a/GUI/Views/CommonWidgets/StatusLabel.h b/GUI/View/Intensity/StatusLabel.h
similarity index 85%
rename from GUI/Views/CommonWidgets/StatusLabel.h
rename to GUI/View/Intensity/StatusLabel.h
index d13a01c792a66f4f9799107fcfbc3ba2a575bcb3..18e2285324c7850baf5b9f8d3a4355a63cfb6c73 100644
--- a/GUI/Views/CommonWidgets/StatusLabel.h
+++ b/GUI/View/Intensity/StatusLabel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/StatusLabel.h
+//! @file      GUI/View/Intensity/StatusLabel.h
 //! @brief     Defines class StatusLabel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_STATUSLABEL_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_STATUSLABEL_H
+#ifndef BORNAGAIN_GUI_VIEW_INTENSITY_STATUSLABEL_H
+#define BORNAGAIN_GUI_VIEW_INTENSITY_STATUSLABEL_H
 
 #include <QFrame>
 
@@ -45,4 +45,4 @@ private:
     QFont m_font;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_STATUSLABEL_H
+#endif // BORNAGAIN_GUI_VIEW_INTENSITY_STATUSLABEL_H
diff --git a/GUI/Views/JobWidgets/JobListModel.cpp b/GUI/View/Job/JobListModel.cpp
similarity index 96%
rename from GUI/Views/JobWidgets/JobListModel.cpp
rename to GUI/View/Job/JobListModel.cpp
index 3d8640a8c2eaabec7dd61abec90ab07a55b169cb..3668b1971a204d6ea4692ac2c10c00d1e0d982e9 100644
--- a/GUI/Views/JobWidgets/JobListModel.cpp
+++ b/GUI/View/Job/JobListModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobListModel.cpp
+//! @file      GUI/View/Job/JobListModel.cpp
 //! @brief     Implements class JobListModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/JobListModel.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
+#include "GUI/View/Job/JobListModel.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
 
 //==================================================================================================
 // JobListModel
diff --git a/GUI/Views/JobWidgets/JobListModel.h b/GUI/View/Job/JobListModel.h
similarity index 87%
rename from GUI/Views/JobWidgets/JobListModel.h
rename to GUI/View/Job/JobListModel.h
index 6082852a6d80c60baa6e03ac9ad61e718efe42f2..b2b36039fbcc02f8a7270540baa6ae9d235dfc83 100644
--- a/GUI/Views/JobWidgets/JobListModel.h
+++ b/GUI/View/Job/JobListModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobListModel.h
+//! @file      GUI/View/Job/JobListModel.h
 //! @brief     Defines class JobListModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBLISTMODEL_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBLISTMODEL_H
+#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBLISTMODEL_H
+#define BORNAGAIN_GUI_VIEW_JOB_JOBLISTMODEL_H
 
 #include <QAbstractListModel>
 
@@ -51,4 +51,4 @@ private:
     JobModel* m_jobs;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBLISTMODEL_H
+#endif // BORNAGAIN_GUI_VIEW_JOB_JOBLISTMODEL_H
diff --git a/GUI/Views/JobWidgets/JobListView.cpp b/GUI/View/Job/JobListView.cpp
similarity index 96%
rename from GUI/Views/JobWidgets/JobListView.cpp
rename to GUI/View/Job/JobListView.cpp
index a830bc9aed51833c7ad3a9330001ca51ae2bdbb4..f6f3c797b1023eceee95857713d5606591550880 100644
--- a/GUI/Views/JobWidgets/JobListView.cpp
+++ b/GUI/View/Job/JobListView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobListView.cpp
+//! @file      GUI/View/Job/JobListView.cpp
 //! @brief     Implements class JobListView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/JobListView.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Views/CommonWidgets/StyledToolBar.h"
-#include "GUI/Views/JobWidgets/JobListModel.h"
-#include "GUI/Views/JobWidgets/JobListViewDelegate.h"
+#include "GUI/View/Job/JobListView.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/View/Common/StyledToolBar.h"
+#include "GUI/View/Job/JobListModel.h"
+#include "GUI/View/Job/JobListViewDelegate.h"
 #include <QAction>
 #include <QListView>
 #include <QMenu>
diff --git a/GUI/Views/JobWidgets/JobListView.h b/GUI/View/Job/JobListView.h
similarity index 88%
rename from GUI/Views/JobWidgets/JobListView.h
rename to GUI/View/Job/JobListView.h
index 063dbfb2472fa4d0bcf169ed4e1442859a32efff..817344082e10d97ca5f49096a529c862fb29bd7f 100644
--- a/GUI/Views/JobWidgets/JobListView.h
+++ b/GUI/View/Job/JobListView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobListView.h
+//! @file      GUI/View/Job/JobListView.h
 //! @brief     Defines class JobListView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBLISTVIEW_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBLISTVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBLISTVIEW_H
+#define BORNAGAIN_GUI_VIEW_JOB_JOBLISTVIEW_H
 
 #include <QWidget>
 
@@ -61,4 +61,4 @@ private:
     QMenu* m_equalizeMenu;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBLISTVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_JOB_JOBLISTVIEW_H
diff --git a/GUI/Views/JobWidgets/JobListViewDelegate.cpp b/GUI/View/Job/JobListViewDelegate.cpp
similarity index 96%
rename from GUI/Views/JobWidgets/JobListViewDelegate.cpp
rename to GUI/View/Job/JobListViewDelegate.cpp
index e159fce4d8c1d0dc58a9eb8f24af825a8e712905..e8ad13c40742b0485eabf557d91c6e0bc6f9520d 100644
--- a/GUI/Views/JobWidgets/JobListViewDelegate.cpp
+++ b/GUI/View/Job/JobListViewDelegate.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobListViewDelegate.cpp
+//! @file      GUI/View/Job/JobListViewDelegate.cpp
 //! @brief     Implements class JobListViewDelegate
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/JobListViewDelegate.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Views/JobWidgets/JobListModel.h"
+#include "GUI/View/Job/JobListViewDelegate.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/View/Job/JobListModel.h"
 #include <QApplication>
 #include <QMouseEvent>
 #include <QPaintDevice>
diff --git a/GUI/Views/JobWidgets/JobListViewDelegate.h b/GUI/View/Job/JobListViewDelegate.h
similarity index 86%
rename from GUI/Views/JobWidgets/JobListViewDelegate.h
rename to GUI/View/Job/JobListViewDelegate.h
index e046ceeac3e1b6c31a78f8bd5e993157d1a438f7..768e4b6c98893c16305285083c3b75221de1eedd 100644
--- a/GUI/Views/JobWidgets/JobListViewDelegate.h
+++ b/GUI/View/Job/JobListViewDelegate.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobListViewDelegate.h
+//! @file      GUI/View/Job/JobListViewDelegate.h
 //! @brief     Defines class JobListViewDelegate
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBLISTVIEWDELEGATE_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBLISTVIEWDELEGATE_H
+#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBLISTVIEWDELEGATE_H
+#define BORNAGAIN_GUI_VIEW_JOB_JOBLISTVIEWDELEGATE_H
 
 #include <QItemDelegate>
 #include <QMap>
@@ -49,4 +49,4 @@ private:
     QMap<JobStatus, QColor> m_status_to_color;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBLISTVIEWDELEGATE_H
+#endif // BORNAGAIN_GUI_VIEW_JOB_JOBLISTVIEWDELEGATE_H
diff --git a/GUI/Views/JobWidgets/JobProgressAssistant.cpp b/GUI/View/Job/JobProgressAssistant.cpp
similarity index 85%
rename from GUI/Views/JobWidgets/JobProgressAssistant.cpp
rename to GUI/View/Job/JobProgressAssistant.cpp
index bbdd4eaf0d240971afc6f926d4ee67f9f9757d04..370ec685791fb1415b4a9eb73a4381b46958c0a0 100644
--- a/GUI/Views/JobWidgets/JobProgressAssistant.cpp
+++ b/GUI/View/Job/JobProgressAssistant.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobProgressAssistant.cpp
+//! @file      GUI/View/Job/JobProgressAssistant.cpp
 //! @brief     Implements class JobProgressAssistant
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/JobProgressAssistant.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/mainwindow/mainwindow.h"
+#include "GUI/View/Job/JobProgressAssistant.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/View/Main/MainWindow.h"
 #include <QProgressBar>
 
 JobProgressAssistant::JobProgressAssistant(MainWindow* mainWindow, JobModel* jobModel)
diff --git a/GUI/Views/JobWidgets/JobProgressAssistant.h b/GUI/View/Job/JobProgressAssistant.h
similarity index 79%
rename from GUI/Views/JobWidgets/JobProgressAssistant.h
rename to GUI/View/Job/JobProgressAssistant.h
index 85efa05e77e5fca887bc1aaa002ac9e1dd54e2cc..25fcd51a32a404cc13b9a927d34c3bdbe1d575b4 100644
--- a/GUI/Views/JobWidgets/JobProgressAssistant.h
+++ b/GUI/View/Job/JobProgressAssistant.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobProgressAssistant.h
+//! @file      GUI/View/Job/JobProgressAssistant.h
 //! @brief     Defines class JobProgressAssistant
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROGRESSASSISTANT_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROGRESSASSISTANT_H
+#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBPROGRESSASSISTANT_H
+#define BORNAGAIN_GUI_VIEW_JOB_JOBPROGRESSASSISTANT_H
 
 #include <QObject>
 
@@ -34,4 +34,4 @@ private:
     MainWindow* m_mainWindow;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROGRESSASSISTANT_H
+#endif // BORNAGAIN_GUI_VIEW_JOB_JOBPROGRESSASSISTANT_H
diff --git a/GUI/Views/JobWidgets/JobPropertiesTableModel.cpp b/GUI/View/Job/JobPropertiesTableModel.cpp
similarity index 97%
rename from GUI/Views/JobWidgets/JobPropertiesTableModel.cpp
rename to GUI/View/Job/JobPropertiesTableModel.cpp
index 081357adad5c3c110c7782343644f10336a31d5b..e22964bf79205fbaf89df1bfb15eb937d7c8d471 100644
--- a/GUI/Views/JobWidgets/JobPropertiesTableModel.cpp
+++ b/GUI/View/Job/JobPropertiesTableModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobPropertiesTableModel.cpp
+//! @file      GUI/View/Job/JobPropertiesTableModel.cpp
 //! @brief     Implements class JobPropertiesTableModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/JobPropertiesTableModel.h"
-#include "GUI/Models/JobItem.h"
+#include "GUI/View/Job/JobPropertiesTableModel.h"
+#include "GUI/Model/Job/JobItem.h"
 #include <QLocale>
 
 namespace {
diff --git a/GUI/Views/JobWidgets/JobPropertiesTableModel.h b/GUI/View/Job/JobPropertiesTableModel.h
similarity index 87%
rename from GUI/Views/JobWidgets/JobPropertiesTableModel.h
rename to GUI/View/Job/JobPropertiesTableModel.h
index e42e897aeca8466a1f1c76c5ff60d6f832d05002..659ed5345223bff9f0b6deb0c8cc4b4fc690825e 100644
--- a/GUI/Views/JobWidgets/JobPropertiesTableModel.h
+++ b/GUI/View/Job/JobPropertiesTableModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobPropertiesWidget.h
+//! @file      GUI/View/Job/JobPropertiesTableModel.h
 //! @brief     Defines class JobPropertiesWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROPERTIESTABLEMODEL_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROPERTIESTABLEMODEL_H
+#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBPROPERTIESTABLEMODEL_H
+#define BORNAGAIN_GUI_VIEW_JOB_JOBPROPERTIESTABLEMODEL_H
 
 #include <QAbstractTableModel>
 
@@ -45,4 +45,4 @@ private:
     JobItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROPERTIESTABLEMODEL_H
+#endif // BORNAGAIN_GUI_VIEW_JOB_JOBPROPERTIESTABLEMODEL_H
diff --git a/GUI/Views/JobWidgets/JobPropertiesWidget.cpp b/GUI/View/Job/JobPropertiesWidget.cpp
similarity index 88%
rename from GUI/Views/JobWidgets/JobPropertiesWidget.cpp
rename to GUI/View/Job/JobPropertiesWidget.cpp
index 00552914d67e6c5a7391feac3d3d71c9ead4929d..e0555271737601a75033e675826781641831c59a 100644
--- a/GUI/Views/JobWidgets/JobPropertiesWidget.cpp
+++ b/GUI/View/Job/JobPropertiesWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobPropertiesWidget.cpp
+//! @file      GUI/View/Job/JobPropertiesWidget.cpp
 //! @brief     Implements class JobPropertiesWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/JobPropertiesWidget.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/JobWidgets/JobPropertiesTableModel.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/View/Job/JobPropertiesWidget.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Job/JobPropertiesTableModel.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QTabBar>
 #include <QTabWidget>
 #include <QTextEdit>
@@ -72,12 +72,12 @@ JobPropertiesWidget::~JobPropertiesWidget()
 
 QSize JobPropertiesWidget::sizeHint() const
 {
-    return QSize(GUI::Utils::Style::PropertyPanelWidth(), GUI::Utils::Style::PropertyPanelWidth());
+    return QSize(GUI::Util::Style::PropertyPanelWidth(), GUI::Util::Style::PropertyPanelWidth());
 }
 
 QSize JobPropertiesWidget::minimumSizeHint() const
 {
-    return QSize(GUI::Utils::Style::PropertyPanelWidth(), GUI::Utils::Style::PropertyPanelWidth());
+    return QSize(GUI::Util::Style::PropertyPanelWidth(), GUI::Util::Style::PropertyPanelWidth());
 }
 
 void JobPropertiesWidget::setItem(JobItem* item)
diff --git a/GUI/Views/JobWidgets/JobPropertiesWidget.h b/GUI/View/Job/JobPropertiesWidget.h
similarity index 85%
rename from GUI/Views/JobWidgets/JobPropertiesWidget.h
rename to GUI/View/Job/JobPropertiesWidget.h
index cad504f2edc6e3e65755cb1d06440024d62be227..d4ea5166fce7de93465879db571d547acf2ee10c 100644
--- a/GUI/Views/JobWidgets/JobPropertiesWidget.h
+++ b/GUI/View/Job/JobPropertiesWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobPropertiesWidget.h
+//! @file      GUI/View/Job/JobPropertiesWidget.h
 //! @brief     Defines class JobPropertiesWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROPERTIESWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROPERTIESWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBPROPERTIESWIDGET_H
+#define BORNAGAIN_GUI_VIEW_JOB_JOBPROPERTIESWIDGET_H
 
 #include <QWidget>
 
@@ -50,4 +50,4 @@ private:
     JobItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBPROPERTIESWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_JOB_JOBPROPERTIESWIDGET_H
diff --git a/GUI/Views/JobWidgets/JobResultsPresenter.cpp b/GUI/View/Job/JobResultsPresenter.cpp
similarity index 89%
rename from GUI/Views/JobWidgets/JobResultsPresenter.cpp
rename to GUI/View/Job/JobResultsPresenter.cpp
index c98eb83672ab17a139d4e360c64e6cd55d61eff0..adb1cd533947135568f0b4a6e552ac37fde31c05 100644
--- a/GUI/Views/JobWidgets/JobResultsPresenter.cpp
+++ b/GUI/View/Job/JobResultsPresenter.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobResultsPresenter.cpp
+//! @file      GUI/View/Job/JobResultsPresenter.cpp
 //! @brief     Implements class JobResultsPresenter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/JobResultsPresenter.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Views/IntensityDataWidgets/IntensityDataWidget.h"
-#include "GUI/Views/JobWidgets/FitComparisonWidget.h"
-#include "GUI/Views/JobWidgets/FitComparisonWidget1D.h"
-#include "GUI/Views/JobWidgets/JobViewActivities.h"
-#include "GUI/Views/ProjectionsWidgets/IntensityDataProjectionsWidget.h"
-#include "GUI/Views/SpecularDataWidgets/SpecularDataWidget.h"
+#include "GUI/View/Job/JobResultsPresenter.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/View/Compare/FitComparisonWidget.h"
+#include "GUI/View/Compare/FitComparisonWidget1D.h"
+#include "GUI/View/Intensity/IntensityDataWidget.h"
+#include "GUI/View/Job/JobViewActivities.h"
+#include "GUI/View/Projection/IntensityDataProjectionsWidget.h"
+#include "GUI/View/SpecularData/SpecularDataWidget.h"
 
 JobResultsPresenter::JobResultsPresenter(QWidget* parent) : ItemComboWidget(parent)
 {
diff --git a/GUI/Views/JobWidgets/JobResultsPresenter.h b/GUI/View/Job/JobResultsPresenter.h
similarity index 84%
rename from GUI/Views/JobWidgets/JobResultsPresenter.h
rename to GUI/View/Job/JobResultsPresenter.h
index 7ebb7e26c0707de3b99c468f9b53bdf89ca351bc..f4b61a95c72fb6277009095534214e18fd14627b 100644
--- a/GUI/Views/JobWidgets/JobResultsPresenter.h
+++ b/GUI/View/Job/JobResultsPresenter.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobResultsPresenter.h
+//! @file      GUI/View/Job/JobResultsPresenter.h
 //! @brief     Defines class JobResultsPresenter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBRESULTSPRESENTER_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBRESULTSPRESENTER_H
+#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBRESULTSPRESENTER_H
+#define BORNAGAIN_GUI_VIEW_JOB_JOBRESULTSPRESENTER_H
 
-#include "GUI/Views/CommonWidgets/ItemComboWidget.h"
+#include "GUI/View/Common/ItemComboWidget.h"
 
 class InstrumentItem;
 class JobItem;
@@ -51,4 +51,4 @@ private:
     JobViewActivity m_activity;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBRESULTSPRESENTER_H
+#endif // BORNAGAIN_GUI_VIEW_JOB_JOBRESULTSPRESENTER_H
diff --git a/GUI/Views/JobWidgets/JobSelectorWidget.cpp b/GUI/View/Job/JobSelectorWidget.cpp
similarity index 85%
rename from GUI/Views/JobWidgets/JobSelectorWidget.cpp
rename to GUI/View/Job/JobSelectorWidget.cpp
index 7cb961159964a7f4bfefcd31bf8f1b4d13e85de0..a1f1ed522fc2fedef185decd49eff33e8c66748a 100644
--- a/GUI/Views/JobWidgets/JobSelectorWidget.cpp
+++ b/GUI/View/Job/JobSelectorWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobSelectorWidget.cpp
+//! @file      GUI/View/Job/JobSelectorWidget.cpp
 //! @brief     Implements class JobSelectorWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,18 +12,17 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/JobSelectorWidget.h"
+#include "GUI/View/Job/JobSelectorWidget.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Views/JobWidgets/JobListView.h"
-#include "GUI/Views/JobWidgets/JobPropertiesWidget.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Job/JobListView.h"
+#include "GUI/View/Job/JobPropertiesWidget.h"
 #include <QSplitter>
 #include <QVBoxLayout>
 
 JobSelectorWidget::JobSelectorWidget(JobModel* jobModel, QWidget* parent)
-    : QWidget(parent)
-    , m_jobModel(jobModel)
+    : QWidget(parent), m_jobModel(jobModel)
 {
     setWindowTitle(GUI::Constants::JobSelectorWidgetName);
     setObjectName("JobSelectorWidget");
diff --git a/GUI/Views/JobWidgets/JobSelectorWidget.h b/GUI/View/Job/JobSelectorWidget.h
similarity index 84%
rename from GUI/Views/JobWidgets/JobSelectorWidget.h
rename to GUI/View/Job/JobSelectorWidget.h
index 5d94525d2cb79780e42ac524d1dab6877bc01109..a6c92e00d4018c877f18ba6ca4bfd59b413499d9 100644
--- a/GUI/Views/JobWidgets/JobSelectorWidget.h
+++ b/GUI/View/Job/JobSelectorWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobSelectorWidget.h
+//! @file      GUI/View/Job/JobSelectorWidget.h
 //! @brief     Defines class JobSelectorWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBSELECTORWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBSELECTORWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBSELECTORWIDGET_H
+#define BORNAGAIN_GUI_VIEW_JOB_JOBSELECTORWIDGET_H
 
 #include <QWidget>
 
@@ -47,4 +47,4 @@ private:
     JobModel* m_jobModel;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBSELECTORWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_JOB_JOBSELECTORWIDGET_H
diff --git a/GUI/Views/JobWidgets/JobView.cpp b/GUI/View/Job/JobView.cpp
similarity index 88%
rename from GUI/Views/JobWidgets/JobView.cpp
rename to GUI/View/Job/JobView.cpp
index 7bcf6d3d535998376b9c2d04da1b27acf4fa0ef3..aef625d1dc6d297ae45623f7093b80f42f007746 100644
--- a/GUI/Views/JobWidgets/JobView.cpp
+++ b/GUI/View/Job/JobView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobView.cpp
+//! @file      GUI/View/Job/JobView.cpp
 //! @brief     Implements class JobView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,19 +12,19 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/JobView.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Views/CommonWidgets/DocksController.h"
-#include "GUI/Views/FitWidgets/FitActivityPanel.h"
-#include "GUI/Views/FitWidgets/JobRealTimeWidget.h"
-#include "GUI/Views/JobWidgets/JobMessagePanel.h"
-#include "GUI/Views/JobWidgets/JobProgressAssistant.h"
-#include "GUI/Views/JobWidgets/JobResultsPresenter.h"
-#include "GUI/Views/JobWidgets/JobSelectorWidget.h"
-#include "GUI/Views/JobWidgets/JobViewActivities.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectmanager.h"
+#include "GUI/View/Job/JobView.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/View/Common/DocksController.h"
+#include "GUI/View/Fit/FitActivityPanel.h"
+#include "GUI/View/Fit/JobMessagePanel.h"
+#include "GUI/View/Fit/JobRealTimeWidget.h"
+#include "GUI/View/Job/JobProgressAssistant.h"
+#include "GUI/View/Job/JobResultsPresenter.h"
+#include "GUI/View/Job/JobSelectorWidget.h"
+#include "GUI/View/Job/JobViewActivities.h"
+#include "GUI/View/Main/MainWindow.h"
+#include "GUI/View/Main/ProjectManager.h"
 #include <QMenu>
 
 JobView::JobView(MainWindow* mainWindow, ProjectDocument* document)
diff --git a/GUI/Views/JobWidgets/JobView.h b/GUI/View/Job/JobView.h
similarity index 91%
rename from GUI/Views/JobWidgets/JobView.h
rename to GUI/View/Job/JobView.h
index ee1419a255f0d444c3f4090bd6b722fa53dd3cca..82cdb6b6ed735beccbe00d8bb59977ec29a040b0 100644
--- a/GUI/Views/JobWidgets/JobView.h
+++ b/GUI/View/Job/JobView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobView.h
+//! @file      GUI/View/Job/JobView.h
 //! @brief     Defines class JobView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBVIEW_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBVIEW_H
+#define BORNAGAIN_GUI_VIEW_JOB_JOBVIEW_H
 
 #include <QActionGroup>
 #include <QMainWindow>
@@ -75,4 +75,4 @@ private:
     ProjectDocument* m_document;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_JOB_JOBVIEW_H
diff --git a/GUI/Views/JobWidgets/JobViewActivities.cpp b/GUI/View/Job/JobViewActivities.cpp
similarity index 93%
rename from GUI/Views/JobWidgets/JobViewActivities.cpp
rename to GUI/View/Job/JobViewActivities.cpp
index a2d9ff1a5ea440d5319e3b1b172f1e26e469fadb..ffc4fc46de74a4d7ac29a6af24656d44f31309bf 100644
--- a/GUI/Views/JobWidgets/JobViewActivities.cpp
+++ b/GUI/View/Job/JobViewActivities.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobViewActivities.cpp
+//! @file      GUI/View/Job/JobViewActivities.cpp
 //! @brief     Implements class JobViewActivities
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/JobWidgets/JobViewActivities.h"
+#include "GUI/View/Job/JobViewActivities.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/Util/mainwindow_constants.h"
 
 namespace {
 QMap<JobViewActivity, QVector<JobViewFlags::Dock>> createActivityMap()
diff --git a/GUI/Views/JobWidgets/JobViewActivities.h b/GUI/View/Job/JobViewActivities.h
similarity index 77%
rename from GUI/Views/JobWidgets/JobViewActivities.h
rename to GUI/View/Job/JobViewActivities.h
index 56c587dfefe9354ac3b8abcb130e0a5469b0f5eb..22c3f0fa0be85eb6884a3ea6944903816f6f4f20 100644
--- a/GUI/Views/JobWidgets/JobViewActivities.h
+++ b/GUI/View/Job/JobViewActivities.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobViewActivities.h
+//! @file      GUI/View/Job/JobViewActivities.h
 //! @brief     Defines class JobViewActivities
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBVIEWACTIVITIES_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBVIEWACTIVITIES_H
+#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBVIEWACTIVITIES_H
+#define BORNAGAIN_GUI_VIEW_JOB_JOBVIEWACTIVITIES_H
 
-#include "GUI/Views/JobWidgets/JobViewFlags.h"
+#include "GUI/View/Job/JobViewFlags.h"
 #include <QMap>
 #include <QStringList>
 #include <QVector>
@@ -34,4 +34,4 @@ QVector<JobViewFlags::Dock> activeDocks(JobViewActivity activity);
 
 }; // namespace JobViewActivities
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBVIEWACTIVITIES_H
+#endif // BORNAGAIN_GUI_VIEW_JOB_JOBVIEWACTIVITIES_H
diff --git a/GUI/Views/JobWidgets/JobViewFlags.h b/GUI/View/Job/JobViewFlags.h
similarity index 80%
rename from GUI/Views/JobWidgets/JobViewFlags.h
rename to GUI/View/Job/JobViewFlags.h
index 0d35e72b6ecb99ed565e0cd13a97bbaf9163ab09..1d200e7bbdc276af1cda2ed96a18614394a327e4 100644
--- a/GUI/Views/JobWidgets/JobViewFlags.h
+++ b/GUI/View/Job/JobViewFlags.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/JobWidgets/JobViewFlags.h
+//! @file      GUI/View/Job/JobViewFlags.h
 //! @brief     Defines class JobViewFlags
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBVIEWFLAGS_H
-#define BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBVIEWFLAGS_H
+#ifndef BORNAGAIN_GUI_VIEW_JOB_JOBVIEWFLAGS_H
+#define BORNAGAIN_GUI_VIEW_JOB_JOBVIEWFLAGS_H
 
 #include <QWidget>
 
@@ -32,4 +32,4 @@ public:
 
 Q_DECLARE_OPERATORS_FOR_FLAGS(JobViewFlags::Dock)
 
-#endif // BORNAGAIN_GUI_VIEWS_JOBWIDGETS_JOBVIEWFLAGS_H
+#endif // BORNAGAIN_GUI_VIEW_JOB_JOBVIEWFLAGS_H
diff --git a/GUI/DataLoaders/AutomaticDataLoader1D.cpp b/GUI/View/Loaders/AutomaticDataLoader1D.cpp
similarity index 89%
rename from GUI/DataLoaders/AutomaticDataLoader1D.cpp
rename to GUI/View/Loaders/AutomaticDataLoader1D.cpp
index 3bdcc7e0acfc204fa77742e0e6b9bb7bb22f83ab..9782800ab4ed8e8b6bb0fed0a965eb4712cd9385 100644
--- a/GUI/DataLoaders/AutomaticDataLoader1D.cpp
+++ b/GUI/View/Loaders/AutomaticDataLoader1D.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/AutomaticDataLoader1D.cpp
+//! @file      GUI/View/Loaders/AutomaticDataLoader1D.cpp
 //! @brief     Implements class AutomaticDataLoader1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/DataLoaders/AutomaticDataLoader1D.h"
+#include "GUI/View/Loaders/AutomaticDataLoader1D.h"
 #include "Device/InputOutput/OutputDataReadReflectometry.h"
-#include "GUI/DataLoaders/AutomaticDataLoader1DResultModel.h"
-#include "GUI/Models/ImportDataInfo.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/utils/DeserializationException.h"
+#include "GUI/Model/Data/ImportDataInfo.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Util/DeserializationException.h"
+#include "GUI/View/Loaders/AutomaticDataLoader1DResultModel.h"
 
 QString AutomaticDataLoader1D::name() const
 {
diff --git a/GUI/DataLoaders/AutomaticDataLoader1D.h b/GUI/View/Loaders/AutomaticDataLoader1D.h
similarity index 83%
rename from GUI/DataLoaders/AutomaticDataLoader1D.h
rename to GUI/View/Loaders/AutomaticDataLoader1D.h
index 6a5bc7c50481540d470c51e4395d13e95438faca..084abe27d23369310bce8bb286f831b55a93a081 100644
--- a/GUI/DataLoaders/AutomaticDataLoader1D.h
+++ b/GUI/View/Loaders/AutomaticDataLoader1D.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/AutomaticDataLoader1D.h
+//! @file      GUI/View/Loaders/AutomaticDataLoader1D.h
 //! @brief     Defines class AutomaticDataLoader1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_DATALOADERS_AUTOMATICDATALOADER1D_H
-#define BORNAGAIN_GUI_DATALOADERS_AUTOMATICDATALOADER1D_H
+#ifndef BORNAGAIN_GUI_VIEW_LOADERS_AUTOMATICDATALOADER1D_H
+#define BORNAGAIN_GUI_VIEW_LOADERS_AUTOMATICDATALOADER1D_H
 
 #include "Device/Data/OutputData.h"
-#include "GUI/Models/AbstractDataLoader1D.h"
+#include "GUI/Model/IO/AbstractDataLoader1D.h"
 
 //! The legacy importer for reflectometry, with no user interaction.
 
@@ -39,4 +39,4 @@ private:
     QString m_error;
 };
 
-#endif // BORNAGAIN_GUI_DATALOADERS_AUTOMATICDATALOADER1D_H
+#endif // BORNAGAIN_GUI_VIEW_LOADERS_AUTOMATICDATALOADER1D_H
diff --git a/GUI/DataLoaders/AutomaticDataLoader1DResultModel.cpp b/GUI/View/Loaders/AutomaticDataLoader1DResultModel.cpp
similarity index 89%
rename from GUI/DataLoaders/AutomaticDataLoader1DResultModel.cpp
rename to GUI/View/Loaders/AutomaticDataLoader1DResultModel.cpp
index dc6071083c7be616cec55d3776f8a328bcee2b42..cf85fa823742a5545e8e9d8a1b14fcbf98de2581 100644
--- a/GUI/DataLoaders/AutomaticDataLoader1DResultModel.cpp
+++ b/GUI/View/Loaders/AutomaticDataLoader1DResultModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/AutomaticDataLoader1DResultModel.cpp
+//! @file      GUI/View/Loaders/AutomaticDataLoader1DResultModel.cpp
 //! @brief     Implements class AutomaticDataLoader1DResultModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/DataLoaders/AutomaticDataLoader1DResultModel.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SpecularDataItem.h"
+#include "GUI/View/Loaders/AutomaticDataLoader1DResultModel.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
 
 AutomaticDataLoader1DResultModel::AutomaticDataLoader1DResultModel(RealDataItem* item)
     : m_item(item)
diff --git a/GUI/DataLoaders/AutomaticDataLoader1DResultModel.h b/GUI/View/Loaders/AutomaticDataLoader1DResultModel.h
similarity index 81%
rename from GUI/DataLoaders/AutomaticDataLoader1DResultModel.h
rename to GUI/View/Loaders/AutomaticDataLoader1DResultModel.h
index fe435e3664b69c713ed92a632db52e8bafc0928b..8ef6696949a16c2d81c9a6c8cbf45aa86c791577 100644
--- a/GUI/DataLoaders/AutomaticDataLoader1DResultModel.h
+++ b/GUI/View/Loaders/AutomaticDataLoader1DResultModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/AutomaticDataLoader1DResultModel.h
+//! @file      GUI/View/Loaders/AutomaticDataLoader1DResultModel.h
 //! @brief     Defines class AutomaticDataLoader1DResultModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_DATALOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H
-#define BORNAGAIN_GUI_DATALOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H
+#ifndef BORNAGAIN_GUI_VIEW_LOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H
+#define BORNAGAIN_GUI_VIEW_LOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H
 
-#include "GUI/Models/AbstractDataLoaderResultModel.h"
+#include "GUI/Model/IO/AbstractDataLoaderResultModel.h"
 
 class RealDataItem;
 
@@ -40,4 +40,4 @@ private:
     RealDataItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_DATALOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H
+#endif // BORNAGAIN_GUI_VIEW_LOADERS_AUTOMATICDATALOADER1DRESULTMODEL_H
diff --git a/GUI/DataLoaders/DataLoaderUtil.cpp b/GUI/View/Loaders/DataLoaderUtil.cpp
similarity index 87%
rename from GUI/DataLoaders/DataLoaderUtil.cpp
rename to GUI/View/Loaders/DataLoaderUtil.cpp
index e011b98cf631d7956b5ef88166594f4ad1bcb9eb..51a01ee60c0a44a4ccd0efe3b6d52f6bc5d1eadd 100644
--- a/GUI/DataLoaders/DataLoaderUtil.cpp
+++ b/GUI/View/Loaders/DataLoaderUtil.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/DataLoaderUtil.cpp
+//! @file      GUI/View/Loaders/DataLoaderUtil.cpp
 //! @brief     Implements class UserDefinedDataLoader1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/DataLoaders/DataLoaderUtil.h"
-#include "GUI/DataLoaders/AutomaticDataLoader1D.h"
-#include "GUI/DataLoaders/QREDataLoader.h"
-#include "GUI/DataLoaders/UserDefinedDataLoader1D.h"
-#include "GUI/Models/DataLoaders1D.h"
+#include "GUI/View/Loaders/DataLoaderUtil.h"
+#include "GUI/Model/IO/DataLoaders1D.h"
+#include "GUI/View/Loaders/AutomaticDataLoader1D.h"
+#include "GUI/View/Loaders/QREDataLoader.h"
+#include "GUI/View/Loaders/UserDefinedDataLoader1D.h"
 
 void cloneAsUserDefinedLoader(AbstractDataLoader1D* loader, const QString& name)
 {
diff --git a/GUI/DataLoaders/DataLoaderUtil.h b/GUI/View/Loaders/DataLoaderUtil.h
similarity index 80%
rename from GUI/DataLoaders/DataLoaderUtil.h
rename to GUI/View/Loaders/DataLoaderUtil.h
index ed92834113fde49f6b12bdae13d2160b403fce03..20da94e90a7c655a672587d81fd867e83ffe9677 100644
--- a/GUI/DataLoaders/DataLoaderUtil.h
+++ b/GUI/View/Loaders/DataLoaderUtil.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/DataLoaderUtil.h
+//! @file      GUI/View/Loaders/DataLoaderUtil.h
 //! @brief     Utility functions for data loaders
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_DATALOADERS_DATALOADERUTIL_H
-#define BORNAGAIN_GUI_DATALOADERS_DATALOADERUTIL_H
+#ifndef BORNAGAIN_GUI_VIEW_LOADERS_DATALOADERUTIL_H
+#define BORNAGAIN_GUI_VIEW_LOADERS_DATALOADERUTIL_H
 
 class AbstractDataLoader1D;
 class QString;
@@ -24,4 +24,4 @@ void cloneAsUserDefinedLoader(AbstractDataLoader1D* loader, const QString& name)
 //! register the concrete 1D data loaders with DataLoaders1D
 void register1DDataLoaders();
 
-#endif // BORNAGAIN_GUI_DATALOADERS_DATALOADERUTIL_H
+#endif // BORNAGAIN_GUI_VIEW_LOADERS_DATALOADERUTIL_H
diff --git a/GUI/DataLoaders/QREDataLoader.cpp b/GUI/View/Loaders/QREDataLoader.cpp
similarity index 98%
rename from GUI/DataLoaders/QREDataLoader.cpp
rename to GUI/View/Loaders/QREDataLoader.cpp
index 9338d0c24e4eba0b048e18e149ed3990d425b57c..8b4b467920e23bc8fecd196e5141f409bc03016c 100644
--- a/GUI/DataLoaders/QREDataLoader.cpp
+++ b/GUI/View/Loaders/QREDataLoader.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/QREDataLoader.cpp
+//! @file      GUI/View/Loaders/QREDataLoader.cpp
 //! @brief     Implements class QREDataLoader
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/DataLoaders/QREDataLoader.h"
+#include "GUI/View/Loaders/QREDataLoader.h"
 #include "Base/Axis/PointwiseAxis.h"
 #include "Device/Coord/AxisNames.h"
-#include "GUI/DataLoaders/QREDataLoaderProperties.h"
-#include "GUI/DataLoaders/QREDataLoaderResultModel.h"
-#include "GUI/Models/JobItemUtils.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/utils/DeserializationException.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Util/DeserializationException.h"
+#include "GUI/View/Loaders/QREDataLoaderProperties.h"
+#include "GUI/View/Loaders/QREDataLoaderResultModel.h"
 #include "ui_QREDataLoaderProperties.h"
 #include <QFile>
 #include <QString>
diff --git a/GUI/DataLoaders/QREDataLoader.h b/GUI/View/Loaders/QREDataLoader.h
similarity index 96%
rename from GUI/DataLoaders/QREDataLoader.h
rename to GUI/View/Loaders/QREDataLoader.h
index 2429371c350b8197610365b390f8fc4748489245..1d0a7a81d3d20fd47a0118ecc94dec6c7ee143f8 100644
--- a/GUI/DataLoaders/QREDataLoader.h
+++ b/GUI/View/Loaders/QREDataLoader.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/QREDataLoader.h
+//! @file      GUI/View/Loaders/QREDataLoader.h
 //! @brief     Defines class QREDataLoader
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_DATALOADERS_QREDATALOADER_H
-#define BORNAGAIN_GUI_DATALOADERS_QREDATALOADER_H
+#ifndef BORNAGAIN_GUI_VIEW_LOADERS_QREDATALOADER_H
+#define BORNAGAIN_GUI_VIEW_LOADERS_QREDATALOADER_H
 
-#include "GUI/Models/AbstractDataLoader1D.h"
+#include "GUI/Model/IO/AbstractDataLoader1D.h"
 #include <QVector>
 #include <variant>
 
@@ -139,4 +139,4 @@ private:
 QDataStream& operator<<(QDataStream& stream, const QREDataLoader::ImportSettings& s);
 QDataStream& operator>>(QDataStream& stream, QREDataLoader::ImportSettings& s);
 
-#endif // BORNAGAIN_GUI_DATALOADERS_QREDATALOADER_H
+#endif // BORNAGAIN_GUI_VIEW_LOADERS_QREDATALOADER_H
diff --git a/GUI/DataLoaders/QREDataLoaderProperties.cpp b/GUI/View/Loaders/QREDataLoaderProperties.cpp
similarity index 97%
rename from GUI/DataLoaders/QREDataLoaderProperties.cpp
rename to GUI/View/Loaders/QREDataLoaderProperties.cpp
index c46d51f2da9b59791695654d6b8c4c8511d13e54..1537a70a91a2892e94f72fd599ae86bf0292a679 100644
--- a/GUI/DataLoaders/QREDataLoaderProperties.cpp
+++ b/GUI/View/Loaders/QREDataLoaderProperties.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/QREDataLoaderProperties.cpp
+//! @file      GUI/View/Loaders/QREDataLoaderProperties.cpp
 //! @brief     Implements class AutomaticMultiColumnDataLoader1DProperties
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/DataLoaders/QREDataLoaderProperties.h"
+#include "GUI/View/Loaders/QREDataLoaderProperties.h"
 #include "ui_QREDataLoaderProperties.h"
 #include <QCheckBox>
 #include <QtGui>
diff --git a/GUI/DataLoaders/QREDataLoaderProperties.h b/GUI/View/Loaders/QREDataLoaderProperties.h
similarity index 88%
rename from GUI/DataLoaders/QREDataLoaderProperties.h
rename to GUI/View/Loaders/QREDataLoaderProperties.h
index d228b5624b0d1036f93cd7c5920084fbf3fb4bcb..d13c489ed511a5841c8090d9e505738a97e217b5 100644
--- a/GUI/DataLoaders/QREDataLoaderProperties.h
+++ b/GUI/View/Loaders/QREDataLoaderProperties.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/QREDataLoaderProperties.h
+//! @file      GUI/View/Loaders/QREDataLoaderProperties.h
 //! @brief     Defines class AutomaticMultiColumnDataLoader1DProperties
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_DATALOADERS_QREDATALOADERPROPERTIES_H
-#define BORNAGAIN_GUI_DATALOADERS_QREDATALOADERPROPERTIES_H
+#ifndef BORNAGAIN_GUI_VIEW_LOADERS_QREDATALOADERPROPERTIES_H
+#define BORNAGAIN_GUI_VIEW_LOADERS_QREDATALOADERPROPERTIES_H
 
 #include <QWidget>
 
@@ -62,4 +62,4 @@ private:
     static const int factorColumn = factorLabelColumn + 1;
 };
 
-#endif // BORNAGAIN_GUI_DATALOADERS_QREDATALOADERPROPERTIES_H
+#endif // BORNAGAIN_GUI_VIEW_LOADERS_QREDATALOADERPROPERTIES_H
diff --git a/GUI/DataLoaders/QREDataLoaderProperties.ui b/GUI/View/Loaders/QREDataLoaderProperties.ui
similarity index 100%
rename from GUI/DataLoaders/QREDataLoaderProperties.ui
rename to GUI/View/Loaders/QREDataLoaderProperties.ui
diff --git a/GUI/DataLoaders/QREDataLoaderResultModel.cpp b/GUI/View/Loaders/QREDataLoaderResultModel.cpp
similarity index 96%
rename from GUI/DataLoaders/QREDataLoaderResultModel.cpp
rename to GUI/View/Loaders/QREDataLoaderResultModel.cpp
index 4f8652d2a58cfdfff1323f877f6a6d0fbdb26961..6ef2485f0cd8a6a7cda927662b84bba778709ea0 100644
--- a/GUI/DataLoaders/QREDataLoaderResultModel.cpp
+++ b/GUI/View/Loaders/QREDataLoaderResultModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/QREDataLoaderResultModel.cpp
+//! @file      GUI/View/Loaders/QREDataLoaderResultModel.cpp
 //! @brief     Implements class QREDataLoaderResultModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/DataLoaders/QREDataLoaderResultModel.h"
+#include "GUI/View/Loaders/QREDataLoaderResultModel.h"
 
 QREDataLoaderResultModel::QREDataLoaderResultModel(QREDataLoader::ImportResult* importResult)
     : m_importResult(importResult)
diff --git a/GUI/DataLoaders/QREDataLoaderResultModel.h b/GUI/View/Loaders/QREDataLoaderResultModel.h
similarity index 80%
rename from GUI/DataLoaders/QREDataLoaderResultModel.h
rename to GUI/View/Loaders/QREDataLoaderResultModel.h
index 2bdcfd7992a7fcc72c9c1386fc77cc68eb1cc481..e5bbd679b671cc3dada32755e14e200362302266 100644
--- a/GUI/DataLoaders/QREDataLoaderResultModel.h
+++ b/GUI/View/Loaders/QREDataLoaderResultModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/QREDataLoaderResultModel.h
+//! @file      GUI/View/Loaders/QREDataLoaderResultModel.h
 //! @brief     Defines class QREDataLoaderResultModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_DATALOADERS_QREDATALOADERRESULTMODEL_H
-#define BORNAGAIN_GUI_DATALOADERS_QREDATALOADERRESULTMODEL_H
+#ifndef BORNAGAIN_GUI_VIEW_LOADERS_QREDATALOADERRESULTMODEL_H
+#define BORNAGAIN_GUI_VIEW_LOADERS_QREDATALOADERRESULTMODEL_H
 
-#include "GUI/DataLoaders/QREDataLoader.h"
-#include "GUI/Models/AbstractDataLoaderResultModel.h"
+#include "GUI/Model/IO/AbstractDataLoaderResultModel.h"
+#include "GUI/View/Loaders/QREDataLoader.h"
 
 //! The result model of a QREDataLoader (for showing the import results in a table view).
 class QREDataLoaderResultModel : public AbstractDataLoaderResultModel {
@@ -39,4 +39,4 @@ private:
     QREDataLoader::ImportResult* m_importResult;
 };
 
-#endif // BORNAGAIN_GUI_DATALOADERS_QREDATALOADERRESULTMODEL_H
+#endif // BORNAGAIN_GUI_VIEW_LOADERS_QREDATALOADERRESULTMODEL_H
diff --git a/GUI/DataLoaders/UserDefinedDataLoader1D.cpp b/GUI/View/Loaders/UserDefinedDataLoader1D.cpp
similarity index 95%
rename from GUI/DataLoaders/UserDefinedDataLoader1D.cpp
rename to GUI/View/Loaders/UserDefinedDataLoader1D.cpp
index e98d4a86b772c1c48d65cee7d1359cee3e43ad41..c7c1d10b18f48245c8bf8f2740fcc605cd1c26b6 100644
--- a/GUI/DataLoaders/UserDefinedDataLoader1D.cpp
+++ b/GUI/View/Loaders/UserDefinedDataLoader1D.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/UserDefinedDataLoader1D.cpp
+//! @file      GUI/View/Loaders/UserDefinedDataLoader1D.cpp
 //! @brief     Implements class UserDefinedDataLoader1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/DataLoaders/UserDefinedDataLoader1D.h"
+#include "GUI/View/Loaders/UserDefinedDataLoader1D.h"
 
 UserDefinedDataLoader1D::UserDefinedDataLoader1D(AbstractDataLoader1D* wrappedLoader,
                                                  const QString& name,
diff --git a/GUI/DataLoaders/UserDefinedDataLoader1D.h b/GUI/View/Loaders/UserDefinedDataLoader1D.h
similarity index 85%
rename from GUI/DataLoaders/UserDefinedDataLoader1D.h
rename to GUI/View/Loaders/UserDefinedDataLoader1D.h
index ffe553e92253956644cd673d4dee2cda6635cf95..269ca41ea473a9a29bd80baa2f7300d349729efb 100644
--- a/GUI/DataLoaders/UserDefinedDataLoader1D.h
+++ b/GUI/View/Loaders/UserDefinedDataLoader1D.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/DataLoaders/UserDefinedDataLoader1D.h
+//! @file      GUI/View/Loaders/UserDefinedDataLoader1D.h
 //! @brief     Defines class UserDefinedDataLoader1D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_DATALOADERS_USERDEFINEDDATALOADER1D_H
-#define BORNAGAIN_GUI_DATALOADERS_USERDEFINEDDATALOADER1D_H
+#ifndef BORNAGAIN_GUI_VIEW_LOADERS_USERDEFINEDDATALOADER1D_H
+#define BORNAGAIN_GUI_VIEW_LOADERS_USERDEFINEDDATALOADER1D_H
 
-#include "GUI/Models/AbstractDataLoader1D.h"
+#include "GUI/Model/IO/AbstractDataLoader1D.h"
 
 //! A user defined data loader. This is a thin wrapper around the real loader implementation,
 //! storing the relevant settings to make it user definable (namely name and import settings).
@@ -43,4 +43,4 @@ private:
     QByteArray m_defaultProperties;
 };
 
-#endif // BORNAGAIN_GUI_DATALOADERS_USERDEFINEDDATALOADER1D_H
+#endif // BORNAGAIN_GUI_VIEW_LOADERS_USERDEFINEDDATALOADER1D_H
diff --git a/GUI/mainwindow/aboutapplicationdialog.cpp b/GUI/View/Main/AboutDialog.cpp
similarity index 87%
rename from GUI/mainwindow/aboutapplicationdialog.cpp
rename to GUI/View/Main/AboutDialog.cpp
index 875a62d06daf0e472d476fba03f89d476313a658..369ad774eb77ed21c4bbca862944c302f0d3d5ec 100644
--- a/GUI/mainwindow/aboutapplicationdialog.cpp
+++ b/GUI/View/Main/AboutDialog.cpp
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/aboutapplicationdialog.cpp
-//! @brief     Implements class AboutApplicationDialog
+//! @file      GUI/View/Main/AboutDialog.cpp
+//! @brief     Implements class AboutDialog
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/aboutapplicationdialog.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/utils/CustomEventFilters.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/View/Main/AboutDialog.h"
+#include "GUI/Util/Path.h"
+#include "GUI/View/PropertyEditor/CustomEventFilters.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 #include <QDate>
 #include <QLabel>
 #include <QPushButton>
@@ -43,7 +43,7 @@ QLabel* createLogoLabel()
 
 } // namespace
 
-AboutApplicationDialog::AboutApplicationDialog(QWidget* parent) : QDialog(parent)
+AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent)
 {
     QColor bgColor(240, 240, 240, 255);
     QPalette palette;
@@ -65,7 +65,7 @@ AboutApplicationDialog::AboutApplicationDialog(QWidget* parent) : QDialog(parent
     setLayout(mainLayout);
 }
 
-QBoxLayout* AboutApplicationDialog::createLogoLayout()
+QBoxLayout* AboutDialog::createLogoLayout()
 {
     auto result = new QVBoxLayout;
 
@@ -80,7 +80,7 @@ QBoxLayout* AboutApplicationDialog::createLogoLayout()
     return result;
 }
 
-QBoxLayout* AboutApplicationDialog::createTextLayout()
+QBoxLayout* AboutDialog::createTextLayout()
 {
     auto result = new QVBoxLayout;
 
@@ -94,7 +94,7 @@ QBoxLayout* AboutApplicationDialog::createTextLayout()
 
     // title
     auto aboutTitleLabel =
-        new QLabel("BornAgain version " + GUI::Helpers::getBornAgainVersionString());
+        new QLabel("BornAgain version " + GUI::Util::Path::getBornAgainVersionString());
     aboutTitleLabel->setFont(titleFont);
 
     // description
@@ -137,7 +137,7 @@ QBoxLayout* AboutApplicationDialog::createTextLayout()
     return result;
 }
 
-QBoxLayout* AboutApplicationDialog::createButtonLayout()
+QBoxLayout* AboutDialog::createButtonLayout()
 {
     auto result = new QHBoxLayout;
 
diff --git a/GUI/mainwindow/aboutapplicationdialog.h b/GUI/View/Main/AboutDialog.h
similarity index 65%
rename from GUI/mainwindow/aboutapplicationdialog.h
rename to GUI/View/Main/AboutDialog.h
index cefa83707f03b4e42762a1b2cc7562a09d1ca921..8fba7b885e84ea4f348190d68c9b9abeab03e8eb 100644
--- a/GUI/mainwindow/aboutapplicationdialog.h
+++ b/GUI/View/Main/AboutDialog.h
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/aboutapplicationdialog.h
-//! @brief     Defines class AboutApplicationDialog
+//! @file      GUI/View/Main/AboutDialog.h
+//! @brief     Defines class AboutDialog
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_ABOUTAPPLICATIONDIALOG_H
-#define BORNAGAIN_GUI_MAINWINDOW_ABOUTAPPLICATIONDIALOG_H
+#ifndef BORNAGAIN_GUI_VIEW_MAIN_ABOUTDIALOG_H
+#define BORNAGAIN_GUI_VIEW_MAIN_ABOUTDIALOG_H
 
 #include <QDialog>
 
@@ -21,10 +21,10 @@ class QBoxLayout;
 
 //! About BornAgain dialog.
 
-class AboutApplicationDialog : public QDialog {
+class AboutDialog : public QDialog {
     Q_OBJECT
 public:
-    AboutApplicationDialog(QWidget* parent = 0);
+    AboutDialog(QWidget* parent = 0);
 
 private:
     QBoxLayout* createLogoLayout();
@@ -32,4 +32,4 @@ private:
     QBoxLayout* createButtonLayout();
 };
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_ABOUTAPPLICATIONDIALOG_H
+#endif // BORNAGAIN_GUI_VIEW_MAIN_ABOUTDIALOG_H
diff --git a/GUI/mainwindow/actionmanager.cpp b/GUI/View/Main/ActionManager.cpp
similarity index 92%
rename from GUI/mainwindow/actionmanager.cpp
rename to GUI/View/Main/ActionManager.cpp
index a1ea8af84ab5b7ca2fe0d1c8b65f9b3d7b457069..6c95c166dbe35cf1d259e5084100bbfd95cc63c0 100644
--- a/GUI/mainwindow/actionmanager.cpp
+++ b/GUI/View/Main/ActionManager.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/actionmanager.cpp
+//! @file      GUI/View/Main/ActionManager.cpp
 //! @brief     Implements class ActionManager
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,19 +12,20 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/actionmanager.h"
+#include "GUI/View/Main/ActionManager.h"
 #include "Base/Utils/Assert.h"
 #include "Base/Utils/SysUtils.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Views/JobWidgets/JobView.h"
-#include "GUI/Views/SampleView.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
-#include "GUI/mainwindow/PyImportAssistant.h"
-#include "GUI/mainwindow/aboutapplicationdialog.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectmanager.h"
-#include "GUI/utils/hostosinfo.h"
-#include "GUI/utils/qstringutils.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/Util/OSInfo.h"
+#include "GUI/Util/Path.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Job/JobView.h"
+#include "GUI/View/Main/AboutDialog.h"
+#include "GUI/View/Main/MainWindow.h"
+#include "GUI/View/Main/ProjectManager.h"
+#include "GUI/View/Main/PyImportAssistant.h"
+#include "GUI/View/SampleDesigner/SampleView.h"
 #include <QDesktopServices>
 #include <QDir>
 #include <QMenuBar>
@@ -65,7 +66,7 @@ ActionManager::ActionManager(MainWindow* parent)
 
 void ActionManager::updateActionEnabling()
 {
-    const bool documentExists = ProjectManager::instance()->document() != nullptr;
+    const bool documentExists = gSessionData->projectDocument != nullptr;
     m_saveAction->setEnabled(documentExists);
     m_saveAsAction->setEnabled(documentExists);
     m_closeProjectAction->setEnabled(documentExists);
@@ -131,7 +132,7 @@ void ActionManager::createMenus()
 {
     m_menuBar = new QMenuBar(0); // No parent (System menu bar on Mac OS X)
 
-    if (!GUI::Utils::OS::HostOsInfo::isMacHost())
+    if (!GUI::Util::OS::HostOsInfo::isMacHost())
         m_mainWindow->setMenuBar(m_menuBar);
 
     // File Menu
@@ -157,11 +158,11 @@ void ActionManager::createMenus()
 
 #ifdef BORNAGAIN_PYTHON
     connect(action, &QAction::triggered, this, &ActionManager::onImportFromPythonScript);
-    if (GUI::Utils::OS::HostOsInfo::isMacHost())
+    if (GUI::Util::OS::HostOsInfo::isMacHost())
         if (BaseUtils::System::getenv("PYTHONHOME").empty())
             action->setEnabled(false);
 #endif // BORNAGAIN_PYTHON
-    if (!ProjectManager::instance()->document())
+    if (!gSessionData->projectDocument)
         action->setEnabled(false);
 
     m_fileMenu->addSeparator();
@@ -205,7 +206,7 @@ void ActionManager::onAboutToShowFileMenu()
     int orderNr = 1;
     for (QString file : m_mainWindow->projectManager()->recentProjects()) {
         hasRecentProjects = true;
-        QString actionText = GUI::Utils::String::withTildeHomePath(QDir::toNativeSeparators(file));
+        QString actionText = GUI::Util::Path::withTildeHomePath(QDir::toNativeSeparators(file));
         if (orderNr < 10)
             actionText = QString("&%1 ").arg(orderNr) + actionText;
         QAction* action = m_recentProjectsMenu->addAction(actionText);
@@ -306,7 +307,7 @@ void ActionManager::setSessionModelViewActive(bool status)
 
 void ActionManager::onAboutApplication()
 {
-    AboutApplicationDialog dialog(m_mainWindow);
+    AboutDialog dialog(m_mainWindow);
     dialog.exec();
 }
 
@@ -320,7 +321,7 @@ void ActionManager::onCurrentViewChanged()
 #ifdef BORNAGAIN_PYTHON
 void ActionManager::onImportFromPythonScript()
 {
-    PyImportAssistant assistant(m_mainWindow, ProjectManager::instance()->document());
+    PyImportAssistant assistant(m_mainWindow, gSessionData->projectDocument);
     assistant.exec();
 }
 #endif // BORNAGAIN_PYTHON
diff --git a/GUI/mainwindow/actionmanager.h b/GUI/View/Main/ActionManager.h
similarity index 90%
rename from GUI/mainwindow/actionmanager.h
rename to GUI/View/Main/ActionManager.h
index 8e2772a207ef36f72d909c1a80a22c143bb23a7b..5511848037ebf76713086c72b661c0950c305667 100644
--- a/GUI/mainwindow/actionmanager.h
+++ b/GUI/View/Main/ActionManager.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/actionmanager.h
+//! @file      GUI/View/Main/ActionManager.h
 //! @brief     Defines class ActionManager
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_ACTIONMANAGER_H
-#define BORNAGAIN_GUI_MAINWINDOW_ACTIONMANAGER_H
+#ifndef BORNAGAIN_GUI_VIEW_MAIN_ACTIONMANAGER_H
+#define BORNAGAIN_GUI_VIEW_MAIN_ACTIONMANAGER_H
 
 #include <QObject>
 
@@ -71,4 +71,4 @@ private:
     void createGlobalShortcuts();
 };
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_ACTIONMANAGER_H
+#endif // BORNAGAIN_GUI_VIEW_MAIN_ACTIONMANAGER_H
diff --git a/GUI/mainwindow/AutosaveController.cpp b/GUI/View/Main/AutosaveController.cpp
similarity index 93%
rename from GUI/mainwindow/AutosaveController.cpp
rename to GUI/View/Main/AutosaveController.cpp
index 35af4fdce3a8bc3e0b8812e71afdb1c38d57bdd9..7e3b42d72c805d4fce57d98514755564a95b60f0 100644
--- a/GUI/mainwindow/AutosaveController.cpp
+++ b/GUI/View/Main/AutosaveController.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/AutosaveController.cpp
+//! @file      GUI/View/Main/AutosaveController.cpp
 //! @brief     Implements class AutosaveController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/AutosaveController.h"
-#include "GUI/Views/CommonWidgets/UpdateTimer.h"
-#include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/View/Main/AutosaveController.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/View/Tool/UpdateTimer.h"
 #include <QDir>
 
 namespace {
diff --git a/GUI/mainwindow/AutosaveController.h b/GUI/View/Main/AutosaveController.h
similarity index 89%
rename from GUI/mainwindow/AutosaveController.h
rename to GUI/View/Main/AutosaveController.h
index 50a1d126e47ab75cac964b6fc5425b7bf9c5fa6a..777bb5b5e10d49ad3d0c5dc35816c56361a1c99d 100644
--- a/GUI/mainwindow/AutosaveController.h
+++ b/GUI/View/Main/AutosaveController.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/AutosaveController.h
+//! @file      GUI/View/Main/AutosaveController.h
 //! @brief     Defines class AutosaveController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_AUTOSAVECONTROLLER_H
-#define BORNAGAIN_GUI_MAINWINDOW_AUTOSAVECONTROLLER_H
+#ifndef BORNAGAIN_GUI_VIEW_MAIN_AUTOSAVECONTROLLER_H
+#define BORNAGAIN_GUI_VIEW_MAIN_AUTOSAVECONTROLLER_H
 
 #include <QObject>
 
@@ -59,4 +59,4 @@ private:
     UpdateTimer* m_timer;
 };
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_AUTOSAVECONTROLLER_H
+#endif // BORNAGAIN_GUI_VIEW_MAIN_AUTOSAVECONTROLLER_H
diff --git a/GUI/mainwindow/mainwindow.cpp b/GUI/View/Main/MainWindow.cpp
similarity index 92%
rename from GUI/mainwindow/mainwindow.cpp
rename to GUI/View/Main/MainWindow.cpp
index f62c14481547e6e4234e90cca50fab195613768e..52265bd3fd72654503245c10a0d70b87c5a0d546 100644
--- a/GUI/mainwindow/mainwindow.cpp
+++ b/GUI/View/Main/MainWindow.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/mainwindow.cpp
+//! @file      GUI/View/Main/MainWindow.cpp
 //! @brief     Implements class MainWindow
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,23 +12,23 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Views/ImportDataView.h"
-#include "GUI/Views/InstrumentWidgets/InstrumentView.h"
-#include "GUI/Views/JobWidgets/JobView.h"
-#include "GUI/Views/ProjectSettingsView.h"
-#include "GUI/Views/SampleView.h"
-#include "GUI/Views/SessionModelView.h"
-#include "GUI/Views/SimulationView.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
-#include "GUI/Views/WelcomeView.h"
-#include "GUI/mainwindow/actionmanager.h"
-#include "GUI/mainwindow/projectmanager.h"
-#include "GUI/utils/Helpers.h"
-#include "GUI/utils/hostosinfo.h"
+#include "GUI/View/Main/MainWindow.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/Util/OSInfo.h"
+#include "GUI/Util/Path.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Import/ImportDataView.h"
+#include "GUI/View/Instrument/InstrumentView.h"
+#include "GUI/View/Job/JobView.h"
+#include "GUI/View/Main/ActionManager.h"
+#include "GUI/View/Main/ProjectManager.h"
+#include "GUI/View/SampleDesigner/SampleView.h"
+#include "GUI/View/Toplevel/ProjectSettingsView.h"
+#include "GUI/View/Toplevel/SessionModelView.h"
+#include "GUI/View/Toplevel/SimulationView.h"
+#include "GUI/View/Toplevel/WelcomeView.h"
 #include <QAction>
 #include <QApplication>
 #include <QBoxLayout>
@@ -156,14 +156,13 @@ void MainWindow::raiseView(int viewId)
 
 void MainWindow::updateTitle()
 {
-    const auto doc = m_projectManager->document();
+    const auto doc = gSessionData->projectDocument;
     if (doc == nullptr)
         setWindowTitle("BornAgain");
-    else if (doc->isModified()) {
+    else if (doc->isModified())
         setWindowTitle("BornAgain - *" + doc->projectName());
-    } else {
+    else
         setWindowTitle("BornAgain - " + doc->projectName());
-    }
 }
 
 void MainWindow::onFocusRequest(int index)
@@ -205,8 +204,8 @@ void MainWindow::onSessionModelViewActive(bool isActive)
 
 void MainWindow::closeEvent(QCloseEvent* event)
 {
-    if (m_projectManager->document() != nullptr
-        && m_projectManager->document()->jobModel()->hasUnfinishedJobs()) {
+    if (gSessionData->projectDocument != nullptr
+        && gSessionData->projectDocument->jobModel()->hasUnfinishedJobs()) {
         QMessageBox::warning(this, "Can't quit the application.",
                              "Can't quit the application while jobs are running.\n"
                              "Cancel running jobs or wait until they are completed.");
@@ -247,7 +246,7 @@ void MainWindow::initViews()
                 "Switch to Welcome View", m_welcomeView);
     }
 
-    auto doc = m_projectManager->document();
+    auto doc = gSessionData->projectDocument;
     if (doc != nullptr) {
         m_instrumentView = new InstrumentView(this, doc);
         m_sampleView = new SampleView(this, doc);
diff --git a/GUI/mainwindow/mainwindow.h b/GUI/View/Main/MainWindow.h
similarity index 94%
rename from GUI/mainwindow/mainwindow.h
rename to GUI/View/Main/MainWindow.h
index 36af64a96ed197f666bc68272ddc8e699a5aaa14..0b725d68797107176fc785bafb7c78f6071c990f 100644
--- a/GUI/mainwindow/mainwindow.h
+++ b/GUI/View/Main/MainWindow.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/mainwindow.h
+//! @file      GUI/View/Main/MainWindow.h
 //! @brief     Defines class MainWindow
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,30 +12,29 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_MAINWINDOW_H
-#define BORNAGAIN_GUI_MAINWINDOW_MAINWINDOW_H
+#ifndef BORNAGAIN_GUI_VIEW_MAIN_MAINWINDOW_H
+#define BORNAGAIN_GUI_VIEW_MAIN_MAINWINDOW_H
 
 #include <QMainWindow>
 
-class WelcomeView;
-class InstrumentView;
-class SampleView;
+class ActionManager;
 class ImportDataView;
-class SimulationView;
+class InstrumentView;
 class JobView;
-class SessionModelView;
-
 class ProjectManager;
-class ActionManager;
+class ProjectSettingsView;
+class SampleView;
+class SessionModelView;
+class SimulationView;
 class UpdateNotifier;
+class WelcomeView;
 
-class QProgressBar;
 class QButtonGroup;
+class QProgressBar;
 class QStackedLayout;
 class QStatusBar;
 class QToolButton;
 class QVBoxLayout;
-class ProjectSettingsView;
 
 class MainWindow : public QMainWindow {
     Q_OBJECT
@@ -113,4 +112,4 @@ private:
 
 #define baWin (MainWindow::instance())
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_MAINWINDOW_H
+#endif // BORNAGAIN_GUI_VIEW_MAIN_MAINWINDOW_H
diff --git a/GUI/mainwindow/newprojectdialog.cpp b/GUI/View/Main/NewProjectDialog.cpp
similarity index 95%
rename from GUI/mainwindow/newprojectdialog.cpp
rename to GUI/View/Main/NewProjectDialog.cpp
index 9472b8e7c173a7d6e6c067dabad47dfe0e75e92c..053dc7d176d5a5a0c951111a2ad7289d604db0de 100644
--- a/GUI/mainwindow/newprojectdialog.cpp
+++ b/GUI/View/Main/NewProjectDialog.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/newprojectdialog.cpp
+//! @file      GUI/View/Main/NewProjectDialog.cpp
 //! @brief     Implements class NewProjectDialog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/newprojectdialog.h"
-#include "GUI/Application/Application.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/View/Main/NewProjectDialog.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/Project/ProjectDocument.h"
 #include <QFileDialog>
 #include <QGroupBox>
 #include <QLabel>
@@ -102,7 +103,7 @@ void NewProjectDialog::setWorkingDirectory(const QString& text)
 QString NewProjectDialog::getProjectFileName() const
 {
     QString projectDir = getWorkingDirectory() + QString("/") + getProjectName();
-    QString projectFile = getProjectName() + ProjectDocument::projectFileExtension();
+    QString projectFile = getProjectName() + GUI::Project::Utils::projectFileExtension;
     return projectDir + QString("/") + projectFile;
 }
 
diff --git a/GUI/mainwindow/newprojectdialog.h b/GUI/View/Main/NewProjectDialog.h
similarity index 88%
rename from GUI/mainwindow/newprojectdialog.h
rename to GUI/View/Main/NewProjectDialog.h
index ea6a1b7f21e0ddfdc2981840789d347e30b995fa..ebab71526228fc2a4bf0c2981b8ee5d6fc99cead 100644
--- a/GUI/mainwindow/newprojectdialog.h
+++ b/GUI/View/Main/NewProjectDialog.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/newprojectdialog.h
+//! @file      GUI/View/Main/NewProjectDialog.h
 //! @brief     Defines class NewProjectDialog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_NEWPROJECTDIALOG_H
-#define BORNAGAIN_GUI_MAINWINDOW_NEWPROJECTDIALOG_H
+#ifndef BORNAGAIN_GUI_VIEW_MAIN_NEWPROJECTDIALOG_H
+#define BORNAGAIN_GUI_VIEW_MAIN_NEWPROJECTDIALOG_H
 
 #include <QDialog>
 #include <QLineEdit>
@@ -56,4 +56,4 @@ private:
     bool m_valid_projectPath;
 };
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_NEWPROJECTDIALOG_H
+#endif // BORNAGAIN_GUI_VIEW_MAIN_NEWPROJECTDIALOG_H
diff --git a/GUI/mainwindow/projectmanager.cpp b/GUI/View/Main/ProjectManager.cpp
similarity index 80%
rename from GUI/mainwindow/projectmanager.cpp
rename to GUI/View/Main/ProjectManager.cpp
index e65daa728296e5c9a35d36b91c5d0920917a06c9..7326942bee1da923636a1ac42856949a86354940 100644
--- a/GUI/mainwindow/projectmanager.cpp
+++ b/GUI/View/Main/ProjectManager.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/projectmanager.cpp
+//! @file      GUI/View/Main/ProjectManager.cpp
 //! @brief     Implements class ProjectManager
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,30 +12,28 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/projectmanager.h"
+#include "GUI/View/Main/ProjectManager.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Views/CommonWidgets/GUIHelpers.h"
-#include "GUI/Views/InfoWidgets/ProjectLoadProblemDialog.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
-#include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/mainwindow/SaveService.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/newprojectdialog.h"
-#include "GUI/mainwindow/projectdocument.h"
-#include "GUI/utils/MessageService.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Data/ApplicationModels.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/MessageService.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Info/ProjectLoadProblemDialog.h"
+#include "GUI/View/Main/MainWindow.h"
+#include "GUI/View/Main/NewProjectDialog.h"
+#include "GUI/View/Main/SaveService.h"
+#include "GUI/View/Info/MessageBox.h"
 #include <QApplication>
 #include <QDateTime>
 #include <QFileDialog>
 #include <QMessageBox>
 #include <QSettings>
-#include <QStandardPaths>
-
-using namespace GUI::Project;
 
 namespace {
+
 const QString S_PROJECTMANAGER = "ProjectManager";
 const QString S_AUTOSAVE = "EnableAutosave";
 const QString S_DEFAULTPROJECTPATH = "DefaultProjectPath";
@@ -43,12 +41,14 @@ const QString S_RECENTPROJECTS = "RecentProjects";
 const QString S_LASTUSEDIMPORTDIR = "LastUsedImportDir";
 const QString S_LASTUSEDIMPORFILTER1D = "LastUsedImportFilter1D";
 const QString S_LASTUSEDIMPORFILTER2D = "LastUsedImportFilter2D";
+
 } // namespace
 
+
 ProjectManager* ProjectManager::s_instance = nullptr;
 
 ProjectManager::ProjectManager(MainWindow* parent)
-    : m_mainWindow(parent), m_project_document(nullptr), m_saveService(new SaveService(this))
+    : m_mainWindow(parent), m_saveService(new SaveService(this))
 
 {
     if (s_instance != nullptr)
@@ -61,7 +61,7 @@ ProjectManager::ProjectManager(MainWindow* parent)
 ProjectManager::~ProjectManager()
 {
     s_instance = nullptr;
-    delete m_project_document;
+    delete gSessionData->projectDocument;
 }
 
 ProjectManager* ProjectManager::instance()
@@ -117,21 +117,14 @@ void ProjectManager::writeSettings()
     settings.endGroup();
 }
 
-ProjectDocument* ProjectManager::document()
-{
-    return m_project_document;
-}
-
 //! Returns list of recent projects, validates if projects still exists on disk.
 
 QStringList ProjectManager::recentProjects()
 {
     QStringList updatedList;
-    for (QString fileName : m_recentProjects) {
-        QFile fin(fileName);
-        if (fin.exists())
+    for (QString fileName : m_recentProjects)
+        if (QFile fin(fileName); fin.exists())
             updatedList.append(fileName);
-    }
     m_recentProjects = updatedList;
     return m_recentProjects;
 }
@@ -140,28 +133,21 @@ QStringList ProjectManager::recentProjects()
 
 QString ProjectManager::projectDir() const
 {
-    if (m_project_document && m_project_document->hasValidNameAndPath())
-        return m_project_document->projectDir();
-
+    if (const auto pd = gSessionData->projectDocument)
+        return pd->validProjectDir();
     return "";
 }
 
-//! Returns directory name suitable for saving plots.
-
-QString ProjectManager::userExportDir() const
-{
-    QString result = projectDir();
-    if (result.isEmpty())
-        result = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
-
-    return result;
-}
-
 //! Returns directory name which was used by the user to import files.
 
 QString ProjectManager::userImportDir() const
 {
-    return m_importDirectory.isEmpty() ? userExportDir() : m_importDirectory;
+    if (m_importDirectory.isEmpty()) {
+        if (const auto pd = gSessionData->projectDocument)
+            return pd->userExportDir();
+        return "";
+    }
+    return m_importDirectory;
 }
 
 QString ProjectManager::recentlyUsedImportFilter1D() const
@@ -242,10 +228,10 @@ void ProjectManager::newProject()
 
 bool ProjectManager::closeCurrentProject()
 {
-    if (!m_project_document)
+    if (!gSessionData->projectDocument)
         return true;
 
-    if (m_project_document->isModified()) {
+    if (gSessionData->projectDocument->isModified()) {
         QMessageBox msgBox;
         msgBox.setText("The project has been modified.");
         msgBox.setInformativeText("Do you want to save your changes?");
@@ -276,8 +262,8 @@ bool ProjectManager::closeCurrentProject()
 bool ProjectManager::saveProject(QString projectFileName)
 {
     if (projectFileName.isEmpty()) {
-        if (m_project_document->hasValidNameAndPath())
-            projectFileName = m_project_document->projectFileName();
+        if (gSessionData->projectDocument->hasValidNameAndPath())
+            projectFileName = gSessionData->projectDocument->projectFileName();
         else
             projectFileName = acquireProjectFileName();
     }
@@ -344,7 +330,7 @@ void ProjectManager::openProject(QString fileName)
         riseProjectLoadProblemDialog(messageService);
         addToRecentProjects();
     }
-    if (m_project_document != nullptr) {
+    if (gSessionData->projectDocument != nullptr) {
         emit documentOpenedOrClosed();
         m_mainWindow->setCurrentView(MainWindow::PROJECT);
     }
@@ -354,23 +340,25 @@ void ProjectManager::openProject(QString fileName)
 
 void ProjectManager::createNewProject()
 {
-    if (m_project_document)
+    if (gSessionData->projectDocument)
         throw Error("ProjectManager::createNewProject() -> Project already exists");
 
-    m_project_document = new ProjectDocument();
+    gSessionData->projectDocument = new ProjectDocument();
 
     const QVariant defFunctionalities =
         baApp->settings().defaultFunctionalities(toVariant(ProjectDocument::All));
-    m_project_document->setFunctionalities(toFunctionalities(defFunctionalities));
-    m_project_document->setSingleInstrumentMode(baApp->settings().defaultIsSingleInstrumentMode());
-    m_project_document->setSingleSampleMode(baApp->settings().defaultIsSingleSampleMode());
+    gSessionData->projectDocument->setFunctionalities(toFunctionalities(defFunctionalities));
+    gSessionData->projectDocument->setSingleInstrumentMode(
+        baApp->settings().defaultIsSingleInstrumentMode());
+    gSessionData->projectDocument->setSingleSampleMode(
+        baApp->settings().defaultIsSingleSampleMode());
 
-    m_project_document->setProjectName("Untitled");
-    m_project_document->setModified(false);
+    gSessionData->projectDocument->setProjectName("Untitled");
+    gSessionData->projectDocument->setModified(false);
 
-    m_saveService->setDocument(m_project_document);
+    m_saveService->setDocument(gSessionData->projectDocument);
 
-    connect(m_project_document, &ProjectDocument::modified, this,
+    connect(gSessionData->projectDocument, &ProjectDocument::modified, this,
             &ProjectManager::onDocumentModified);
 }
 
@@ -379,8 +367,8 @@ void ProjectManager::deleteCurrentProject()
     emit aboutToCloseDocument();
     m_saveService->stopService();
 
-    delete m_project_document;
-    m_project_document = 0;
+    delete gSessionData->projectDocument;
+    gSessionData->projectDocument = nullptr;
 }
 
 //! Load project data from file name. If autosave info exists, opens dialog for project restore.
@@ -390,16 +378,18 @@ ProjectDocument::ReadResult ProjectManager::loadProject(const QString& projectFi
 {
     auto readResult = ProjectDocument::ReadResult::ok;
 
-    const bool useAutosave = m_saveService && Utils::hasAutosavedData(projectFileName);
-    const QString autosaveName = Utils::autosaveName(projectFileName);
+    const bool useAutosave =
+        m_saveService && GUI::Project::Utils::hasAutosavedData(projectFileName);
+    const QString autosaveName = GUI::Project::Utils::autosaveName(projectFileName);
     if (useAutosave && restoreProjectDialog(projectFileName, autosaveName)) {
         QApplication::setOverrideCursor(Qt::WaitCursor);
-        readResult = m_project_document->loadProjectFile(autosaveName, messageService);
-        m_project_document->setProjectFileName(projectFileName);
-        m_project_document->setModified(true);
+        readResult = gSessionData->projectDocument->loadProjectFile(autosaveName, messageService);
+        gSessionData->projectDocument->setProjectFileName(projectFileName);
+        gSessionData->projectDocument->setModified(true);
     } else {
         QApplication::setOverrideCursor(Qt::WaitCursor);
-        readResult = m_project_document->loadProjectFile(projectFileName, messageService);
+        readResult =
+            gSessionData->projectDocument->loadProjectFile(projectFileName, messageService);
     }
     QApplication::restoreOverrideCursor();
     return readResult;
@@ -423,7 +413,7 @@ QString ProjectManager::acquireProjectFileName()
 
 void ProjectManager::addToRecentProjects()
 {
-    QString fileName = m_project_document->projectFileName();
+    QString fileName = gSessionData->projectDocument->projectFileName();
     m_recentProjects.removeAll(fileName);
     m_recentProjects.prepend(fileName);
     while (m_recentProjects.size() > GUI::Constants::MAX_RECENT_PROJECTS)
@@ -463,8 +453,8 @@ QString ProjectManager::untitledProjectName()
 
 void ProjectManager::riseProjectLoadFailedDialog(const MessageService& messageService)
 {
-    QString message =
-        QString("Failed to load the project '%1' \n\n").arg(m_project_document->projectFileName());
+    QString message = QString("Failed to load the project '%1' \n\n")
+                          .arg(gSessionData->projectDocument->projectFileName());
 
     for (auto details : messageService.errors())
         message.append(details + "\n");
@@ -474,9 +464,10 @@ void ProjectManager::riseProjectLoadFailedDialog(const MessageService& messageSe
 
 void ProjectManager::riseProjectLoadProblemDialog(const MessageService& messageService)
 {
-    ASSERT(m_project_document);
-    ProjectLoadProblemDialog* problemDialog = new ProjectLoadProblemDialog(
-        m_mainWindow, messageService.warnings(true), m_project_document->documentVersion());
+    ASSERT(gSessionData->projectDocument);
+    ProjectLoadProblemDialog* problemDialog =
+        new ProjectLoadProblemDialog(m_mainWindow, messageService.warnings(true),
+                                     gSessionData->projectDocument->documentVersion());
 
     problemDialog->show();
     problemDialog->raise();
diff --git a/GUI/mainwindow/projectmanager.h b/GUI/View/Main/ProjectManager.h
similarity index 88%
rename from GUI/mainwindow/projectmanager.h
rename to GUI/View/Main/ProjectManager.h
index df39b430e17ed2088eba1624a1786e4e0aceae8d..44d4b7cb8b679a074b8286227843a978057bd602 100644
--- a/GUI/mainwindow/projectmanager.h
+++ b/GUI/View/Main/ProjectManager.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/projectmanager.h
+//! @file      GUI/View/Main/ProjectManager.h
 //! @brief     Defines class ProjectManager
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,14 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_PROJECTMANAGER_H
-#define BORNAGAIN_GUI_MAINWINDOW_PROJECTMANAGER_H
+#ifndef BORNAGAIN_GUI_VIEW_MAIN_PROJECTMANAGER_H
+#define BORNAGAIN_GUI_VIEW_MAIN_PROJECTMANAGER_H
 
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/Model/Project/ProjectDocument.h"
 #include <QObject>
 #include <QStringList>
 
 class MainWindow;
-class ProjectDocument;
 class MessageService;
 class SaveService;
 
@@ -37,11 +36,8 @@ public:
     void readSettings();
     void writeSettings();
 
-    ProjectDocument* document();
-
     QStringList recentProjects();
     QString projectDir() const;
-    QString userExportDir() const;
     QString userImportDir() const;
     QString recentlyUsedImportFilter1D() const;
     QString recentlyUsedImportFilter2D() const;
@@ -83,7 +79,6 @@ private:
     bool restoreProjectDialog(const QString& projectFileName, const QString autosaveName);
 
     MainWindow* m_mainWindow;
-    ProjectDocument* m_project_document;
 
     //!< Name of directory where project directory was created.
     QString m_workingDirectory;
@@ -103,4 +98,4 @@ private:
     static ProjectManager* s_instance;
 };
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_PROJECTMANAGER_H
+#endif // BORNAGAIN_GUI_VIEW_MAIN_PROJECTMANAGER_H
diff --git a/GUI/mainwindow/PyImportAssistant.cpp b/GUI/View/Main/PyImportAssistant.cpp
similarity index 90%
rename from GUI/mainwindow/PyImportAssistant.cpp
rename to GUI/View/Main/PyImportAssistant.cpp
index 5eeb1b34d5aaf5bdf2e4e5babfae814d730f2234..198634c4d56913625a010183343521cfad06be22 100644
--- a/GUI/mainwindow/PyImportAssistant.cpp
+++ b/GUI/View/Main/PyImportAssistant.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/PyImportAssistant.cpp
+//! @file      GUI/View/Main/PyImportAssistant.cpp
 //! @brief     Implements class PyImportAssistant
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -14,20 +14,20 @@
 
 #ifdef BORNAGAIN_PYTHON
 
-#include "GUI/mainwindow/PyImportAssistant.h"
+#include "GUI/View/Main/PyImportAssistant.h"
 #include "BABuild.h"
 #include "Base/Utils/Assert.h"
 #include "Base/Utils/SysUtils.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/GUIDomainSampleVisitor.h"
-#include "GUI/Models/GUIObjectBuilder.h"
-#include "GUI/Views/CommonWidgets/GUIHelpers.h"
-#include "GUI/Views/InfoWidgets/ComboSelectorDialog.h"
-#include "GUI/Views/InfoWidgets/DetailedMessageBox.h"
-#include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectmanager.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Domain/GUIObjectBuilder.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/Sample/GUIDomainSampleVisitor.h"
+#include "GUI/Util/Path.h"
+#include "GUI/Util/String.h"
+#include "GUI/View/Info/ComboSelectorDialog.h"
+#include "GUI/View/Info/DetailedMessageBox.h"
+#include "GUI/View/Main/ProjectManager.h"
+#include "GUI/View/Info/MessageBox.h"
 #include "Sample/Multilayer/MultiLayer.h"
 #include "Sample/Multilayer/PyImport.h"
 #include <QApplication>
@@ -90,7 +90,7 @@ void PyImportAssistant::exec()
     if (!multilayer)
         return;
 
-    populateModels(*multilayer, GUI::Helpers::baseName(fileName));
+    populateModels(*multilayer, GUI::Util::Path::baseName(fileName));
 }
 
 //! Lets user to select Python file on disk.
@@ -116,7 +116,7 @@ void PyImportAssistant::saveImportDir(const QString& fileName)
     if (fileName.isEmpty())
         return;
 
-    ProjectManager::instance()->setImportDir(GUI::Helpers::fileDir(fileName));
+    ProjectManager::instance()->setImportDir(GUI::Util::Path::fileDir(fileName));
 }
 
 //! Read content of text file and returns it as a multi-line string.
@@ -145,7 +145,7 @@ QString PyImportAssistant::getPySampleFunctionName(const QString& snippet)
     QApplication::setOverrideCursor(Qt::WaitCursor);
     try {
         auto funcs = Py::Import::listOfFunctions(snippet.toStdString(), bornagainDir());
-        funcList = GUI::Helpers::fromStdStrings(funcs);
+        funcList = GUI::Util::String::fromStdStrings(funcs);
 
     } catch (const std::exception& ex) {
         QApplication::restoreOverrideCursor();
diff --git a/GUI/mainwindow/PyImportAssistant.h b/GUI/View/Main/PyImportAssistant.h
similarity index 87%
rename from GUI/mainwindow/PyImportAssistant.h
rename to GUI/View/Main/PyImportAssistant.h
index 5b85a672ba06db47d7928e15fbe42436394a1f84..5d0e564ffc5f765f93a00c82e4360b3601318886 100644
--- a/GUI/mainwindow/PyImportAssistant.h
+++ b/GUI/View/Main/PyImportAssistant.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/PyImportAssistant.h
+//! @file      GUI/View/Main/PyImportAssistant.h
 //! @brief     Implements class PyImportAssistant
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_PYIMPORTASSISTANT_H
-#define BORNAGAIN_GUI_MAINWINDOW_PYIMPORTASSISTANT_H
+#ifndef BORNAGAIN_GUI_VIEW_MAIN_PYIMPORTASSISTANT_H
+#define BORNAGAIN_GUI_VIEW_MAIN_PYIMPORTASSISTANT_H
 
 #ifdef BORNAGAIN_PYTHON
 
@@ -47,4 +47,4 @@ private:
 
 #endif // BORNAGAIN_PYTHON
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_PYIMPORTASSISTANT_H
+#endif // BORNAGAIN_GUI_VIEW_MAIN_PYIMPORTASSISTANT_H
diff --git a/GUI/mainwindow/SaveService.cpp b/GUI/View/Main/SaveService.cpp
similarity index 93%
rename from GUI/mainwindow/SaveService.cpp
rename to GUI/View/Main/SaveService.cpp
index f883e2f57a6d51e463d94d97dceb482f683a01a0..7ceb66d2c722de07d7060df329aa669a45737d22 100644
--- a/GUI/mainwindow/SaveService.cpp
+++ b/GUI/View/Main/SaveService.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/SaveService.cpp
+//! @file      GUI/View/Main/SaveService.cpp
 //! @brief     Implements class SaveService
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/SaveService.h"
+#include "GUI/View/Main/SaveService.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Models/Error.h"
-#include "GUI/mainwindow/AutosaveController.h"
-#include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/mainwindow/SaveThread.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/Main/AutosaveController.h"
+#include "GUI/View/Main/SaveThread.h"
 #include <QApplication>
 #include <QCoreApplication>
 #include <QTime>
diff --git a/GUI/mainwindow/SaveService.h b/GUI/View/Main/SaveService.h
similarity index 88%
rename from GUI/mainwindow/SaveService.h
rename to GUI/View/Main/SaveService.h
index 2dbef3831ae49fcd975933fb003a1d36ecc31bd7..d345d30ece58bb294ac49a4c0cfc75f109cd19a1 100644
--- a/GUI/mainwindow/SaveService.h
+++ b/GUI/View/Main/SaveService.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/SaveService.h
+//! @file      GUI/View/Main/SaveService.h
 //! @brief     Defines class SaveService
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_SAVESERVICE_H
-#define BORNAGAIN_GUI_MAINWINDOW_SAVESERVICE_H
+#ifndef BORNAGAIN_GUI_VIEW_MAIN_SAVESERVICE_H
+#define BORNAGAIN_GUI_VIEW_MAIN_SAVESERVICE_H
 
 #include <QObject>
 #include <QQueue>
@@ -61,4 +61,4 @@ private:
     ProjectDocument* m_document;
 };
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_SAVESERVICE_H
+#endif // BORNAGAIN_GUI_VIEW_MAIN_SAVESERVICE_H
diff --git a/GUI/mainwindow/SaveThread.cpp b/GUI/View/Main/SaveThread.cpp
similarity index 88%
rename from GUI/mainwindow/SaveThread.cpp
rename to GUI/View/Main/SaveThread.cpp
index af3d2c8043d94fa7953d8d10219b0eb0784826b5..c106ab49d3e760f024f947a3d53e6226bfd9b1a9 100644
--- a/GUI/mainwindow/SaveThread.cpp
+++ b/GUI/View/Main/SaveThread.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/SaveThread.cpp
+//! @file      GUI/View/Main/SaveThread.cpp
 //! @brief     Defines SaveThread classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/mainwindow/SaveThread.h"
+#include "GUI/View/Main/SaveThread.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/Model/Project/ProjectDocument.h"
 
 SaveThread::SaveThread(QObject* parent) : QThread(parent), m_document(nullptr) {}
 
diff --git a/GUI/mainwindow/SaveThread.h b/GUI/View/Main/SaveThread.h
similarity index 84%
rename from GUI/mainwindow/SaveThread.h
rename to GUI/View/Main/SaveThread.h
index 401509fbe677a36384051bec2720f7ddc19628c1..83202ea9b0724d5c353843fa10dc2d15b38d80cb 100644
--- a/GUI/mainwindow/SaveThread.h
+++ b/GUI/View/Main/SaveThread.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/mainwindow/SaveThread.h
+//! @file      GUI/View/Main/SaveThread.h
 //! @brief     Defines SaveThread classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_MAINWINDOW_SAVETHREAD_H
-#define BORNAGAIN_GUI_MAINWINDOW_SAVETHREAD_H
+#ifndef BORNAGAIN_GUI_VIEW_MAIN_SAVETHREAD_H
+#define BORNAGAIN_GUI_VIEW_MAIN_SAVETHREAD_H
 
 #include <QObject>
 #include <QThread>
@@ -40,4 +40,4 @@ private:
     QString m_projectFile;
 };
 
-#endif // BORNAGAIN_GUI_MAINWINDOW_SAVETHREAD_H
+#endif // BORNAGAIN_GUI_VIEW_MAIN_SAVETHREAD_H
diff --git a/GUI/Views/MaskWidgets/ColorMapSceneAdaptor.cpp b/GUI/View/Mask/ColorMapSceneAdaptor.cpp
similarity index 90%
rename from GUI/Views/MaskWidgets/ColorMapSceneAdaptor.cpp
rename to GUI/View/Mask/ColorMapSceneAdaptor.cpp
index 9243ede2e48bdcbc695ecb63f75b5c66f6bcb456..6af3db7f5d13b560b62cb16cbb1062a05869267e 100644
--- a/GUI/Views/MaskWidgets/ColorMapSceneAdaptor.cpp
+++ b/GUI/View/Mask/ColorMapSceneAdaptor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/ColorMapSceneAdaptor.cpp
+//! @file      GUI/View/Mask/ColorMapSceneAdaptor.cpp
 //! @brief     Implements class ColorMapSceneAdaptor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/ColorMapSceneAdaptor.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMap.h"
+#include "GUI/View/Mask/ColorMapSceneAdaptor.h"
+#include "GUI/View/Intensity/ColorMap.h"
 
 ColorMapSceneAdaptor::ColorMapSceneAdaptor() : m_plot(0) {}
 
diff --git a/GUI/Views/MaskWidgets/ColorMapSceneAdaptor.h b/GUI/View/Mask/ColorMapSceneAdaptor.h
similarity index 80%
rename from GUI/Views/MaskWidgets/ColorMapSceneAdaptor.h
rename to GUI/View/Mask/ColorMapSceneAdaptor.h
index f10ed3f651565625777e2ddd317d509ab61362e8..db5f96277f9fb4ed017bfa5698aa661014b27346 100644
--- a/GUI/Views/MaskWidgets/ColorMapSceneAdaptor.h
+++ b/GUI/View/Mask/ColorMapSceneAdaptor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/ColorMapSceneAdaptor.h
+//! @file      GUI/View/Mask/ColorMapSceneAdaptor.h
 //! @brief     Defines class ColorMapSceneAdaptor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_COLORMAPSCENEADAPTOR_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_COLORMAPSCENEADAPTOR_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_COLORMAPSCENEADAPTOR_H
+#define BORNAGAIN_GUI_VIEW_MASK_COLORMAPSCENEADAPTOR_H
 
-#include "GUI/Views/MaskWidgets/ISceneAdaptor.h"
+#include "GUI/View/Mask/ISceneAdaptor.h"
 class ColorMap;
 
 //! Performs conversion of MaskItems coordinates between ColorMap and GraphicsScene.
@@ -42,4 +42,4 @@ private:
     ColorMap* m_plot;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_COLORMAPSCENEADAPTOR_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_COLORMAPSCENEADAPTOR_H
diff --git a/GUI/Views/MaskWidgets/EllipseView.cpp b/GUI/View/Mask/EllipseView.cpp
similarity index 97%
rename from GUI/Views/MaskWidgets/EllipseView.cpp
rename to GUI/View/Mask/EllipseView.cpp
index 6f3b08689f3c2d464ce13f14ee34e7e87a822b17..8437443521a63ded9d18cac69883b241d5210d67 100644
--- a/GUI/Views/MaskWidgets/EllipseView.cpp
+++ b/GUI/View/Mask/EllipseView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/EllipseView.cpp
+//! @file      GUI/View/Mask/EllipseView.cpp
 //! @brief     Implements EllipseView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/EllipseView.h"
-#include "GUI/Models/MaskItems.h"
+#include "GUI/View/Mask/EllipseView.h"
+#include "GUI/Model/Data/MaskItems.h"
 #include <QGraphicsSceneMouseEvent>
 #include <QPainter>
 
diff --git a/GUI/Views/MaskWidgets/EllipseView.h b/GUI/View/Mask/EllipseView.h
similarity index 85%
rename from GUI/Views/MaskWidgets/EllipseView.h
rename to GUI/View/Mask/EllipseView.h
index f29d6f4d4480f193e06d18304e4bc497527ad9fc..4dd8338b9ef81baf4695488639d288d6c5544642 100644
--- a/GUI/Views/MaskWidgets/EllipseView.h
+++ b/GUI/View/Mask/EllipseView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/EllipseView.h
+//! @file      GUI/View/Mask/EllipseView.h
 //! @brief     Defines EllipseView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_ELLIPSEVIEW_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_ELLIPSEVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_ELLIPSEVIEW_H
+#define BORNAGAIN_GUI_VIEW_MASK_ELLIPSEVIEW_H
 
-#include "GUI/Views/MaskWidgets/RectangleBaseView.h"
+#include "GUI/View/Mask/RectangleBaseView.h"
 
 class EllipseItem;
 
@@ -55,4 +55,4 @@ private:
     EllipseItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_ELLIPSEVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_ELLIPSEVIEW_H
diff --git a/GUI/Views/MaskWidgets/ISceneAdaptor.h b/GUI/View/Mask/ISceneAdaptor.h
similarity index 89%
rename from GUI/Views/MaskWidgets/ISceneAdaptor.h
rename to GUI/View/Mask/ISceneAdaptor.h
index b16101b9f075d75d9a6664114c60b2e532c6c42b..1d241a3edb725f1d4387102b5898b8912557cd80 100644
--- a/GUI/Views/MaskWidgets/ISceneAdaptor.h
+++ b/GUI/View/Mask/ISceneAdaptor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/ISceneAdaptor.h
+//! @file      GUI/View/Mask/ISceneAdaptor.h
 //! @brief     Defines interface class ISceneAdaptor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_ISCENEADAPTOR_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_ISCENEADAPTOR_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_ISCENEADAPTOR_H
+#define BORNAGAIN_GUI_VIEW_MASK_ISCENEADAPTOR_H
 
 #include <QObject>
 #include <QRectF>
@@ -55,4 +55,4 @@ public:
     qreal fromSceneY(qreal value) const { return value; }
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_ISCENEADAPTOR_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_ISCENEADAPTOR_H
diff --git a/GUI/Views/MaskWidgets/IShape2DView.cpp b/GUI/View/Mask/IShape2DView.cpp
similarity index 96%
rename from GUI/Views/MaskWidgets/IShape2DView.cpp
rename to GUI/View/Mask/IShape2DView.cpp
index b1fde367dba23486f31162ba0eced83651970c81..0fa53d881472751f0e4196ab2a245e84df4a7759 100644
--- a/GUI/Views/MaskWidgets/IShape2DView.cpp
+++ b/GUI/View/Mask/IShape2DView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/IShape2DView.cpp
+//! @file      GUI/View/Mask/IShape2DView.cpp
 //! @brief     Implements interface IShape2DView.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/IShape2DView.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Views/MaskWidgets/ISceneAdaptor.h"
+#include "GUI/View/Mask/IShape2DView.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/View/Mask/ISceneAdaptor.h"
 #include <QAction>
 #include <QGraphicsScene>
 #include <QGraphicsSceneContextMenuEvent>
diff --git a/GUI/Views/MaskWidgets/IShape2DView.h b/GUI/View/Mask/IShape2DView.h
similarity index 88%
rename from GUI/Views/MaskWidgets/IShape2DView.h
rename to GUI/View/Mask/IShape2DView.h
index 7902371381f3aac67240b9bf31b584bd97b1880b..34e5e82b9990835674f499f7dc89558c7f49d7ee 100644
--- a/GUI/Views/MaskWidgets/IShape2DView.h
+++ b/GUI/View/Mask/IShape2DView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/IShape2DView.h
+//! @file      GUI/View/Mask/IShape2DView.h
 //! @brief     Defines interface IShape2DView.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_ISHAPE2DVIEW_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_ISHAPE2DVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_ISHAPE2DVIEW_H
+#define BORNAGAIN_GUI_VIEW_MASK_ISHAPE2DVIEW_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorHelper.h"
+#include "GUI/View/Mask/MaskEditorHelper.h"
 #include <QGraphicsObject>
 
 class SessionItem;
@@ -73,4 +73,4 @@ private:
     virtual void onItemDestroyed() = 0;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_ISHAPE2DVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_ISHAPE2DVIEW_H
diff --git a/GUI/Views/MaskWidgets/LineViews.cpp b/GUI/View/Mask/LineViews.cpp
similarity index 96%
rename from GUI/Views/MaskWidgets/LineViews.cpp
rename to GUI/View/Mask/LineViews.cpp
index 799929420da1b1be2ae6c07dc61e49864a01964f..e81d6b8ba337ec4778e749160d697e7980d11d96 100644
--- a/GUI/Views/MaskWidgets/LineViews.cpp
+++ b/GUI/View/Mask/LineViews.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/LineViews.cpp
+//! @file      GUI/View/Mask/LineViews.cpp
 //! @brief     Implements classes VerticalLineView and HorizontalLineView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/LineViews.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Views/MaskWidgets/ColorMapSceneAdaptor.h"
+#include "GUI/View/Mask/LineViews.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/View/Mask/ColorMapSceneAdaptor.h"
 #include <QCursor>
 #include <QPainter>
 #include <QStyleOptionGraphicsItem>
diff --git a/GUI/Views/MaskWidgets/LineViews.h b/GUI/View/Mask/LineViews.h
similarity index 89%
rename from GUI/Views/MaskWidgets/LineViews.h
rename to GUI/View/Mask/LineViews.h
index 76fef32c7def77b87b10607478b5022acad3d7ee..a0c3516f3712284c75e0f39e82e53668e462c0ad 100644
--- a/GUI/Views/MaskWidgets/LineViews.h
+++ b/GUI/View/Mask/LineViews.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/LineViews.h
+//! @file      GUI/View/Mask/LineViews.h
 //! @brief     Defines classes VerticalLineView and HorizontalLineView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_LINEVIEWS_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_LINEVIEWS_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_LINEVIEWS_H
+#define BORNAGAIN_GUI_VIEW_MASK_LINEVIEWS_H
 
-#include "GUI/Views/MaskWidgets/IShape2DView.h"
+#include "GUI/View/Mask/IShape2DView.h"
 
 class VerticalLineItem;
 class HorizontalLineItem;
@@ -79,4 +79,4 @@ private:
     HorizontalLineItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_LINEVIEWS_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_LINEVIEWS_H
diff --git a/GUI/Views/MaskWidgets/MaskAllView.cpp b/GUI/View/Mask/MaskAllView.cpp
similarity index 89%
rename from GUI/Views/MaskWidgets/MaskAllView.cpp
rename to GUI/View/Mask/MaskAllView.cpp
index 697fc72fa984b767599fbe53a48de3118d546d5e..c903402ed8043c3b5e502b9ade9ed9ce15b3c0a7 100644
--- a/GUI/Views/MaskWidgets/MaskAllView.cpp
+++ b/GUI/View/Mask/MaskAllView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskAllView.cpp
+//! @file      GUI/View/Mask/MaskAllView.cpp
 //! @brief     Implements MaskAllView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskAllView.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Views/MaskWidgets/ColorMapSceneAdaptor.h"
+#include "GUI/View/Mask/MaskAllView.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/View/Mask/ColorMapSceneAdaptor.h"
 #include <QBrush>
 #include <QPainter>
 #include <QStyleOptionGraphicsItem>
diff --git a/GUI/Views/MaskWidgets/MaskAllView.h b/GUI/View/Mask/MaskAllView.h
similarity index 81%
rename from GUI/Views/MaskWidgets/MaskAllView.h
rename to GUI/View/Mask/MaskAllView.h
index 4c398ab364181269a100b614af223b4b52d481bb..d01c7880f2dcfbadb803dea7cd8a053159dae7d2 100644
--- a/GUI/Views/MaskWidgets/MaskAllView.h
+++ b/GUI/View/Mask/MaskAllView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskAllView.h
+//! @file      GUI/View/Mask/MaskAllView.h
 //! @brief     Defines MaskAllView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKALLVIEW_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKALLVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKALLVIEW_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKALLVIEW_H
 
-#include "GUI/Views/MaskWidgets/IShape2DView.h"
+#include "GUI/View/Mask/IShape2DView.h"
 
 class MaskAllItem;
 
@@ -45,4 +45,4 @@ private:
     MaskAllItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKALLVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKALLVIEW_H
diff --git a/GUI/Views/MaskWidgets/MaskContainerView.cpp b/GUI/View/Mask/MaskContainerView.cpp
similarity index 86%
rename from GUI/Views/MaskWidgets/MaskContainerView.cpp
rename to GUI/View/Mask/MaskContainerView.cpp
index 165a241bab5fde2106e76a8725b1a3335a7deb38..db3a2ad24e14555fd5ceedd1c5d525a655d2ba35 100644
--- a/GUI/Views/MaskWidgets/MaskContainerView.cpp
+++ b/GUI/View/Mask/MaskContainerView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskContainerView.cpp
+//! @file      GUI/View/Mask/MaskContainerView.cpp
 //! @brief     Implements MaskContainerView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskContainerView.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/ProjectionItems.h"
-#include "GUI/Views/MaskWidgets/ISceneAdaptor.h"
+#include "GUI/View/Mask/MaskContainerView.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Data/ProjectionItems.h"
+#include "GUI/View/Mask/ISceneAdaptor.h"
 #include <QBrush>
 #include <QPainter>
 #include <QStyleOptionGraphicsItem>
diff --git a/GUI/Views/MaskWidgets/MaskContainerView.h b/GUI/View/Mask/MaskContainerView.h
similarity index 82%
rename from GUI/Views/MaskWidgets/MaskContainerView.h
rename to GUI/View/Mask/MaskContainerView.h
index 45ef1ded4868680e8e0639e2adf1f3d6744a44b0..f246dc0e11e6540cb7d42ae318fd9c1230bbc651 100644
--- a/GUI/Views/MaskWidgets/MaskContainerView.h
+++ b/GUI/View/Mask/MaskContainerView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskContainerView.h
+//! @file      GUI/View/Mask/MaskContainerView.h
 //! @brief     Defines MaskContainerView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKCONTAINERVIEW_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKCONTAINERVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKCONTAINERVIEW_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKCONTAINERVIEW_H
 
-#include "GUI/Views/MaskWidgets/IShape2DView.h"
-#include "GUI/Views/MaskWidgets/SizeHandleElement.h"
+#include "GUI/View/Mask/IShape2DView.h"
+#include "GUI/View/Mask/SizeHandleElement.h"
 #include <QMap>
 
 class MaskContainerItem;
@@ -54,4 +54,4 @@ private:
     SessionItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKCONTAINERVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKCONTAINERVIEW_H
diff --git a/GUI/Views/MaskWidgets/MaskDrawingContext.cpp b/GUI/View/Mask/MaskDrawingContext.cpp
similarity index 96%
rename from GUI/Views/MaskWidgets/MaskDrawingContext.cpp
rename to GUI/View/Mask/MaskDrawingContext.cpp
index d0dcc6b25a749fbdd86fd6be9a4ec024694193e5..07b6932a2336f59ca0f994a7d2ff6c1b17f5797c 100644
--- a/GUI/Views/MaskWidgets/MaskDrawingContext.cpp
+++ b/GUI/View/Mask/MaskDrawingContext.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskDrawingContext.cpp
+//! @file      GUI/View/Mask/MaskDrawingContext.cpp
 //! @brief     Implements class MaskDrawingContext
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskDrawingContext.h"
-#include "GUI/Models/MaskItems.h"
+#include "GUI/View/Mask/MaskDrawingContext.h"
+#include "GUI/Model/Data/MaskItems.h"
 
 MaskDrawingContext::MaskDrawingContext()
     : m_current_activity(MaskEditorFlags::PAN_ZOOM_MODE)
diff --git a/GUI/Views/MaskWidgets/MaskDrawingContext.h b/GUI/View/Mask/MaskDrawingContext.h
similarity index 84%
rename from GUI/Views/MaskWidgets/MaskDrawingContext.h
rename to GUI/View/Mask/MaskDrawingContext.h
index 10dbc77c9dcc789d389557e4d020f6afe0ac6a51..00f1c5200c2fafdd4e1390f88d6e2ba35de1c22d 100644
--- a/GUI/Views/MaskWidgets/MaskDrawingContext.h
+++ b/GUI/View/Mask/MaskDrawingContext.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskDrawingContext.h
+//! @file      GUI/View/Mask/MaskDrawingContext.h
 //! @brief     Defines class MaskDrawingContext
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKDRAWINGCONTEXT_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKDRAWINGCONTEXT_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKDRAWINGCONTEXT_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKDRAWINGCONTEXT_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorFlags.h"
+#include "GUI/View/Mask/MaskEditorFlags.h"
 
 //! Helper class for MaskGraphicsScene to hold drawing conditions
 
@@ -55,4 +55,4 @@ private:
     bool m_drawing_in_progress;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKDRAWINGCONTEXT_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKDRAWINGCONTEXT_H
diff --git a/GUI/Views/MaskWidgets/MaskEditor.cpp b/GUI/View/Mask/MaskEditor.cpp
similarity index 91%
rename from GUI/Views/MaskWidgets/MaskEditor.cpp
rename to GUI/View/Mask/MaskEditor.cpp
index 3fe2d255309871269ae790eda0073c253563432a..62109a24281ef655808eed2a95ddfe2dea7456af 100644
--- a/GUI/Views/MaskWidgets/MaskEditor.cpp
+++ b/GUI/View/Mask/MaskEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditor.cpp
+//! @file      GUI/View/Mask/MaskEditor.cpp
 //! @brief     Implements class MaskEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskEditor.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/MaskWidgets/MaskEditorActions.h"
-#include "GUI/Views/MaskWidgets/MaskEditorCanvas.h"
-#include "GUI/Views/MaskWidgets/MaskEditorPropertyPanel.h"
-#include "GUI/Views/MaskWidgets/MaskEditorToolBar.h"
-#include "GUI/Views/MaskWidgets/MaskGraphicsScene.h"
+#include "GUI/View/Mask/MaskEditor.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/View/Mask/MaskEditorActions.h"
+#include "GUI/View/Mask/MaskEditorCanvas.h"
+#include "GUI/View/Mask/MaskEditorPropertyPanel.h"
+#include "GUI/View/Mask/MaskEditorToolBar.h"
+#include "GUI/View/Mask/MaskGraphicsScene.h"
 #include <QBoxLayout>
 #include <QContextMenuEvent>
 #include <QSplitter>
diff --git a/GUI/Views/MaskWidgets/MaskEditor.h b/GUI/View/Mask/MaskEditor.h
similarity index 89%
rename from GUI/Views/MaskWidgets/MaskEditor.h
rename to GUI/View/Mask/MaskEditor.h
index 8e52dcbc277a45be89bd1518327c2d20717acd4c..77c77181c808899c3a06c1925fbb54baa6b92887 100644
--- a/GUI/Views/MaskWidgets/MaskEditor.h
+++ b/GUI/View/Mask/MaskEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditor.h
+//! @file      GUI/View/Mask/MaskEditor.h
 //! @brief     Defines class MaskEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKEDITOR_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKEDITOR_H
 
 #include <QMainWindow>
 #include <QModelIndex>
@@ -59,4 +59,4 @@ private:
     MaskEditorCanvas* m_editorCanvas;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKEDITOR_H
diff --git a/GUI/Views/MaskWidgets/MaskEditorActions.cpp b/GUI/View/Mask/MaskEditorActions.cpp
similarity index 95%
rename from GUI/Views/MaskWidgets/MaskEditorActions.cpp
rename to GUI/View/Mask/MaskEditorActions.cpp
index 8bc56cef50781313c4e4b89f55812f349fea4371..05ad04c5cc640fe8aac47e140c5fdb77a321e00f 100644
--- a/GUI/Views/MaskWidgets/MaskEditorActions.cpp
+++ b/GUI/View/Mask/MaskEditorActions.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditorActions.cpp
+//! @file      GUI/View/Mask/MaskEditorActions.cpp
 //! @brief     Implement class MaskEditorActions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskEditorActions.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/View/Mask/MaskEditorActions.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Session/SessionModel.h"
 #include <QAction>
 #include <QItemSelectionModel>
 #include <QMenu>
@@ -35,13 +35,13 @@ MaskEditorActions::MaskEditorActions(QWidget* parent)
     connect(m_toggleMaskValueAction, &QAction::triggered, this,
             &MaskEditorActions::onToggleMaskValueAction);
 
-    m_bringToFrontAction->setIcon(QIcon(":/MaskWidgets/images/maskeditor_bringtofront.svg"));
+    m_bringToFrontAction->setIcon(QIcon(":/Mask/img/maskeditor_bringtofront.svg"));
     m_bringToFrontAction->setToolTip("Rise selected mask one level up (PgUp)");
     m_bringToFrontAction->setShortcuts(QKeySequence::MoveToPreviousPage);
     connect(m_bringToFrontAction, &QAction::triggered, this,
             &MaskEditorActions::onBringToFrontAction);
 
-    m_sendToBackAction->setIcon(QIcon(":/MaskWidgets/images/maskeditor_sendtoback.svg"));
+    m_sendToBackAction->setIcon(QIcon(":/Mask/img/maskeditor_sendtoback.svg"));
     m_sendToBackAction->setToolTip("Lower selected mask one level down (PgDown)");
     m_sendToBackAction->setShortcuts(QKeySequence::MoveToNextPage);
     connect(m_sendToBackAction, &QAction::triggered, this, &MaskEditorActions::onSendToBackAction);
diff --git a/GUI/Views/MaskWidgets/MaskEditorActions.h b/GUI/View/Mask/MaskEditorActions.h
similarity index 88%
rename from GUI/Views/MaskWidgets/MaskEditorActions.h
rename to GUI/View/Mask/MaskEditorActions.h
index 4383fc80f96811be3802d0f7d6700df79299e67b..3fe6a84f873508511e066ed9ee30b15c05ac77d1 100644
--- a/GUI/Views/MaskWidgets/MaskEditorActions.h
+++ b/GUI/View/Mask/MaskEditorActions.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditorActions.h
+//! @file      GUI/View/Mask/MaskEditorActions.h
 //! @brief     Defines class MaskEditorActions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORACTIONS_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORACTIONS_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKEDITORACTIONS_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKEDITORACTIONS_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorFlags.h"
+#include "GUI/View/Mask/MaskEditorFlags.h"
 #include <QList>
 #include <QModelIndex>
 #include <QObject>
@@ -78,4 +78,4 @@ private:
     QItemSelectionModel* m_selectionModel;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORACTIONS_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKEDITORACTIONS_H
diff --git a/GUI/Views/MaskWidgets/MaskEditorCanvas.cpp b/GUI/View/Mask/MaskEditorCanvas.cpp
similarity index 82%
rename from GUI/Views/MaskWidgets/MaskEditorCanvas.cpp
rename to GUI/View/Mask/MaskEditorCanvas.cpp
index 3cc43f9fa4ef443390daa0b21a78b7ffc9dc0a85..fbc4267fb1aba05af53c6ceb475e89bdab4bbc1a 100644
--- a/GUI/Views/MaskWidgets/MaskEditorCanvas.cpp
+++ b/GUI/View/Mask/MaskEditorCanvas.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditorCanvas.cpp
+//! @file      GUI/View/Mask/MaskEditorCanvas.cpp
 //! @brief     Implements class MaskEditorCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,16 +12,16 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskEditorCanvas.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMap.h"
-#include "GUI/Views/IntensityDataWidgets/PlotStatusLabel.h"
-#include "GUI/Views/IntensityDataWidgets/SavePlotAssistant.h"
-#include "GUI/Views/MaskWidgets/MaskGraphicsScene.h"
-#include "GUI/Views/MaskWidgets/MaskGraphicsView.h"
-#include "GUI/Views/MaskWidgets/MaskResultsPresenter.h"
-#include "GUI/mainwindow/projectmanager.h"
+#include "GUI/View/Mask/MaskEditorCanvas.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/View/Intensity/ColorMap.h"
+#include "GUI/View/Intensity/PlotStatusLabel.h"
+#include "GUI/View/Intensity/SavePlotAssistant.h"
+#include "GUI/View/Mask/MaskGraphicsScene.h"
+#include "GUI/View/Mask/MaskGraphicsView.h"
+#include "GUI/View/Mask/MaskResultsPresenter.h"
 #include <QVBoxLayout>
 
 MaskEditorCanvas::MaskEditorCanvas(QWidget* parent)
@@ -92,22 +92,20 @@ void MaskEditorCanvas::onPresentationTypeRequest(MaskEditorFlags::PresentationTy
 
 void MaskEditorCanvas::onSavePlotRequest()
 {
-    QString dirname = ProjectManager::instance()->userExportDir();
+    QString dirname = gSessionData->projectDocument->userExportDir();
 
-    SavePlotAssistant saveAssistant;
-    saveAssistant.savePlot(dirname, m_scene->colorMap()->customPlot(),
-                           m_intensityDataItem->getOutputData());
+    GUI::Plot::savePlot(dirname, m_scene->colorMap()->customPlot(),
+                        m_intensityDataItem->getOutputData());
 }
 
 void MaskEditorCanvas::onResetViewRequest()
 {
     m_view->onResetViewRequest();
 
-    if (isAxisRangeMatchData()) {
+    if (isAxisRangeMatchData())
         setZoomToROI();
-    } else {
+    else
         m_intensityDataItem->resetView();
-    }
 }
 
 //! Returns true if IntensityData is currently at 100% zoom level
diff --git a/GUI/Views/MaskWidgets/MaskEditorCanvas.h b/GUI/View/Mask/MaskEditorCanvas.h
similarity index 86%
rename from GUI/Views/MaskWidgets/MaskEditorCanvas.h
rename to GUI/View/Mask/MaskEditorCanvas.h
index 6e3b865bc850a5dd77b41c230ce6f9e02a94e450..4b555d5a5eb1149259ce62a023fc06940d843046 100644
--- a/GUI/Views/MaskWidgets/MaskEditorCanvas.h
+++ b/GUI/View/Mask/MaskEditorCanvas.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditorCanvas.h
+//! @file      GUI/View/Mask/MaskEditorCanvas.h
 //! @brief     Defines class MaskEditorCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORCANVAS_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORCANVAS_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKEDITORCANVAS_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKEDITORCANVAS_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorFlags.h"
+#include "GUI/View/Mask/MaskEditorFlags.h"
 #include <QWidget>
 
 class MaskGraphicsScene;
@@ -64,4 +64,4 @@ private:
     MaskResultsPresenter* m_resultsPresenter;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORCANVAS_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKEDITORCANVAS_H
diff --git a/GUI/Views/MaskWidgets/MaskEditorFlags.h b/GUI/View/Mask/MaskEditorFlags.h
similarity index 86%
rename from GUI/Views/MaskWidgets/MaskEditorFlags.h
rename to GUI/View/Mask/MaskEditorFlags.h
index 1a27e4dd48d07e38107034b909a213efaa29e07d..7609b37a33f44331f4a8b9246a6deae2fb8b28e8 100644
--- a/GUI/Views/MaskWidgets/MaskEditorFlags.h
+++ b/GUI/View/Mask/MaskEditorFlags.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditorFlags.h
+//! @file      GUI/View/Mask/MaskEditorFlags.h
 //! @brief     Defines class MaskEditorFlags
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORFLAGS_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORFLAGS_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKEDITORFLAGS_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKEDITORFLAGS_H
 
 #include <QWidget>
 
@@ -50,4 +50,4 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(MaskEditorFlags::Stacking)
 Q_DECLARE_OPERATORS_FOR_FLAGS(MaskEditorFlags::MaskValue)
 Q_DECLARE_OPERATORS_FOR_FLAGS(MaskEditorFlags::PresentationType)
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORFLAGS_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKEDITORFLAGS_H
diff --git a/GUI/Views/MaskWidgets/MaskEditorHelper.cpp b/GUI/View/Mask/MaskEditorHelper.cpp
similarity index 92%
rename from GUI/Views/MaskWidgets/MaskEditorHelper.cpp
rename to GUI/View/Mask/MaskEditorHelper.cpp
index 576c7865eadbd18730766fc4d24763f773c46649..c6c2d638278441704b5a6f2286e213ad4769506a 100644
--- a/GUI/Views/MaskWidgets/MaskEditorHelper.cpp
+++ b/GUI/View/Mask/MaskEditorHelper.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditorHelper.cpp
+//! @file      GUI/View/Mask/MaskEditorHelper.cpp
 //! @brief     Implements class MaskEditorHelper
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskEditorHelper.h"
+#include "GUI/View/Mask/MaskEditorHelper.h"
 #include <QBrush>
 #include <QColor>
 #include <QPen>
diff --git a/GUI/Views/MaskWidgets/MaskEditorHelper.h b/GUI/View/Mask/MaskEditorHelper.h
similarity index 85%
rename from GUI/Views/MaskWidgets/MaskEditorHelper.h
rename to GUI/View/Mask/MaskEditorHelper.h
index f8fa4993c92622aab08e53cf557ae6b22b021e7f..04399bdd82d04912815b5b06a0ef87276271f910 100644
--- a/GUI/Views/MaskWidgets/MaskEditorHelper.h
+++ b/GUI/View/Mask/MaskEditorHelper.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditorHelper.h
+//! @file      GUI/View/Mask/MaskEditorHelper.h
 //! @brief     Defines class MaskEditorHelper
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORHELPER_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORHELPER_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKEDITORHELPER_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKEDITORHELPER_H
 
 #include <QGraphicsItem>
 
@@ -49,4 +49,4 @@ public:
     static QRectF getMarkerRectangle(const QPointF& pos);
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORHELPER_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKEDITORHELPER_H
diff --git a/GUI/Views/MaskWidgets/MaskEditorPropertyPanel.cpp b/GUI/View/Mask/MaskEditorPropertyPanel.cpp
similarity index 96%
rename from GUI/Views/MaskWidgets/MaskEditorPropertyPanel.cpp
rename to GUI/View/Mask/MaskEditorPropertyPanel.cpp
index dcdb70efb812856adc90a010ee58e69ad0939504..516c549b3804651d2cb1786ecdd2c1b8bfdcc80d 100644
--- a/GUI/Views/MaskWidgets/MaskEditorPropertyPanel.cpp
+++ b/GUI/View/Mask/MaskEditorPropertyPanel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditorPropertyPanel.cpp
+//! @file      GUI/View/Mask/MaskEditorPropertyPanel.cpp
 //! @brief     Implements class MaskEditorPropertyPanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskEditorPropertyPanel.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/PropertyEditor/ComponentEditor.h"
+#include "GUI/View/Mask/MaskEditorPropertyPanel.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/View/PropertyEditor/ComponentEditor.h"
 
 #include <qAccordion/contentpane.h>
 
diff --git a/GUI/Views/MaskWidgets/MaskEditorPropertyPanel.h b/GUI/View/Mask/MaskEditorPropertyPanel.h
similarity index 85%
rename from GUI/Views/MaskWidgets/MaskEditorPropertyPanel.h
rename to GUI/View/Mask/MaskEditorPropertyPanel.h
index d8696caa317babdb1edd5dae0d1c477b0768db1d..4054823d16c4ed8b64e467a45ab3af04fb805e1e 100644
--- a/GUI/Views/MaskWidgets/MaskEditorPropertyPanel.h
+++ b/GUI/View/Mask/MaskEditorPropertyPanel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditorPropertyPanel.h
+//! @file      GUI/View/Mask/MaskEditorPropertyPanel.h
 //! @brief     Defines class MaskEditorPropertyPanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORPROPERTYPANEL_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORPROPERTYPANEL_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKEDITORPROPERTYPANEL_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKEDITORPROPERTYPANEL_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorFlags.h"
+#include "GUI/View/Mask/MaskEditorFlags.h"
 #include <QModelIndex>
 #include <QWidget>
 
@@ -67,4 +67,4 @@ private:
     IntensityDataItem* m_intensityDataItem;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORPROPERTYPANEL_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKEDITORPROPERTYPANEL_H
diff --git a/GUI/Views/MaskWidgets/MaskEditorToolBar.cpp b/GUI/View/Mask/MaskEditorToolBar.cpp
similarity index 88%
rename from GUI/Views/MaskWidgets/MaskEditorToolBar.cpp
rename to GUI/View/Mask/MaskEditorToolBar.cpp
index 495ae41813897bd1b37b6e78a00143fae96ac900..dee68f3614df54e7af52ea41150bdf9a4653a537 100644
--- a/GUI/Views/MaskWidgets/MaskEditorToolBar.cpp
+++ b/GUI/View/Mask/MaskEditorToolBar.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditorToolBar.cpp
+//! @file      GUI/View/Mask/MaskEditorToolBar.cpp
 //! @brief     Implements class MaskEditorToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskEditorToolBar.h"
+#include "GUI/View/Mask/MaskEditorToolBar.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Views/MaskWidgets/MaskEditorActions.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Mask/MaskEditorActions.h"
 #include <QButtonGroup>
 #include <QLabel>
 #include <QRadioButton>
@@ -109,7 +109,7 @@ void MaskEditorToolBar::setup_selection_group()
     add_separator();
 
     QToolButton* selectionButton = new QToolButton(this);
-    selectionButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_arrow.svg"));
+    selectionButton->setIcon(QIcon(":/Mask/img/maskeditor_arrow.svg"));
     selectionButton->setToolTip("Select/modify mask");
     selectionButton->setCheckable(true);
     addWidget(selectionButton);
@@ -144,43 +144,43 @@ void MaskEditorToolBar::setup_maskvalue_group()
 void MaskEditorToolBar::setup_shapes_group()
 {
     QToolButton* roiButton = new QToolButton(this);
-    roiButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_roi.svg"));
+    roiButton->setIcon(QIcon(":/Mask/img/maskeditor_roi.svg"));
     roiButton->setToolTip("Create region of interest");
     roiButton->setCheckable(true);
     addWidget(roiButton);
 
     QToolButton* rectangleButton = new QToolButton(this);
-    rectangleButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_rectangle.svg"));
+    rectangleButton->setIcon(QIcon(":/Mask/img/maskeditor_rectangle.svg"));
     rectangleButton->setToolTip("Create rectangle mask");
     rectangleButton->setCheckable(true);
     addWidget(rectangleButton);
 
     QToolButton* polygonButton = new QToolButton(this);
-    polygonButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_polygon.svg"));
+    polygonButton->setIcon(QIcon(":/Mask/img/maskeditor_polygon.svg"));
     polygonButton->setToolTip("Create polygon mask");
     polygonButton->setCheckable(true);
     addWidget(polygonButton);
 
     QToolButton* verticalLineButton = new QToolButton(this);
-    verticalLineButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_verticalline.svg"));
+    verticalLineButton->setIcon(QIcon(":/Mask/img/maskeditor_verticalline.svg"));
     verticalLineButton->setToolTip("Create vertical line mask");
     verticalLineButton->setCheckable(true);
     addWidget(verticalLineButton);
 
     QToolButton* horizontalLineButton = new QToolButton(this);
-    horizontalLineButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_horizontalline.svg"));
+    horizontalLineButton->setIcon(QIcon(":/Mask/img/maskeditor_horizontalline.svg"));
     horizontalLineButton->setToolTip("Create horizontal line mask");
     horizontalLineButton->setCheckable(true);
     addWidget(horizontalLineButton);
 
     QToolButton* ellipseButton = new QToolButton(this);
-    ellipseButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_ellipse.svg"));
+    ellipseButton->setIcon(QIcon(":/Mask/img/maskeditor_ellipse.svg"));
     ellipseButton->setToolTip("Create ellipse mask");
     ellipseButton->setCheckable(true);
     addWidget(ellipseButton);
 
     //    QToolButton *maskAllButton = new QToolButton(this);
-    //    maskAllButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_maskall.svg"));
+    //    maskAllButton->setIcon(QIcon(":/Mask/img/maskeditor_maskall.svg"));
     //    maskAllButton->setToolTip("Create masked area covering whole detector plane\n"
     //                              "Will be placed beneath all masks. Only one instance is
     //                              allowed.");
@@ -208,7 +208,7 @@ void MaskEditorToolBar::setup_maskmodify_group()
 void MaskEditorToolBar::setup_extratools_group()
 {
     QToolButton* presentationButton = new QToolButton(this);
-    presentationButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_lightbulb.svg"));
+    presentationButton->setIcon(QIcon(":/Mask/img/maskeditor_lightbulb.svg"));
     presentationButton->setToolTip("Press and hold to see mask results.");
     addWidget(presentationButton);
 
@@ -218,7 +218,7 @@ void MaskEditorToolBar::setup_extratools_group()
             &MaskEditorToolBar::onPresentationTypeReleased);
 
     QToolButton* propertyPanelButton = new QToolButton(this);
-    propertyPanelButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_toolpanel.svg"));
+    propertyPanelButton->setIcon(QIcon(":/Mask/img/maskeditor_toolpanel.svg"));
     propertyPanelButton->setToolTip("Open panel with additional properties");
     addWidget(propertyPanelButton);
 
diff --git a/GUI/Views/MaskWidgets/MaskEditorToolBar.h b/GUI/View/Mask/MaskEditorToolBar.h
similarity index 85%
rename from GUI/Views/MaskWidgets/MaskEditorToolBar.h
rename to GUI/View/Mask/MaskEditorToolBar.h
index 5c99af7698b55d56fb1dbfd64c8ea28df7d856a8..8b2e3054b3657206b1ce2d123397b0bb7b2fb0bc 100644
--- a/GUI/Views/MaskWidgets/MaskEditorToolBar.h
+++ b/GUI/View/Mask/MaskEditorToolBar.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskEditorToolBar.h
+//! @file      GUI/View/Mask/MaskEditorToolBar.h
 //! @brief     Defines class MaskEditorToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORTOOLBAR_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORTOOLBAR_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKEDITORTOOLBAR_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKEDITORTOOLBAR_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorFlags.h"
+#include "GUI/View/Mask/MaskEditorFlags.h"
 #include <QToolBar>
 
 class MaskEditorActions;
@@ -59,4 +59,4 @@ private:
     MaskEditorFlags::Activity m_previousActivity;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKEDITORTOOLBAR_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKEDITORTOOLBAR_H
diff --git a/GUI/Views/MaskWidgets/MaskGraphicsProxy.cpp b/GUI/View/Mask/MaskGraphicsProxy.cpp
similarity index 90%
rename from GUI/Views/MaskWidgets/MaskGraphicsProxy.cpp
rename to GUI/View/Mask/MaskGraphicsProxy.cpp
index 13534ac3473d2af0d6f43e11e5234a71e1aa0d3c..104ed4c014a6064be1c0ca039d778c2576e67f07 100644
--- a/GUI/Views/MaskWidgets/MaskGraphicsProxy.cpp
+++ b/GUI/View/Mask/MaskGraphicsProxy.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskGraphicsProxy.cpp
+//! @file      GUI/View/Mask/MaskGraphicsProxy.cpp
 //! @brief     Implements class MaskGraphicsProxy
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskGraphicsProxy.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMap.h"
-#include "GUI/Views/MaskWidgets/ColorMapSceneAdaptor.h"
+#include "GUI/View/Mask/MaskGraphicsProxy.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/View/Intensity/ColorMap.h"
+#include "GUI/View/Mask/ColorMapSceneAdaptor.h"
 #include <QGraphicsSceneMouseEvent>
 
 MaskGraphicsProxy::MaskGraphicsProxy()
diff --git a/GUI/Views/MaskWidgets/MaskGraphicsProxy.h b/GUI/View/Mask/MaskGraphicsProxy.h
similarity index 84%
rename from GUI/Views/MaskWidgets/MaskGraphicsProxy.h
rename to GUI/View/Mask/MaskGraphicsProxy.h
index e06d4e70d8af6c11c975e78a7eacce8b008e0ae3..06db94f4b212e1acaf58ff0d285ae18952452118 100644
--- a/GUI/Views/MaskWidgets/MaskGraphicsProxy.h
+++ b/GUI/View/Mask/MaskGraphicsProxy.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskGraphicsProxy.h
+//! @file      GUI/View/Mask/MaskGraphicsProxy.h
 //! @brief     Defines class MaskGraphicsProxy
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKGRAPHICSPROXY_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKGRAPHICSPROXY_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSPROXY_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSPROXY_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorHelper.h"
+#include "GUI/View/Mask/MaskEditorHelper.h"
 #include <QGraphicsProxyWidget>
 
 class SessionItem;
@@ -53,4 +53,4 @@ private:
     bool m_send_signals_to_colormap;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKGRAPHICSPROXY_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSPROXY_H
diff --git a/GUI/Views/MaskWidgets/MaskGraphicsScene.cpp b/GUI/View/Mask/MaskGraphicsScene.cpp
similarity index 97%
rename from GUI/Views/MaskWidgets/MaskGraphicsScene.cpp
rename to GUI/View/Mask/MaskGraphicsScene.cpp
index ce79f7977a3dc83e93baf6bfd92d9c44df0ac6d8..47a0400644bb0baf3485d0dd83f956c61b124002 100644
--- a/GUI/Views/MaskWidgets/MaskGraphicsScene.cpp
+++ b/GUI/View/Mask/MaskGraphicsScene.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskGraphicsScene.cpp
+//! @file      GUI/View/Mask/MaskGraphicsScene.cpp
 //! @brief     Implements class MaskGraphicsScene
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,17 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskGraphicsScene.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/ProjectionItems.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/MaskWidgets/ColorMapSceneAdaptor.h"
-#include "GUI/Views/MaskWidgets/MaskGraphicsProxy.h"
-#include "GUI/Views/MaskWidgets/MaskViewFactory.h"
-#include "GUI/Views/MaskWidgets/PolygonView.h"
+#include "GUI/View/Mask/MaskGraphicsScene.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Data/ProjectionItems.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/Mask/ColorMapSceneAdaptor.h"
+#include "GUI/View/Mask/MaskGraphicsProxy.h"
+#include "GUI/View/Mask/MaskViewFactory.h"
+#include "GUI/View/Mask/PolygonView.h"
 #include <QGraphicsItem>
 #include <QGraphicsSceneMoveEvent>
 #include <QItemSelection>
diff --git a/GUI/Views/MaskWidgets/MaskGraphicsScene.h b/GUI/View/Mask/MaskGraphicsScene.h
similarity index 92%
rename from GUI/Views/MaskWidgets/MaskGraphicsScene.h
rename to GUI/View/Mask/MaskGraphicsScene.h
index a12b2bc24b2e75aee94e68f0fc4da043f79b44b6..e7eac831cf9c7f6083f2d160bd9a27ecfcfc83df 100644
--- a/GUI/Views/MaskWidgets/MaskGraphicsScene.h
+++ b/GUI/View/Mask/MaskGraphicsScene.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskGraphicsScene.h
+//! @file      GUI/View/Mask/MaskGraphicsScene.h
 //! @brief     Defines class MaskGraphicsScene
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKGRAPHICSSCENE_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKGRAPHICSSCENE_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSSCENE_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSSCENE_H
 
-#include "GUI/Views/MaskWidgets/MaskDrawingContext.h"
-#include "GUI/Views/MaskWidgets/MaskEditorHelper.h"
+#include "GUI/View/Mask/MaskDrawingContext.h"
+#include "GUI/View/Mask/MaskEditorHelper.h"
 #include <QGraphicsScene>
 #include <QMap>
 #include <QModelIndex>
@@ -122,4 +122,4 @@ private:
     MaskDrawingContext m_context;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKGRAPHICSSCENE_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSSCENE_H
diff --git a/GUI/Views/MaskWidgets/MaskGraphicsView.cpp b/GUI/View/Mask/MaskGraphicsView.cpp
similarity index 95%
rename from GUI/Views/MaskWidgets/MaskGraphicsView.cpp
rename to GUI/View/Mask/MaskGraphicsView.cpp
index 1ddb13ae0f9037a27d80e82387604139cb25576f..52cffc2c9edd65e4b306eab52d6cee5d15db0823 100644
--- a/GUI/Views/MaskWidgets/MaskGraphicsView.cpp
+++ b/GUI/View/Mask/MaskGraphicsView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskGraphicsView.cpp
+//! @file      GUI/View/Mask/MaskGraphicsView.cpp
 //! @brief     Implements class MaskGraphicsView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskGraphicsView.h"
-#include "GUI/Views/MaskWidgets/MaskGraphicsProxy.h"
-#include "GUI/Views/MaskWidgets/MaskGraphicsScene.h"
+#include "GUI/View/Mask/MaskGraphicsView.h"
+#include "GUI/View/Mask/MaskGraphicsProxy.h"
+#include "GUI/View/Mask/MaskGraphicsScene.h"
 #include <QGraphicsScene>
 #include <QScrollBar>
 #include <QTransform>
diff --git a/GUI/Views/MaskWidgets/MaskGraphicsView.h b/GUI/View/Mask/MaskGraphicsView.h
similarity index 84%
rename from GUI/Views/MaskWidgets/MaskGraphicsView.h
rename to GUI/View/Mask/MaskGraphicsView.h
index 7b7aa65ecea010c0d7cbde6e9fe81860ef0d5faa..10e0de7a0c405cd43356f21dc376dd75980794f0 100644
--- a/GUI/Views/MaskWidgets/MaskGraphicsView.h
+++ b/GUI/View/Mask/MaskGraphicsView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskGraphicsView.h
+//! @file      GUI/View/Mask/MaskGraphicsView.h
 //! @brief     Defines class MaskGraphicsView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKGRAPHICSVIEW_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKGRAPHICSVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSVIEW_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSVIEW_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorFlags.h"
+#include "GUI/View/Mask/MaskEditorFlags.h"
 #include <QGraphicsView>
 
 class QWheelEvent;
@@ -56,4 +56,4 @@ private:
     double m_current_zoom_value;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKGRAPHICSVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKGRAPHICSVIEW_H
diff --git a/GUI/Views/MaskWidgets/MaskResultsPresenter.cpp b/GUI/View/Mask/MaskResultsPresenter.cpp
similarity index 94%
rename from GUI/Views/MaskWidgets/MaskResultsPresenter.cpp
rename to GUI/View/Mask/MaskResultsPresenter.cpp
index ec1ddd7f56beaa86a60ed04d059ba6e970758984..4f0d341a4540e29d3eae34bd327ac52369af1755 100644
--- a/GUI/Views/MaskWidgets/MaskResultsPresenter.cpp
+++ b/GUI/View/Mask/MaskResultsPresenter.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskResultsPresenter.cpp
+//! @file      GUI/View/Mask/MaskResultsPresenter.cpp
 //! @brief     Implements class MaskResultsPresenter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskResultsPresenter.h"
+#include "GUI/View/Mask/MaskResultsPresenter.h"
 #include "Device/Mask/DetectorMask.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Session/SessionModel.h"
 #include <QVBoxLayout>
 
 MaskResultsPresenter::MaskResultsPresenter(QWidget* parent)
diff --git a/GUI/Views/MaskWidgets/MaskResultsPresenter.h b/GUI/View/Mask/MaskResultsPresenter.h
similarity index 83%
rename from GUI/Views/MaskWidgets/MaskResultsPresenter.h
rename to GUI/View/Mask/MaskResultsPresenter.h
index 1965aef7b785af17c18db4ceae62eafd00928b08..0a8bdcf80b17119ddbda4a9a2eb15778a3bba1c6 100644
--- a/GUI/Views/MaskWidgets/MaskResultsPresenter.h
+++ b/GUI/View/Mask/MaskResultsPresenter.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskResultsPresenter.h
+//! @file      GUI/View/Mask/MaskResultsPresenter.h
 //! @brief     Defines class MaskResultsPresenter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKRESULTSPRESENTER_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKRESULTSPRESENTER_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKRESULTSPRESENTER_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKRESULTSPRESENTER_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorFlags.h"
+#include "GUI/View/Mask/MaskEditorFlags.h"
 #include <QModelIndex>
 #include <QObject>
 #include <memory>
@@ -51,4 +51,4 @@ private:
     bool m_interpolation_flag_backup;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKRESULTSPRESENTER_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKRESULTSPRESENTER_H
diff --git a/GUI/Views/MaskWidgets/MaskViewFactory.cpp b/GUI/View/Mask/MaskViewFactory.cpp
similarity index 80%
rename from GUI/Views/MaskWidgets/MaskViewFactory.cpp
rename to GUI/View/Mask/MaskViewFactory.cpp
index a5c3a99f713f22998c8f1b59ccdc7b19cfa97a82..7caa57c8ac8c59f8a4f2b52f61fc85052e592860 100644
--- a/GUI/Views/MaskWidgets/MaskViewFactory.cpp
+++ b/GUI/View/Mask/MaskViewFactory.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskViewFactory.cpp
+//! @file      GUI/View/Mask/MaskViewFactory.cpp
 //! @brief     Implements class MaskViewFactory
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,18 +12,18 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/MaskViewFactory.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/ProjectionItems.h"
-#include "GUI/Models/SessionItem.h"
-#include "GUI/Views/MaskWidgets/EllipseView.h"
-#include "GUI/Views/MaskWidgets/LineViews.h"
-#include "GUI/Views/MaskWidgets/MaskAllView.h"
-#include "GUI/Views/MaskWidgets/MaskContainerView.h"
-#include "GUI/Views/MaskWidgets/PolygonPointView.h"
-#include "GUI/Views/MaskWidgets/PolygonView.h"
-#include "GUI/Views/MaskWidgets/RegionOfInterestView.h"
+#include "GUI/View/Mask/MaskViewFactory.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Data/ProjectionItems.h"
+#include "GUI/Model/Session/SessionItem.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/Mask/EllipseView.h"
+#include "GUI/View/Mask/LineViews.h"
+#include "GUI/View/Mask/MaskAllView.h"
+#include "GUI/View/Mask/MaskContainerView.h"
+#include "GUI/View/Mask/PolygonPointView.h"
+#include "GUI/View/Mask/PolygonView.h"
+#include "GUI/View/Mask/RegionOfInterestView.h"
 
 #include <boost/polymorphic_cast.hpp>
 using boost::polymorphic_downcast;
diff --git a/GUI/Views/MaskWidgets/MaskViewFactory.h b/GUI/View/Mask/MaskViewFactory.h
similarity index 78%
rename from GUI/Views/MaskWidgets/MaskViewFactory.h
rename to GUI/View/Mask/MaskViewFactory.h
index 86d25a0e2bad9be7dff297a3dce27e7f247e0c4a..6db3063d7e3f61b94ecb2b93ac2eaa86a1b66879 100644
--- a/GUI/Views/MaskWidgets/MaskViewFactory.h
+++ b/GUI/View/Mask/MaskViewFactory.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/MaskViewFactory.h
+//! @file      GUI/View/Mask/MaskViewFactory.h
 //! @brief     Defines class MaskViewFactory
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKVIEWFACTORY_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKVIEWFACTORY_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_MASKVIEWFACTORY_H
+#define BORNAGAIN_GUI_VIEW_MASK_MASKVIEWFACTORY_H
 
 #include <QString>
 
@@ -28,4 +28,4 @@ public:
     static IShape2DView* createMaskView(SessionItem* item, ISceneAdaptor* adaptor = 0);
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_MASKVIEWFACTORY_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_MASKVIEWFACTORY_H
diff --git a/GUI/View/Mask/MaskWidgets.qrc b/GUI/View/Mask/MaskWidgets.qrc
new file mode 100644
index 0000000000000000000000000000000000000000..a228cb0b503fc160b183cafed063ece11c5f40a9
--- /dev/null
+++ b/GUI/View/Mask/MaskWidgets.qrc
@@ -0,0 +1,21 @@
+<RCC>
+    <qresource prefix="/Mask">
+        <file>image/maskeditor_arrow.svg</file>
+        <file>image/maskeditor_hand.svg</file>
+        <file>image/maskeditor_refresh.svg</file>
+        <file>image/maskeditor_rectangle.svg</file>
+        <file>image/maskeditor_ellipse.svg</file>
+        <file>image/maskeditor_polygon.svg</file>
+        <file>image/maskeditor_bringtofront.svg</file>
+        <file>image/maskeditor_sendtoback.svg</file>
+        <file>image/maskeditor_maskall.svg</file>
+        <file>image/maskeditor_verticalline.svg</file>
+        <file>image/maskeditor_horizontalline.svg</file>
+        <file>image/maskeditor_toolpanel.svg</file>
+        <file>image/maskeditor_masktrue.svg</file>
+        <file>image/maskeditor_maskfalse.svg</file>
+        <file>image/maskeditor_lightbulb.svg</file>
+        <file>image/maskeditor_roi.svg</file>
+        <file>image/maskeditor_save.svg</file>
+    </qresource>
+</RCC>
diff --git a/GUI/Views/MaskWidgets/PolygonPointView.cpp b/GUI/View/Mask/PolygonPointView.cpp
similarity index 94%
rename from GUI/Views/MaskWidgets/PolygonPointView.cpp
rename to GUI/View/Mask/PolygonPointView.cpp
index c930294d1d0bda108de34c5983839807f1a93b77..b907ccb7b8cd98c91c773a964d9b848aeeb10e33 100644
--- a/GUI/Views/MaskWidgets/PolygonPointView.cpp
+++ b/GUI/View/Mask/PolygonPointView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/PolygonPointView.cpp
+//! @file      GUI/View/Mask/PolygonPointView.cpp
 //! @brief     Implements PolygonPointView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/PolygonPointView.h"
-#include "GUI/Models/MaskItems.h"
+#include "GUI/View/Mask/PolygonPointView.h"
+#include "GUI/Model/Data/MaskItems.h"
 #include <QGraphicsSceneMouseEvent>
 #include <QPainter>
 
diff --git a/GUI/Views/MaskWidgets/PolygonPointView.h b/GUI/View/Mask/PolygonPointView.h
similarity index 85%
rename from GUI/Views/MaskWidgets/PolygonPointView.h
rename to GUI/View/Mask/PolygonPointView.h
index 794e11ad6540930a6065f05249d58d204dd074d8..ae1ab069f2f3c07a32b9730897ed8567533d3c7d 100644
--- a/GUI/Views/MaskWidgets/PolygonPointView.h
+++ b/GUI/View/Mask/PolygonPointView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/PolygonPointView.h
+//! @file      GUI/View/Mask/PolygonPointView.h
 //! @brief     Defines PolygonPointView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_POLYGONPOINTVIEW_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_POLYGONPOINTVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_POLYGONPOINTVIEW_H
+#define BORNAGAIN_GUI_VIEW_MASK_POLYGONPOINTVIEW_H
 
-#include "GUI/Views/MaskWidgets/IShape2DView.h"
+#include "GUI/View/Mask/IShape2DView.h"
 
 class PolygonPointItem;
 
@@ -58,4 +58,4 @@ private:
     bool m_on_hover;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_POLYGONPOINTVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_POLYGONPOINTVIEW_H
diff --git a/GUI/Views/MaskWidgets/PolygonView.cpp b/GUI/View/Mask/PolygonView.cpp
similarity index 97%
rename from GUI/Views/MaskWidgets/PolygonView.cpp
rename to GUI/View/Mask/PolygonView.cpp
index b7ee2109524df3727b510df469006ab91f561082..d8e51f687c14f53ab3594e68f691f0c94e301a5a 100644
--- a/GUI/Views/MaskWidgets/PolygonView.cpp
+++ b/GUI/View/Mask/PolygonView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/PolygonView.cpp
+//! @file      GUI/View/Mask/PolygonView.cpp
 //! @brief     Implements PolygonView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/PolygonView.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Views/MaskWidgets/PolygonPointView.h"
+#include "GUI/View/Mask/PolygonView.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/View/Mask/PolygonPointView.h"
 #include <QCursor>
 #include <QPainter>
 
diff --git a/GUI/Views/MaskWidgets/PolygonView.h b/GUI/View/Mask/PolygonView.h
similarity index 87%
rename from GUI/Views/MaskWidgets/PolygonView.h
rename to GUI/View/Mask/PolygonView.h
index d8d12d8003f734005486e8d27bf144288c25739c..e7e00c267533f2236eb1e5f2339587d1bf4012f5 100644
--- a/GUI/Views/MaskWidgets/PolygonView.h
+++ b/GUI/View/Mask/PolygonView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/PolygonView.h
+//! @file      GUI/View/Mask/PolygonView.h
 //! @brief     Defines PolygonView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_POLYGONVIEW_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_POLYGONVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_POLYGONVIEW_H
+#define BORNAGAIN_GUI_VIEW_MASK_POLYGONVIEW_H
 
-#include "GUI/Views/MaskWidgets/IShape2DView.h"
+#include "GUI/View/Mask/IShape2DView.h"
 #include <QPolygonF>
 
 class PolygonItem;
@@ -65,4 +65,4 @@ private:
     bool m_close_polygon_request;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_POLYGONVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_POLYGONVIEW_H
diff --git a/GUI/Views/MaskWidgets/RectangleBaseView.cpp b/GUI/View/Mask/RectangleBaseView.cpp
similarity index 97%
rename from GUI/Views/MaskWidgets/RectangleBaseView.cpp
rename to GUI/View/Mask/RectangleBaseView.cpp
index b9a431018882d431608326579fe451670c77434d..2f25ce9e4a162fa93e72dea63bb896e6f90ce7b1 100644
--- a/GUI/Views/MaskWidgets/RectangleBaseView.cpp
+++ b/GUI/View/Mask/RectangleBaseView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/RectangleBaseView.cpp
+//! @file      GUI/View/Mask/RectangleBaseView.cpp
 //! @brief     Implements RectangleBaseView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/RectangleBaseView.h"
+#include "GUI/View/Mask/RectangleBaseView.h"
 #include "Base/Utils/Assert.h"
 
 namespace {
diff --git a/GUI/Views/MaskWidgets/RectangleBaseView.h b/GUI/View/Mask/RectangleBaseView.h
similarity index 84%
rename from GUI/Views/MaskWidgets/RectangleBaseView.h
rename to GUI/View/Mask/RectangleBaseView.h
index 9c406268ab964874d033f9c8aecb5cfd3e710276..460cfd3c6bbd7eba360c4e1449dc74cb097aec9a 100644
--- a/GUI/Views/MaskWidgets/RectangleBaseView.h
+++ b/GUI/View/Mask/RectangleBaseView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/RectangleBaseView.h
+//! @file      GUI/View/Mask/RectangleBaseView.h
 //! @brief     Defines RectangleBaseView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_RECTANGLEBASEVIEW_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_RECTANGLEBASEVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_RECTANGLEBASEVIEW_H
+#define BORNAGAIN_GUI_VIEW_MASK_RECTANGLEBASEVIEW_H
 
-#include "GUI/Views/MaskWidgets/IShape2DView.h"
-#include "GUI/Views/MaskWidgets/SizeHandleElement.h"
+#include "GUI/View/Mask/IShape2DView.h"
+#include "GUI/View/Mask/SizeHandleElement.h"
 #include <QMap>
 
 //! Base view for all rectangular-like masks.
@@ -57,4 +57,4 @@ protected:
     SizeHandleElement* m_activeHandleElement;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_RECTANGLEBASEVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_RECTANGLEBASEVIEW_H
diff --git a/GUI/Views/MaskWidgets/RectangleView.cpp b/GUI/View/Mask/RectangleView.cpp
similarity index 96%
rename from GUI/Views/MaskWidgets/RectangleView.cpp
rename to GUI/View/Mask/RectangleView.cpp
index 7fbc87be9cc7e1cf4364cceb03ba61f7417d084a..1a6f9d1f376b7aa5a72d478d7b513fe4999d096e 100644
--- a/GUI/Views/MaskWidgets/RectangleView.cpp
+++ b/GUI/View/Mask/RectangleView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/RectangleView.cpp
+//! @file      GUI/View/Mask/RectangleView.cpp
 //! @brief     Implements RectangleView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/RectangleView.h"
-#include "GUI/Models/MaskItems.h"
+#include "GUI/View/Mask/RectangleView.h"
+#include "GUI/Model/Data/MaskItems.h"
 #include <QGraphicsSceneMouseEvent>
 #include <QPainter>
 
diff --git a/GUI/Views/MaskWidgets/RectangleView.h b/GUI/View/Mask/RectangleView.h
similarity index 85%
rename from GUI/Views/MaskWidgets/RectangleView.h
rename to GUI/View/Mask/RectangleView.h
index 2b263b6d759f52b3c48e23577d0ff22fbfccb489..f014c1502969cd10733789938c9fad022e817d1e 100644
--- a/GUI/Views/MaskWidgets/RectangleView.h
+++ b/GUI/View/Mask/RectangleView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/RectangleView.h
+//! @file      GUI/View/Mask/RectangleView.h
 //! @brief     Defines RectangleView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_RECTANGLEVIEW_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_RECTANGLEVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_RECTANGLEVIEW_H
+#define BORNAGAIN_GUI_VIEW_MASK_RECTANGLEVIEW_H
 
-#include "GUI/Views/MaskWidgets/RectangleBaseView.h"
+#include "GUI/View/Mask/RectangleBaseView.h"
 
 class RectangleItem;
 
@@ -56,4 +56,4 @@ private:
     RectangleItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_RECTANGLEVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_RECTANGLEVIEW_H
diff --git a/GUI/Views/MaskWidgets/RegionOfInterestView.cpp b/GUI/View/Mask/RegionOfInterestView.cpp
similarity index 86%
rename from GUI/Views/MaskWidgets/RegionOfInterestView.cpp
rename to GUI/View/Mask/RegionOfInterestView.cpp
index 66b0ca1bb11b378b8b6d3812b5da57053eef834a..3ada6809009f973eccd3b4653c6aad172c8f7b8b 100644
--- a/GUI/Views/MaskWidgets/RegionOfInterestView.cpp
+++ b/GUI/View/Mask/RegionOfInterestView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/RegionOfInterestView.cpp
+//! @file      GUI/View/Mask/RegionOfInterestView.cpp
 //! @brief     Defines RegionOfInterestView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/RegionOfInterestView.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Views/MaskWidgets/ISceneAdaptor.h"
+#include "GUI/View/Mask/RegionOfInterestView.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/View/Mask/ISceneAdaptor.h"
 #include <QPainter>
 
 RegionOfInterestView::RegionOfInterestView(RegionOfInterestItem* item) : RectangleView(item) {}
diff --git a/GUI/Views/MaskWidgets/RegionOfInterestView.h b/GUI/View/Mask/RegionOfInterestView.h
similarity index 78%
rename from GUI/Views/MaskWidgets/RegionOfInterestView.h
rename to GUI/View/Mask/RegionOfInterestView.h
index 10091b929960bea9bd15e9e63952f57bdb5a696d..14771b2bceea8fec6dfeb18749bc8a3ebf4ccf68 100644
--- a/GUI/Views/MaskWidgets/RegionOfInterestView.h
+++ b/GUI/View/Mask/RegionOfInterestView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/RegionOfInterestView.h
+//! @file      GUI/View/Mask/RegionOfInterestView.h
 //! @brief     Defines RegionOfInterestView class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_REGIONOFINTERESTVIEW_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_REGIONOFINTERESTVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_REGIONOFINTERESTVIEW_H
+#define BORNAGAIN_GUI_VIEW_MASK_REGIONOFINTERESTVIEW_H
 
-#include "GUI/Views/MaskWidgets/RectangleView.h"
+#include "GUI/View/Mask/RectangleView.h"
 
 class RegionOfInterestItem;
 
@@ -38,4 +38,4 @@ protected:
     void paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) override;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_REGIONOFINTERESTVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_REGIONOFINTERESTVIEW_H
diff --git a/GUI/Views/MaskWidgets/SizeHandleElement.cpp b/GUI/View/Mask/SizeHandleElement.cpp
similarity index 98%
rename from GUI/Views/MaskWidgets/SizeHandleElement.cpp
rename to GUI/View/Mask/SizeHandleElement.cpp
index 753b2ede5a287099ed6f16004170acf9017da8e6..85a677696a23cf11b277124b757afe7533d6844d 100644
--- a/GUI/Views/MaskWidgets/SizeHandleElement.cpp
+++ b/GUI/View/Mask/SizeHandleElement.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/SizeHandleElement.cpp
+//! @file      GUI/View/Mask/SizeHandleElement.cpp
 //! @brief     Implements SizeHandleElement class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaskWidgets/SizeHandleElement.h"
+#include "GUI/View/Mask/SizeHandleElement.h"
 #include <QGraphicsSceneHoverEvent>
 #include <QPainter>
 
diff --git a/GUI/Views/MaskWidgets/SizeHandleElement.h b/GUI/View/Mask/SizeHandleElement.h
similarity index 88%
rename from GUI/Views/MaskWidgets/SizeHandleElement.h
rename to GUI/View/Mask/SizeHandleElement.h
index 4d584307288482caf256203d164daf0c7f1f6470..e811fac2bcd82a6591b7fb789df2da2cb64b1107 100644
--- a/GUI/Views/MaskWidgets/SizeHandleElement.h
+++ b/GUI/View/Mask/SizeHandleElement.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaskWidgets/SizeHandleElement.h
+//! @file      GUI/View/Mask/SizeHandleElement.h
 //! @brief     Defines SizeHandleElement class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MASKWIDGETS_SIZEHANDLEELEMENT_H
-#define BORNAGAIN_GUI_VIEWS_MASKWIDGETS_SIZEHANDLEELEMENT_H
+#ifndef BORNAGAIN_GUI_VIEW_MASK_SIZEHANDLEELEMENT_H
+#define BORNAGAIN_GUI_VIEW_MASK_SIZEHANDLEELEMENT_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorHelper.h"
+#include "GUI/View/Mask/MaskEditorHelper.h"
 #include <QCursor>
 #include <QGraphicsObject>
 #include <QMap>
@@ -72,4 +72,4 @@ private:
     static QMap<EHandleLocation, EHandleLocation> m_opposite_handle_location;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MASKWIDGETS_SIZEHANDLEELEMENT_H
+#endif // BORNAGAIN_GUI_VIEW_MASK_SIZEHANDLEELEMENT_H
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_arrow.svg b/GUI/View/Mask/image/maskeditor_arrow.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_arrow.svg
rename to GUI/View/Mask/image/maskeditor_arrow.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_bringtofront.svg b/GUI/View/Mask/image/maskeditor_bringtofront.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_bringtofront.svg
rename to GUI/View/Mask/image/maskeditor_bringtofront.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_details.svg b/GUI/View/Mask/image/maskeditor_details.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_details.svg
rename to GUI/View/Mask/image/maskeditor_details.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_ellipse.svg b/GUI/View/Mask/image/maskeditor_ellipse.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_ellipse.svg
rename to GUI/View/Mask/image/maskeditor_ellipse.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_hand.svg b/GUI/View/Mask/image/maskeditor_hand.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_hand.svg
rename to GUI/View/Mask/image/maskeditor_hand.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_horizontalline.svg b/GUI/View/Mask/image/maskeditor_horizontalline.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_horizontalline.svg
rename to GUI/View/Mask/image/maskeditor_horizontalline.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_lightbulb.svg b/GUI/View/Mask/image/maskeditor_lightbulb.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_lightbulb.svg
rename to GUI/View/Mask/image/maskeditor_lightbulb.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_maskall.svg b/GUI/View/Mask/image/maskeditor_maskall.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_maskall.svg
rename to GUI/View/Mask/image/maskeditor_maskall.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_maskfalse.svg b/GUI/View/Mask/image/maskeditor_maskfalse.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_maskfalse.svg
rename to GUI/View/Mask/image/maskeditor_maskfalse.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_masktrue.svg b/GUI/View/Mask/image/maskeditor_masktrue.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_masktrue.svg
rename to GUI/View/Mask/image/maskeditor_masktrue.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_polygon.svg b/GUI/View/Mask/image/maskeditor_polygon.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_polygon.svg
rename to GUI/View/Mask/image/maskeditor_polygon.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_rectangle.svg b/GUI/View/Mask/image/maskeditor_rectangle.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_rectangle.svg
rename to GUI/View/Mask/image/maskeditor_rectangle.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_refresh.svg b/GUI/View/Mask/image/maskeditor_refresh.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_refresh.svg
rename to GUI/View/Mask/image/maskeditor_refresh.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_roi.svg b/GUI/View/Mask/image/maskeditor_roi.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_roi.svg
rename to GUI/View/Mask/image/maskeditor_roi.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_save.svg b/GUI/View/Mask/image/maskeditor_save.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_save.svg
rename to GUI/View/Mask/image/maskeditor_save.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_sendtoback.svg b/GUI/View/Mask/image/maskeditor_sendtoback.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_sendtoback.svg
rename to GUI/View/Mask/image/maskeditor_sendtoback.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_toolpanel.svg b/GUI/View/Mask/image/maskeditor_toolpanel.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_toolpanel.svg
rename to GUI/View/Mask/image/maskeditor_toolpanel.svg
diff --git a/GUI/Views/MaskWidgets/images/maskeditor_verticalline.svg b/GUI/View/Mask/image/maskeditor_verticalline.svg
similarity index 100%
rename from GUI/Views/MaskWidgets/images/maskeditor_verticalline.svg
rename to GUI/View/Mask/image/maskeditor_verticalline.svg
diff --git a/GUI/Views/MaterialEditor/MaterialEditorDialog.cpp b/GUI/View/MaterialEditor/MaterialEditorDialog.cpp
similarity index 90%
rename from GUI/Views/MaterialEditor/MaterialEditorDialog.cpp
rename to GUI/View/MaterialEditor/MaterialEditorDialog.cpp
index 602312b0c0fa962644db598410e08767ed418dd6..39b001ca1111b1c1aa48648e4f5abca4dfa6dc63 100644
--- a/GUI/Views/MaterialEditor/MaterialEditorDialog.cpp
+++ b/GUI/View/MaterialEditor/MaterialEditorDialog.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaterialEditor/MaterialEditorDialog.cpp
+//! @file      GUI/View/MaterialEditor/MaterialEditorDialog.cpp
 //! @brief     Implements class MaterialEditorDialog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,20 +12,20 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaterialEditor/MaterialEditorDialog.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/ItemWithMaterial.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/MaterialModelStore.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/VectorItem.h"
-#include "GUI/Views/CommonWidgets/GUIHelpers.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/MaterialEditor/MaterialEditorModel.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/View/MaterialEditor/MaterialEditorDialog.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Material/MaterialModelStore.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/Model/Sample/ItemWithMaterial.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/MaterialEditor/MaterialEditorModel.h"
+#include "GUI/View/Tool/EditUtil.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include "ui_MaterialEditorDialog.h"
 
 #include <QAction>
@@ -36,8 +36,6 @@
 #include <QToolBar>
 #include <QVBoxLayout>
 
-using namespace GUI::View::Helpers;
-
 MaterialEditorDialog::MaterialEditorDialog(ProjectDocument* document, QWidget* parent)
     : QDialog(parent), m_ui(new Ui::MaterialEditorDialog), m_document(document)
 {
@@ -47,11 +45,13 @@ MaterialEditorDialog::MaterialEditorDialog(ProjectDocument* document, QWidget* p
 
     m_ui->setupUi(this);
 
+    using GUI::View::EditUtil::configScientificDoubleEdit;
     configScientificDoubleEdit(m_ui->deltaEdit, RealLimits::limitless());
     configScientificDoubleEdit(m_ui->betaEdit, RealLimits::limitless());
     configScientificDoubleEdit(m_ui->realEdit, RealLimits::limitless());
     configScientificDoubleEdit(m_ui->imaginaryEdit, RealLimits::limitless());
 
+    using GUI::View::EditUtil::configSpinbox;
     configSpinbox(m_ui->xSpinBox, 3, RealLimits::limitless());
     configSpinbox(m_ui->ySpinBox, 3, RealLimits::limitless());
     configSpinbox(m_ui->zSpinBox, 3, RealLimits::limitless());
@@ -97,7 +97,7 @@ MaterialEditorDialog::MaterialEditorDialog(ProjectDocument* document, QWidget* p
     toolbar->addAction(m_removeMaterialAction);
     m_ui->mainLayout->insertWidget(0, toolbar);
 
-    GUI::Utils::Style::setResizable(this);
+    GUI::Util::Style::setResizable(this);
     baApp->settings().loadWindowSizeAndPos(this);
 
     connect(m_ui->treeView->selectionModel(), &QItemSelectionModel::currentChanged, this,
@@ -156,10 +156,10 @@ void MaterialEditorDialog::accept()
     QDialog::accept();
 }
 
-QString MaterialEditorDialog::chooseMaterial(ProjectDocument* document,
+QString MaterialEditorDialog::chooseMaterial(QWidget* parent, ProjectDocument* document,
                                              const QString& identifierOfPreviousMaterial)
 {
-    MaterialEditorDialog dialog(document, MainWindow::instance());
+    MaterialEditorDialog dialog(document, parent);
     dialog.setCurrentMaterial(identifierOfPreviousMaterial);
     if (dialog.exec() == QDialog::Accepted)
         if (MaterialItem* material = dialog.currentMaterial())
@@ -168,9 +168,9 @@ QString MaterialEditorDialog::chooseMaterial(ProjectDocument* document,
     return QString();
 }
 
-void MaterialEditorDialog::editMaterials(ProjectDocument* document)
+void MaterialEditorDialog::editMaterials(QWidget* parent, ProjectDocument* document)
 {
-    MaterialEditorDialog dialog(document, MainWindow::instance());
+    MaterialEditorDialog dialog(document, parent);
     dialog.exec();
 }
 
diff --git a/GUI/Views/MaterialEditor/MaterialEditorDialog.h b/GUI/View/MaterialEditor/MaterialEditorDialog.h
similarity index 86%
rename from GUI/Views/MaterialEditor/MaterialEditorDialog.h
rename to GUI/View/MaterialEditor/MaterialEditorDialog.h
index a4e4c6968df8459d0e5a2fab44f0e67cc91a01af..5b281a678992fa402a21eae8241b63ccd9a85c50 100644
--- a/GUI/Views/MaterialEditor/MaterialEditorDialog.h
+++ b/GUI/View/MaterialEditor/MaterialEditorDialog.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaterialEditor/MaterialEditorDialog.h
+//! @file      GUI/View/MaterialEditor/MaterialEditorDialog.h
 //! @brief     Defines class MaterialEditorDialog
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MATERIALEDITOR_MATERIALEDITORDIALOG_H
-#define BORNAGAIN_GUI_VIEWS_MATERIALEDITOR_MATERIALEDITORDIALOG_H
+#ifndef BORNAGAIN_GUI_VIEW_MATERIALEDITOR_MATERIALEDITORDIALOG_H
+#define BORNAGAIN_GUI_VIEW_MATERIALEDITOR_MATERIALEDITORDIALOG_H
 
 #include <QDialog>
 #include <memory>
@@ -39,11 +39,11 @@ public:
     //! selected when opening the dialog. Returns the identifier of the newly selected material.
     //! Returns an empty string, if the dialog is
     //! cancelled.
-    static QString chooseMaterial(ProjectDocument* document,
+    static QString chooseMaterial(QWidget* parent, ProjectDocument* document,
                                   const QString& identifierOfPreviousMaterial);
 
     //! Use this to edit the list of existing materials.
-    static void editMaterials(ProjectDocument* document);
+    static void editMaterials(QWidget* parent, ProjectDocument* document);
 
 private:
     MaterialEditorDialog(ProjectDocument* document, QWidget* parent = nullptr);
@@ -80,4 +80,4 @@ private:
     ProjectDocument* m_document;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_MATERIALEDITOR_MATERIALEDITORDIALOG_H
+#endif // BORNAGAIN_GUI_VIEW_MATERIALEDITOR_MATERIALEDITORDIALOG_H
diff --git a/GUI/Views/MaterialEditor/MaterialEditorDialog.ui b/GUI/View/MaterialEditor/MaterialEditorDialog.ui
similarity index 100%
rename from GUI/Views/MaterialEditor/MaterialEditorDialog.ui
rename to GUI/View/MaterialEditor/MaterialEditorDialog.ui
diff --git a/GUI/Views/MaterialEditor/MaterialEditorModel.cpp b/GUI/View/MaterialEditor/MaterialEditorModel.cpp
similarity index 96%
rename from GUI/Views/MaterialEditor/MaterialEditorModel.cpp
rename to GUI/View/MaterialEditor/MaterialEditorModel.cpp
index 37358b6a52840811a084c7449457fb66de93b880..cad287d81b7c6d0c6e14154c8b6a7948db224ded 100644
--- a/GUI/Views/MaterialEditor/MaterialEditorModel.cpp
+++ b/GUI/View/MaterialEditor/MaterialEditorModel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaterialEditor/MaterialEditorModel.cpp
+//! @file      GUI/View/MaterialEditor/MaterialEditorModel.cpp
 //! @brief     Implements class MaterialEditorModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/MaterialEditor/MaterialEditorModel.h"
-#include "GUI/Models/MaterialItem.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/View/MaterialEditor/MaterialEditorModel.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Types/VectorItem.h"
 #include <QApplication>
 #include <QFontMetrics>
 #include <QPixmap>
diff --git a/GUI/Views/MaterialEditor/MaterialEditorModel.h b/GUI/View/MaterialEditor/MaterialEditorModel.h
similarity index 91%
rename from GUI/Views/MaterialEditor/MaterialEditorModel.h
rename to GUI/View/MaterialEditor/MaterialEditorModel.h
index 298e1576107658c624f8f349f36fb3cf0f8d97b1..447b88a507f6c0534fdfab051ba2ade1233594a2 100644
--- a/GUI/Views/MaterialEditor/MaterialEditorModel.h
+++ b/GUI/View/MaterialEditor/MaterialEditorModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/MaterialEditor/MaterialEditorModel.h
+//! @file      GUI/View/MaterialEditor/MaterialEditorModel.h
 //! @brief     Defines class MaterialEditorModel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_MATERIALEDITOR_MATERIALEDITORMODEL_H
-#define BORNAGAIN_GUI_VIEWS_MATERIALEDITOR_MATERIALEDITORMODEL_H
+#ifndef BORNAGAIN_GUI_VIEW_MATERIALEDITOR_MATERIALEDITORMODEL_H
+#define BORNAGAIN_GUI_VIEW_MATERIALEDITOR_MATERIALEDITORMODEL_H
 
 #include <QAbstractItemModel>
 
@@ -66,4 +66,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_MATERIALEDITOR_MATERIALEDITORMODEL_H
+#endif // BORNAGAIN_GUI_VIEW_MATERIALEDITOR_MATERIALEDITORMODEL_H
diff --git a/GUI/Views/ProjectionsWidgets/IntensityDataProjectionsWidget.cpp b/GUI/View/Projection/IntensityDataProjectionsWidget.cpp
similarity index 84%
rename from GUI/Views/ProjectionsWidgets/IntensityDataProjectionsWidget.cpp
rename to GUI/View/Projection/IntensityDataProjectionsWidget.cpp
index 6851515eb47131ad0fbba883f9a49b3716e14220..a121c3dbdbbe2eca01f1f501675a0cd42138d852 100644
--- a/GUI/Views/ProjectionsWidgets/IntensityDataProjectionsWidget.cpp
+++ b/GUI/View/Projection/IntensityDataProjectionsWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/IntensityDataProjectionsWidget.cpp
+//! @file      GUI/View/Projection/IntensityDataProjectionsWidget.cpp
 //! @brief     Defines class IntensityDataProjectionsWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ProjectionsWidgets/IntensityDataProjectionsWidget.h"
-#include "GUI/Models/DataItemUtils.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/ProjectionItems.h"
-#include "GUI/Views/ProjectionsWidgets/ProjectionsEditor.h"
+#include "GUI/View/Projection/IntensityDataProjectionsWidget.h"
+#include "GUI/Model/Data/DataItemUtils.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/ProjectionItems.h"
+#include "GUI/View/Projection/ProjectionsEditor.h"
 #include <QVBoxLayout>
 
 IntensityDataProjectionsWidget::IntensityDataProjectionsWidget(QWidget* parent)
diff --git a/GUI/Views/ProjectionsWidgets/IntensityDataProjectionsWidget.h b/GUI/View/Projection/IntensityDataProjectionsWidget.h
similarity index 76%
rename from GUI/Views/ProjectionsWidgets/IntensityDataProjectionsWidget.h
rename to GUI/View/Projection/IntensityDataProjectionsWidget.h
index 6ca8bf83f2f5af5ca31df8ea76980be3bd01f9b8..a3f8bcccf0c1a0145966bef20d0c2b8253ced6d9 100644
--- a/GUI/Views/ProjectionsWidgets/IntensityDataProjectionsWidget.h
+++ b/GUI/View/Projection/IntensityDataProjectionsWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/IntensityDataProjectionsWidget.h
+//! @file      GUI/View/Projection/IntensityDataProjectionsWidget.h
 //! @brief     Defines class IntensityDataProjectionsWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_INTENSITYDATAPROJECTIONSWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_INTENSITYDATAPROJECTIONSWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_PROJECTION_INTENSITYDATAPROJECTIONSWIDGET_H
+#define BORNAGAIN_GUI_VIEW_PROJECTION_INTENSITYDATAPROJECTIONSWIDGET_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 
 class ProjectionsEditor;
 class IntensityDataItem;
@@ -43,4 +43,4 @@ private:
     ProjectionsEditor* m_projectionsEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_INTENSITYDATAPROJECTIONSWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_PROJECTION_INTENSITYDATAPROJECTIONSWIDGET_H
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsEditor.cpp b/GUI/View/Projection/ProjectionsEditor.cpp
similarity index 89%
rename from GUI/Views/ProjectionsWidgets/ProjectionsEditor.cpp
rename to GUI/View/Projection/ProjectionsEditor.cpp
index 71e3edbacaca4f716f9072d3840c69e4ede20092..291dfb1d6bb27a671ba49aae2cd570a516c358ea 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsEditor.cpp
+++ b/GUI/View/Projection/ProjectionsEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsEditor.cpp
+//! @file      GUI/View/Projection/ProjectionsEditor.cpp
 //! @brief     Implements class ProjectionsEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ProjectionsWidgets/ProjectionsEditor.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/ProjectionsWidgets/ProjectionsEditorActions.h"
-#include "GUI/Views/ProjectionsWidgets/ProjectionsEditorCanvas.h"
-#include "GUI/Views/ProjectionsWidgets/ProjectionsPropertyPanel.h"
-#include "GUI/Views/ProjectionsWidgets/ProjectionsToolBar.h"
-#include "GUI/Views/ProjectionsWidgets/ProjectionsWidget.h"
+#include "GUI/View/Projection/ProjectionsEditor.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/View/Projection/ProjectionsEditorActions.h"
+#include "GUI/View/Projection/ProjectionsEditorCanvas.h"
+#include "GUI/View/Projection/ProjectionsPropertyPanel.h"
+#include "GUI/View/Projection/ProjectionsToolBar.h"
+#include "GUI/View/Projection/ProjectionsWidget.h"
 #include <QItemSelectionModel>
 #include <QSplitter>
 
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsEditor.h b/GUI/View/Projection/ProjectionsEditor.h
similarity index 86%
rename from GUI/Views/ProjectionsWidgets/ProjectionsEditor.h
rename to GUI/View/Projection/ProjectionsEditor.h
index eeac105ca40518c672365898d9cfb15c9f47a11f..0d3448e525952695ba81e5ad44b3e572dfec8e03 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsEditor.h
+++ b/GUI/View/Projection/ProjectionsEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsEditor.h
+//! @file      GUI/View/Projection/ProjectionsEditor.h
 //! @brief     Defines class ProjectionsEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITOR_H
+#define BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITOR_H
 
 #include <QMainWindow>
 
@@ -54,4 +54,4 @@ private:
     QItemSelectionModel* m_selectionModel;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITOR_H
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsEditorActions.cpp b/GUI/View/Projection/ProjectionsEditorActions.cpp
similarity index 92%
rename from GUI/Views/ProjectionsWidgets/ProjectionsEditorActions.cpp
rename to GUI/View/Projection/ProjectionsEditorActions.cpp
index f85faf1170010bdf71bf4358071862ad7326f900..3ab3bdc997967cf0fd99cbd4235bf2944fe952c1 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsEditorActions.cpp
+++ b/GUI/View/Projection/ProjectionsEditorActions.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsEditorActions.cpp
+//! @file      GUI/View/Projection/ProjectionsEditorActions.cpp
 //! @brief     Implements class ProjectionsEditorActions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ProjectionsWidgets/ProjectionsEditorActions.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/ProjectionsWidgets/SaveProjectionsAssistant.h"
+#include "GUI/View/Projection/ProjectionsEditorActions.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/View/Projection/SaveProjectionsAssistant.h"
 #include <QAction>
 #include <QItemSelectionModel>
 #include <QModelIndexList>
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsEditorActions.h b/GUI/View/Projection/ProjectionsEditorActions.h
similarity index 84%
rename from GUI/Views/ProjectionsWidgets/ProjectionsEditorActions.h
rename to GUI/View/Projection/ProjectionsEditorActions.h
index 1a7361740146350172b51d224ed209802d0b358f..85ab2f442a2c044eabb261112043a3c1af60074c 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsEditorActions.h
+++ b/GUI/View/Projection/ProjectionsEditorActions.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsEditorActions.h
+//! @file      GUI/View/Projection/ProjectionsEditorActions.h
 //! @brief     Defines class ProjectionsEditorActions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSEDITORACTIONS_H
-#define BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSEDITORACTIONS_H
+#ifndef BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITORACTIONS_H
+#define BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITORACTIONS_H
 
 #include <QList>
 #include <QModelIndex>
@@ -58,4 +58,4 @@ private:
     QWidget* m_parent;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSEDITORACTIONS_H
+#endif // BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITORACTIONS_H
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsEditorCanvas.cpp b/GUI/View/Projection/ProjectionsEditorCanvas.cpp
similarity index 91%
rename from GUI/Views/ProjectionsWidgets/ProjectionsEditorCanvas.cpp
rename to GUI/View/Projection/ProjectionsEditorCanvas.cpp
index e16f2eda9135475f8a040bfbdc87acaf7acad742..09015c50bab4c4c846532546e6cba533abb09aa6 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsEditorCanvas.cpp
+++ b/GUI/View/Projection/ProjectionsEditorCanvas.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsEditorCanvas.cpp
+//! @file      GUI/View/Projection/ProjectionsEditorCanvas.cpp
 //! @brief     Implements class ProjectionsEditorCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ProjectionsWidgets/ProjectionsEditorCanvas.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMap.h"
-#include "GUI/Views/IntensityDataWidgets/PlotStatusLabel.h"
-#include "GUI/Views/IntensityDataWidgets/ScientificPlotEvent.h"
-#include "GUI/Views/MaskWidgets/MaskGraphicsScene.h"
-#include "GUI/Views/MaskWidgets/MaskGraphicsView.h"
+#include "GUI/View/Projection/ProjectionsEditorCanvas.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/View/Intensity/ColorMap.h"
+#include "GUI/View/Intensity/PlotStatusLabel.h"
+#include "GUI/View/Intensity/ScientificPlotEvent.h"
+#include "GUI/View/Mask/MaskGraphicsScene.h"
+#include "GUI/View/Mask/MaskGraphicsView.h"
 #include <QItemSelectionModel>
 #include <QVBoxLayout>
 
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsEditorCanvas.h b/GUI/View/Projection/ProjectionsEditorCanvas.h
similarity index 87%
rename from GUI/Views/ProjectionsWidgets/ProjectionsEditorCanvas.h
rename to GUI/View/Projection/ProjectionsEditorCanvas.h
index 2cdec15d1bdc3fbeb5fbfc79f16b55fdd252c50b..8b869971b21663869cf3de72ec0ae3aa3c7e7ad9 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsEditorCanvas.h
+++ b/GUI/View/Projection/ProjectionsEditorCanvas.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsEditorCanvas.h
+//! @file      GUI/View/Projection/ProjectionsEditorCanvas.h
 //! @brief     Defines class ProjectionsEditorCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSEDITORCANVAS_H
-#define BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSEDITORCANVAS_H
+#ifndef BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITORCANVAS_H
+#define BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITORCANVAS_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorFlags.h"
+#include "GUI/View/Mask/MaskEditorFlags.h"
 #include <QModelIndex>
 #include <QWidget>
 
@@ -79,4 +79,4 @@ private:
     bool m_block_update;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSEDITORCANVAS_H
+#endif // BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSEDITORCANVAS_H
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsPlot.cpp b/GUI/View/Projection/ProjectionsPlot.cpp
similarity index 95%
rename from GUI/Views/ProjectionsWidgets/ProjectionsPlot.cpp
rename to GUI/View/Projection/ProjectionsPlot.cpp
index 41170ce103f6fbfcdb3ca80895e7147484dda0b9..1eff59fb15e1f01af93f12a05f352d01c867c9db 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsPlot.cpp
+++ b/GUI/View/Projection/ProjectionsPlot.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsPlot.cpp
+//! @file      GUI/View/Projection/ProjectionsPlot.cpp
 //! @brief     Defines class ProjectionCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ProjectionsWidgets/ProjectionsPlot.h"
+#include "GUI/View/Projection/ProjectionsPlot.h"
 #include "Device/Histo/Histogram1D.h"
 #include "Device/Histo/Histogram2D.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/ProjectionItems.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMapUtils.h"
-#include "GUI/Views/IntensityDataWidgets/plot_constants.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Data/ProjectionItems.h"
+#include "GUI/View/Intensity/ColorMapUtils.h"
+#include "GUI/View/Intensity/PlotConstants.h"
 #include <qcustomplot.h>
 
 #include <boost/polymorphic_cast.hpp>
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsPlot.h b/GUI/View/Projection/ProjectionsPlot.h
similarity index 87%
rename from GUI/Views/ProjectionsWidgets/ProjectionsPlot.h
rename to GUI/View/Projection/ProjectionsPlot.h
index b1e851f061ae942dc2d7a815dd4cbe5ce5b2f557..49bf7e124b980327326f9fa0230bb3740cddee43 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsPlot.h
+++ b/GUI/View/Projection/ProjectionsPlot.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsPlot.h
+//! @file      GUI/View/Projection/ProjectionsPlot.h
 //! @brief     Defines class ProjectionsPlot
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSPLOT_H
-#define BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSPLOT_H
+#ifndef BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSPLOT_H
+#define BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSPLOT_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 #include <QMap>
 #include <memory>
 #include <qcustomplot.h>
@@ -75,4 +75,4 @@ private:
     bool m_block_plot_update;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSPLOT_H
+#endif // BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSPLOT_H
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsPropertyPanel.cpp b/GUI/View/Projection/ProjectionsPropertyPanel.cpp
similarity index 87%
rename from GUI/Views/ProjectionsWidgets/ProjectionsPropertyPanel.cpp
rename to GUI/View/Projection/ProjectionsPropertyPanel.cpp
index 4efe85e2fcf7beb1ad937c4fff4c9d4c56d3afac..62d6867ac7c3e90716ceef607c6f492a6d76878a 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsPropertyPanel.cpp
+++ b/GUI/View/Projection/ProjectionsPropertyPanel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsPropertyPanel.cpp
+//! @file      GUI/View/Projection/ProjectionsPropertyPanel.cpp
 //! @brief     Implements class ProjectionsPropertyPanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ProjectionsWidgets/ProjectionsPropertyPanel.h"
-#include "GUI/Views/PropertyEditor/ComponentEditor.h"
+#include "GUI/View/Projection/ProjectionsPropertyPanel.h"
+#include "GUI/View/PropertyEditor/ComponentEditor.h"
 #include <QVBoxLayout>
 
 ProjectionsPropertyPanel::ProjectionsPropertyPanel(QWidget* parent)
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsPropertyPanel.h b/GUI/View/Projection/ProjectionsPropertyPanel.h
similarity index 72%
rename from GUI/Views/ProjectionsWidgets/ProjectionsPropertyPanel.h
rename to GUI/View/Projection/ProjectionsPropertyPanel.h
index f8c51cb8235622d007327ce74d52033b71f153b9..e2afd58520355953a62be814aeb3eadcbe964909 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsPropertyPanel.h
+++ b/GUI/View/Projection/ProjectionsPropertyPanel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsPropertyPanel.h
+//! @file      GUI/View/Projection/ProjectionsPropertyPanel.h
 //! @brief     Defines class ProjectionsPropertyPanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSPROPERTYPANEL_H
-#define BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSPROPERTYPANEL_H
+#ifndef BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSPROPERTYPANEL_H
+#define BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSPROPERTYPANEL_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 
 class ComponentEditor;
 
@@ -36,4 +36,4 @@ private:
     ComponentEditor* m_componentEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSPROPERTYPANEL_H
+#endif // BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSPROPERTYPANEL_H
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsToolBar.cpp b/GUI/View/Projection/ProjectionsToolBar.cpp
similarity index 90%
rename from GUI/Views/ProjectionsWidgets/ProjectionsToolBar.cpp
rename to GUI/View/Projection/ProjectionsToolBar.cpp
index ffaffc2605f6c4e845d0fda5238f55df0f7f9492..e494144af1f46dbd8e15cbfa409575c52c586b83 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsToolBar.cpp
+++ b/GUI/View/Projection/ProjectionsToolBar.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsToolBar.cpp
+//! @file      GUI/View/Projection/ProjectionsToolBar.cpp
 //! @brief     Implements class ProjectionsToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ProjectionsWidgets/ProjectionsToolBar.h"
-#include "GUI/Views/ProjectionsWidgets/ProjectionsEditorActions.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/View/Projection/ProjectionsToolBar.h"
+#include "GUI/Util/mainwindow_constants.h"
+#include "GUI/View/Projection/ProjectionsEditorActions.h"
 #include <QButtonGroup>
 #include <QLabel>
 #include <QToolButton>
@@ -104,7 +104,7 @@ void ProjectionsToolBar::setup_selection_group()
     add_separator();
 
     QToolButton* selectionButton = new QToolButton(this);
-    selectionButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_arrow.svg"));
+    selectionButton->setIcon(QIcon(":/Mask/img/maskeditor_arrow.svg"));
     selectionButton->setToolTip(selection_mode_tooltip);
     selectionButton->setCheckable(true);
     addWidget(selectionButton);
@@ -116,13 +116,13 @@ void ProjectionsToolBar::setup_selection_group()
 void ProjectionsToolBar::setup_shapes_group()
 {
     auto horizontalLineButton = new QToolButton(this);
-    horizontalLineButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_horizontalline.svg"));
+    horizontalLineButton->setIcon(QIcon(":/Mask/img/maskeditor_horizontalline.svg"));
     horizontalLineButton->setToolTip(horizontal_mode_tooltip);
     horizontalLineButton->setCheckable(true);
     addWidget(horizontalLineButton);
 
     auto verticalLineButton = new QToolButton(this);
-    verticalLineButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_verticalline.svg"));
+    verticalLineButton->setIcon(QIcon(":/Mask/img/maskeditor_verticalline.svg"));
     verticalLineButton->setToolTip(vertical_mode_tooltip);
     verticalLineButton->setCheckable(true);
     addWidget(verticalLineButton);
@@ -136,7 +136,7 @@ void ProjectionsToolBar::setup_shapes_group()
 void ProjectionsToolBar::setup_extratools_group()
 {
     auto saveButton = new QToolButton(this);
-    saveButton->setIcon(QIcon(":/MaskWidgets/images/maskeditor_save.svg"));
+    saveButton->setIcon(QIcon(":/Mask/img/maskeditor_save.svg"));
     saveButton->setToolTip("Save created projections in multi-column ASCII file.");
     addWidget(saveButton);
     connect(saveButton, &QToolButton::clicked, m_editorActions,
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsToolBar.h b/GUI/View/Projection/ProjectionsToolBar.h
similarity index 83%
rename from GUI/Views/ProjectionsWidgets/ProjectionsToolBar.h
rename to GUI/View/Projection/ProjectionsToolBar.h
index 098380875a19574702b845b1845c71c02f49b579..2db67ddef1bfca61c14cafb59e9666d2bf99428c 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsToolBar.h
+++ b/GUI/View/Projection/ProjectionsToolBar.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsToolBar.h
+//! @file      GUI/View/Projection/ProjectionsToolBar.h
 //! @brief     Defines class ProjectionsToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSTOOLBAR_H
-#define BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSTOOLBAR_H
+#ifndef BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSTOOLBAR_H
+#define BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSTOOLBAR_H
 
-#include "GUI/Views/MaskWidgets/MaskEditorFlags.h"
+#include "GUI/View/Mask/MaskEditorFlags.h"
 #include <QToolBar>
 
 class ProjectionsEditorActions;
@@ -53,4 +53,4 @@ private:
     MaskEditorFlags::Activity m_previousActivity;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSTOOLBAR_H
+#endif // BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSTOOLBAR_H
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsWidget.cpp b/GUI/View/Projection/ProjectionsWidget.cpp
similarity index 92%
rename from GUI/Views/ProjectionsWidgets/ProjectionsWidget.cpp
rename to GUI/View/Projection/ProjectionsWidget.cpp
index c719ceab341201d288d7857c2e5c78707c55bbdc..61eb7caad4b9e6c160c5a4ee20d5cde1cd7b3074 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsWidget.cpp
+++ b/GUI/View/Projection/ProjectionsWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsWidget.cpp
+//! @file      GUI/View/Projection/ProjectionsWidget.cpp
 //! @brief     Implements class ProjectionsWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ProjectionsWidgets/ProjectionsWidget.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Views/ProjectionsWidgets/ProjectionsPlot.h"
+#include "GUI/View/Projection/ProjectionsWidget.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/View/Projection/ProjectionsPlot.h"
 #include <QTabWidget>
 #include <QVBoxLayout>
 
diff --git a/GUI/Views/ProjectionsWidgets/ProjectionsWidget.h b/GUI/View/Projection/ProjectionsWidget.h
similarity index 78%
rename from GUI/Views/ProjectionsWidgets/ProjectionsWidget.h
rename to GUI/View/Projection/ProjectionsWidget.h
index a36b7d365b7c974832c0c7b6a01d0b38c03a50b1..02edf0d30ad93d18df2bfa5ec90f51993c183d67 100644
--- a/GUI/Views/ProjectionsWidgets/ProjectionsWidget.h
+++ b/GUI/View/Projection/ProjectionsWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/ProjectionsWidget.h
+//! @file      GUI/View/Projection/ProjectionsWidget.h
 //! @brief     Defines class ProjectionsWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSWIDGET_H
+#define BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSWIDGET_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
-#include "GUI/Views/MaskWidgets/MaskEditorFlags.h"
+#include "GUI/View/Common/SessionItemWidget.h"
+#include "GUI/View/Mask/MaskEditorFlags.h"
 
 class ProjectionsPlot;
 class QTabWidget;
@@ -50,4 +50,4 @@ private:
     QTabWidget* m_tabWidget;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_PROJECTIONSWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_PROJECTION_PROJECTIONSWIDGET_H
diff --git a/GUI/Views/ProjectionsWidgets/SaveProjectionsAssistant.cpp b/GUI/View/Projection/SaveProjectionsAssistant.cpp
similarity index 92%
rename from GUI/Views/ProjectionsWidgets/SaveProjectionsAssistant.cpp
rename to GUI/View/Projection/SaveProjectionsAssistant.cpp
index 4145e06a4d5335e32cffe9dfb6cf9783ca2264c8..c8e3386971aa61423b5c1820d51fcc09014f6852 100644
--- a/GUI/Views/ProjectionsWidgets/SaveProjectionsAssistant.cpp
+++ b/GUI/View/Projection/SaveProjectionsAssistant.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/SaveProjectionsAssistant.cpp
+//! @file      GUI/View/Projection/SaveProjectionsAssistant.cpp
 //! @brief     Implements class SaveProjectionsAssistant
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,16 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ProjectionsWidgets/SaveProjectionsAssistant.h"
+#include "GUI/View/Projection/SaveProjectionsAssistant.h"
 #include "Base/Py/PyFmt.h"
 #include "Device/Histo/Histogram1D.h"
 #include "Device/Histo/Histogram2D.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/ProjectionItems.h"
-#include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/mainwindow/projectmanager.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Data/ProjectionItems.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/Util/Error.h"
 #include <QFileDialog>
 #include <QTextStream>
 
@@ -69,7 +68,7 @@ void SaveProjectionsAssistant::saveProjections(QWidget* parent, IntensityDataIte
 {
     ASSERT(intensityItem);
 
-    QString defaultName = ProjectManager::instance()->userExportDir() + "/untitled.txt";
+    QString defaultName = gSessionData->projectDocument->userExportDir() + "/untitled.txt";
     QString fileName = QFileDialog::getSaveFileName(
         parent, "Save projections data", defaultName, "", nullptr,
         baApp->settings().useNativeFileDialog() ? QFileDialog::Options()
diff --git a/GUI/Views/ProjectionsWidgets/SaveProjectionsAssistant.h b/GUI/View/Projection/SaveProjectionsAssistant.h
similarity index 85%
rename from GUI/Views/ProjectionsWidgets/SaveProjectionsAssistant.h
rename to GUI/View/Projection/SaveProjectionsAssistant.h
index d96d7c268c62170b498cb9d9467fb244f5a4dc6b..36c418b9c760a23c771b42d5d180910c09a2b127 100644
--- a/GUI/Views/ProjectionsWidgets/SaveProjectionsAssistant.h
+++ b/GUI/View/Projection/SaveProjectionsAssistant.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectionsWidgets/SaveProjectionsAssistant.h
+//! @file      GUI/View/Projection/SaveProjectionsAssistant.h
 //! @brief     Defines class SaveProjectionsAssistant
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_SAVEPROJECTIONSASSISTANT_H
-#define BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_SAVEPROJECTIONSASSISTANT_H
+#ifndef BORNAGAIN_GUI_VIEW_PROJECTION_SAVEPROJECTIONSASSISTANT_H
+#define BORNAGAIN_GUI_VIEW_PROJECTION_SAVEPROJECTIONSASSISTANT_H
 
 #include <QString>
 #include <QVector>
@@ -56,4 +56,4 @@ private:
     QString projectionFileHeader(ProjectionsData& projectionsData);
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROJECTIONSWIDGETS_SAVEPROJECTIONSASSISTANT_H
+#endif // BORNAGAIN_GUI_VIEW_PROJECTION_SAVEPROJECTIONSASSISTANT_H
diff --git a/GUI/Views/PropertyEditor/ComponentEditor.cpp b/GUI/View/PropertyEditor/ComponentEditor.cpp
similarity index 90%
rename from GUI/Views/PropertyEditor/ComponentEditor.cpp
rename to GUI/View/PropertyEditor/ComponentEditor.cpp
index 27e77837da31b5d0059fb4e24bfd72c12fff2032..59a6213b539ff969e708ceda9cf6558797266984 100644
--- a/GUI/Views/PropertyEditor/ComponentEditor.cpp
+++ b/GUI/View/PropertyEditor/ComponentEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/ComponentEditor.cpp
+//! @file      GUI/View/PropertyEditor/ComponentEditor.cpp
 //! @brief     Implements ComponentEditor class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/PropertyEditor/ComponentEditor.h"
-#include "GUI/Views/PropertyEditor/ComponentFlatView.h"
-#include "GUI/Views/PropertyEditor/ComponentTreeView.h"
-#include "GUI/Views/PropertyEditor/GroupInfoBox.h"
+#include "GUI/View/PropertyEditor/ComponentEditor.h"
+#include "GUI/View/PropertyEditor/ComponentFlatView.h"
+#include "GUI/View/PropertyEditor/ComponentTreeView.h"
+#include "GUI/View/PropertyEditor/GroupInfoBox.h"
 #include <QBoxLayout>
 #include <QGroupBox>
 
diff --git a/GUI/Views/PropertyEditor/ComponentEditor.h b/GUI/View/PropertyEditor/ComponentEditor.h
similarity index 89%
rename from GUI/Views/PropertyEditor/ComponentEditor.h
rename to GUI/View/PropertyEditor/ComponentEditor.h
index ba71476c56d65337feb81184d12a23181ae38a12..6c6827c8000fedee91f76d39a2c504b8af29328b 100644
--- a/GUI/Views/PropertyEditor/ComponentEditor.h
+++ b/GUI/View/PropertyEditor/ComponentEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/ComponentEditor.h
+//! @file      GUI/View/PropertyEditor/ComponentEditor.h
 //! @brief     Defines ComponentEditor class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTEDITOR_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTEDITOR_H
 
 #include <QWidget>
 
@@ -71,4 +71,4 @@ private:
 
 Q_DECLARE_OPERATORS_FOR_FLAGS(ComponentEditor::EditorType)
 
-#endif // BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTEDITOR_H
diff --git a/GUI/Views/PropertyEditor/ComponentFlatView.cpp b/GUI/View/PropertyEditor/ComponentFlatView.cpp
similarity index 89%
rename from GUI/Views/PropertyEditor/ComponentFlatView.cpp
rename to GUI/View/PropertyEditor/ComponentFlatView.cpp
index c13ede8d825151eab1493338dab69854e0be0560..58e8b6ec639f990d5362e08b0d1352d028a6dfd4 100644
--- a/GUI/Views/PropertyEditor/ComponentFlatView.cpp
+++ b/GUI/View/PropertyEditor/ComponentFlatView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/ComponentFlatView.cpp
+//! @file      GUI/View/PropertyEditor/ComponentFlatView.cpp
 //! @brief     Implements class ComponentFlatView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/PropertyEditor/ComponentFlatView.h"
-#include "GUI/Models/ComponentUtils.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/PropertyEditor/PropertyEditorFactory.h"
-#include "GUI/Views/PropertyEditor/PropertyWidgetItem.h"
-#include "GUI/utils/LayoutUtils.h"
+#include "GUI/View/PropertyEditor/ComponentFlatView.h"
+#include "GUI/Model/Component/ComponentUtils.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/LayoutUtils.h"
+#include "GUI/View/PropertyEditor/PropertyEditorFactory.h"
+#include "GUI/View/PropertyEditor/PropertyWidgetItem.h"
 #include <QBoxLayout>
 #include <QComboBox>
 #include <QDataWidgetMapper>
@@ -81,7 +81,7 @@ void ComponentFlatView::setModel(SessionModel* model)
 void ComponentFlatView::clearLayout()
 {
     ASSERT(m_gridLayout);
-    GUI::Utils::Layout::clearGridLayout(m_gridLayout, false);
+    GUI::Util::Layout::clearGridLayout(m_gridLayout, false);
 
     for (auto widget : m_widgetItems)
         widget->deleteLater();
diff --git a/GUI/Views/PropertyEditor/ComponentFlatView.h b/GUI/View/PropertyEditor/ComponentFlatView.h
similarity index 85%
rename from GUI/Views/PropertyEditor/ComponentFlatView.h
rename to GUI/View/PropertyEditor/ComponentFlatView.h
index b86c6d4dc80bb3f0dd34fb5ade078ef5a72ed5a4..1bfac9952349785c5f32fff6576220448e20f347 100644
--- a/GUI/Views/PropertyEditor/ComponentFlatView.h
+++ b/GUI/View/PropertyEditor/ComponentFlatView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/ComponentFlatView.h
+//! @file      GUI/View/PropertyEditor/ComponentFlatView.h
 //! @brief     Defines class ComponentFlatView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTFLATVIEW_H
-#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTFLATVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTFLATVIEW_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTFLATVIEW_H
 
-#include "GUI/Views/PropertyEditor/ComponentView.h"
+#include "GUI/View/PropertyEditor/ComponentView.h"
 #include <memory>
 
 class SessionItem;
@@ -62,4 +62,4 @@ private:
     QVector<const SessionItem*> m_topItems;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTFLATVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTFLATVIEW_H
diff --git a/GUI/Views/PropertyEditor/ComponentTreeActions.cpp b/GUI/View/PropertyEditor/ComponentTreeActions.cpp
similarity index 92%
rename from GUI/Views/PropertyEditor/ComponentTreeActions.cpp
rename to GUI/View/PropertyEditor/ComponentTreeActions.cpp
index e67240e5012dd87ee6c92097c35d199c9397bb65..4ead3d30be586c2086737a8592140a4cc0efd623 100644
--- a/GUI/Views/PropertyEditor/ComponentTreeActions.cpp
+++ b/GUI/View/PropertyEditor/ComponentTreeActions.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/ComponentTreeActions.cpp
+//! @file      GUI/View/PropertyEditor/ComponentTreeActions.cpp
 //! @brief     Implements class ComponentTreeActions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/PropertyEditor/ComponentTreeActions.h"
-#include "GUI/Models/SessionItem.h"
+#include "GUI/View/PropertyEditor/ComponentTreeActions.h"
+#include "GUI/Model/Session/SessionItem.h"
 #include <QAction>
 #include <QMenu>
 
diff --git a/GUI/Views/PropertyEditor/ComponentTreeActions.h b/GUI/View/PropertyEditor/ComponentTreeActions.h
similarity index 76%
rename from GUI/Views/PropertyEditor/ComponentTreeActions.h
rename to GUI/View/PropertyEditor/ComponentTreeActions.h
index 0d182135ba15de969e1433fdd06572cc8f23f98b..015dace296003db447f4da819a4401f7884aca92 100644
--- a/GUI/Views/PropertyEditor/ComponentTreeActions.h
+++ b/GUI/View/PropertyEditor/ComponentTreeActions.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/ComponentTreeActions.h
+//! @file      GUI/View/PropertyEditor/ComponentTreeActions.h
 //! @brief     Defines class ComponentTreeActions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTTREEACTIONS_H
-#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTTREEACTIONS_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTTREEACTIONS_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTTREEACTIONS_H
 
 #include <QObject>
 
@@ -30,4 +30,4 @@ public slots:
     void onCustomContextMenuRequested(const QPoint& point, SessionItem& item);
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTTREEACTIONS_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTTREEACTIONS_H
diff --git a/GUI/Views/PropertyEditor/ComponentTreeView.cpp b/GUI/View/PropertyEditor/ComponentTreeView.cpp
similarity index 87%
rename from GUI/Views/PropertyEditor/ComponentTreeView.cpp
rename to GUI/View/PropertyEditor/ComponentTreeView.cpp
index c6cd25201b8e25c3cff9b956915825db872ec136..5d0b01058efcb973f70bfeaf75ab04a738ed3bab 100644
--- a/GUI/Views/PropertyEditor/ComponentTreeView.cpp
+++ b/GUI/View/PropertyEditor/ComponentTreeView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/ComponentTreeView.cpp
+//! @file      GUI/View/PropertyEditor/ComponentTreeView.cpp
 //! @brief     Implements class ComponentTreeView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/PropertyEditor/ComponentTreeView.h"
-#include "GUI/Models/ComponentProxyModel.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/PropertyEditor/ComponentTreeActions.h"
-#include "GUI/Views/SessionModelDelegate.h"
-#include "GUI/utils/CustomEventFilters.h"
+#include "GUI/View/PropertyEditor/ComponentTreeView.h"
+#include "GUI/Model/Component/ComponentProxyModel.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/View/PropertyEditor/ComponentTreeActions.h"
+#include "GUI/View/PropertyEditor/CustomEventFilters.h"
+#include "GUI/View/PropertyEditor/SessionModelDelegate.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QBoxLayout>
 #include <QStandardItemModel>
 #include <QTreeView>
@@ -44,7 +44,7 @@ ComponentTreeView::ComponentTreeView(QWidget* parent)
     QStringList labels = {"Name", "Value"};
     m_placeHolderModel->setHorizontalHeaderLabels(labels);
 
-    GUI::Utils::Style::setPropertyStyle(m_tree);
+    GUI::Util::Style::setPropertyStyle(m_tree);
     m_tree->setRootIsDecorated(false);
     m_tree->setModel(m_placeHolderModel);
     m_tree->setItemDelegate(m_delegate);
diff --git a/GUI/Views/PropertyEditor/ComponentTreeView.h b/GUI/View/PropertyEditor/ComponentTreeView.h
similarity index 84%
rename from GUI/Views/PropertyEditor/ComponentTreeView.h
rename to GUI/View/PropertyEditor/ComponentTreeView.h
index 58b3839f0e4fa2e2fb16b49a5a38e381486d1ef4..b3c3275c837f2061f19b0035f42d2497b34e6e64 100644
--- a/GUI/Views/PropertyEditor/ComponentTreeView.h
+++ b/GUI/View/PropertyEditor/ComponentTreeView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/ComponentTreeView.h
+//! @file      GUI/View/PropertyEditor/ComponentTreeView.h
 //! @brief     Defines class ComponentTreeView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTTREEVIEW_H
-#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTTREEVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTTREEVIEW_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTTREEVIEW_H
 
-#include "GUI/Views/PropertyEditor/ComponentView.h"
+#include "GUI/View/PropertyEditor/ComponentView.h"
 #include <memory>
 
 class QTreeView;
@@ -59,4 +59,4 @@ private:
     bool m_show_root_item; //!< Tree will starts from item itself, if true.
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTTREEVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTTREEVIEW_H
diff --git a/GUI/Views/PropertyEditor/ComponentView.h b/GUI/View/PropertyEditor/ComponentView.h
similarity index 79%
rename from GUI/Views/PropertyEditor/ComponentView.h
rename to GUI/View/PropertyEditor/ComponentView.h
index c5d9eaa847c73c8aa80768385c008cf2a5bcb369..20dcbcb85349caada4760b1d73050164a606c0a6 100644
--- a/GUI/Views/PropertyEditor/ComponentView.h
+++ b/GUI/View/PropertyEditor/ComponentView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/ComponentView.h
+//! @file      GUI/View/PropertyEditor/ComponentView.h
 //! @brief     Defines class ComponentView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTVIEW_H
-#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTVIEW_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTVIEW_H
 
 #include <QWidget>
 
@@ -31,4 +31,4 @@ public:
     virtual void addItem(SessionItem*) {}
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_COMPONENTVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_COMPONENTVIEW_H
diff --git a/GUI/Views/PropertyEditor/CustomEditors.cpp b/GUI/View/PropertyEditor/CustomEditors.cpp
similarity index 95%
rename from GUI/Views/PropertyEditor/CustomEditors.cpp
rename to GUI/View/PropertyEditor/CustomEditors.cpp
index b01868a95a56ff6a36a1c25ef9d67534cac45eb8..5f12e039d318ef75d5eaee618cef8fb930db009a 100644
--- a/GUI/Views/PropertyEditor/CustomEditors.cpp
+++ b/GUI/View/PropertyEditor/CustomEditors.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/CustomEditors.cpp
+//! @file      GUI/View/PropertyEditor/CustomEditors.cpp
 //! @brief     Implements CustomEditors classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/PropertyEditor/CustomEditors.h"
+#include "GUI/View/PropertyEditor/CustomEditors.h"
 #include "Base/Utils/Assert.h"
-#include "Fit/Param/RealLimits.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Views/CommonWidgets/ScientificSpinBox.h"
-#include "GUI/Views/MaterialEditor/MaterialEditorDialog.h"
-#include "GUI/mainwindow/projectmanager.h"
-#include "GUI/utils/CustomEventFilters.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/View/Common/ScientificSpinBox.h"
+#include "GUI/View/MaterialEditor/MaterialEditorDialog.h"
+#include "GUI/View/PropertyEditor/CustomEventFilters.h"
 #include <QApplication>
 #include <QBoxLayout>
 #include <QCheckBox>
@@ -100,7 +100,7 @@ void MaterialSelectionEditor::buttonClicked()
     installEventFilter(m_focusFilter);
     const QString materialIdentifier = m_data.toString();
     const QString newMaterialIdentifier = MaterialEditorDialog::chooseMaterial(
-        ProjectManager::instance()->document(), materialIdentifier);
+        parentWidget(), gSessionData->projectDocument, materialIdentifier);
 
     removeEventFilter(m_focusFilter);
 
@@ -111,7 +111,7 @@ void MaterialSelectionEditor::buttonClicked()
 void MaterialSelectionEditor::initEditor()
 {
     ASSERT(m_data.canConvert<QString>());
-    const auto material = GUI::Model::MaterialItemUtils::findMaterial(m_data.toString());
+    const auto material = GUI::MaterialUtil::findMaterial(m_data.toString());
 
     m_textLabel->setText(material->itemName());
 
diff --git a/GUI/Views/PropertyEditor/CustomEditors.h b/GUI/View/PropertyEditor/CustomEditors.h
similarity index 94%
rename from GUI/Views/PropertyEditor/CustomEditors.h
rename to GUI/View/PropertyEditor/CustomEditors.h
index 5d1eeaded93e2ea2fde1d00aebfba66ed82b88ab..91fa662aa5f72a8af37b1c50e46843344f5f4ea2 100644
--- a/GUI/Views/PropertyEditor/CustomEditors.h
+++ b/GUI/View/PropertyEditor/CustomEditors.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/CustomEditors.h
+//! @file      GUI/View/PropertyEditor/CustomEditors.h
 //! @brief     Defines CustomEditors classes
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_CUSTOMEDITORS_H
-#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_CUSTOMEDITORS_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_CUSTOMEDITORS_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_CUSTOMEDITORS_H
 
 #include "WinDllMacros.h"
 #include <QVariant>
@@ -187,4 +187,4 @@ private:
     QCheckBox* m_checkBox;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_CUSTOMEDITORS_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_CUSTOMEDITORS_H
diff --git a/GUI/utils/CustomEventFilters.cpp b/GUI/View/PropertyEditor/CustomEventFilters.cpp
similarity index 98%
rename from GUI/utils/CustomEventFilters.cpp
rename to GUI/View/PropertyEditor/CustomEventFilters.cpp
index f8efbe849587fb8ed7fc938b24adc79e40844a09..6865428082dafc2e4250dbb475c88c7a5b0ac298 100644
--- a/GUI/utils/CustomEventFilters.cpp
+++ b/GUI/View/PropertyEditor/CustomEventFilters.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/CustomEventFilters.cpp
+//! @file      GUI/View/PropertyEditor/CustomEventFilters.cpp
 //! @brief     Defines classes releted to event filtering
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/utils/CustomEventFilters.h"
+#include "GUI/View/PropertyEditor/CustomEventFilters.h"
 #include <QApplication>
 #include <QComboBox>
 #include <QKeyEvent>
diff --git a/GUI/utils/CustomEventFilters.h b/GUI/View/PropertyEditor/CustomEventFilters.h
similarity index 90%
rename from GUI/utils/CustomEventFilters.h
rename to GUI/View/PropertyEditor/CustomEventFilters.h
index be1cc8e5309ca5aeed8c013f5e89541f0439e31b..cb8cba2618759d5a629347581e25b19a984cdf41 100644
--- a/GUI/utils/CustomEventFilters.h
+++ b/GUI/View/PropertyEditor/CustomEventFilters.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/CustomEventFilters.h
+//! @file      GUI/View/PropertyEditor/CustomEventFilters.h
 //! @brief     Defines classes releted to event filtering
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_UTILS_CUSTOMEVENTFILTERS_H
-#define BORNAGAIN_GUI_UTILS_CUSTOMEVENTFILTERS_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_CUSTOMEVENTFILTERS_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_CUSTOMEVENTFILTERS_H
 
 #include <QObject>
 
@@ -105,4 +105,4 @@ protected:
     QWidget* m_parent;
 };
 
-#endif // BORNAGAIN_GUI_UTILS_CUSTOMEVENTFILTERS_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_CUSTOMEVENTFILTERS_H
diff --git a/GUI/Views/PropertyEditor/GroupInfoBox.cpp b/GUI/View/PropertyEditor/GroupInfoBox.cpp
similarity index 92%
rename from GUI/Views/PropertyEditor/GroupInfoBox.cpp
rename to GUI/View/PropertyEditor/GroupInfoBox.cpp
index 4174dc6d6892735d9ca313ed82994770eb1e9589..45b72cc999a9a31806e614725ef76ab87d05cbe0 100644
--- a/GUI/Views/PropertyEditor/GroupInfoBox.cpp
+++ b/GUI/View/PropertyEditor/GroupInfoBox.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/GroupInfoBox.cpp
+//! @file      GUI/View/PropertyEditor/GroupInfoBox.cpp
 //! @brief     Implements class GroupInfoBox
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/PropertyEditor/GroupInfoBox.h"
-#include "GUI/utils/hostosinfo.h"
+#include "GUI/View/PropertyEditor/GroupInfoBox.h"
+#include "GUI/Util/OSInfo.h"
 #include <QApplication>
 #include <QMouseEvent>
 #include <QPainter>
@@ -87,7 +87,7 @@ void GroupInfoBox::paintEvent(QPaintEvent*)
 
     // draw groupbox
     int shift(1);
-    if (GUI::Utils::OS::HostOsInfo::isLinuxHost())
+    if (GUI::Util::OS::HostOsInfo::isLinuxHost())
         shift = 3;
 
     paint.drawItemPixmap(option.rect.adjusted(0, shift, 0, 0), Qt::AlignTop | Qt::AlignRight,
diff --git a/GUI/Views/PropertyEditor/GroupInfoBox.h b/GUI/View/PropertyEditor/GroupInfoBox.h
similarity index 82%
rename from GUI/Views/PropertyEditor/GroupInfoBox.h
rename to GUI/View/PropertyEditor/GroupInfoBox.h
index b931a8779347d9238642275fbe988fc2772013b9..49242add3ef2eb8e179712f368edec7422f2217b 100644
--- a/GUI/Views/PropertyEditor/GroupInfoBox.h
+++ b/GUI/View/PropertyEditor/GroupInfoBox.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/GroupInfoBox.h
+//! @file      GUI/View/PropertyEditor/GroupInfoBox.h
 //! @brief     Defines class GroupInfoBox
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_GROUPINFOBOX_H
-#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_GROUPINFOBOX_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_GROUPINFOBOX_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_GROUPINFOBOX_H
 
 #include <QGroupBox>
 
@@ -41,4 +41,4 @@ private:
     int m_yImage;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_GROUPINFOBOX_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_GROUPINFOBOX_H
diff --git a/GUI/Views/PropertyEditor/MultiComboPropertyEditor.cpp b/GUI/View/PropertyEditor/MultiComboPropertyEditor.cpp
similarity index 96%
rename from GUI/Views/PropertyEditor/MultiComboPropertyEditor.cpp
rename to GUI/View/PropertyEditor/MultiComboPropertyEditor.cpp
index b1cc4beafc14ae225e75009c6eb1a6a0b9ebfce4..52a7b89fbee062ab733aee22428dee53f7a04377 100644
--- a/GUI/Views/PropertyEditor/MultiComboPropertyEditor.cpp
+++ b/GUI/View/PropertyEditor/MultiComboPropertyEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/MultiComboPropertyEditor.cpp
+//! @file      GUI/View/PropertyEditor/MultiComboPropertyEditor.cpp
 //! @brief     Defines MultiComboPropertyEditor class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/PropertyEditor/MultiComboPropertyEditor.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/utils/CustomEventFilters.h"
+#include "GUI/View/PropertyEditor/MultiComboPropertyEditor.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/View/PropertyEditor/CustomEventFilters.h"
 #include <QComboBox>
 #include <QEvent>
 #include <QLineEdit>
diff --git a/GUI/Views/PropertyEditor/MultiComboPropertyEditor.h b/GUI/View/PropertyEditor/MultiComboPropertyEditor.h
similarity index 84%
rename from GUI/Views/PropertyEditor/MultiComboPropertyEditor.h
rename to GUI/View/PropertyEditor/MultiComboPropertyEditor.h
index c20e30034d8cc060c968ae5fb1432415f24450b8..a38f79e507fdb146133d7e2e82783eafc2994b14 100644
--- a/GUI/Views/PropertyEditor/MultiComboPropertyEditor.h
+++ b/GUI/View/PropertyEditor/MultiComboPropertyEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/MultiComboPropertyEditor.h
+//! @file      GUI/View/PropertyEditor/MultiComboPropertyEditor.h
 //! @brief     Defines MultiComboPropertyEditor class
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_MULTICOMBOPROPERTYEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_MULTICOMBOPROPERTYEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_MULTICOMBOPROPERTYEDITOR_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_MULTICOMBOPROPERTYEDITOR_H
 
-#include "GUI/Views/PropertyEditor/CustomEditors.h"
+#include "GUI/View/PropertyEditor/CustomEditors.h"
 #include <QStyledItemDelegate>
 #include <memory>
 
@@ -64,4 +64,4 @@ public:
                const QModelIndex& index) const;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_MULTICOMBOPROPERTYEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_MULTICOMBOPROPERTYEDITOR_H
diff --git a/GUI/Views/PropertyEditor/PropertyEditorFactory.cpp b/GUI/View/PropertyEditor/PropertyEditorFactory.cpp
similarity index 89%
rename from GUI/Views/PropertyEditor/PropertyEditorFactory.cpp
rename to GUI/View/PropertyEditor/PropertyEditorFactory.cpp
index 47ba56a3dac28584e65996fd262330d7cfd36762..9f680d9e7f7902e240c439bf1ed9ff464fb6736f 100644
--- a/GUI/Views/PropertyEditor/PropertyEditorFactory.cpp
+++ b/GUI/View/PropertyEditor/PropertyEditorFactory.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/PropertyEditorFactory.cpp
+//! @file      GUI/View/PropertyEditor/PropertyEditorFactory.cpp
 //! @brief     Implements PropertyEditorFactory namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/PropertyEditor/PropertyEditorFactory.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/SessionFlags.h"
-#include "GUI/Models/SessionItem.h"
-#include "GUI/Views/CommonWidgets/ScientificSpinBox.h"
-#include "GUI/Views/PropertyEditor/MultiComboPropertyEditor.h"
+#include "GUI/View/PropertyEditor/PropertyEditorFactory.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/Session/SessionFlags.h"
+#include "GUI/Model/Session/SessionItem.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/View/Common/ScientificSpinBox.h"
+#include "GUI/View/PropertyEditor/MultiComboPropertyEditor.h"
 #include <QLabel>
 #include <QLineEdit>
 #include <QSpinBox>
@@ -26,8 +27,23 @@
 
 namespace {
 
-QWidget* createCustomStringEditor(const SessionItem& item);
-double getStep(double val);
+QWidget* createCustomStringEditor(const SessionItem& item)
+{
+    if (item.isEditable()) {
+        auto* editor = new QLineEdit;
+        editor->setText(item.value().toString());
+        return editor;
+    }
+
+    auto* editor = new QLabel;
+    editor->setText(item.value().toString());
+    return editor;
+}
+
+double getStep(double val)
+{
+    return val == 0.0 ? 1.0 : val / 100.;
+}
 
 bool isDoubleProperty(const QVariant& variant)
 {
@@ -82,7 +98,7 @@ QString GUI::View::PropertyEditorFactory::toString(const QModelIndex& index)
 {
     auto variant = index.data();
     if (isMaterialProperty(index)) {
-        const auto* material = GUI::Model::MaterialItemUtils::findMaterial(variant.toString());
+        const auto* material = GUI::MaterialUtil::findMaterial(variant.toString());
         return material->itemName();
     }
     if (isComboProperty(variant))
@@ -149,25 +165,3 @@ QWidget* GUI::View::PropertyEditorFactory::CreateEditor(const SessionItem& item,
 
     return result;
 }
-
-namespace {
-
-QWidget* createCustomStringEditor(const SessionItem& item)
-{
-    if (item.isEditable()) {
-        auto* editor = new QLineEdit;
-        editor->setText(item.value().toString());
-        return editor;
-    }
-
-    auto* editor = new QLabel;
-    editor->setText(item.value().toString());
-    return editor;
-}
-
-double getStep(double val)
-{
-    return val == 0.0 ? 1.0 : val / 100.;
-}
-
-} // namespace
diff --git a/GUI/Views/PropertyEditor/PropertyEditorFactory.h b/GUI/View/PropertyEditor/PropertyEditorFactory.h
similarity index 81%
rename from GUI/Views/PropertyEditor/PropertyEditorFactory.h
rename to GUI/View/PropertyEditor/PropertyEditorFactory.h
index d98f4202ffc534399422f2010e1f09bc8ea4fc14..0db4d93c6a7b2d16b9ef866c3c32245a9d27eff8 100644
--- a/GUI/Views/PropertyEditor/PropertyEditorFactory.h
+++ b/GUI/View/PropertyEditor/PropertyEditorFactory.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/PropertyEditorFactory.h
+//! @file      GUI/View/PropertyEditor/PropertyEditorFactory.h
 //! @brief     Defines namespace GUI::View::PropertyEditorFactory
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_PROPERTYEDITORFACTORY_H
-#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_PROPERTYEDITORFACTORY_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_PROPERTYEDITORFACTORY_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_PROPERTYEDITORFACTORY_H
 
 #include <QString>
 
@@ -37,4 +37,4 @@ QWidget* CreateEditor(const SessionItem& item, QWidget* parent = nullptr);
 
 } // namespace GUI::View::PropertyEditorFactory
 
-#endif // BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_PROPERTYEDITORFACTORY_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_PROPERTYEDITORFACTORY_H
diff --git a/GUI/Views/PropertyEditor/PropertyWidgetItem.cpp b/GUI/View/PropertyEditor/PropertyWidgetItem.cpp
similarity index 90%
rename from GUI/Views/PropertyEditor/PropertyWidgetItem.cpp
rename to GUI/View/PropertyEditor/PropertyWidgetItem.cpp
index 1322b336b81dabf017f7a1a6b3271b5b2fda0034..9677abd1f33c6d17b53e62e0acc03b000ab2b67b 100644
--- a/GUI/Views/PropertyEditor/PropertyWidgetItem.cpp
+++ b/GUI/View/PropertyEditor/PropertyWidgetItem.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/PropertyWidgetItem.cpp
+//! @file      GUI/View/PropertyEditor/PropertyWidgetItem.cpp
 //! @brief     Implements class PropertyWidgetItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/PropertyEditor/PropertyWidgetItem.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/PropertyEditor/CustomEditors.h"
-#include "GUI/Views/SessionModelDelegate.h"
+#include "GUI/View/PropertyEditor/PropertyWidgetItem.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/View/PropertyEditor/CustomEditors.h"
+#include "GUI/View/PropertyEditor/SessionModelDelegate.h"
 #include <QComboBox>
 #include <QDataWidgetMapper>
 #include <QDoubleSpinBox>
diff --git a/GUI/Views/PropertyEditor/PropertyWidgetItem.h b/GUI/View/PropertyEditor/PropertyWidgetItem.h
similarity index 84%
rename from GUI/Views/PropertyEditor/PropertyWidgetItem.h
rename to GUI/View/PropertyEditor/PropertyWidgetItem.h
index f4955b2a8286b9676208f98c2431b8c675120cff..38a9a62c0ed5aa70525327e27845b455be95042f 100644
--- a/GUI/Views/PropertyEditor/PropertyWidgetItem.h
+++ b/GUI/View/PropertyEditor/PropertyWidgetItem.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/PropertyWidgetItem.h
+//! @file      GUI/View/PropertyEditor/PropertyWidgetItem.h
 //! @brief     Defines class PropertyWidgetItem
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_PROPERTYWIDGETITEM_H
-#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_PROPERTYWIDGETITEM_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_PROPERTYWIDGETITEM_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_PROPERTYWIDGETITEM_H
 
 #include <QObject>
 
@@ -50,4 +50,4 @@ private:
     const SessionItem* m_item;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_PROPERTYWIDGETITEM_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_PROPERTYWIDGETITEM_H
diff --git a/GUI/Views/SessionModelDelegate.cpp b/GUI/View/PropertyEditor/SessionModelDelegate.cpp
similarity index 93%
rename from GUI/Views/SessionModelDelegate.cpp
rename to GUI/View/PropertyEditor/SessionModelDelegate.cpp
index 5ebd794b339e2336cf9996f8a74837f0218a2604..6b0de4e64835edd900f1aea4754c4e653e8ca442 100644
--- a/GUI/Views/SessionModelDelegate.cpp
+++ b/GUI/View/PropertyEditor/SessionModelDelegate.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SessionModelDelegate.cpp
+//! @file      GUI/View/PropertyEditor/SessionModelDelegate.cpp
 //! @brief     Implements class SessionModelDelegate
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SessionModelDelegate.h"
-#include "GUI/Models/SessionItem.h"
-#include "GUI/Views/PropertyEditor/CustomEditors.h"
-#include "GUI/Views/PropertyEditor/PropertyEditorFactory.h"
-#include "GUI/utils/CustomEventFilters.h"
+#include "GUI/View/PropertyEditor/SessionModelDelegate.h"
+#include "GUI/Model/Session/SessionItem.h"
+#include "GUI/View/PropertyEditor/CustomEditors.h"
+#include "GUI/View/PropertyEditor/CustomEventFilters.h"
+#include "GUI/View/PropertyEditor/PropertyEditorFactory.h"
 #include <QApplication>
 
 SessionModelDelegate::SessionModelDelegate(QObject* parent) : QStyledItemDelegate(parent) {}
diff --git a/GUI/Views/SessionModelDelegate.h b/GUI/View/PropertyEditor/SessionModelDelegate.h
similarity index 88%
rename from GUI/Views/SessionModelDelegate.h
rename to GUI/View/PropertyEditor/SessionModelDelegate.h
index c9d995e61c0ed5b33b79efcd18665f7151779345..06f3c68caf7049850459728061f557625620c19c 100644
--- a/GUI/Views/SessionModelDelegate.h
+++ b/GUI/View/PropertyEditor/SessionModelDelegate.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SessionModelDelegate.h
+//! @file      GUI/View/PropertyEditor/SessionModelDelegate.h
 //! @brief     Defines class SessionModelDelegate
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SESSIONMODELDELEGATE_H
-#define BORNAGAIN_GUI_VIEWS_SESSIONMODELDELEGATE_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_SESSIONMODELDELEGATE_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_SESSIONMODELDELEGATE_H
 
 #include <QStyledItemDelegate>
 
@@ -52,4 +52,4 @@ private:
                           const QModelIndex& index, const QString& text) const;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SESSIONMODELDELEGATE_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_SESSIONMODELDELEGATE_H
diff --git a/GUI/Views/PropertyEditor/TestComponentView.cpp b/GUI/View/PropertyEditor/TestComponentView.cpp
similarity index 86%
rename from GUI/Views/PropertyEditor/TestComponentView.cpp
rename to GUI/View/PropertyEditor/TestComponentView.cpp
index fa27c5902babc06cd1b27d36d055c8f372208490..67b2b50b87f9c23cd5000bbb325c69197fdba9dc 100644
--- a/GUI/Views/PropertyEditor/TestComponentView.cpp
+++ b/GUI/View/PropertyEditor/TestComponentView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/TestComponentView.cpp
+//! @file      GUI/View/PropertyEditor/TestComponentView.cpp
 //! @brief     Defines class TestComponentView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,18 +12,18 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/PropertyEditor/TestComponentView.h"
-#include "GUI/Models/BeamItems.h"
-#include "GUI/Models/GUIDomainSampleVisitor.h"
-#include "GUI/Models/GUIObjectBuilder.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/VectorItem.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/PropertyEditor/ComponentEditor.h"
-#include "GUI/Views/SessionModelDelegate.h"
+#include "GUI/View/PropertyEditor/TestComponentView.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Domain/GUIObjectBuilder.h"
+#include "GUI/Model/Instrument/BeamItems.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Sample/GUIDomainSampleVisitor.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/View/PropertyEditor/ComponentEditor.h"
+#include "GUI/View/PropertyEditor/SessionModelDelegate.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include "Sample/Multilayer/MultiLayer.h"
 #include "Sample/StandardSamples/ExemplarySamples.h"
 #include <QBoxLayout>
@@ -33,8 +33,8 @@
 #include <QTreeView>
 #include <limits>
 
-TestComponentView::TestComponentView(MainWindow* mainWindow)
-    : m_mainWindow(mainWindow)
+TestComponentView::TestComponentView(QWidget* parent)
+    : QWidget(parent)
     , m_sampleModel(new SampleModel(this))
     , m_materialModel(new MaterialModel(this))
     , m_sourceTree(new QTreeView)
@@ -75,7 +75,7 @@ TestComponentView::TestComponentView(MainWindow* mainWindow)
 
     m_sourceTree->setModel(m_sampleModel);
     m_sourceTree->setItemDelegate(m_delegate);
-    GUI::Utils::Style::setPropertyStyle(m_sourceTree);
+    GUI::Util::Style::setPropertyStyle(m_sourceTree);
     connect(m_sourceTree->selectionModel(), &QItemSelectionModel::selectionChanged, this,
             &TestComponentView::onSelectionChanged);
 }
diff --git a/GUI/Views/PropertyEditor/TestComponentView.h b/GUI/View/PropertyEditor/TestComponentView.h
similarity index 82%
rename from GUI/Views/PropertyEditor/TestComponentView.h
rename to GUI/View/PropertyEditor/TestComponentView.h
index e17752169a1c603b17cf92dbb04212b2ebdd1cfd..dcf2c3f2d70d3a40fa715e0c28d67a9ab965f2ae 100644
--- a/GUI/Views/PropertyEditor/TestComponentView.h
+++ b/GUI/View/PropertyEditor/TestComponentView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/PropertyEditor/TestComponentView.h
+//! @file      GUI/View/PropertyEditor/TestComponentView.h
 //! @brief     Defines class TestComponentView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_TESTCOMPONENTVIEW_H
-#define BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_TESTCOMPONENTVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_TESTCOMPONENTVIEW_H
+#define BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_TESTCOMPONENTVIEW_H
 
 #include <QWidget>
 
@@ -35,7 +35,7 @@ class MaterialModel;
 class TestComponentView : public QWidget {
     Q_OBJECT
 public:
-    TestComponentView(MainWindow* mainWindow = nullptr);
+    TestComponentView(QWidget* parent);
 
 private slots:
     void onUpdateRequest();
@@ -48,7 +48,6 @@ private:
     QWidget* componentTreePanel();
     QWidget* componentBoxPanel();
 
-    MainWindow* m_mainWindow;
     SampleModel* m_sampleModel;
     MaterialModel* m_materialModel;
     QTreeView* m_sourceTree;
@@ -62,4 +61,4 @@ private:
     bool m_isExpaned;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROPERTYEDITOR_TESTCOMPONENTVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_TESTCOMPONENTVIEW_H
diff --git a/GUI/Views/RealSpaceWidgets/IPositionBuilder.cpp b/GUI/View/Realspace/IPositionBuilder.cpp
similarity index 98%
rename from GUI/Views/RealSpaceWidgets/IPositionBuilder.cpp
rename to GUI/View/Realspace/IPositionBuilder.cpp
index 0299bc30e77a6edbacf57b86d66658d210087282..488f1a472c2f4ee7321f310342399feecadc0ab1 100644
--- a/GUI/Views/RealSpaceWidgets/IPositionBuilder.cpp
+++ b/GUI/View/Realspace/IPositionBuilder.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/IPositionBuilder.cpp
+//! @file      GUI/View/Realspace/IPositionBuilder.cpp
 //! @brief     Implements subclasses of IPositionBuilder
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/IPositionBuilder.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpace2DParacrystalUtils.h"
+#include "GUI/View/Realspace/IPositionBuilder.h"
+#include "GUI/View/Realspace/RealSpace2DParacrystalUtils.h"
 #include "Sample/Aggregate/Interferences.h"
 #include <cmath>
 #include <random>
diff --git a/GUI/Views/RealSpaceWidgets/IPositionBuilder.h b/GUI/View/Realspace/IPositionBuilder.h
similarity index 94%
rename from GUI/Views/RealSpaceWidgets/IPositionBuilder.h
rename to GUI/View/Realspace/IPositionBuilder.h
index 786dc9980c8cf741a794707f1e9a21fee6921e93..601ce5778d075d5c749091d2e7f478ae14fba5e5 100644
--- a/GUI/Views/RealSpaceWidgets/IPositionBuilder.h
+++ b/GUI/View/Realspace/IPositionBuilder.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/IPositionBuilder.h
+//! @file      GUI/View/Realspace/IPositionBuilder.h
 //! @brief     Declares interface IPositionBuilder and subclasses
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_IPOSITIONBUILDER_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_IPOSITIONBUILDER_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_IPOSITIONBUILDER_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_IPOSITIONBUILDER_H
 
 #include <memory>
 #include <vector>
@@ -123,4 +123,4 @@ private:
     std::unique_ptr<InterferenceRadialParaCrystal> m_iff;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_IPOSITIONBUILDER_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_IPOSITIONBUILDER_H
diff --git a/GUI/Views/RealSpaceWidgets/Particle3DContainer.cpp b/GUI/View/Realspace/Particle3DContainer.cpp
similarity index 96%
rename from GUI/Views/RealSpaceWidgets/Particle3DContainer.cpp
rename to GUI/View/Realspace/Particle3DContainer.cpp
index 407e426e168de12350897953f9c2ba782147f706..863fd8699d337d1104b9687eaf47e3ad4fbf63f0 100644
--- a/GUI/Views/RealSpaceWidgets/Particle3DContainer.cpp
+++ b/GUI/View/Realspace/Particle3DContainer.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/Particle3DContainer.cpp
+//! @file      GUI/View/Realspace/Particle3DContainer.cpp
 //! @brief     Implements namespace GUI::View::TransformTo3D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/Particle3DContainer.h"
+#include "GUI/View/Realspace/Particle3DContainer.h"
 #include "GUI/ba3d/model/particles.h"
 
 // copy constructor
diff --git a/GUI/Views/RealSpaceWidgets/Particle3DContainer.h b/GUI/View/Realspace/Particle3DContainer.h
similarity index 89%
rename from GUI/Views/RealSpaceWidgets/Particle3DContainer.h
rename to GUI/View/Realspace/Particle3DContainer.h
index c64fabb862835829e55e98154ecb40984925a98a..30ab5f49f7346093ec64b098b87a3811f470b10f 100644
--- a/GUI/Views/RealSpaceWidgets/Particle3DContainer.h
+++ b/GUI/View/Realspace/Particle3DContainer.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/Particle3DContainer.h
+//! @file      GUI/View/Realspace/Particle3DContainer.h
 //! @brief     Implements namespace GUI::View::TransformTo3D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_PARTICLE3DCONTAINER_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_PARTICLE3DCONTAINER_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_PARTICLE3DCONTAINER_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_PARTICLE3DCONTAINER_H
 
 #include <QString>
 #include <memory>
@@ -54,4 +54,4 @@ private:
     std::vector<bool> m_containerParticlesBlend;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_PARTICLE3DCONTAINER_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_PARTICLE3DCONTAINER_H
diff --git a/GUI/Views/RealSpaceWidgets/RealSpace2DParacrystalUtils.cpp b/GUI/View/Realspace/RealSpace2DParacrystalUtils.cpp
similarity index 98%
rename from GUI/Views/RealSpaceWidgets/RealSpace2DParacrystalUtils.cpp
rename to GUI/View/Realspace/RealSpace2DParacrystalUtils.cpp
index 043ed6d982413281237008150cff5490b58b9ac1..a63352a1262bca91a70f8678d88a091e093e8469 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpace2DParacrystalUtils.cpp
+++ b/GUI/View/Realspace/RealSpace2DParacrystalUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpace2DParacrystalUtils.cpp
+//! @file      GUI/View/Realspace/RealSpace2DParacrystalUtils.cpp
 //! @brief     Defines GUI::RealSpace::BuilderUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/RealSpace2DParacrystalUtils.h"
+#include "GUI/View/Realspace/RealSpace2DParacrystalUtils.h"
 #include "Sample/Aggregate/Interference2DParaCrystal.h"
 
 namespace {
diff --git a/GUI/Views/RealSpaceWidgets/RealSpace2DParacrystalUtils.h b/GUI/View/Realspace/RealSpace2DParacrystalUtils.h
similarity index 73%
rename from GUI/Views/RealSpaceWidgets/RealSpace2DParacrystalUtils.h
rename to GUI/View/Realspace/RealSpace2DParacrystalUtils.h
index 048412546942618a92e6758b5b5f1406aa50dd45..7e37f847005cc7e27addabfe21fd7e2590ca4275 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpace2DParacrystalUtils.h
+++ b/GUI/View/Realspace/RealSpace2DParacrystalUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpace2DParacrystalUtils.h
+//! @file      GUI/View/Realspace/RealSpace2DParacrystalUtils.h
 //! @brief     Defines namespace GUI::RealSpace::Paracrystal2D.
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACE2DPARACRYSTALUTILS_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACE2DPARACRYSTALUTILS_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACE2DPARACRYSTALUTILS_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACE2DPARACRYSTALUTILS_H
 
 #include <vector>
 
@@ -26,4 +26,4 @@ std::vector<std::vector<double>> latticePositions(const Interference2DParaCrysta
 
 }
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACE2DPARACRYSTALUTILS_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACE2DPARACRYSTALUTILS_H
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceActions.cpp b/GUI/View/Realspace/RealSpaceActions.cpp
similarity index 84%
rename from GUI/Views/RealSpaceWidgets/RealSpaceActions.cpp
rename to GUI/View/Realspace/RealSpaceActions.cpp
index 0b29657e519b4721bc729ed47e8e8ffb0def39b9..d85ae9beb3375cac48650f5476c4c51f6e18aaf5 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceActions.cpp
+++ b/GUI/View/Realspace/RealSpaceActions.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceActions.cpp
+//! @file      GUI/View/Realspace/RealSpaceActions.cpp
 //! @brief     Implements class RealSpaceActions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,6 +12,6 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/RealSpaceActions.h"
+#include "GUI/View/Realspace/RealSpaceActions.h"
 
 RealSpaceActions::RealSpaceActions(QObject* parent) : QObject(parent) {}
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceActions.h b/GUI/View/Realspace/RealSpaceActions.h
similarity index 74%
rename from GUI/Views/RealSpaceWidgets/RealSpaceActions.h
rename to GUI/View/Realspace/RealSpaceActions.h
index 4f7abe741b51c57de7150aa3335a5abc41abdb02..bfc6e3e753b0f511cf2bd45e8933f76fb2ce178c 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceActions.h
+++ b/GUI/View/Realspace/RealSpaceActions.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceActions.h
+//! @file      GUI/View/Realspace/RealSpaceActions.h
 //! @brief     Defines class RealSpaceActions
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEACTIONS_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEACTIONS_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEACTIONS_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEACTIONS_H
 
 #include <QObject>
 
@@ -26,4 +26,4 @@ public:
     RealSpaceActions(QObject* parent = 0);
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEACTIONS_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEACTIONS_H
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceBuilder.cpp b/GUI/View/Realspace/RealSpaceBuilder.cpp
similarity index 89%
rename from GUI/Views/RealSpaceWidgets/RealSpaceBuilder.cpp
rename to GUI/View/Realspace/RealSpaceBuilder.cpp
index 9058d03b8a3eb6e22ca6801a62ee48874e102a2a..77e797f4a0474146d91c33c26f69db002ebcedcf 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceBuilder.cpp
+++ b/GUI/View/Realspace/RealSpaceBuilder.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceBuilder.cpp
+//! @file      GUI/View/Realspace/RealSpaceBuilder.cpp
 //! @brief     Implements class RealSpaceBuilder
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,22 +12,22 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/RealSpaceBuilder.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/InterferenceItems.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Views/RealSpaceWidgets/Particle3DContainer.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceCanvas.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceModel.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpacePositionBuilder.h"
-#include "GUI/Views/RealSpaceWidgets/TransformTo3D.h"
+#include "GUI/View/Realspace/RealSpaceBuilder.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
+#include "GUI/View/Realspace/Particle3DContainer.h"
+#include "GUI/View/Realspace/RealSpaceBuilderUtils.h"
+#include "GUI/View/Realspace/RealSpaceCanvas.h"
+#include "GUI/View/Realspace/RealSpaceModel.h"
+#include "GUI/View/Realspace/RealSpacePositionBuilder.h"
+#include "GUI/View/Realspace/TransformTo3D.h"
 #include "Sample/Aggregate/Interferences.h"
 #include "Sample/Particle/Particle.h"
 #include "Sample/Particle/ParticleCoreShell.h"
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceBuilder.h b/GUI/View/Realspace/RealSpaceBuilder.h
similarity index 90%
rename from GUI/Views/RealSpaceWidgets/RealSpaceBuilder.h
rename to GUI/View/Realspace/RealSpaceBuilder.h
index 57d2ea8d81ae7b04d4d2fe8cc9b88fa9e98eb15a..67210df3723004f62d220848824943e9f8716c41 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceBuilder.h
+++ b/GUI/View/Realspace/RealSpaceBuilder.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceBuilder.h
+//! @file      GUI/View/Realspace/RealSpaceBuilder.h
 //! @brief     Defines class RealSpaceBuilder
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEBUILDER_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEBUILDER_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEBUILDER_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEBUILDER_H
 
 #include "GUI/ba3d/view/camera.h"
 #include <QVector3D>
@@ -61,4 +61,4 @@ public:
                                                  const QVector3D& lattice_position = {}) const;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEBUILDER_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEBUILDER_H
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.cpp b/GUI/View/Realspace/RealSpaceBuilderUtils.cpp
similarity index 95%
rename from GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.cpp
rename to GUI/View/Realspace/RealSpaceBuilderUtils.cpp
index b41b83a76b93311176d337a483cb479a8e47d60d..1a9a64225a705a9cae0aa9fd717446940545d404 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.cpp
+++ b/GUI/View/Realspace/RealSpaceBuilderUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.cpp
+//! @file      GUI/View/Realspace/RealSpaceBuilderUtils.cpp
 //! @brief     Implements GUI::RealSpace::BuilderUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,22 +12,22 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h"
+#include "GUI/View/Realspace/RealSpaceBuilderUtils.h"
 #include "Base/Const/Units.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/MaterialItem.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/MaterialModelStore.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Views/RealSpaceWidgets/Particle3DContainer.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceBuilder.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceCanvas.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.h"
-#include "GUI/Views/RealSpaceWidgets/TransformTo3D.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Material/MaterialModelStore.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
+#include "GUI/View/Realspace/Particle3DContainer.h"
+#include "GUI/View/Realspace/RealSpaceBuilder.h"
+#include "GUI/View/Realspace/RealSpaceCanvas.h"
+#include "GUI/View/Realspace/RealSpaceMesoCrystalUtils.h"
+#include "GUI/View/Realspace/TransformTo3D.h"
 #include "Sample/Particle/MesoCrystal.h"
 #include "Sample/Particle/Particle.h"
 #include "Sample/Particle/ParticleCoreShell.h"
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h b/GUI/View/Realspace/RealSpaceBuilderUtils.h
similarity index 93%
rename from GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h
rename to GUI/View/Realspace/RealSpaceBuilderUtils.h
index 4953952daa73ed8713dad897ef574bc74ed203a0..3939e9518eab8becf9705f32349b62b599bdd7e0 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h
+++ b/GUI/View/Realspace/RealSpaceBuilderUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h
+//! @file      GUI/View/Realspace/RealSpaceBuilderUtils.h
 //! @brief     Defines GUI::RealSpace::BuilderUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEBUILDERUTILS_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEBUILDERUTILS_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEBUILDERUTILS_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEBUILDERUTILS_H
 
 #include "Sample/Scattering/Rotations.h"
 #include <QVector3D>
@@ -89,4 +89,4 @@ Particle3DContainer mesoCrystal3DContainer(const MesoCrystalItem& mesoCrystalIte
 
 } // namespace GUI::RealSpace::BuilderUtils
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEBUILDERUTILS_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEBUILDERUTILS_H
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceCanvas.cpp b/GUI/View/Realspace/RealSpaceCanvas.cpp
similarity index 92%
rename from GUI/Views/RealSpaceWidgets/RealSpaceCanvas.cpp
rename to GUI/View/Realspace/RealSpaceCanvas.cpp
index a2a0c5c9104d4edc150e7a6a281b06361f64121c..3de3a16e3bc9490d16622cdf673c32272b01eee2 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceCanvas.cpp
+++ b/GUI/View/Realspace/RealSpaceCanvas.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceCanvas.cpp
+//! @file      GUI/View/Realspace/RealSpaceCanvas.cpp
 //! @brief     Implements class RealSpaceScene
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,16 +12,16 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/RealSpaceCanvas.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/FilterPropertyProxy.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Views/InfoWidgets/CautionSign.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceBuilder.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceModel.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceView.h"
-#include "GUI/mainwindow/projectmanager.h"
+#include "GUI/View/Realspace/RealSpaceCanvas.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Group/FilterPropertyProxy.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/View/Info/CautionSign.h"
+#include "GUI/View/Realspace/RealSpaceBuilder.h"
+#include "GUI/View/Realspace/RealSpaceModel.h"
+#include "GUI/View/Realspace/RealSpaceView.h"
 #include <QApplication>
 #include <QFileDialog>
 #include <QMessageBox>
@@ -147,7 +147,7 @@ void RealSpaceCanvas::onRowsAboutToBeRemoved(const QModelIndex& parent, int firs
 
 void RealSpaceCanvas::savePicture(const QPixmap& pixmap)
 {
-    QString dirname = ProjectManager::instance()->userExportDir();
+    QString dirname = gSessionData->projectDocument->userExportDir();
     QString defaultExtension = ".png";
     QString selectedFilter("*" + defaultExtension);
     QString defaultName = dirname + "/untitled";
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceCanvas.h b/GUI/View/Realspace/RealSpaceCanvas.h
similarity index 92%
rename from GUI/Views/RealSpaceWidgets/RealSpaceCanvas.h
rename to GUI/View/Realspace/RealSpaceCanvas.h
index 58ffd407f0e3b3407b8030d8a374e0dcf2bbe423..aa890b1c918b54dec3695effaa60214f6545d7b2 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceCanvas.h
+++ b/GUI/View/Realspace/RealSpaceCanvas.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceCanvas.h
+//! @file      GUI/View/Realspace/RealSpaceCanvas.h
 //! @brief     Defines class RealSpaceCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACECANVAS_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACECANVAS_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACECANVAS_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACECANVAS_H
 
 #include <QItemSelectionModel>
 #include <QModelIndex>
@@ -98,4 +98,4 @@ private:
     void savePicture(const QPixmap& pixmap);
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACECANVAS_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACECANVAS_H
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.cpp b/GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp
similarity index 98%
rename from GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.cpp
rename to GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp
index e51ac65678839aa62e173319f4aedc818afeac5c..a201dbb8d0d57a173c70f4d016eb1002d10481b2 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.cpp
+++ b/GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.cpp
+//! @file      GUI/View/Realspace/RealSpaceMesoCrystalUtils.cpp
 //! @brief     Defines GUI::RealSpace::BuilderUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.h"
+#include "GUI/View/Realspace/RealSpaceMesoCrystalUtils.h"
 #include "Base/Const/Units.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Views/RealSpaceWidgets/Particle3DContainer.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h"
-#include "GUI/Views/RealSpaceWidgets/TransformTo3D.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/View/Realspace/Particle3DContainer.h"
+#include "GUI/View/Realspace/RealSpaceBuilderUtils.h"
+#include "GUI/View/Realspace/TransformTo3D.h"
 #include "Sample/HardParticle/HardParticles.h"
 #include "Sample/Particle/MesoCrystal.h"
 #include "Sample/Particle/Particle.h"
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.h b/GUI/View/Realspace/RealSpaceMesoCrystalUtils.h
similarity index 79%
rename from GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.h
rename to GUI/View/Realspace/RealSpaceMesoCrystalUtils.h
index 05d2406a1f4b03a5b8103cfe88062651c9bbd5aa..c3f105ff8afcd17283b4b40ff71e6fb6a93cab56 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.h
+++ b/GUI/View/Realspace/RealSpaceMesoCrystalUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceMesoCrystalUtils.h
+//! @file      GUI/View/Realspace/RealSpaceMesoCrystalUtils.h
 //! @brief     Defines GUI::RealSpace::BuilderUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEMESOCRYSTALUTILS_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEMESOCRYSTALUTILS_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEMESOCRYSTALUTILS_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEMESOCRYSTALUTILS_H
 
 #include "Sample/Scattering/Rotations.h"
 #include <QVector3D>
@@ -38,4 +38,4 @@ private:
     QVector3D m_origin;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEMESOCRYSTALUTILS_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEMESOCRYSTALUTILS_H
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceModel.h b/GUI/View/Realspace/RealSpaceModel.h
similarity index 72%
rename from GUI/Views/RealSpaceWidgets/RealSpaceModel.h
rename to GUI/View/Realspace/RealSpaceModel.h
index 080531c0df7cb8140c6972ff1140ced391460d42..945059095c5ace41a5eeee98ad5eb4f030a491ec 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceModel.h
+++ b/GUI/View/Realspace/RealSpaceModel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceModel.h
+//! @file      GUI/View/Realspace/RealSpaceModel.h
 //! @brief     Defines RealSpaceModel namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEMODEL_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEMODEL_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEMODEL_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEMODEL_H
 
 #include "GUI/ba3d/model/model.h"
 
 class RealSpaceModel : public GUI::RealSpace::Model {
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEMODEL_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEMODEL_H
diff --git a/GUI/Views/RealSpaceWidgets/RealSpacePositionBuilder.cpp b/GUI/View/Realspace/RealSpacePositionBuilder.cpp
similarity index 90%
rename from GUI/Views/RealSpaceWidgets/RealSpacePositionBuilder.cpp
rename to GUI/View/Realspace/RealSpacePositionBuilder.cpp
index 1737e8f1265bef1ac2fca7702bba07107c89f53f..888a64143b62c07495121bd5fdd863de61042041 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpacePositionBuilder.cpp
+++ b/GUI/View/Realspace/RealSpacePositionBuilder.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpacePositionBuilder.cpp
+//! @file      GUI/View/Realspace/RealSpacePositionBuilder.cpp
 //! @brief     Implements class RealSpacePositionBuilder
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/RealSpacePositionBuilder.h"
-#include "GUI/Views/RealSpaceWidgets/IPositionBuilder.h"
+#include "GUI/View/Realspace/RealSpacePositionBuilder.h"
+#include "GUI/View/Realspace/IPositionBuilder.h"
 
 RealSpacePositionBuilder::RealSpacePositionBuilder() : m_pos_builder{new DefaultPositionBuilder()}
 {
diff --git a/GUI/Views/RealSpaceWidgets/RealSpacePositionBuilder.h b/GUI/View/Realspace/RealSpacePositionBuilder.h
similarity index 83%
rename from GUI/Views/RealSpaceWidgets/RealSpacePositionBuilder.h
rename to GUI/View/Realspace/RealSpacePositionBuilder.h
index 5bd94112ba21c2b94fd96b627d46adaa7d629757..80d6ae91780f202fee7d59743109c8421e61a4cd 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpacePositionBuilder.h
+++ b/GUI/View/Realspace/RealSpacePositionBuilder.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpacePositionBuilder.h
+//! @file      GUI/View/Realspace/RealSpacePositionBuilder.h
 //! @brief     Defines class RealSpacePositionBuilder
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEPOSITIONBUILDER_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEPOSITIONBUILDER_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEPOSITIONBUILDER_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEPOSITIONBUILDER_H
 
 #include "Param/Node/INodeVisitor.h"
 #include <memory>
@@ -41,4 +41,4 @@ private:
     std::unique_ptr<IPositionBuilder> m_pos_builder;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEPOSITIONBUILDER_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEPOSITIONBUILDER_H
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceToolBar.cpp b/GUI/View/Realspace/RealSpaceToolBar.cpp
similarity index 96%
rename from GUI/Views/RealSpaceWidgets/RealSpaceToolBar.cpp
rename to GUI/View/Realspace/RealSpaceToolBar.cpp
index 95248c40ffbd193fab7ceb0294707f7820b18fac..bfc4ae0c956c80765673f56f767a4aee281a8794 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceToolBar.cpp
+++ b/GUI/View/Realspace/RealSpaceToolBar.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceToolBar.cpp
+//! @file      GUI/View/Realspace/RealSpaceToolBar.cpp
 //! @brief     Implements class RealSpaceWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/RealSpaceToolBar.h"
-#include "GUI/Views/Tools/mainwindow_constants.h"
+#include "GUI/View/Realspace/RealSpaceToolBar.h"
+#include "GUI/Util/mainwindow_constants.h"
 
 #include <QCheckBox>
 #include <QToolButton>
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceToolBar.h b/GUI/View/Realspace/RealSpaceToolBar.h
similarity index 80%
rename from GUI/Views/RealSpaceWidgets/RealSpaceToolBar.h
rename to GUI/View/Realspace/RealSpaceToolBar.h
index 5366c3756793a827b87773a75e2a3120e665370c..1d9c2bc296cfa0d1d380915366ce98d12bb2dc69 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceToolBar.h
+++ b/GUI/View/Realspace/RealSpaceToolBar.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceToolBar.h
+//! @file      GUI/View/Realspace/RealSpaceToolBar.h
 //! @brief     Defines class RealSpaceWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACETOOLBAR_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACETOOLBAR_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACETOOLBAR_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACETOOLBAR_H
 
-#include "GUI/Views/CommonWidgets/StyledToolBar.h"
+#include "GUI/View/Common/StyledToolBar.h"
 
 class QToolButton;
 class QCheckBox;
@@ -47,4 +47,4 @@ private:
     QToolButton* m_savePictureButton;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACETOOLBAR_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACETOOLBAR_H
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceView.cpp b/GUI/View/Realspace/RealSpaceView.cpp
similarity index 88%
rename from GUI/Views/RealSpaceWidgets/RealSpaceView.cpp
rename to GUI/View/Realspace/RealSpaceView.cpp
index 6b8761fdca8eceb3387c4bef6d29b098957240c2..2a639dc63eeb8e1f6bf59d92ada793ace004016f 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceView.cpp
+++ b/GUI/View/Realspace/RealSpaceView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceView.cpp
+//! @file      GUI/View/Realspace/RealSpaceView.cpp
 //! @brief     Implements class RealSpaceView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/RealSpaceView.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceModel.h"
+#include "GUI/View/Realspace/RealSpaceView.h"
+#include "GUI/View/Realspace/RealSpaceModel.h"
 #include "GUI/ba3d/widget.h"
 #include <QVBoxLayout>
 
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceView.h b/GUI/View/Realspace/RealSpaceView.h
similarity index 80%
rename from GUI/Views/RealSpaceWidgets/RealSpaceView.h
rename to GUI/View/Realspace/RealSpaceView.h
index f82eb844ffd3583ff6b4afbd7b2b75e2e865225c..3df16af1cf08a4690f4eca6d1270fd2149f638f2 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceView.h
+++ b/GUI/View/Realspace/RealSpaceView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceView.h
+//! @file      GUI/View/Realspace/RealSpaceView.h
 //! @brief     Defines class RealSpaceView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEVIEW_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEVIEW_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEVIEW_H
 
 #include <QWidget>
 
@@ -44,4 +44,4 @@ private:
     GUI::RealSpace::Widget3D* m_3dview;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEVIEW_H
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceWidget.cpp b/GUI/View/Realspace/RealSpaceWidget.cpp
similarity index 88%
rename from GUI/Views/RealSpaceWidgets/RealSpaceWidget.cpp
rename to GUI/View/Realspace/RealSpaceWidget.cpp
index 35818b94a01b3c725f0bc4122d88a8ec3b28c9e4..37463b37d8ebda46500c5f8763d1d2a5fa19e527 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceWidget.cpp
+++ b/GUI/View/Realspace/RealSpaceWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceWidget.cpp
+//! @file      GUI/View/Realspace/RealSpaceWidget.cpp
 //! @brief     Implements class RealSpaceWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/RealSpaceWidget.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceActions.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceCanvas.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceToolBar.h"
+#include "GUI/View/Realspace/RealSpaceWidget.h"
+#include "GUI/View/Realspace/RealSpaceActions.h"
+#include "GUI/View/Realspace/RealSpaceCanvas.h"
+#include "GUI/View/Realspace/RealSpaceToolBar.h"
 #include <QLabel>
 #include <QVBoxLayout>
 
diff --git a/GUI/Views/RealSpaceWidgets/RealSpaceWidget.h b/GUI/View/Realspace/RealSpaceWidget.h
similarity index 83%
rename from GUI/Views/RealSpaceWidgets/RealSpaceWidget.h
rename to GUI/View/Realspace/RealSpaceWidget.h
index 05ed69b5e56690b3a5c614ed8010809100542236..08260d8fb04941f64455b2dede9ceae22c5a46fe 100644
--- a/GUI/Views/RealSpaceWidgets/RealSpaceWidget.h
+++ b/GUI/View/Realspace/RealSpaceWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/RealSpaceWidget.h
+//! @file      GUI/View/Realspace/RealSpaceWidget.h
 //! @brief     Defines class RealSpaceWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEWIDGET_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEWIDGET_H
 
 #include <QWidget>
 
@@ -45,4 +45,4 @@ private:
     QItemSelectionModel* m_selectionModel;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_REALSPACEWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_REALSPACEWIDGET_H
diff --git a/GUI/Views/RealSpaceWidgets/TransformTo3D.cpp b/GUI/View/Realspace/TransformTo3D.cpp
similarity index 97%
rename from GUI/Views/RealSpaceWidgets/TransformTo3D.cpp
rename to GUI/View/Realspace/TransformTo3D.cpp
index 86a5a6d4ab25540a91bdeffe4b021757e4f53f42..f9cb83540a0d5371440429aafc53865afce0c4e7 100644
--- a/GUI/Views/RealSpaceWidgets/TransformTo3D.cpp
+++ b/GUI/View/Realspace/TransformTo3D.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/TransformTo3D.cpp
+//! @file      GUI/View/Realspace/TransformTo3D.cpp
 //! @brief     Implements namespace GUI::View::TransformTo3D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/RealSpaceWidgets/TransformTo3D.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceCanvas.h"
+#include "GUI/View/Realspace/TransformTo3D.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/View/Realspace/RealSpaceCanvas.h"
 #include "Sample/HardParticle/HardParticles.h"
 
 #include <boost/polymorphic_cast.hpp>
diff --git a/GUI/Views/RealSpaceWidgets/TransformTo3D.h b/GUI/View/Realspace/TransformTo3D.h
similarity index 85%
rename from GUI/Views/RealSpaceWidgets/TransformTo3D.h
rename to GUI/View/Realspace/TransformTo3D.h
index efc86859edfe3fb54bd138d08f14c5371d03772e..34d26cb3f35da2be51382deed508fd66c8244b2b 100644
--- a/GUI/Views/RealSpaceWidgets/TransformTo3D.h
+++ b/GUI/View/Realspace/TransformTo3D.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/RealSpaceWidgets/TransformTo3D.h
+//! @file      GUI/View/Realspace/TransformTo3D.h
 //! @brief     Defines namespace GUI::View::TransformTo3D
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_TRANSFORMTO3D_H
-#define BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_TRANSFORMTO3D_H
+#ifndef BORNAGAIN_GUI_VIEW_REALSPACE_TRANSFORMTO3D_H
+#define BORNAGAIN_GUI_VIEW_REALSPACE_TRANSFORMTO3D_H
 
 #include "Base/Vector/Vectors3D.h"
 #include "GUI/ba3d/model/layer.h"
@@ -41,4 +41,4 @@ createParticlefromIFormFactor(const IFormFactor* ff);
 
 } // namespace GUI::View::TransformTo3D
 
-#endif // BORNAGAIN_GUI_VIEWS_REALSPACEWIDGETS_TRANSFORMTO3D_H
+#endif // BORNAGAIN_GUI_VIEW_REALSPACE_TRANSFORMTO3D_H
diff --git a/GUI/utils/ActionFactory.cpp b/GUI/View/SampleDesigner/ActionFactory.cpp
similarity index 90%
rename from GUI/utils/ActionFactory.cpp
rename to GUI/View/SampleDesigner/ActionFactory.cpp
index 70d649e07978b05e33003f22c98e629a2727895b..057d42f8653ae4a75cea20f4fbb36c30bbe0c4e6 100644
--- a/GUI/utils/ActionFactory.cpp
+++ b/GUI/View/SampleDesigner/ActionFactory.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/ActionFactory.cpp
+//! @file      GUI/View/SampleDesigner/ActionFactory.cpp
 //! @brief     Implements class ActionFactory
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/utils/ActionFactory.h"
+#include "GUI/View/SampleDesigner/ActionFactory.h"
 #include <QAction>
 
 QAction* ActionFactory::createRemoveAction(QObject* parent, const QString& what,
diff --git a/GUI/utils/ActionFactory.h b/GUI/View/SampleDesigner/ActionFactory.h
similarity index 85%
rename from GUI/utils/ActionFactory.h
rename to GUI/View/SampleDesigner/ActionFactory.h
index a373d9f8a45b0bc32f1bf27dcdb92db0eb0d6c3a..3315e4f7cd3d22f6e63907e6e9f8c814eb4f86c4 100644
--- a/GUI/utils/ActionFactory.h
+++ b/GUI/View/SampleDesigner/ActionFactory.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/utils/ActionFactory.h
+//! @file      GUI/View/SampleDesigner/ActionFactory.h
 //! @brief     Defines class ActionFactory
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_UTILS_ACTIONFACTORY_H
-#define BORNAGAIN_GUI_UTILS_ACTIONFACTORY_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_ACTIONFACTORY_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_ACTIONFACTORY_H
 
 #include <functional>
 
@@ -41,4 +41,4 @@ private:
     ActionFactory() = default;
 };
 
-#endif // BORNAGAIN_GUI_UTILS_ACTIONFACTORY_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_ACTIONFACTORY_H
diff --git a/GUI/Views/SampleDesigner/ConnectableView.cpp b/GUI/View/SampleDesigner/ConnectableView.cpp
similarity index 90%
rename from GUI/Views/SampleDesigner/ConnectableView.cpp
rename to GUI/View/SampleDesigner/ConnectableView.cpp
index 641ab5fb482d22e00cc3955f9fb25bb197bc0d37..c4516764c6c362771917bd8735f4d95ab07a740c 100644
--- a/GUI/Views/SampleDesigner/ConnectableView.cpp
+++ b/GUI/View/SampleDesigner/ConnectableView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ConnectableView.cpp
+//! @file      GUI/View/SampleDesigner/ConnectableView.cpp
 //! @brief     Implements class ConnectableView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,12 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/ConnectableView.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/SessionGraphicsItem.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/SampleDesigner/NodeEditorConnection.h"
+#include "GUI/View/SampleDesigner/ConnectableView.h"
+#include "GUI/Model/Session/SessionGraphicsItem.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/SampleDesigner/NodeEditorConnection.h"
+#include "GUI/View/Tool/DesignerHelper.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QObject>
 #include <QPainter>
 #include <QStyleOptionGraphicsItem>
@@ -29,8 +29,8 @@ ConnectableView::ConnectableView(QGraphicsItem* parent, QRectF rect)
     setFlag(QGraphicsItem::ItemIsMovable, true);
     setFlag(QGraphicsItem::ItemIsSelectable, true);
     setFlag(QGraphicsItem::ItemSendsGeometryChanges);
-    m_label_vspace = GUI::Utils::Style::SizeOfLetterM().height() * 2.5;
-    m_roundpar = GUI::Utils::Style::SizeOfLetterM().height() / 3.0;
+    m_label_vspace = GUI::Util::Style::SizeOfLetterM().height() * 2.5;
+    m_roundpar = GUI::Util::Style::SizeOfLetterM().height() / 3.0;
 }
 
 void ConnectableView::paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
@@ -51,7 +51,7 @@ void ConnectableView::paint(QPainter* painter, const QStyleOptionGraphicsItem* o
 
     painter->setPen(Qt::black);
     double width = getRectangle().width() * 0.9;
-    double yoffset = GUI::Utils::Style::SizeOfLetterM().height() / 2.; // space above the label
+    double yoffset = GUI::Util::Style::SizeOfLetterM().height() / 2.; // space above the label
     double height = m_label_vspace - yoffset;
     QFont serifFont("Monospace", DesignerHelper::getLabelFontSize(), QFont::Normal);
     painter->setFont(serifFont);
diff --git a/GUI/Views/SampleDesigner/ConnectableView.h b/GUI/View/SampleDesigner/ConnectableView.h
similarity index 88%
rename from GUI/Views/SampleDesigner/ConnectableView.h
rename to GUI/View/SampleDesigner/ConnectableView.h
index accb26ba26f4cf3ad353c2fe77d2f3ad54866df9..799ae7a0d220f769b7fc169a97ab9d11b8f99f76 100644
--- a/GUI/Views/SampleDesigner/ConnectableView.h
+++ b/GUI/View/SampleDesigner/ConnectableView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ConnectableView.h
+//! @file      GUI/View/SampleDesigner/ConnectableView.h
 //! @brief     Defines class ConnectableView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_CONNECTABLEVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_CONNECTABLEVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_CONNECTABLEVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_CONNECTABLEVIEW_H
 
-#include "GUI/Views/SampleDesigner/IView.h"
-#include "GUI/Views/SampleDesigner/NodeEditorPort.h"
+#include "GUI/View/SampleDesigner/IView.h"
+#include "GUI/View/SampleDesigner/NodeEditorPort.h"
 
 class QPainter;
 class QStyleOptionGraphicsItem;
@@ -74,4 +74,4 @@ private:
     QString hyphenate(const QString& name) const;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_CONNECTABLEVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_CONNECTABLEVIEW_H
diff --git a/GUI/Views/SampleDesigner/DesignerMimeData.cpp b/GUI/View/SampleDesigner/DesignerMimeData.cpp
similarity index 90%
rename from GUI/Views/SampleDesigner/DesignerMimeData.cpp
rename to GUI/View/SampleDesigner/DesignerMimeData.cpp
index f2fd444a90cc5e8db34651a74c8a02272f80d740..4b90e87bc44423cbfc32f1dd54051d177ee56d7d 100644
--- a/GUI/Views/SampleDesigner/DesignerMimeData.cpp
+++ b/GUI/View/SampleDesigner/DesignerMimeData.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/DesignerMimeData.cpp
+//! @file      GUI/View/SampleDesigner/DesignerMimeData.cpp
 //! @brief     Implements class DesignerMimeData
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/DesignerMimeData.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
+#include "GUI/View/SampleDesigner/DesignerMimeData.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 #include <QDrag>
 #include <QPixmap>
 #include <QWidget>
diff --git a/GUI/Views/SampleDesigner/DesignerMimeData.h b/GUI/View/SampleDesigner/DesignerMimeData.h
similarity index 80%
rename from GUI/Views/SampleDesigner/DesignerMimeData.h
rename to GUI/View/SampleDesigner/DesignerMimeData.h
index 7339ecb9273643a86d96df141c44ae4fa404f6a8..769f97369ee301c73b365fcf5de04e9f274fb176 100644
--- a/GUI/Views/SampleDesigner/DesignerMimeData.h
+++ b/GUI/View/SampleDesigner/DesignerMimeData.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/DesignerMimeData.h
+//! @file      GUI/View/SampleDesigner/DesignerMimeData.h
 //! @brief     Defines class DesignerMimeData
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_DESIGNERMIMEDATA_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_DESIGNERMIMEDATA_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_DESIGNERMIMEDATA_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_DESIGNERMIMEDATA_H
 
 #include <QMimeData>
 
@@ -36,4 +36,4 @@ private:
     QString m_className;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_DESIGNERMIMEDATA_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_DESIGNERMIMEDATA_H
diff --git a/GUI/Views/SampleDesigner/DesignerScene.cpp b/GUI/View/SampleDesigner/DesignerScene.cpp
similarity index 94%
rename from GUI/Views/SampleDesigner/DesignerScene.cpp
rename to GUI/View/SampleDesigner/DesignerScene.cpp
index ddfaf5610622182d68af9111c8a1909b840dd728..1eb97b2a88f5e9505bf2e37f1ef43a6e5b8f4e93 100644
--- a/GUI/Views/SampleDesigner/DesignerScene.cpp
+++ b/GUI/View/SampleDesigner/DesignerScene.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/DesignerScene.cpp
+//! @file      GUI/View/SampleDesigner/DesignerScene.cpp
 //! @brief     Implements class DesignerScene
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,27 +12,27 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/DesignerScene.h"
-#include "GUI/Models/FilterPropertyProxy.h"
-#include "GUI/Models/GUIExamplesFactory.h"
-#include "GUI/Models/InterferenceItems.h"
-#include "GUI/Models/ItemFactory.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/RotationItems.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/SampleDesigner/DesignerMimeData.h"
-#include "GUI/Views/SampleDesigner/LayerView.h"
-#include "GUI/Views/SampleDesigner/MultiLayerView.h"
-#include "GUI/Views/SampleDesigner/NodeEditor.h"
-#include "GUI/Views/SampleDesigner/NodeEditorConnection.h"
-#include "GUI/Views/SampleDesigner/SampleViewAligner.h"
-#include "GUI/Views/SampleDesigner/SampleViewFactory.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/View/SampleDesigner/DesignerScene.h"
+#include "GUI/Model/Group/FilterPropertyProxy.h"
+#include "GUI/Model/Group/ItemFactory.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/Model/Sample/GUIExamplesFactory.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Trafo/RotationItems.h"
+#include "GUI/View/SampleDesigner/DesignerMimeData.h"
+#include "GUI/View/SampleDesigner/LayerView.h"
+#include "GUI/View/SampleDesigner/MultiLayerView.h"
+#include "GUI/View/SampleDesigner/NodeEditor.h"
+#include "GUI/View/SampleDesigner/NodeEditorConnection.h"
+#include "GUI/View/SampleDesigner/SampleViewAligner.h"
+#include "GUI/View/SampleDesigner/SampleViewFactory.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 #include <QGraphicsSceneMouseEvent>
 #include <QItemSelection>
 #include <QPainter>
diff --git a/GUI/Views/SampleDesigner/DesignerScene.h b/GUI/View/SampleDesigner/DesignerScene.h
similarity index 93%
rename from GUI/Views/SampleDesigner/DesignerScene.h
rename to GUI/View/SampleDesigner/DesignerScene.h
index 1faa4d7edace13f707a97ab72cf42eeba4fdc0ce..c616058e3feca8fe3979757b121924157f4ca0f7 100644
--- a/GUI/Views/SampleDesigner/DesignerScene.h
+++ b/GUI/View/SampleDesigner/DesignerScene.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/DesignerScene.h
+//! @file      GUI/View/SampleDesigner/DesignerScene.h
 //! @brief     Defines class DesignerScene
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_DESIGNERSCENE_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_DESIGNERSCENE_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_DESIGNERSCENE_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_DESIGNERSCENE_H
 
 #include <QGraphicsScene>
 #include <QMap>
@@ -115,4 +115,4 @@ private:
     NodeEditor* m_nodeEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_DESIGNERSCENE_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_DESIGNERSCENE_H
diff --git a/GUI/Views/SampleDesigner/DesignerView.cpp b/GUI/View/SampleDesigner/DesignerView.cpp
similarity index 93%
rename from GUI/Views/SampleDesigner/DesignerView.cpp
rename to GUI/View/SampleDesigner/DesignerView.cpp
index c238f39079730a453ee468629ee9fe69b452a149..dc0a3d5464b644a64bf4d4f6059b8357a4de3774 100644
--- a/GUI/Views/SampleDesigner/DesignerView.cpp
+++ b/GUI/View/SampleDesigner/DesignerView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/DesignerView.cpp
+//! @file      GUI/View/SampleDesigner/DesignerView.cpp
 //! @brief     Implements class DesignerView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/DesignerView.h"
+#include "GUI/View/SampleDesigner/DesignerView.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Views/SampleDesigner/DesignerMimeData.h"
-#include "GUI/Views/SampleDesigner/DesignerScene.h"
+#include "GUI/View/SampleDesigner/DesignerMimeData.h"
+#include "GUI/View/SampleDesigner/DesignerScene.h"
 #include <QDragEnterEvent>
 #include <QGraphicsScene>
 #include <QGraphicsView>
diff --git a/GUI/Views/SampleDesigner/DesignerView.h b/GUI/View/SampleDesigner/DesignerView.h
similarity index 86%
rename from GUI/Views/SampleDesigner/DesignerView.h
rename to GUI/View/SampleDesigner/DesignerView.h
index 0be89d645b55cf8c14890e13d9271fedb4b58445..959f24fabc59e10ab49d79855adf4d253961e547 100644
--- a/GUI/Views/SampleDesigner/DesignerView.h
+++ b/GUI/View/SampleDesigner/DesignerView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/DesignerView.h
+//! @file      GUI/View/SampleDesigner/DesignerView.h
 //! @brief     Defines class DesignerView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_DESIGNERVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_DESIGNERVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_DESIGNERVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_DESIGNERVIEW_H
 
 #include <QGraphicsView>
 
@@ -53,4 +53,4 @@ protected:
     void keyReleaseEvent(QKeyEvent* event);
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_DESIGNERVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_DESIGNERVIEW_H
diff --git a/GUI/Views/SampleDesigner/FormLayouter.cpp b/GUI/View/SampleDesigner/FormLayouter.cpp
similarity index 93%
rename from GUI/Views/SampleDesigner/FormLayouter.cpp
rename to GUI/View/SampleDesigner/FormLayouter.cpp
index d133622c043603ece34a90b88f04604cfe2f1cc9..425f9d568448919cf74cc761660acaa982077f3a 100644
--- a/GUI/Views/SampleDesigner/FormLayouter.cpp
+++ b/GUI/View/SampleDesigner/FormLayouter.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/FormLayouter.cpp
+//! @file      GUI/View/SampleDesigner/FormLayouter.cpp
 //! @brief     Implements class FormLayouter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/FormLayouter.h"
-#include "GUI/Models/UIntDescriptor.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Views/CommonWidgets/DoubleSpinBox.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/Views/SampleDesigner/LayerEditorUtils.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
+#include "GUI/View/SampleDesigner/FormLayouter.h"
+#include "GUI/Model/Types/UIntDescriptor.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
+#include "GUI/View/Edit/DoubleSpinBox.h"
+#include "GUI/View/SampleDesigner/LayerEditorUtils.h"
+#include "GUI/View/SampleDesigner/SampleEditorController.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 
 #include <QFormLayout>
 #include <QGroupBox>
diff --git a/GUI/Views/SampleDesigner/FormLayouter.h b/GUI/View/SampleDesigner/FormLayouter.h
similarity index 94%
rename from GUI/Views/SampleDesigner/FormLayouter.h
rename to GUI/View/SampleDesigner/FormLayouter.h
index 207a86ee8b474cc1936b965c919331f19b2a7c9e..5881444a0bb3e1b717e239db50728d6873d90ea8 100644
--- a/GUI/Views/SampleDesigner/FormLayouter.h
+++ b/GUI/View/SampleDesigner/FormLayouter.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/FormLayouter.h
+//! @file      GUI/View/SampleDesigner/FormLayouter.h
 //! @brief     Defines classes FormLayouter
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,22 +12,20 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_FORMLAYOUTER_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_FORMLAYOUTER_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_FORMLAYOUTER_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_FORMLAYOUTER_H
 
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/SelectionDescriptor.h"
-#include "GUI/Models/Unit.h"
-#include "GUI/Views/SampleDesigner/SelectionContainerForm.h"
+#include "GUI/Model/Group/SelectionDescriptor.h"
+#include "GUI/View/SampleDesigner/SelectionContainerForm.h"
 #include <QFormLayout>
 
+class DoubleDescriptor;
+class QPushButton;
+class QString;
 class QWidget;
 class SampleEditorController;
-class QString;
-class DoubleDescriptor;
 class UIntDescriptor;
 class VectorDescriptor;
-class QPushButton;
 
 //! Utility class to populate a QFormLayout.
 //!
@@ -154,5 +152,4 @@ template <typename T> int FormLayouter::addSelection(const SelectionDescriptor<T
     return addRow(d.label, w);
 }
 
-
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_FORMLAYOUTER_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_FORMLAYOUTER_H
diff --git a/GUI/Views/SampleDesigner/ILayerView.cpp b/GUI/View/SampleDesigner/ILayerView.cpp
similarity index 95%
rename from GUI/Views/SampleDesigner/ILayerView.cpp
rename to GUI/View/SampleDesigner/ILayerView.cpp
index f8ce66c4fc31ca2fe284f10d21da7d35606ca85b..a5d5ebb408d9e526a5b4eafd360e062c99742fd5 100644
--- a/GUI/Views/SampleDesigner/ILayerView.cpp
+++ b/GUI/View/SampleDesigner/ILayerView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ILayerView.cpp
+//! @file      GUI/View/SampleDesigner/ILayerView.cpp
 //! @brief     Implements interface ILayerView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/SampleDesigner/DesignerScene.h"
-#include "GUI/Views/SampleDesigner/MultiLayerView.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/SampleDesigner/DesignerScene.h"
+#include "GUI/View/SampleDesigner/MultiLayerView.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 #include <QGraphicsSceneMouseEvent>
 
 QLineF MultiLayerCandidate::getInterfaceToScene()
diff --git a/GUI/Views/SampleDesigner/ILayerView.h b/GUI/View/SampleDesigner/ILayerView.h
similarity index 88%
rename from GUI/Views/SampleDesigner/ILayerView.h
rename to GUI/View/SampleDesigner/ILayerView.h
index 8dd4e0c32af06be70e31a5852d5d816044ea6163..3d771a07972f768bc9e81d328b55638fcf65f62c 100644
--- a/GUI/Views/SampleDesigner/ILayerView.h
+++ b/GUI/View/SampleDesigner/ILayerView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ILayerView.h
+//! @file      GUI/View/SampleDesigner/ILayerView.h
 //! @brief     Defines interface ILayerView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_ILAYERVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_ILAYERVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_ILAYERVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_ILAYERVIEW_H
 
-#include "GUI/Views/SampleDesigner/ConnectableView.h"
+#include "GUI/View/SampleDesigner/ConnectableView.h"
 
 class MultiLayerView;
 class MultiLayerCandidate;
@@ -64,4 +64,4 @@ public:
     QLineF getInterfaceToScene();
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_ILAYERVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_ILAYERVIEW_H
diff --git a/GUI/Views/SampleDesigner/IView.cpp b/GUI/View/SampleDesigner/IView.cpp
similarity index 93%
rename from GUI/Views/SampleDesigner/IView.cpp
rename to GUI/View/SampleDesigner/IView.cpp
index 8396d6628f5243a0de2d46fbbcf4e9706d90ae61..27f9515cdcb624f23aa1847230a3dfb05dcb4a06 100644
--- a/GUI/Views/SampleDesigner/IView.cpp
+++ b/GUI/View/SampleDesigner/IView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/IView.cpp
+//! @file      GUI/View/SampleDesigner/IView.cpp
 //! @brief     Implements interface IView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/IView.h"
-#include "GUI/Models/SessionGraphicsItem.h"
+#include "GUI/View/SampleDesigner/IView.h"
+#include "GUI/Model/Session/SessionGraphicsItem.h"
 #include <QString>
 
 IView::IView(QGraphicsItem* parent) : QGraphicsObject(parent), m_item(nullptr)
diff --git a/GUI/Views/SampleDesigner/IView.h b/GUI/View/SampleDesigner/IView.h
similarity index 86%
rename from GUI/Views/SampleDesigner/IView.h
rename to GUI/View/SampleDesigner/IView.h
index a2aa8f54b5a795cb39114b17b3f06fdd67653288..c048c13cab15ebc1f862291274f7c74560fd925d 100644
--- a/GUI/Views/SampleDesigner/IView.h
+++ b/GUI/View/SampleDesigner/IView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/IView.h
+//! @file      GUI/View/SampleDesigner/IView.h
 //! @brief     Defines interface IView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_IVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_IVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_IVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_IVIEW_H
 
-#include "GUI/Views/SampleDesigner/ViewTypes.h"
+#include "GUI/View/SampleDesigner/ViewTypes.h"
 #include <QGraphicsObject>
 #include <memory>
 
@@ -65,4 +65,4 @@ inline SessionGraphicsItem* IView::getItem()
     return m_item;
 }
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_IVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_IVIEW_H
diff --git a/GUI/Views/SampleDesigner/InterferenceForm.cpp b/GUI/View/SampleDesigner/InterferenceForm.cpp
similarity index 86%
rename from GUI/Views/SampleDesigner/InterferenceForm.cpp
rename to GUI/View/SampleDesigner/InterferenceForm.cpp
index d02937d01c37f1014e7d3094aca9384a8132b016..324efd05a253479ccc2469462eba10ed0ba8cd23 100644
--- a/GUI/Views/SampleDesigner/InterferenceForm.cpp
+++ b/GUI/View/SampleDesigner/InterferenceForm.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/InterferenceForm.cpp
+//! @file      GUI/View/SampleDesigner/InterferenceForm.cpp
 //! @brief     Implements class InterferenceForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,14 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/InterferenceForm.h"
-#include "GUI/Models/InterferenceItems.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/Views/SampleDesigner/FormLayouter.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
-#include "GUI/Views/SampleDesigner/SelectionContainerForm.h"
-#include "GUI/utils/CustomEventFilters.h"
+#include "GUI/View/SampleDesigner/InterferenceForm.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/View/PropertyEditor/CustomEventFilters.h"
+#include "GUI/View/SampleDesigner/FormLayouter.h"
+#include "GUI/View/SampleDesigner/SampleEditorController.h"
+#include "GUI/View/SampleDesigner/SelectionContainerForm.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 
 InterferenceForm::InterferenceForm(QWidget* parent, ParticleLayoutItem* layoutItem,
                                    SampleEditorController* ec)
diff --git a/GUI/Views/SampleDesigner/InterferenceForm.h b/GUI/View/SampleDesigner/InterferenceForm.h
similarity index 83%
rename from GUI/Views/SampleDesigner/InterferenceForm.h
rename to GUI/View/SampleDesigner/InterferenceForm.h
index 036b39012ef134ebd63b15854d2805461fa01fc3..c9db999a80e80e1c3647076d7b176d7b21fdded1 100644
--- a/GUI/Views/SampleDesigner/InterferenceForm.h
+++ b/GUI/View/SampleDesigner/InterferenceForm.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/InterferenceForm.h
+//! @file      GUI/View/SampleDesigner/InterferenceForm.h
 //! @brief     Defines class InterferenceForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_INTERFERENCEFORM_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_INTERFERENCEFORM_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_INTERFERENCEFORM_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_INTERFERENCEFORM_H
 
 #include <QGroupBox>
 
@@ -43,4 +43,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_INTERFERENCEFORM_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_INTERFERENCEFORM_H
diff --git a/GUI/Views/SampleDesigner/InterferenceViews.cpp b/GUI/View/SampleDesigner/InterferenceViews.cpp
similarity index 93%
rename from GUI/Views/SampleDesigner/InterferenceViews.cpp
rename to GUI/View/SampleDesigner/InterferenceViews.cpp
index 2e8bcade65a3f3d4ad1503b61555251259580d3f..4d3c3e767b503903aa30cf44727e94a098d17eb9 100644
--- a/GUI/Views/SampleDesigner/InterferenceViews.cpp
+++ b/GUI/View/SampleDesigner/InterferenceViews.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/InterferenceViews.cpp
+//! @file      GUI/View/SampleDesigner/InterferenceViews.cpp
 //! @brief     Implements classes InterferenceViews
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/InterferenceViews.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
+#include "GUI/View/SampleDesigner/InterferenceViews.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 
 Interference1DLatticeView::Interference1DLatticeView(QGraphicsItem* parent)
     : ConnectableView(parent)
diff --git a/GUI/Views/SampleDesigner/InterferenceViews.h b/GUI/View/SampleDesigner/InterferenceViews.h
similarity index 87%
rename from GUI/Views/SampleDesigner/InterferenceViews.h
rename to GUI/View/SampleDesigner/InterferenceViews.h
index 73f3da42344a5789e155f64deaf826a89cef0e50..343d08af4bcfa0e91317c5a472c09c8f33e8f9d2 100644
--- a/GUI/Views/SampleDesigner/InterferenceViews.h
+++ b/GUI/View/SampleDesigner/InterferenceViews.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/InterferenceViews.h
+//! @file      GUI/View/SampleDesigner/InterferenceViews.h
 //! @brief     Defines classes InterferenceViews
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_INTERFERENCEVIEWS_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_INTERFERENCEVIEWS_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_INTERFERENCEVIEWS_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_INTERFERENCEVIEWS_H
 
-#include "GUI/Views/SampleDesigner/ConnectableView.h"
+#include "GUI/View/SampleDesigner/ConnectableView.h"
 
 class Interference1DLatticeView : public ConnectableView {
     Q_OBJECT
@@ -59,4 +59,4 @@ public:
     int type() const override { return GUI::View::Types::INTERFERENCE_FUNCTION_RADIAL_PARA; }
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_INTERFERENCEVIEWS_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_INTERFERENCEVIEWS_H
diff --git a/GUI/Views/SampleDesigner/ItemTreeView.cpp b/GUI/View/SampleDesigner/ItemTreeView.cpp
similarity index 91%
rename from GUI/Views/SampleDesigner/ItemTreeView.cpp
rename to GUI/View/SampleDesigner/ItemTreeView.cpp
index 2b7ce9abaffecd5fc592097bca161417596effd2..9a82df5d8a08a7a2eadab6ea1a31a261691fab86 100644
--- a/GUI/Views/SampleDesigner/ItemTreeView.cpp
+++ b/GUI/View/SampleDesigner/ItemTreeView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ItemTreeView.cpp
+//! @file      GUI/View/SampleDesigner/ItemTreeView.cpp
 //! @brief     Implements class ItemTreeView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/ItemTreeView.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/View/SampleDesigner/ItemTreeView.h"
+#include "GUI/Model/Session/SessionModel.h"
 #include <QDragMoveEvent>
 #include <QMimeData>
 #include <QtCore/QXmlStreamWriter>
diff --git a/GUI/Views/SampleDesigner/ItemTreeView.h b/GUI/View/SampleDesigner/ItemTreeView.h
similarity index 78%
rename from GUI/Views/SampleDesigner/ItemTreeView.h
rename to GUI/View/SampleDesigner/ItemTreeView.h
index 5bac0f7229c9e14678301a5c8c799ca9acebcf63..209ee1277859b5db7fa86a0281f7a98fb761db5b 100644
--- a/GUI/Views/SampleDesigner/ItemTreeView.h
+++ b/GUI/View/SampleDesigner/ItemTreeView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ItemTreeView.h
+//! @file      GUI/View/SampleDesigner/ItemTreeView.h
 //! @brief     Defines class ItemTreeView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_ITEMTREEVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_ITEMTREEVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_ITEMTREEVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_ITEMTREEVIEW_H
 
 #include <QTreeView>
 
@@ -29,4 +29,4 @@ protected:
 #endif
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_ITEMTREEVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_ITEMTREEVIEW_H
diff --git a/GUI/Views/SampleDesigner/LayerEditorUtils.cpp b/GUI/View/SampleDesigner/LayerEditorUtils.cpp
similarity index 90%
rename from GUI/Views/SampleDesigner/LayerEditorUtils.cpp
rename to GUI/View/SampleDesigner/LayerEditorUtils.cpp
index fa05c9cd1179bae4ff8f3e5a8d9551b5e5a923e3..3a40d9879a4bb329b1613317f251da9046a7d103 100644
--- a/GUI/Views/SampleDesigner/LayerEditorUtils.cpp
+++ b/GUI/View/SampleDesigner/LayerEditorUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/LayerEditorUtils.cpp
+//! @file      GUI/View/SampleDesigner/LayerEditorUtils.cpp
 //! @brief     Implements class LayerEditorUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,23 +12,23 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/LayerEditorUtils.h"
-#include "GUI/Models/FTDecayFunctionItems.h"
-#include "GUI/Models/FTDistributionItems.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/LayerRoughnessItems.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/RotationItems.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Views/CommonWidgets/DoubleSpinBox.h"
-#include "GUI/Views/SampleDesigner/MesoCrystalForm.h"
-#include "GUI/Views/SampleDesigner/ParticleCompositionForm.h"
-#include "GUI/Views/SampleDesigner/ParticleCoreShellForm.h"
-#include "GUI/Views/SampleDesigner/ParticleForm.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
+#include "GUI/View/SampleDesigner/LayerEditorUtils.h"
+#include "GUI/Model/Sample/FTDecayFunctionItems.h"
+#include "GUI/Model/Sample/FTDistributionItems.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/LayerRoughnessItems.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Trafo/RotationItems.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
+#include "GUI/View/Edit/DoubleSpinBox.h"
+#include "GUI/View/SampleDesigner/FormLayouter.h"
+#include "GUI/View/SampleDesigner/MesoCrystalForm.h"
+#include "GUI/View/SampleDesigner/ParticleCompositionForm.h"
+#include "GUI/View/SampleDesigner/ParticleCoreShellForm.h"
+#include "GUI/View/SampleDesigner/ParticleForm.h"
 
 #include <QLabel>
 #include <QMenu>
diff --git a/GUI/Views/SampleDesigner/LayerEditorUtils.h b/GUI/View/SampleDesigner/LayerEditorUtils.h
similarity index 92%
rename from GUI/Views/SampleDesigner/LayerEditorUtils.h
rename to GUI/View/SampleDesigner/LayerEditorUtils.h
index 6353f6e3cf9d513f15a42906e98575acc871209c..52fde7d7264f43a1804e4b33ca39cff3b3897f1c 100644
--- a/GUI/Views/SampleDesigner/LayerEditorUtils.h
+++ b/GUI/View/SampleDesigner/LayerEditorUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/LayerEditorUtils.h
+//! @file      GUI/View/SampleDesigner/LayerEditorUtils.h
 //! @brief     Defines class LayerEditorUtils
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,30 +12,30 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYEREDITORUTILS_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYEREDITORUTILS_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYEREDITORUTILS_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYEREDITORUTILS_H
 
-#include "GUI/Models/DoubleDescriptor.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 
 #include <QColor>
 #include <QList>
 #include <functional>
 
-class QLabel;
 class DoubleSpinBox;
-class QGridLayout;
-class SampleEditorController;
-class VectorDescriptor;
-class QString;
-class LayerZeroRoughnessItem;
-class LayerBasicRoughnessItem;
 class FTDecayFunction1DItem;
-class FormFactorItem;
 class FTDistribution1DItem;
-class RotationItem;
-class QWidget;
+class FormFactorItem;
 class ItemWithParticles;
+class LayerBasicRoughnessItem;
+class LayerZeroRoughnessItem;
+class QGridLayout;
+class QLabel;
 class QPushButton;
+class QString;
+class QWidget;
+class RotationItem;
+class SampleEditorController;
+class VectorDescriptor;
 
 //! Utility functions to support layer oriented sample editor
 namespace LayerEditorUtils {
@@ -91,4 +91,4 @@ QList<QColor> predefinedLayerColors();
 
 } // namespace LayerEditorUtils
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYEREDITORUTILS_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYEREDITORUTILS_H
diff --git a/GUI/Views/SampleDesigner/LayerForm.cpp b/GUI/View/SampleDesigner/LayerForm.cpp
similarity index 90%
rename from GUI/Views/SampleDesigner/LayerForm.cpp
rename to GUI/View/SampleDesigner/LayerForm.cpp
index cb77b856d3fc5bae56651c8f9e962e2769c7a897..cb263857d5691f24f63c85f890a50784b442af73 100644
--- a/GUI/Views/SampleDesigner/LayerForm.cpp
+++ b/GUI/View/SampleDesigner/LayerForm.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/LayerForm.cpp
+//! @file      GUI/View/SampleDesigner/LayerForm.cpp
 //! @brief     Implements class LayerForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/LayerForm.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/UIntDescriptor.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/Views/SampleDesigner/MaterialInplaceForm.h"
-#include "GUI/Views/SampleDesigner/ParticleLayoutForm.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
-#include "GUI/Views/SampleDesigner/SelectionContainerForm.h"
-#include "GUI/Views/SampleDesigner/WidgetMoverButton.h"
-#include "GUI/utils/ActionFactory.h"
+#include "GUI/View/SampleDesigner/LayerForm.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Types/UIntDescriptor.h"
+#include "GUI/View/SampleDesigner/ActionFactory.h"
+#include "GUI/View/SampleDesigner/MaterialInplaceForm.h"
+#include "GUI/View/SampleDesigner/ParticleLayoutForm.h"
+#include "GUI/View/SampleDesigner/WidgetMoverButton.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 
 #include <QLineEdit>
 #include <QMenu>
diff --git a/GUI/Views/SampleDesigner/LayerForm.h b/GUI/View/SampleDesigner/LayerForm.h
similarity index 84%
rename from GUI/Views/SampleDesigner/LayerForm.h
rename to GUI/View/SampleDesigner/LayerForm.h
index 7e643b9cb32d4724b6bee82c44a1be96d4cec54f..1832f309c65e2428e27b6ea159ade4160140c184 100644
--- a/GUI/Views/SampleDesigner/LayerForm.h
+++ b/GUI/View/SampleDesigner/LayerForm.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/LayerForm.h
+//! @file      GUI/View/SampleDesigner/LayerForm.h
 //! @brief     Defines class LayerForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERFORM_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERFORM_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYERFORM_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYERFORM_H
 
-#include "GUI/Views/SampleDesigner/FormLayouter.h"
+#include "GUI/View/SampleDesigner/FormLayouter.h"
 #include <QGroupBox>
 #include <memory>
 
@@ -52,4 +52,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERFORM_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYERFORM_H
diff --git a/GUI/Views/SampleDesigner/LayerOrientedSampleEditor.cpp b/GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp
similarity index 92%
rename from GUI/Views/SampleDesigner/LayerOrientedSampleEditor.cpp
rename to GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp
index 9116a39a3c0d949241f689ce69a4f4d3873d48fc..10642c3b8365670db2c6395e241b54cc31bfcf9f 100644
--- a/GUI/Views/SampleDesigner/LayerOrientedSampleEditor.cpp
+++ b/GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/LayerOrientedSampleEditor.cpp
+//! @file      GUI/View/SampleDesigner/LayerOrientedSampleEditor.cpp
 //! @brief     Implements class LayerOrientedSampleEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/LayerOrientedSampleEditor.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Views/CommonWidgets/StyledToolBar.h"
-#include "GUI/Views/SampleDesigner/LayerEditorUtils.h"
-#include "GUI/Views/SampleDesigner/MultiLayerForm.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
+#include "GUI/View/SampleDesigner/LayerOrientedSampleEditor.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/View/Common/StyledToolBar.h"
+#include "GUI/View/SampleDesigner/LayerEditorUtils.h"
+#include "GUI/View/SampleDesigner/MultiLayerForm.h"
+#include "GUI/View/SampleDesigner/SampleEditorController.h"
 
-#include "GUI/Application/Application.h"
+#include "GUI/Application/GlobalSettings.h"
 #include <QBoxLayout>
 #include <QScrollArea>
 
diff --git a/GUI/Views/SampleDesigner/LayerOrientedSampleEditor.h b/GUI/View/SampleDesigner/LayerOrientedSampleEditor.h
similarity index 84%
rename from GUI/Views/SampleDesigner/LayerOrientedSampleEditor.h
rename to GUI/View/SampleDesigner/LayerOrientedSampleEditor.h
index 431faafe8af2b20e4f5f079fd9ec68bca8f500f6..0a11350d6f41352da4358aab5a0dea36f6da6a80 100644
--- a/GUI/Views/SampleDesigner/LayerOrientedSampleEditor.h
+++ b/GUI/View/SampleDesigner/LayerOrientedSampleEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/LayerOrientedSampleEditor.h
+//! @file      GUI/View/SampleDesigner/LayerOrientedSampleEditor.h
 //! @brief     Defines class LayerOrientedSampleEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERORIENTEDSAMPLEEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERORIENTEDSAMPLEEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYERORIENTEDSAMPLEEDITOR_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYERORIENTEDSAMPLEEDITOR_H
 
 #include <QMap>
 #include <QWidget>
@@ -54,4 +54,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERORIENTEDSAMPLEEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYERORIENTEDSAMPLEEDITOR_H
diff --git a/GUI/Views/SampleDesigner/LayerView.cpp b/GUI/View/SampleDesigner/LayerView.cpp
similarity index 83%
rename from GUI/Views/SampleDesigner/LayerView.cpp
rename to GUI/View/SampleDesigner/LayerView.cpp
index 4132263c9e8f7a10bb73210b739df2bcb426e244..abda5606898aaec851b867fd3893a41245800aed 100644
--- a/GUI/Views/SampleDesigner/LayerView.cpp
+++ b/GUI/View/SampleDesigner/LayerView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/LayerView.cpp
+//! @file      GUI/View/SampleDesigner/LayerView.cpp
 //! @brief     Implements class LayerView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/LayerView.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/SampleDesigner/MultiLayerView.h"
-#include "GUI/Views/SampleDesigner/ParticleLayoutView.h"
+#include "GUI/View/SampleDesigner/LayerView.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/View/SampleDesigner/MultiLayerView.h"
+#include "GUI/View/SampleDesigner/ParticleLayoutView.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 #include <QPainter>
 #include <QStyleOptionGraphicsItem>
 
diff --git a/GUI/Views/SampleDesigner/LayerView.h b/GUI/View/SampleDesigner/LayerView.h
similarity index 78%
rename from GUI/Views/SampleDesigner/LayerView.h
rename to GUI/View/SampleDesigner/LayerView.h
index cb9ccef4f2dbc1ae434c0e3fefdd69da79074d54..06f1cabbdc822225e17c0b5c3143a677c969bc65 100644
--- a/GUI/Views/SampleDesigner/LayerView.h
+++ b/GUI/View/SampleDesigner/LayerView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/LayerView.h
+//! @file      GUI/View/SampleDesigner/LayerView.h
 //! @brief     Defines class LayerView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYERVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYERVIEW_H
 
-#include "GUI/Views/SampleDesigner/ILayerView.h"
+#include "GUI/View/SampleDesigner/ILayerView.h"
 
 //! Class that represents view of Layer
 class LayerView : public ILayerView {
@@ -31,4 +31,4 @@ public:
     virtual void addView(IView* childView, int row = 0) override; // to add ParticleLayout
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_LAYERVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_LAYERVIEW_H
diff --git a/GUI/Views/SampleDesigner/MaterialInplaceForm.cpp b/GUI/View/SampleDesigner/MaterialInplaceForm.cpp
similarity index 85%
rename from GUI/Views/SampleDesigner/MaterialInplaceForm.cpp
rename to GUI/View/SampleDesigner/MaterialInplaceForm.cpp
index de56b8d6b175801dd9c6649c26332ce362a84fc5..0d5b438021983a6f6dbe5e165ac000b241cfff8f 100644
--- a/GUI/Views/SampleDesigner/MaterialInplaceForm.cpp
+++ b/GUI/View/SampleDesigner/MaterialInplaceForm.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/MaterialInplaceForm.cpp
+//! @file      GUI/View/SampleDesigner/MaterialInplaceForm.cpp
 //! @brief     Implements class MaterialInplaceForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,21 +12,22 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/MaterialInplaceForm.h"
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/ItemWithMaterial.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/MaterialModelStore.h"
-#include "GUI/Models/ModelPath.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Views/CommonWidgets/DoubleLineEdit.h"
-#include "GUI/Views/CommonWidgets/DoubleSpinBox.h"
-#include "GUI/Views/MaterialEditor/MaterialEditorDialog.h"
-#include "GUI/Views/SampleDesigner/LayerEditorUtils.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
-#include "GUI/mainwindow/projectmanager.h"
-#include "GUI/utils/LayoutUtils.h"
+#include "GUI/View/SampleDesigner/MaterialInplaceForm.h"
+#include "GUI/Model/Job/ModelPath.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Material/MaterialModelStore.h"
+#include "GUI/Model/Sample/ItemWithMaterial.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
+#include "GUI/Util/LayoutUtils.h"
+#include "GUI/View/Edit/DoubleLineEdit.h"
+#include "GUI/View/Edit/DoubleSpinBox.h"
+#include "GUI/View/MaterialEditor/MaterialEditorDialog.h"
+#include "GUI/View/SampleDesigner/LayerEditorUtils.h"
+#include "GUI/View/SampleDesigner/SampleEditorController.h"
 
 #include <QGridLayout>
 #include <QLabel>
@@ -64,10 +65,10 @@ void MaterialInplaceForm::updateValues()
 void MaterialInplaceForm::selectMaterial()
 {
     const QString newMaterialIdentifier = MaterialEditorDialog::chooseMaterial(
-        ProjectManager::instance()->document(), m_item->materialIdentifier());
+        parentWidget(), gSessionData->projectDocument, m_item->materialIdentifier());
 
     if (!newMaterialIdentifier.isEmpty() && newMaterialIdentifier != m_item->materialIdentifier()) {
-        GUI::Utils::Layout::clearLayout(m_layout, true);
+        GUI::Util::Layout::clearLayout(m_layout, true);
         m_ec->selectMaterial(m_item, newMaterialIdentifier);
         createWidgets();
     } else
@@ -90,7 +91,7 @@ void MaterialInplaceForm::createWidgets()
 
     // -- Create UI for delta/beta resp. sldRe/sldIm
     DoubleDescriptors values;
-    auto* materialItem = GUI::Model::MaterialItemUtils::findMaterial(m_item->materialIdentifier());
+    auto* materialItem = GUI::MaterialUtil::findMaterial(m_item->materialIdentifier());
     if (materialItem->hasRefractiveIndex()) {
         DoubleDescriptor delta = materialItem->delta();
         delta.set = [=](double value) { material()->delta().set(value); };
@@ -161,7 +162,7 @@ void MaterialInplaceForm::createWidgets()
 
 MaterialItem* MaterialInplaceForm::material()
 {
-    return GUI::Model::MaterialItemUtils::findMaterial(m_item->materialIdentifier());
+    return GUI::MaterialUtil::findMaterial(m_item->materialIdentifier());
 }
 
 void MaterialInplaceForm::onMaterialChanged(MaterialItem* materialItem)
diff --git a/GUI/Views/SampleDesigner/MaterialInplaceForm.h b/GUI/View/SampleDesigner/MaterialInplaceForm.h
similarity index 82%
rename from GUI/Views/SampleDesigner/MaterialInplaceForm.h
rename to GUI/View/SampleDesigner/MaterialInplaceForm.h
index 746d617c39a6f07a9780d6ccfe2f5a22653bb57c..0d1faa4fc1256e84660e5dc611b468e8bf4ae4fb 100644
--- a/GUI/Views/SampleDesigner/MaterialInplaceForm.h
+++ b/GUI/View/SampleDesigner/MaterialInplaceForm.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/MaterialInplaceForm.h
+//! @file      GUI/View/SampleDesigner/MaterialInplaceForm.h
 //! @brief     Defines class MaterialInplaceForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MATERIALINPLACEFORM_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MATERIALINPLACEFORM_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MATERIALINPLACEFORM_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MATERIALINPLACEFORM_H
 
 #include <QWidget>
 
@@ -43,4 +43,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MATERIALINPLACEFORM_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MATERIALINPLACEFORM_H
diff --git a/GUI/Views/SampleDesigner/MesoCrystalForm.cpp b/GUI/View/SampleDesigner/MesoCrystalForm.cpp
similarity index 86%
rename from GUI/Views/SampleDesigner/MesoCrystalForm.cpp
rename to GUI/View/SampleDesigner/MesoCrystalForm.cpp
index fff3322efe74c697790ab166636b8dad4dc21242..7c5145a14e75724392038e079aec27e3555d3055 100644
--- a/GUI/Views/SampleDesigner/MesoCrystalForm.cpp
+++ b/GUI/View/SampleDesigner/MesoCrystalForm.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/MesoCrystalForm.cpp
+//! @file      GUI/View/SampleDesigner/MesoCrystalForm.cpp
 //! @brief     Implements class MesoCrystalForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/MesoCrystalForm.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/Views/SampleDesigner/FormLayouter.h"
-#include "GUI/Views/SampleDesigner/LayerEditorUtils.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
-#include "GUI/Views/SampleDesigner/SelectionContainerForm.h"
-#include "GUI/utils/ActionFactory.h"
+#include "GUI/View/SampleDesigner/MesoCrystalForm.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
+#include "GUI/View/SampleDesigner/ActionFactory.h"
+#include "GUI/View/SampleDesigner/FormLayouter.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 
 #include <QAction>
 
@@ -50,7 +47,6 @@ MesoCrystalForm::MesoCrystalForm(QWidget* parent, MesoCrystalItem* item, SampleE
     m_rowOfBasisTypeCombo = layouter.addRow("Basis type", m_basisCombo);
     createBasisWidgets();
 
-
     auto* collapser = GroupBoxCollapser::installIntoGroupBox(this);
 
     if (allowRemove) {
diff --git a/GUI/Views/SampleDesigner/MesoCrystalForm.h b/GUI/View/SampleDesigner/MesoCrystalForm.h
similarity index 84%
rename from GUI/Views/SampleDesigner/MesoCrystalForm.h
rename to GUI/View/SampleDesigner/MesoCrystalForm.h
index 19da6e376c0b10f247d2465861162f6866e71609..8fed905d94197b4fa102772d74c7cd2946a9f659 100644
--- a/GUI/Views/SampleDesigner/MesoCrystalForm.h
+++ b/GUI/View/SampleDesigner/MesoCrystalForm.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/MesoCrystalForm.h
+//! @file      GUI/View/SampleDesigner/MesoCrystalForm.h
 //! @brief     Defines class MesoCrystalForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MESOCRYSTALFORM_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MESOCRYSTALFORM_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MESOCRYSTALFORM_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MESOCRYSTALFORM_H
 
 #include <QGroupBox>
 
@@ -48,4 +48,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MESOCRYSTALFORM_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MESOCRYSTALFORM_H
diff --git a/GUI/Views/SampleDesigner/MesoCrystalView.cpp b/GUI/View/SampleDesigner/MesoCrystalView.cpp
similarity index 80%
rename from GUI/Views/SampleDesigner/MesoCrystalView.cpp
rename to GUI/View/SampleDesigner/MesoCrystalView.cpp
index 11e0d2dae63c4bdd4c3495f4ca59b4e4366b1ea0..01022b59b3293ff16c42940e3f533d6f6e817ff7 100644
--- a/GUI/Views/SampleDesigner/MesoCrystalView.cpp
+++ b/GUI/View/SampleDesigner/MesoCrystalView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/MesoCrystalView.cpp
+//! @file      GUI/View/SampleDesigner/MesoCrystalView.cpp
 //! @brief     Implements class MesoCrystalView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/MesoCrystalView.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
+#include "GUI/View/SampleDesigner/MesoCrystalView.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/View/Tool/DesignerHelper.h"
+#include "GUI/View/Tool/StyleUtils.h"
 
 MesoCrystalView::MesoCrystalView(QGraphicsItem* parent) : ConnectableView(parent)
 {
@@ -28,7 +28,7 @@ MesoCrystalView::MesoCrystalView(QGraphicsItem* parent) : ConnectableView(parent
         ->setToolTip("Connect basis particles");
     addPort("transformation", NodeEditorPort::INPUT, NodeEditorPort::TRANSFORMATION)
         ->setToolTip("Connect rotation to this port, if necessary");
-    m_label_vspace = GUI::Utils::Style::SizeOfLetterM().height() * 2.5;
+    m_label_vspace = GUI::Util::Style::SizeOfLetterM().height() * 2.5;
 }
 
 void MesoCrystalView::addView(IView* childView, int /* row */)
diff --git a/GUI/Views/SampleDesigner/MesoCrystalView.h b/GUI/View/SampleDesigner/MesoCrystalView.h
similarity index 74%
rename from GUI/Views/SampleDesigner/MesoCrystalView.h
rename to GUI/View/SampleDesigner/MesoCrystalView.h
index 5c41b05b274e28e28f0963ff07ad845408c51891..19ecbef731afb4a175239f0a1e353c4409f9c431 100644
--- a/GUI/Views/SampleDesigner/MesoCrystalView.h
+++ b/GUI/View/SampleDesigner/MesoCrystalView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/MesoCrystalView.h
+//! @file      GUI/View/SampleDesigner/MesoCrystalView.h
 //! @brief     Defines class MesoCrystalView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MESOCRYSTALVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MESOCRYSTALVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MESOCRYSTALVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MESOCRYSTALVIEW_H
 
-#include "GUI/Views/SampleDesigner/ConnectableView.h"
+#include "GUI/View/SampleDesigner/ConnectableView.h"
 
 //! Class representing view of a meso crystal item
 class MesoCrystalView : public ConnectableView {
@@ -29,4 +29,4 @@ public:
     void addView(IView* childView, int row = 0) override;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MESOCRYSTALVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MESOCRYSTALVIEW_H
diff --git a/GUI/Views/SampleDesigner/MultiLayerForm.cpp b/GUI/View/SampleDesigner/MultiLayerForm.cpp
similarity index 90%
rename from GUI/Views/SampleDesigner/MultiLayerForm.cpp
rename to GUI/View/SampleDesigner/MultiLayerForm.cpp
index 6015cab1a1f96ffced5a904de43d1ae84d659d8b..f60bead3a0d4e5480e0a8ba568b6735986e5c4bb 100644
--- a/GUI/Views/SampleDesigner/MultiLayerForm.cpp
+++ b/GUI/View/SampleDesigner/MultiLayerForm.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/MultiLayerForm.cpp
+//! @file      GUI/View/SampleDesigner/MultiLayerForm.cpp
 //! @brief     Implements class MultiLayerForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,20 +12,17 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/MultiLayerForm.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Views/CommonWidgets/DoubleSpinBox.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/Views/SampleDesigner/LayerEditorUtils.h"
-#include "GUI/Views/SampleDesigner/LayerForm.h"
-#include "GUI/Views/SampleDesigner/MesoCrystalForm.h"
-#include "GUI/Views/SampleDesigner/ParticleCompositionForm.h"
-#include "GUI/Views/SampleDesigner/ParticleCoreShellForm.h"
-#include "GUI/Views/SampleDesigner/ParticleForm.h"
-#include "GUI/Views/SampleDesigner/ParticleLayoutForm.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
-#include "GUI/utils/LayoutUtils.h"
+#include "GUI/View/SampleDesigner/MultiLayerForm.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
+#include "GUI/View/Edit/DoubleSpinBox.h"
+#include "GUI/View/SampleDesigner/LayerForm.h"
+#include "GUI/View/SampleDesigner/MesoCrystalForm.h"
+#include "GUI/View/SampleDesigner/ParticleCompositionForm.h"
+#include "GUI/View/SampleDesigner/ParticleCoreShellForm.h"
+#include "GUI/View/SampleDesigner/ParticleForm.h"
+#include "GUI/View/SampleDesigner/ParticleLayoutForm.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 
 #include <QBoxLayout>
 #include <QLabel>
@@ -157,7 +154,7 @@ void MultiLayerForm::onAboutToRemoveLayer(LayerItem* layerItem)
 
     if (layerForm) {
         // delete editors which are subscribed to SessionItems
-        GUI::Utils::Layout::clearLayout(layerForm->layout());
+        GUI::Util::Layout::clearLayout(layerForm->layout());
         layerForm->hide();
         layerForm->setParent(nullptr); // so it is not findable in update routines
         layerForm->deleteLater();      // delete later (this is the sender)
diff --git a/GUI/Views/SampleDesigner/MultiLayerForm.h b/GUI/View/SampleDesigner/MultiLayerForm.h
similarity index 91%
rename from GUI/Views/SampleDesigner/MultiLayerForm.h
rename to GUI/View/SampleDesigner/MultiLayerForm.h
index da122e8af2c5003018126f514bf8a640cde3d40d..a4e8bd67a2f67acdaf4c3e1555d484439ab1daed 100644
--- a/GUI/Views/SampleDesigner/MultiLayerForm.h
+++ b/GUI/View/SampleDesigner/MultiLayerForm.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/MultiLayerForm.h
+//! @file      GUI/View/SampleDesigner/MultiLayerForm.h
 //! @brief     Defines class MultiLayerForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MULTILAYERFORM_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MULTILAYERFORM_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MULTILAYERFORM_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MULTILAYERFORM_H
 
 #include <QWidget>
 
@@ -80,4 +80,4 @@ private:
     QList<QPushButton*> m_addLayerButtons;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MULTILAYERFORM_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MULTILAYERFORM_H
diff --git a/GUI/Views/SampleDesigner/MultiLayerView.cpp b/GUI/View/SampleDesigner/MultiLayerView.cpp
similarity index 95%
rename from GUI/Views/SampleDesigner/MultiLayerView.cpp
rename to GUI/View/SampleDesigner/MultiLayerView.cpp
index 1a190973914c2c2b4aed4adec8eaa2f9cfc2ddc3..a68664bc145b0f4ff7b2b493e4cdbd6c9d91cfdb 100644
--- a/GUI/Views/SampleDesigner/MultiLayerView.cpp
+++ b/GUI/View/SampleDesigner/MultiLayerView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/MultiLayerView.cpp
+//! @file      GUI/View/SampleDesigner/MultiLayerView.cpp
 //! @brief     Implements class MultiLayerView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/MultiLayerView.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/SessionGraphicsItem.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/SampleDesigner/DesignerMimeData.h"
-#include "GUI/Views/SampleDesigner/DesignerScene.h"
-#include "GUI/Views/SampleDesigner/LayerView.h"
+#include "GUI/View/SampleDesigner/MultiLayerView.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Session/SessionGraphicsItem.h"
+#include "GUI/View/SampleDesigner/DesignerMimeData.h"
+#include "GUI/View/SampleDesigner/DesignerScene.h"
+#include "GUI/View/SampleDesigner/LayerView.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 #include <QGraphicsSceneMouseEvent>
 #include <QPainter>
 #include <QStyleOptionGraphicsItem>
diff --git a/GUI/Views/SampleDesigner/MultiLayerView.h b/GUI/View/SampleDesigner/MultiLayerView.h
similarity index 86%
rename from GUI/Views/SampleDesigner/MultiLayerView.h
rename to GUI/View/SampleDesigner/MultiLayerView.h
index 8c9c59199cd5f83ab3fd74e0b27c2483e1c2e3e5..13c51c85cdcabaac4f8202b7494e680769c9d4fe 100644
--- a/GUI/Views/SampleDesigner/MultiLayerView.h
+++ b/GUI/View/SampleDesigner/MultiLayerView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/MultiLayerView.h
+//! @file      GUI/View/SampleDesigner/MultiLayerView.h
 //! @brief     Defines class MultiLayerView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MULTILAYERVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MULTILAYERVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MULTILAYERVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MULTILAYERVIEW_H
 
-#include "GUI/Views/SampleDesigner/ILayerView.h"
+#include "GUI/View/SampleDesigner/ILayerView.h"
 
 class DesignerMimeData;
 class QGraphicsSceneDragDropEvent;
@@ -62,4 +62,4 @@ private:
     QList<QLineF> m_interfaces;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_MULTILAYERVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_MULTILAYERVIEW_H
diff --git a/GUI/Views/SampleDesigner/NodeEditor.cpp b/GUI/View/SampleDesigner/NodeEditor.cpp
similarity index 93%
rename from GUI/Views/SampleDesigner/NodeEditor.cpp
rename to GUI/View/SampleDesigner/NodeEditor.cpp
index f227f89d27f0f4bf91213cda39ab047fc7dd9e23..13fa76d30d9bf6706ef55516bda4c9260461c5ac 100644
--- a/GUI/Views/SampleDesigner/NodeEditor.cpp
+++ b/GUI/View/SampleDesigner/NodeEditor.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/NodeEditor.cpp
+//! @file      GUI/View/SampleDesigner/NodeEditor.cpp
 //! @brief     Implements class NodeEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/NodeEditor.h"
-#include "GUI/Views/SampleDesigner/DesignerView.h"
-#include "GUI/Views/SampleDesigner/NodeEditorConnection.h"
-#include "GUI/Views/SampleDesigner/NodeEditorPort.h"
+#include "GUI/View/SampleDesigner/NodeEditor.h"
+#include "GUI/View/SampleDesigner/DesignerView.h"
+#include "GUI/View/SampleDesigner/NodeEditorConnection.h"
+#include "GUI/View/SampleDesigner/NodeEditorPort.h"
 #include <QEvent>
 #include <QGraphicsScene>
 #include <QGraphicsSceneMouseEvent>
diff --git a/GUI/Views/SampleDesigner/NodeEditor.h b/GUI/View/SampleDesigner/NodeEditor.h
similarity index 88%
rename from GUI/Views/SampleDesigner/NodeEditor.h
rename to GUI/View/SampleDesigner/NodeEditor.h
index 84352b8861d24e6c2e6d06d4a9292f146af18437..f1631864f6ee22f06dfa63640d9db7edef8d58de 100644
--- a/GUI/Views/SampleDesigner/NodeEditor.h
+++ b/GUI/View/SampleDesigner/NodeEditor.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/NodeEditor.h
+//! @file      GUI/View/SampleDesigner/NodeEditor.h
 //! @brief     Defines class NodeEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_NODEEDITOR_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_NODEEDITOR_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_NODEEDITOR_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_NODEEDITOR_H
 
 /*
  * Node editor: original code is taken from
@@ -58,4 +58,4 @@ private:
     NodeEditorConnection* m_conn;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_NODEEDITOR_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_NODEEDITOR_H
diff --git a/GUI/Views/SampleDesigner/NodeEditorConnection.cpp b/GUI/View/SampleDesigner/NodeEditorConnection.cpp
similarity index 94%
rename from GUI/Views/SampleDesigner/NodeEditorConnection.cpp
rename to GUI/View/SampleDesigner/NodeEditorConnection.cpp
index 09ac813a778f678d30cf5f569097c3a6458f34ea..f57dd28985a02992f5ef02db8166524a8d6c9190 100644
--- a/GUI/Views/SampleDesigner/NodeEditorConnection.cpp
+++ b/GUI/View/SampleDesigner/NodeEditorConnection.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/NodeEditorConnection.cpp
+//! @file      GUI/View/SampleDesigner/NodeEditorConnection.cpp
 //! @brief     Implements class NodeEditorConnection
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/NodeEditorConnection.h"
+#include "GUI/View/SampleDesigner/NodeEditorConnection.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Views/SampleDesigner/ConnectableView.h"
+#include "GUI/View/SampleDesigner/ConnectableView.h"
 #include <QBrush>
 #include <QGraphicsScene>
 #include <QPainter>
diff --git a/GUI/Views/SampleDesigner/NodeEditorConnection.h b/GUI/View/SampleDesigner/NodeEditorConnection.h
similarity index 85%
rename from GUI/Views/SampleDesigner/NodeEditorConnection.h
rename to GUI/View/SampleDesigner/NodeEditorConnection.h
index 132c5d5c25cbd6189ac578cda0f280fcc68d388d..1ec66a1b85d25e30fb9fad6d81f883c0e248291d 100644
--- a/GUI/Views/SampleDesigner/NodeEditorConnection.h
+++ b/GUI/View/SampleDesigner/NodeEditorConnection.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/NodeEditorConnection.h
+//! @file      GUI/View/SampleDesigner/NodeEditorConnection.h
 //! @brief     Defines class NodeEditorConnection
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_NODEEDITORCONNECTION_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_NODEEDITORCONNECTION_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_NODEEDITORCONNECTION_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_NODEEDITORCONNECTION_H
 
 /*
  * Node editor: original code is taken from
@@ -21,7 +21,7 @@
  * Copyright (c) 2012, STANISLAW ADASZEWSKI
  */
 
-#include "GUI/Views/SampleDesigner/ViewTypes.h"
+#include "GUI/View/SampleDesigner/ViewTypes.h"
 #include <QGraphicsPathItem>
 
 class NodeEditorPort;
@@ -62,4 +62,4 @@ private:
     NodeEditorPort* m_port2;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_NODEEDITORCONNECTION_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_NODEEDITORCONNECTION_H
diff --git a/GUI/Views/SampleDesigner/NodeEditorPort.cpp b/GUI/View/SampleDesigner/NodeEditorPort.cpp
similarity index 91%
rename from GUI/Views/SampleDesigner/NodeEditorPort.cpp
rename to GUI/View/SampleDesigner/NodeEditorPort.cpp
index 6640777c2da8a2651282be1d1c711617b8fb4cad..7d238f7022a7b7f6f0d51a025565b6a3b0b377ef 100644
--- a/GUI/Views/SampleDesigner/NodeEditorPort.cpp
+++ b/GUI/View/SampleDesigner/NodeEditorPort.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/NodeEditorPort.cpp
+//! @file      GUI/View/SampleDesigner/NodeEditorPort.cpp
 //! @brief     Implements class NodeEditorPort
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/NodeEditorPort.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/SampleDesigner/NodeEditorConnection.h"
+#include "GUI/View/SampleDesigner/NodeEditorPort.h"
+#include "GUI/View/SampleDesigner/NodeEditorConnection.h"
+#include "GUI/View/Tool/DesignerHelper.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QGraphicsScene>
 #include <QPainter>
 #include <QPen>
@@ -31,7 +31,7 @@ NodeEditorPort::NodeEditorPort(QGraphicsItem* parent, const QString& name,
     , m_margin(0)
     , m_label(nullptr)
 {
-    m_radius = GUI::Utils::Style::SizeOfLetterM().width() * 0.4;
+    m_radius = GUI::Util::Style::SizeOfLetterM().width() * 0.4;
     m_margin = m_radius * 0.5;
     m_color = getPortTypeColor(port_type);
 
diff --git a/GUI/Views/SampleDesigner/NodeEditorPort.h b/GUI/View/SampleDesigner/NodeEditorPort.h
similarity index 89%
rename from GUI/Views/SampleDesigner/NodeEditorPort.h
rename to GUI/View/SampleDesigner/NodeEditorPort.h
index eb414cee957380ab43fc0fa6e8505d939adf4333..13944098013d9d7741ae9a1069003670ca9b6846 100644
--- a/GUI/Views/SampleDesigner/NodeEditorPort.h
+++ b/GUI/View/SampleDesigner/NodeEditorPort.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/NodeEditorPort.h
+//! @file      GUI/View/SampleDesigner/NodeEditorPort.h
 //! @brief     Defines class NodeEditorPort
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_NODEEDITORPORT_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_NODEEDITORPORT_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_NODEEDITORPORT_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_NODEEDITORPORT_H
 
 /*
  * Node editor: original code is taken from
@@ -21,7 +21,7 @@
  * Copyright (c) 2012, STANISLAW ADASZEWSKI
  */
 
-#include "GUI/Views/SampleDesigner/ViewTypes.h"
+#include "GUI/View/SampleDesigner/ViewTypes.h"
 #include <QGraphicsPathItem>
 #include <QString>
 
@@ -95,4 +95,4 @@ inline NodeEditorPort::EPortType NodeEditorPort::getPortType() const
     return m_port_type;
 }
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_NODEEDITORPORT_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_NODEEDITORPORT_H
diff --git a/GUI/Views/SampleDesigner/ParticleCompositionForm.cpp b/GUI/View/SampleDesigner/ParticleCompositionForm.cpp
similarity index 85%
rename from GUI/Views/SampleDesigner/ParticleCompositionForm.cpp
rename to GUI/View/SampleDesigner/ParticleCompositionForm.cpp
index 70088b9d984c578af13b0c640f5081df1bd07773..40cbc9909b2248b3fd9a6b611be08b5e076fb52b 100644
--- a/GUI/Views/SampleDesigner/ParticleCompositionForm.cpp
+++ b/GUI/View/SampleDesigner/ParticleCompositionForm.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleCompositionForm.cpp
+//! @file      GUI/View/SampleDesigner/ParticleCompositionForm.cpp
 //! @brief     Implements class ParticleCompositionForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/ParticleCompositionForm.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/Views/SampleDesigner/FormLayouter.h"
-#include "GUI/Views/SampleDesigner/LayerEditorUtils.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
-#include "GUI/Views/SampleDesigner/SelectionContainerForm.h"
-#include "GUI/utils/ActionFactory.h"
+#include "GUI/View/SampleDesigner/ParticleCompositionForm.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
+#include "GUI/View/SampleDesigner/ActionFactory.h"
+#include "GUI/View/SampleDesigner/FormLayouter.h"
+#include "GUI/View/SampleDesigner/LayerEditorUtils.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 
 #include <QAction>
 #include <QPushButton>
diff --git a/GUI/Views/SampleDesigner/ParticleCompositionForm.h b/GUI/View/SampleDesigner/ParticleCompositionForm.h
similarity index 83%
rename from GUI/Views/SampleDesigner/ParticleCompositionForm.h
rename to GUI/View/SampleDesigner/ParticleCompositionForm.h
index 84ffb224d5bb017bcba8a0175fc03a81c8059e7c..748e7e21e3f20233128e6384227ca0f964aaa70f 100644
--- a/GUI/Views/SampleDesigner/ParticleCompositionForm.h
+++ b/GUI/View/SampleDesigner/ParticleCompositionForm.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleCompositionForm.h
+//! @file      GUI/View/SampleDesigner/ParticleCompositionForm.h
 //! @brief     Defines class ParticleCompositionForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECOMPOSITIONFORM_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECOMPOSITIONFORM_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECOMPOSITIONFORM_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECOMPOSITIONFORM_H
 
 #include <QGroupBox>
 #include <QList>
@@ -45,4 +45,4 @@ private:
     QList<QWidget*> m_structureEditingWidgets;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECOMPOSITIONFORM_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECOMPOSITIONFORM_H
diff --git a/GUI/Views/SampleDesigner/ParticleCompositionView.cpp b/GUI/View/SampleDesigner/ParticleCompositionView.cpp
similarity index 81%
rename from GUI/Views/SampleDesigner/ParticleCompositionView.cpp
rename to GUI/View/SampleDesigner/ParticleCompositionView.cpp
index 1ac5bb8bd456ec2180126aa43b2db4e7ad9ac529..4c24808c6861e7843d51161bc7a3c7dfccdbaf3a 100644
--- a/GUI/Views/SampleDesigner/ParticleCompositionView.cpp
+++ b/GUI/View/SampleDesigner/ParticleCompositionView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleCompositionView.cpp
+//! @file      GUI/View/SampleDesigner/ParticleCompositionView.cpp
 //! @brief     Implements class ParticleCompositionView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/ParticleCompositionView.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
+#include "GUI/View/SampleDesigner/ParticleCompositionView.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/View/Tool/DesignerHelper.h"
+#include "GUI/View/Tool/StyleUtils.h"
 
 ParticleCompositionView::ParticleCompositionView(QGraphicsItem* parent) : ConnectableView(parent)
 {
@@ -27,7 +27,7 @@ ParticleCompositionView::ParticleCompositionView(QGraphicsItem* parent) : Connec
         ->setToolTip("Connect particles");
     addPort("transformation", NodeEditorPort::INPUT, NodeEditorPort::TRANSFORMATION)
         ->setToolTip("Connect rotation to this port, if necessary");
-    m_label_vspace = GUI::Utils::Style::SizeOfLetterM().height() * 3.0;
+    m_label_vspace = GUI::Util::Style::SizeOfLetterM().height() * 3.0;
 }
 
 void ParticleCompositionView::addView(IView* childView, int /* row */)
diff --git a/GUI/Views/SampleDesigner/ParticleCompositionView.h b/GUI/View/SampleDesigner/ParticleCompositionView.h
similarity index 72%
rename from GUI/Views/SampleDesigner/ParticleCompositionView.h
rename to GUI/View/SampleDesigner/ParticleCompositionView.h
index f8b8a912abc363965a5e23f02bb7573c1381affe..1aa4c46ae00cd608e750a4d2413f24fa8853d465 100644
--- a/GUI/Views/SampleDesigner/ParticleCompositionView.h
+++ b/GUI/View/SampleDesigner/ParticleCompositionView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleCompositionView.h
+//! @file      GUI/View/SampleDesigner/ParticleCompositionView.h
 //! @brief     Defines class ParticleCompositionView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECOMPOSITIONVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECOMPOSITIONVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECOMPOSITIONVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECOMPOSITIONVIEW_H
 
-#include "GUI/Views/SampleDesigner/ConnectableView.h"
+#include "GUI/View/SampleDesigner/ConnectableView.h"
 
 //! Class representing view of Particle item
 class ParticleCompositionView : public ConnectableView {
@@ -29,4 +29,4 @@ public:
     void addView(IView* childView, int row = 0) override;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECOMPOSITIONVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECOMPOSITIONVIEW_H
diff --git a/GUI/Views/SampleDesigner/ParticleCoreShellForm.cpp b/GUI/View/SampleDesigner/ParticleCoreShellForm.cpp
similarity index 90%
rename from GUI/Views/SampleDesigner/ParticleCoreShellForm.cpp
rename to GUI/View/SampleDesigner/ParticleCoreShellForm.cpp
index 36f99ff3ebca1d439d28371890c67525aaafa53a..0097f0ebd14a4fc47e875fb798c531a3ca21be61 100644
--- a/GUI/Views/SampleDesigner/ParticleCoreShellForm.cpp
+++ b/GUI/View/SampleDesigner/ParticleCoreShellForm.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleCoreShellForm.cpp
+//! @file      GUI/View/SampleDesigner/ParticleCoreShellForm.cpp
 //! @brief     Implements class ParticleCoreShellForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,23 +12,22 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/ParticleCoreShellForm.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
-#include "GUI/Views/SampleDesigner/SelectionContainerForm.h"
-#include "GUI/utils/ActionFactory.h"
+#include "GUI/View/SampleDesigner/ParticleCoreShellForm.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
+#include "GUI/View/SampleDesigner/ActionFactory.h"
+#include "GUI/View/SampleDesigner/FormLayouter.h"
+#include "GUI/View/SampleDesigner/SampleEditorController.h"
+#include "GUI/View/SampleDesigner/SelectionContainerForm.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 
 #include <QAction>
 #include <QComboBox>
 
 namespace {
 
-
 QComboBox* createFormFactorCombo(QWidget* parent, FormFactorItem* current)
 {
     auto* combo = new QComboBox(parent);
@@ -52,6 +51,7 @@ QComboBox* createFormFactorCombo(QWidget* parent, FormFactorItem* current)
 
 } // namespace
 
+
 ParticleCoreShellForm::ParticleCoreShellForm(QWidget* parent, ParticleCoreShellItem* item,
                                              SampleEditorController* ec, bool allowRemove)
     : QGroupBox(parent), m_item(item), m_ec(ec)
diff --git a/GUI/Views/SampleDesigner/ParticleCoreShellForm.h b/GUI/View/SampleDesigner/ParticleCoreShellForm.h
similarity index 82%
rename from GUI/Views/SampleDesigner/ParticleCoreShellForm.h
rename to GUI/View/SampleDesigner/ParticleCoreShellForm.h
index 98132b1bb2156f00b0befcd6b01eab5748b490fb..bacd010e92babd0894b5895ea0a891863a576bdb 100644
--- a/GUI/Views/SampleDesigner/ParticleCoreShellForm.h
+++ b/GUI/View/SampleDesigner/ParticleCoreShellForm.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleCoreShellForm.h
+//! @file      GUI/View/SampleDesigner/ParticleCoreShellForm.h
 //! @brief     Defines class ParticleCoreShellForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,17 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECORESHELLFORM_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECORESHELLFORM_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECORESHELLFORM_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECORESHELLFORM_H
 
-#include "GUI/Views/SampleDesigner/FormLayouter.h"
 #include <QGroupBox>
 #include <memory>
 
-class ParticleCoreShellItem;
-class SampleEditorController;
+class FormLayouter;
 class GroupBoxCollapser;
+class ParticleCoreShellItem;
 class QComboBox;
+class SampleEditorController;
 
 //! Form for editing a core/shell particle
 class ParticleCoreShellForm : public QGroupBox {
@@ -55,4 +55,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECORESHELLFORM_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECORESHELLFORM_H
diff --git a/GUI/Views/SampleDesigner/ParticleCoreShellView.cpp b/GUI/View/SampleDesigner/ParticleCoreShellView.cpp
similarity index 84%
rename from GUI/Views/SampleDesigner/ParticleCoreShellView.cpp
rename to GUI/View/SampleDesigner/ParticleCoreShellView.cpp
index 8e6e4cfae16cfb1776e276c54cdac01057b8e181..6af0950071f09baf001424dbdf824c11da5f0825 100644
--- a/GUI/Views/SampleDesigner/ParticleCoreShellView.cpp
+++ b/GUI/View/SampleDesigner/ParticleCoreShellView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleCoreShellView.cpp
+//! @file      GUI/View/SampleDesigner/ParticleCoreShellView.cpp
 //! @brief     Implements class ParticleCoreShellView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/ParticleCoreShellView.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
+#include "GUI/View/SampleDesigner/ParticleCoreShellView.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/View/Tool/DesignerHelper.h"
+#include "GUI/View/Tool/StyleUtils.h"
 
 ParticleCoreShellView::ParticleCoreShellView(QGraphicsItem* parent) : ConnectableView(parent)
 {
@@ -30,7 +30,7 @@ ParticleCoreShellView::ParticleCoreShellView(QGraphicsItem* parent) : Connectabl
     addPort("transformation", NodeEditorPort::INPUT, NodeEditorPort::TRANSFORMATION)
         ->setToolTip("Connect particle rotation to this port, if necessary");
 
-    m_label_vspace = GUI::Utils::Style::SizeOfLetterM().height() * 3.0;
+    m_label_vspace = GUI::Util::Style::SizeOfLetterM().height() * 3.0;
 }
 
 void ParticleCoreShellView::addView(IView* childView, int /* row */)
diff --git a/GUI/Views/SampleDesigner/ParticleCoreShellView.h b/GUI/View/SampleDesigner/ParticleCoreShellView.h
similarity index 73%
rename from GUI/Views/SampleDesigner/ParticleCoreShellView.h
rename to GUI/View/SampleDesigner/ParticleCoreShellView.h
index 1d9e8616a07b679c9a709e98e0e32713f21c09b5..81dec5402f12a33e5b334f5f2dd726469eb99220 100644
--- a/GUI/Views/SampleDesigner/ParticleCoreShellView.h
+++ b/GUI/View/SampleDesigner/ParticleCoreShellView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleCoreShellView.h
+//! @file      GUI/View/SampleDesigner/ParticleCoreShellView.h
 //! @brief     Defines class ParticleCoreShellView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECORESHELLVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECORESHELLVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECORESHELLVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECORESHELLVIEW_H
 
-#include "GUI/Views/SampleDesigner/ConnectableView.h"
+#include "GUI/View/SampleDesigner/ConnectableView.h"
 
 //! Class representing view of Particle item
 class ParticleCoreShellView : public ConnectableView {
@@ -29,4 +29,4 @@ public:
     void addView(IView* childView, int row = 0) override;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLECORESHELLVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLECORESHELLVIEW_H
diff --git a/GUI/Views/SampleDesigner/ParticleForm.cpp b/GUI/View/SampleDesigner/ParticleForm.cpp
similarity index 74%
rename from GUI/Views/SampleDesigner/ParticleForm.cpp
rename to GUI/View/SampleDesigner/ParticleForm.cpp
index 3811f69a89de64653cfe965e2be129fc51d084db..c07bfc9f6a3679acc33a88c20efbb5167819a710 100644
--- a/GUI/Views/SampleDesigner/ParticleForm.cpp
+++ b/GUI/View/SampleDesigner/ParticleForm.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleForm.cpp
+//! @file      GUI/View/SampleDesigner/ParticleForm.cpp
 //! @brief     Implements class ParticleForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,17 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/ParticleForm.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/VectorDescriptor.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/Views/SampleDesigner/FormLayouter.h"
-#include "GUI/Views/SampleDesigner/MaterialInplaceForm.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
-#include "GUI/Views/SampleDesigner/SelectionContainerForm.h"
-#include "GUI/utils/ActionFactory.h"
+#include "GUI/View/SampleDesigner/ParticleForm.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Types/VectorDescriptor.h"
+#include "GUI/View/SampleDesigner/ActionFactory.h"
+#include "GUI/View/SampleDesigner/FormLayouter.h"
+#include "GUI/View/SampleDesigner/MaterialInplaceForm.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 
 #include <QAction>
 
diff --git a/GUI/Views/SampleDesigner/ParticleForm.h b/GUI/View/SampleDesigner/ParticleForm.h
similarity index 80%
rename from GUI/Views/SampleDesigner/ParticleForm.h
rename to GUI/View/SampleDesigner/ParticleForm.h
index 791f468641f660e609fb15c623907a2c8355263f..fea336fa46f40222c01e127db451520acb738e2f 100644
--- a/GUI/Views/SampleDesigner/ParticleForm.h
+++ b/GUI/View/SampleDesigner/ParticleForm.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleForm.h
+//! @file      GUI/View/SampleDesigner/ParticleForm.h
 //! @brief     Defines class ParticleForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLEFORM_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLEFORM_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLEFORM_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLEFORM_H
 
 #include <QGroupBox>
 
@@ -34,4 +34,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLEFORM_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLEFORM_H
diff --git a/GUI/Views/SampleDesigner/ParticleLayoutForm.cpp b/GUI/View/SampleDesigner/ParticleLayoutForm.cpp
similarity index 84%
rename from GUI/Views/SampleDesigner/ParticleLayoutForm.cpp
rename to GUI/View/SampleDesigner/ParticleLayoutForm.cpp
index e048bf5c978ffae6c826b18ea8ec0b2289c6b245..8211e76fdef0d4893d7f716754ac6701868c843e 100644
--- a/GUI/Views/SampleDesigner/ParticleLayoutForm.cpp
+++ b/GUI/View/SampleDesigner/ParticleLayoutForm.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleLayoutForm.cpp
+//! @file      GUI/View/SampleDesigner/ParticleLayoutForm.cpp
 //! @brief     Implements class ParticleLayoutForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/ParticleLayoutForm.h"
-#include "GUI/Models/ItemWithParticles.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/Views/SampleDesigner/InterferenceForm.h"
-#include "GUI/Views/SampleDesigner/LayerEditorUtils.h"
-#include "GUI/Views/SampleDesigner/LayerForm.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
-#include "GUI/utils/ActionFactory.h"
+#include "GUI/View/SampleDesigner/ParticleLayoutForm.h"
+#include "GUI/Model/Sample/ItemWithParticles.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/View/SampleDesigner/ActionFactory.h"
+#include "GUI/View/SampleDesigner/InterferenceForm.h"
+#include "GUI/View/SampleDesigner/LayerEditorUtils.h"
+#include "GUI/View/SampleDesigner/LayerForm.h"
+#include "GUI/View/SampleDesigner/SampleEditorController.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 
 #include <QAction>
 #include <QPushButton>
diff --git a/GUI/Views/SampleDesigner/ParticleLayoutForm.h b/GUI/View/SampleDesigner/ParticleLayoutForm.h
similarity index 84%
rename from GUI/Views/SampleDesigner/ParticleLayoutForm.h
rename to GUI/View/SampleDesigner/ParticleLayoutForm.h
index 29d577ece5fd2b2a4ff880c31b77d423d1c90ba1..2eabb3b35e86f045f5b50364a6b6ef7d53df06c9 100644
--- a/GUI/Views/SampleDesigner/ParticleLayoutForm.h
+++ b/GUI/View/SampleDesigner/ParticleLayoutForm.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleLayoutForm.h
+//! @file      GUI/View/SampleDesigner/ParticleLayoutForm.h
 //! @brief     Defines class ParticleLayoutForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLELAYOUTFORM_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLELAYOUTFORM_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLELAYOUTFORM_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLELAYOUTFORM_H
 
 #include <QGroupBox>
 #include <QList>
@@ -46,4 +46,4 @@ private:
     QList<QWidget*> m_structureEditingWidgets;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLELAYOUTFORM_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLELAYOUTFORM_H
diff --git a/GUI/Views/SampleDesigner/ParticleLayoutView.cpp b/GUI/View/SampleDesigner/ParticleLayoutView.cpp
similarity index 88%
rename from GUI/Views/SampleDesigner/ParticleLayoutView.cpp
rename to GUI/View/SampleDesigner/ParticleLayoutView.cpp
index 48a1429948e2bbbb973ae0d903c22e21af3e8838..cd5eb8c04422574a349f3106417f3ce5435a68d5 100644
--- a/GUI/Views/SampleDesigner/ParticleLayoutView.cpp
+++ b/GUI/View/SampleDesigner/ParticleLayoutView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleLayoutView.cpp
+//! @file      GUI/View/SampleDesigner/ParticleLayoutView.cpp
 //! @brief     Implements class ParticleLayoutView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/ParticleLayoutView.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/SessionItem.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/SampleDesigner/ParticleView.h"
+#include "GUI/View/SampleDesigner/ParticleLayoutView.h"
+#include "GUI/Model/Session/SessionItem.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/SampleDesigner/ParticleView.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 
 ParticleLayoutView::ParticleLayoutView(QGraphicsItem* parent) : ConnectableView(parent)
 {
diff --git a/GUI/Views/SampleDesigner/ParticleLayoutView.h b/GUI/View/SampleDesigner/ParticleLayoutView.h
similarity index 73%
rename from GUI/Views/SampleDesigner/ParticleLayoutView.h
rename to GUI/View/SampleDesigner/ParticleLayoutView.h
index d5280cf35f4e1e27dbfbabe221eeb56c9fb0e640..e342421b4c4f724e6aaa9a12eff317effc5f9f88 100644
--- a/GUI/Views/SampleDesigner/ParticleLayoutView.h
+++ b/GUI/View/SampleDesigner/ParticleLayoutView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleLayoutView.h
+//! @file      GUI/View/SampleDesigner/ParticleLayoutView.h
 //! @brief     Defines class ParticleLayoutView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLELAYOUTVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLELAYOUTVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLELAYOUTVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLELAYOUTVIEW_H
 
-#include "GUI/Views/SampleDesigner/ConnectableView.h"
+#include "GUI/View/SampleDesigner/ConnectableView.h"
 
 class ParticleLayoutView : public ConnectableView {
 public:
@@ -26,4 +26,4 @@ public:
     void addView(IView* childView, int row = 0) override; // to add Particle
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLELAYOUTVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLELAYOUTVIEW_H
diff --git a/GUI/Views/SampleDesigner/ParticleView.cpp b/GUI/View/SampleDesigner/ParticleView.cpp
similarity index 89%
rename from GUI/Views/SampleDesigner/ParticleView.cpp
rename to GUI/View/SampleDesigner/ParticleView.cpp
index eaba862c6cf6ab2d247bf20f3cba23400c8de3b0..f371833ebd1cd198c002b900d0eab0b051c98164 100644
--- a/GUI/Views/SampleDesigner/ParticleView.cpp
+++ b/GUI/View/SampleDesigner/ParticleView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleView.cpp
+//! @file      GUI/View/SampleDesigner/ParticleView.cpp
 //! @brief     Implements class ParticleView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/ParticleView.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
+#include "GUI/View/SampleDesigner/ParticleView.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Util/Error.h"
+#include "GUI/View/Tool/DesignerHelper.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QObject>
 #include <QPainter>
 #include <QStyleOptionGraphicsItem>
@@ -31,7 +31,7 @@ ParticleView::ParticleView(QGraphicsItem* parent) : ConnectableView(parent)
         ->setToolTip("Connect to the ParticleLayout");
     addPort("transformation", NodeEditorPort::INPUT, NodeEditorPort::TRANSFORMATION)
         ->setToolTip("Connect particle rotation to this port, if necessary");
-    m_label_vspace = GUI::Utils::Style::SizeOfLetterM().height() * 3.0;
+    m_label_vspace = GUI::Util::Style::SizeOfLetterM().height() * 3.0;
 }
 
 void ParticleView::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
diff --git a/GUI/Views/SampleDesigner/ParticleView.h b/GUI/View/SampleDesigner/ParticleView.h
similarity index 80%
rename from GUI/Views/SampleDesigner/ParticleView.h
rename to GUI/View/SampleDesigner/ParticleView.h
index 294d6726a74f499408fb60cb14e736969f794b25..8b5cdaba6301e9f0ba814f7c382f1e0800c31edf 100644
--- a/GUI/Views/SampleDesigner/ParticleView.h
+++ b/GUI/View/SampleDesigner/ParticleView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ParticleView.h
+//! @file      GUI/View/SampleDesigner/ParticleView.h
 //! @brief     Defines class ParticleView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLEVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLEVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLEVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLEVIEW_H
 
-#include "GUI/Views/SampleDesigner/ConnectableView.h"
+#include "GUI/View/SampleDesigner/ConnectableView.h"
 #include <QPixmap>
 
 //! Class representing view of Particle item
@@ -43,4 +43,4 @@ private:
     QPixmap m_pixmap;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_PARTICLEVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_PARTICLEVIEW_H
diff --git a/GUI/Views/SampleDesigner/RealSpacePanel.cpp b/GUI/View/SampleDesigner/RealSpacePanel.cpp
similarity index 87%
rename from GUI/Views/SampleDesigner/RealSpacePanel.cpp
rename to GUI/View/SampleDesigner/RealSpacePanel.cpp
index 60ac7bc14b062c50b15042b8320c1bea5d7770a1..c4f624277de109b5163bafe10fa728c06df15527 100644
--- a/GUI/Views/SampleDesigner/RealSpacePanel.cpp
+++ b/GUI/View/SampleDesigner/RealSpacePanel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/RealSpacePanel.cpp
+//! @file      GUI/View/SampleDesigner/RealSpacePanel.cpp
 //! @brief     Implements class RealSpacePanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/RealSpacePanel.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceWidget.h"
+#include "GUI/View/SampleDesigner/RealSpacePanel.h"
+#include "GUI/View/Realspace/RealSpaceWidget.h"
 #include <QVBoxLayout>
 
 RealSpacePanel::RealSpacePanel(SampleModel* sampleModel, QItemSelectionModel* selectionModel,
diff --git a/GUI/Views/SampleDesigner/RealSpacePanel.h b/GUI/View/SampleDesigner/RealSpacePanel.h
similarity index 80%
rename from GUI/Views/SampleDesigner/RealSpacePanel.h
rename to GUI/View/SampleDesigner/RealSpacePanel.h
index 328ac358e84f243b70ff0d7e57b29472db59b132..e333912078f760305ac8f10786c2c8d4375e72bb 100644
--- a/GUI/Views/SampleDesigner/RealSpacePanel.h
+++ b/GUI/View/SampleDesigner/RealSpacePanel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/RealSpacePanel.h
+//! @file      GUI/View/SampleDesigner/RealSpacePanel.h
 //! @brief     Defines class RealSpacePanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_REALSPACEPANEL_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_REALSPACEPANEL_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_REALSPACEPANEL_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_REALSPACEPANEL_H
 
 #include <QWidget>
 
@@ -35,4 +35,4 @@ private:
     RealSpaceWidget* m_realSpaceWidget;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_REALSPACEPANEL_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_REALSPACEPANEL_H
diff --git a/GUI/Views/SampleDesigner/SampleDesigner.qrc b/GUI/View/SampleDesigner/SampleDesigner.qrc
similarity index 100%
rename from GUI/Views/SampleDesigner/SampleDesigner.qrc
rename to GUI/View/SampleDesigner/SampleDesigner.qrc
diff --git a/GUI/Views/SampleDesigner/SampleEditorCommands.cpp b/GUI/View/SampleDesigner/SampleEditorCommands.cpp
similarity index 90%
rename from GUI/Views/SampleDesigner/SampleEditorCommands.cpp
rename to GUI/View/SampleDesigner/SampleEditorCommands.cpp
index a98102c931fc3bc1873a956ee6ec73bb78993581..5e5d12aa780e95800f25bca8fe735dbc4026b6c5 100644
--- a/GUI/Views/SampleDesigner/SampleEditorCommands.cpp
+++ b/GUI/View/SampleDesigner/SampleEditorCommands.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleEditorCommands.cpp
+//! @file      GUI/View/SampleDesigner/SampleEditorCommands.cpp
 //! @brief     Implements command classes for LayerOrientedSampleEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/SampleEditorCommands.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Views/SampleDesigner/MultiLayerForm.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
+#include "GUI/View/SampleDesigner/SampleEditorCommands.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/View/SampleDesigner/MultiLayerForm.h"
+#include "GUI/View/SampleDesigner/SampleEditorController.h"
 
 namespace {
 static constexpr int COMMAND_ID_CHANGE_VALUE = 11;
diff --git a/GUI/Views/SampleDesigner/SampleEditorCommands.h b/GUI/View/SampleDesigner/SampleEditorCommands.h
similarity index 84%
rename from GUI/Views/SampleDesigner/SampleEditorCommands.h
rename to GUI/View/SampleDesigner/SampleEditorCommands.h
index 074972a5ea4c83d68201060c83ef26b85be38a5f..e7641b1e77ea3347d26fd5ab264418bcc970aeb5 100644
--- a/GUI/Views/SampleDesigner/SampleEditorCommands.h
+++ b/GUI/View/SampleDesigner/SampleEditorCommands.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleEditorCommands.h
+//! @file      GUI/View/SampleDesigner/SampleEditorCommands.h
 //! @brief     Defines command classes for LayerOrientedSampleEditor
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEEDITORCOMMANDS_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEEDITORCOMMANDS_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEEDITORCOMMANDS_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEEDITORCOMMANDS_H
 
-#include "GUI/Models/SampleModel.h"
+#include "GUI/Model/Sample/SampleModel.h"
 #include <QUndoCommand>
 
 class SampleEditorController;
@@ -58,4 +58,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEEDITORCOMMANDS_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEEDITORCOMMANDS_H
diff --git a/GUI/Views/SampleDesigner/SampleEditorController.cpp b/GUI/View/SampleDesigner/SampleEditorController.cpp
similarity index 92%
rename from GUI/Views/SampleDesigner/SampleEditorController.cpp
rename to GUI/View/SampleDesigner/SampleEditorController.cpp
index 34e018fa675136fde1ff80264ac8b80997b59aad..a1849dc3865bfc07209cb7936f0e58e472a1f03b 100644
--- a/GUI/Views/SampleDesigner/SampleEditorController.cpp
+++ b/GUI/View/SampleDesigner/SampleEditorController.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleEditorController.cpp
+//! @file      GUI/View/SampleDesigner/SampleEditorController.cpp
 //! @brief     Implements class SampleEditorController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,25 +12,25 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/UIntDescriptor.h"
-#include "GUI/Views/CommonWidgets/DoubleSpinBox.h"
-#include "GUI/Views/SampleDesigner/InterferenceForm.h"
-#include "GUI/Views/SampleDesigner/LayerForm.h"
-#include "GUI/Views/SampleDesigner/MaterialInplaceForm.h"
-#include "GUI/Views/SampleDesigner/MesoCrystalForm.h"
-#include "GUI/Views/SampleDesigner/MultiLayerForm.h"
-#include "GUI/Views/SampleDesigner/ParticleCompositionForm.h"
-#include "GUI/Views/SampleDesigner/ParticleCoreShellForm.h"
-#include "GUI/Views/SampleDesigner/ParticleLayoutForm.h"
-#include "GUI/Views/SampleDesigner/SampleEditorCommands.h"
+#include "GUI/View/SampleDesigner/SampleEditorController.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Types/UIntDescriptor.h"
+#include "GUI/View/Edit/DoubleSpinBox.h"
+#include "GUI/View/SampleDesigner/InterferenceForm.h"
+#include "GUI/View/SampleDesigner/LayerForm.h"
+#include "GUI/View/SampleDesigner/MaterialInplaceForm.h"
+#include "GUI/View/SampleDesigner/MesoCrystalForm.h"
+#include "GUI/View/SampleDesigner/MultiLayerForm.h"
+#include "GUI/View/SampleDesigner/ParticleCompositionForm.h"
+#include "GUI/View/SampleDesigner/ParticleCoreShellForm.h"
+#include "GUI/View/SampleDesigner/ParticleLayoutForm.h"
+#include "GUI/View/SampleDesigner/SampleEditorCommands.h"
 
 SampleEditorController::SampleEditorController(MultiLayerItem* multi)
     : m_multiLayerItem(multi), m_multiLayerForm(nullptr)
diff --git a/GUI/Views/SampleDesigner/SampleEditorController.h b/GUI/View/SampleDesigner/SampleEditorController.h
similarity index 92%
rename from GUI/Views/SampleDesigner/SampleEditorController.h
rename to GUI/View/SampleDesigner/SampleEditorController.h
index d3325868d38bc4e8c2f1440e3a1c03a7e4444242..8134098ee10e63e2cf516ce235c3f1de18cea085 100644
--- a/GUI/Views/SampleDesigner/SampleEditorController.h
+++ b/GUI/View/SampleDesigner/SampleEditorController.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleEditorController.h
+//! @file      GUI/View/SampleDesigner/SampleEditorController.h
 //! @brief     Defines class SampleEditorController
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEEDITORCONTROLLER_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEEDITORCONTROLLER_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEEDITORCONTROLLER_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEEDITORCONTROLLER_H
 
 #include <QUndoStack>
 
@@ -91,4 +91,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEEDITORCONTROLLER_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEEDITORCONTROLLER_H
diff --git a/GUI/Views/SampleDesigner/SampleListView.cpp b/GUI/View/SampleDesigner/SampleListView.cpp
similarity index 94%
rename from GUI/Views/SampleDesigner/SampleListView.cpp
rename to GUI/View/SampleDesigner/SampleListView.cpp
index d7f41c3db8273d1b3b4e34190f1e6fd035c752f1..8cbb43df354a5e41e422c4e10a27bb80c6e02ffe 100644
--- a/GUI/Views/SampleDesigner/SampleListView.cpp
+++ b/GUI/View/SampleDesigner/SampleListView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleListView.cpp
+//! @file      GUI/View/SampleDesigner/SampleListView.cpp
 //! @brief     Implements class SampleListView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/SampleListView.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/GUIExamplesFactory.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/SampleListModel.h"
-#include "GUI/Views/CommonWidgets/ItemViewOverlayButtons.h"
-#include "GUI/utils/ItemDelegateForHTML.h"
+#include "GUI/View/SampleDesigner/SampleListView.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Sample/GUIExamplesFactory.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/SampleListModel.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/Util/ItemDelegateForHTML.h"
+#include "GUI/View/Common/ItemViewOverlayButtons.h"
 #include <QAction>
 #include <QDialog>
 #include <QDialogButtonBox>
@@ -142,7 +143,8 @@ void SampleListView::createNewSample()
 void SampleListView::createSampleFromLibrary(const QString& classname, const QString& title,
                                              const QString& description)
 {
-    const QModelIndex newIndex = m_model->createSampleFromExamples(classname, title, description);
+    const QModelIndex newIndex = m_model->createSampleFromExamples(
+        classname, title, description, gSessionData->projectDocument->materialModel());
     setCurrentIndex(newIndex);
 }
 
diff --git a/GUI/Views/SampleDesigner/SampleListView.h b/GUI/View/SampleDesigner/SampleListView.h
similarity index 88%
rename from GUI/Views/SampleDesigner/SampleListView.h
rename to GUI/View/SampleDesigner/SampleListView.h
index 08a8669d378c10837d393c641dfef292619eb109..82fd32478b239936bc314062a10b7066af39b083 100644
--- a/GUI/Views/SampleDesigner/SampleListView.h
+++ b/GUI/View/SampleDesigner/SampleListView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleListView.h
+//! @file      GUI/View/SampleDesigner/SampleListView.h
 //! @brief     Defines class SampleListView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLELISTVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLELISTVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLELISTVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLELISTVIEW_H
 
 #include <QListView>
 
@@ -57,4 +57,4 @@ private:
     QAction* m_chooseFromLibraryAction;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLELISTVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLELISTVIEW_H
diff --git a/GUI/Views/SampleDesigner/SamplePropertyWidget.cpp b/GUI/View/SampleDesigner/SamplePropertyWidget.cpp
similarity index 92%
rename from GUI/Views/SampleDesigner/SamplePropertyWidget.cpp
rename to GUI/View/SampleDesigner/SamplePropertyWidget.cpp
index fb98458339dc1d1b80d3c2a9937c78cfa8483e4b..0d00cce7870119cff207e59a3f5000ea34a62b3e 100644
--- a/GUI/Views/SampleDesigner/SamplePropertyWidget.cpp
+++ b/GUI/View/SampleDesigner/SamplePropertyWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SamplePropertyWidget.cpp
+//! @file      GUI/View/SampleDesigner/SamplePropertyWidget.cpp
 //! @brief     Implements class IntensityDataPropertyWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/SamplePropertyWidget.h"
-#include "GUI/Models/SessionItem.h"
-#include "GUI/Views/PropertyEditor/ComponentEditor.h"
+#include "GUI/View/SampleDesigner/SamplePropertyWidget.h"
+#include "GUI/Model/Session/SessionItem.h"
+#include "GUI/View/PropertyEditor/ComponentEditor.h"
 #include <QItemSelection>
 #include <QModelIndexList>
 #include <QSortFilterProxyModel>
diff --git a/GUI/Views/SampleDesigner/SamplePropertyWidget.h b/GUI/View/SampleDesigner/SamplePropertyWidget.h
similarity index 83%
rename from GUI/Views/SampleDesigner/SamplePropertyWidget.h
rename to GUI/View/SampleDesigner/SamplePropertyWidget.h
index a5651bd03e66b21c7bfcbd6ff808d883d2e76083..3e38586ea57dcac4267626a0840dcc3bbd392ab9 100644
--- a/GUI/Views/SampleDesigner/SamplePropertyWidget.h
+++ b/GUI/View/SampleDesigner/SamplePropertyWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SamplePropertyWidget.h
+//! @file      GUI/View/SampleDesigner/SamplePropertyWidget.h
 //! @brief     Defines class SamplePropertyWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEPROPERTYWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEPROPERTYWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEPROPERTYWIDGET_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEPROPERTYWIDGET_H
 
 #include <QWidget>
 
@@ -42,4 +42,4 @@ private:
     ComponentEditor* m_propertyEditor;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEPROPERTYWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEPROPERTYWIDGET_H
diff --git a/GUI/Views/SampleDesigner/SampleToolBar.cpp b/GUI/View/SampleDesigner/SampleToolBar.cpp
similarity index 91%
rename from GUI/Views/SampleDesigner/SampleToolBar.cpp
rename to GUI/View/SampleDesigner/SampleToolBar.cpp
index b5f706405da714e32a4a9994a1a9a41d1c8b225b..44d531f6fc7a8aa68aceb4552ff94634440936f9 100644
--- a/GUI/Views/SampleDesigner/SampleToolBar.cpp
+++ b/GUI/View/SampleDesigner/SampleToolBar.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleToolBar.cpp
+//! @file      GUI/View/SampleDesigner/SampleToolBar.cpp
 //! @brief     Implements class SampleToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/SampleToolBar.h"
-#include "GUI/Views/MaterialEditor/MaterialEditorDialog.h"
-#include "GUI/Views/SampleDesigner/DesignerView.h"
-#include "GUI/Views/SampleView.h"
-#include "GUI/mainwindow/projectmanager.h"
+#include "GUI/View/SampleDesigner/SampleToolBar.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/View/MaterialEditor/MaterialEditorDialog.h"
+#include "GUI/View/SampleDesigner/DesignerView.h"
+#include "GUI/View/SampleDesigner/SampleView.h"
 #include <QAction>
 #include <QButtonGroup>
 #include <QComboBox>
@@ -27,7 +27,7 @@
 #include <QToolButton>
 
 //! main tool bar on top of SampleView window
-SampleToolBar::SampleToolBar(SampleView* parent) : StyledToolBar(parent), m_sampleView(parent)
+SampleToolBar::SampleToolBar(SampleView* parent) : StyledToolBar(parent)
 {
     // Select & Pan
     auto selectionPointerButton = new QToolButton;
@@ -122,7 +122,7 @@ SampleToolBar::SampleToolBar(SampleView* parent) : StyledToolBar(parent), m_samp
     m_RealSpaceViewerButton->setText("3D Viewer");
     m_RealSpaceViewerButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
     m_RealSpaceViewerButton->setToolTip("Open real space 3D viewer.");
-    connect(m_RealSpaceViewerButton, &QToolButton::clicked, m_sampleView,
+    connect(m_RealSpaceViewerButton, &QToolButton::clicked, parent,
             &SampleView::toggleRealSpaceView);
     addWidget(m_RealSpaceViewerButton);
 }
@@ -141,5 +141,5 @@ void SampleToolBar::onScaleComboChanged(const QString& scale_string)
 
 void SampleToolBar::onMaterialEditorCall()
 {
-    MaterialEditorDialog::editMaterials(ProjectManager::instance()->document());
+    MaterialEditorDialog::editMaterials(parentWidget(), gSessionData->projectDocument);
 }
diff --git a/GUI/Views/SampleDesigner/SampleToolBar.h b/GUI/View/SampleDesigner/SampleToolBar.h
similarity index 81%
rename from GUI/Views/SampleDesigner/SampleToolBar.h
rename to GUI/View/SampleDesigner/SampleToolBar.h
index 456b56e75ab8de3fedabd7294592c36a0c4e204c..02c57f3a49e688365ebca259de82d7bf2416c7ee 100644
--- a/GUI/Views/SampleDesigner/SampleToolBar.h
+++ b/GUI/View/SampleDesigner/SampleToolBar.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleToolBar.h
+//! @file      GUI/View/SampleDesigner/SampleToolBar.h
 //! @brief     Defines class SampleToolBar
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBAR_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBAR_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBAR_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBAR_H
 
-#include "GUI/Views/CommonWidgets/StyledToolBar.h"
+#include "GUI/View/Common/StyledToolBar.h"
 #include <QTreeView>
 
 class QAction;
@@ -54,7 +54,6 @@ private:
     QComboBox* m_scaleCombo;
     QToolButton* m_materialEditorButton;
     QToolButton* m_RealSpaceViewerButton;
-    SampleView* m_sampleView;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBAR_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBAR_H
diff --git a/GUI/Views/SampleDesigner/SampleToolBox.cpp b/GUI/View/SampleDesigner/SampleToolBox.cpp
similarity index 91%
rename from GUI/Views/SampleDesigner/SampleToolBox.cpp
rename to GUI/View/SampleDesigner/SampleToolBox.cpp
index 12ec372e211eb051e5192bfe1829bb5bacdae1fd..e8c6c6385a4970bccf6e4d1371996223b4585cac 100644
--- a/GUI/Views/SampleDesigner/SampleToolBox.cpp
+++ b/GUI/View/SampleDesigner/SampleToolBox.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleToolBox.cpp
+//! @file      GUI/View/SampleDesigner/SampleToolBox.cpp
 //! @brief     Implements class SampleToolBox
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/SampleToolBox.h"
-#include "GUI/Models/GUIExamplesFactory.h"
-#include "GUI/Models/ItemCatalog.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/TransformationItem.h"
-#include "GUI/Views/SampleDesigner/DesignerMimeData.h"
-#include "GUI/Views/SampleDesigner/SampleToolBoxTreeWidget.h"
+#include "GUI/View/SampleDesigner/SampleToolBox.h"
+#include "GUI/Model/Group/ItemCatalog.h"
+#include "GUI/Model/Sample/GUIExamplesFactory.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Trafo/TransformationItem.h"
+#include "GUI/View/SampleDesigner/DesignerMimeData.h"
+#include "GUI/View/SampleDesigner/SampleToolBoxTreeWidget.h"
 #include <QApplication>
 #include <QFocusEvent>
 #include <QIcon>
diff --git a/GUI/Views/SampleDesigner/SampleToolBox.h b/GUI/View/SampleDesigner/SampleToolBox.h
similarity index 81%
rename from GUI/Views/SampleDesigner/SampleToolBox.h
rename to GUI/View/SampleDesigner/SampleToolBox.h
index 670ffbfee7d9dbca9cb12736a74d226644a68f07..2daf95e4b871c01208b75265c1456daa5f9e20ea 100644
--- a/GUI/Views/SampleDesigner/SampleToolBox.h
+++ b/GUI/View/SampleDesigner/SampleToolBox.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleToolBox.h
+//! @file      GUI/View/SampleDesigner/SampleToolBox.h
 //! @brief     Defines class SampleToolBox
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBOX_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBOX_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBOX_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBOX_H
 
 #include <QWidget>
 
@@ -37,4 +37,4 @@ private:
     SampleToolBoxTreeWidget* m_view;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBOX_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBOX_H
diff --git a/GUI/Views/SampleDesigner/SampleToolBoxGroupView.cpp b/GUI/View/SampleDesigner/SampleToolBoxGroupView.cpp
similarity index 98%
rename from GUI/Views/SampleDesigner/SampleToolBoxGroupView.cpp
rename to GUI/View/SampleDesigner/SampleToolBoxGroupView.cpp
index f7ff4a736dbadf10ababf56f86bfee27328ec87d..ed4fd64213669cef54255a1f069b4b0ba4818e06 100644
--- a/GUI/Views/SampleDesigner/SampleToolBoxGroupView.cpp
+++ b/GUI/View/SampleDesigner/SampleToolBoxGroupView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleToolBoxGroupView.cpp
+//! @file      GUI/View/SampleDesigner/SampleToolBoxGroupView.cpp
 //! @brief     Implements class SampleToolBoxGroupView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/SampleToolBoxGroupView.h"
+#include "GUI/View/SampleDesigner/SampleToolBoxGroupView.h"
 
 #include <QIcon>
 #include <QListView>
diff --git a/GUI/Views/SampleDesigner/SampleToolBoxGroupView.h b/GUI/View/SampleDesigner/SampleToolBoxGroupView.h
similarity index 86%
rename from GUI/Views/SampleDesigner/SampleToolBoxGroupView.h
rename to GUI/View/SampleDesigner/SampleToolBoxGroupView.h
index e64401e1ad71e3333563b3f8129ce018799a6682..3d30df0f46fecf890fa1217140a0010a34731e72 100644
--- a/GUI/Views/SampleDesigner/SampleToolBoxGroupView.h
+++ b/GUI/View/SampleDesigner/SampleToolBoxGroupView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleToolBoxGroupView.h
+//! @file      GUI/View/SampleDesigner/SampleToolBoxGroupView.h
 //! @brief     Defines class SampleToolBoxGroupView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBOXGROUPVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBOXGROUPVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBOXGROUPVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBOXGROUPVIEW_H
 
 #include <QListView>
 
@@ -53,4 +53,4 @@ private:
     SampleToolBoxGroupModel* m_model;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBOXGROUPVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBOXGROUPVIEW_H
diff --git a/GUI/Views/SampleDesigner/SampleToolBoxTreeWidget.cpp b/GUI/View/SampleDesigner/SampleToolBoxTreeWidget.cpp
similarity index 98%
rename from GUI/Views/SampleDesigner/SampleToolBoxTreeWidget.cpp
rename to GUI/View/SampleDesigner/SampleToolBoxTreeWidget.cpp
index 362a76a8604c3945d173c6e3115a0d9f9ac57d82..18e97661b2aeb037e3f5af78f41713b3b0431303 100644
--- a/GUI/Views/SampleDesigner/SampleToolBoxTreeWidget.cpp
+++ b/GUI/View/SampleDesigner/SampleToolBoxTreeWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleToolBoxTreeWidget.cpp
+//! @file      GUI/View/SampleDesigner/SampleToolBoxTreeWidget.cpp
 //! @brief     Implements class SampleToolBoxTreeWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/SampleToolBoxTreeWidget.h"
+#include "GUI/View/SampleDesigner/SampleToolBoxTreeWidget.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Views/SampleDesigner/SampleToolBoxGroupView.h"
+#include "GUI/View/SampleDesigner/SampleToolBoxGroupView.h"
 
 #include <QAction>
 #include <QActionGroup>
diff --git a/GUI/Views/SampleDesigner/SampleToolBoxTreeWidget.h b/GUI/View/SampleDesigner/SampleToolBoxTreeWidget.h
similarity index 86%
rename from GUI/Views/SampleDesigner/SampleToolBoxTreeWidget.h
rename to GUI/View/SampleDesigner/SampleToolBoxTreeWidget.h
index f37683ebcabf8b5ea6e5a6a447349eb13f04f8c0..357e93453b9dd45d773aa1754471dacb891193dd 100644
--- a/GUI/Views/SampleDesigner/SampleToolBoxTreeWidget.h
+++ b/GUI/View/SampleDesigner/SampleToolBoxTreeWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleToolBoxTreeWidget.h
+//! @file      GUI/View/SampleDesigner/SampleToolBoxTreeWidget.h
 //! @brief     Defines class SampleToolBoxTreeWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBOXTREEWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBOXTREEWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBOXTREEWIDGET_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBOXTREEWIDGET_H
 
 #include <QTreeWidget>
 
@@ -57,4 +57,4 @@ private:
     bool m_iconMode;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETOOLBOXTREEWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETOOLBOXTREEWIDGET_H
diff --git a/GUI/Views/SampleDesigner/SampleTreeWidget.cpp b/GUI/View/SampleDesigner/SampleTreeWidget.cpp
similarity index 93%
rename from GUI/Views/SampleDesigner/SampleTreeWidget.cpp
rename to GUI/View/SampleDesigner/SampleTreeWidget.cpp
index 618b3906c7a93f67f6049864e9ea5d9cb3f8b8a4..83ee0b205611e226d0926ea78cb9ce4d1af225a6 100644
--- a/GUI/Views/SampleDesigner/SampleTreeWidget.cpp
+++ b/GUI/View/SampleDesigner/SampleTreeWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleTreeWidget.cpp
+//! @file      GUI/View/SampleDesigner/SampleTreeWidget.cpp
 //! @brief     Implements class SampleTreeWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/SampleTreeWidget.h"
-#include "GUI/Models/FilterPropertyProxy.h"
-#include "GUI/Models/ItemCatalog.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Views/SampleDesigner/ItemTreeView.h"
+#include "GUI/View/SampleDesigner/SampleTreeWidget.h"
+#include "GUI/Model/Group/FilterPropertyProxy.h"
+#include "GUI/Model/Group/ItemCatalog.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/View/SampleDesigner/ItemTreeView.h"
 #include <QAction>
 #include <QMenu>
 #include <QVBoxLayout>
diff --git a/GUI/Views/SampleDesigner/SampleTreeWidget.h b/GUI/View/SampleDesigner/SampleTreeWidget.h
similarity index 84%
rename from GUI/Views/SampleDesigner/SampleTreeWidget.h
rename to GUI/View/SampleDesigner/SampleTreeWidget.h
index 939abf4e56b3339f08d9a08fdce119e3c5790fe7..0d5659e4e0fce00d2390c18997f0ee63216d8100 100644
--- a/GUI/Views/SampleDesigner/SampleTreeWidget.h
+++ b/GUI/View/SampleDesigner/SampleTreeWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleTreeWidget.h
+//! @file      GUI/View/SampleDesigner/SampleTreeWidget.h
 //! @brief     Defines class SampleTreeWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETREEWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETREEWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETREEWIDGET_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETREEWIDGET_H
 
 #include <QMap>
 #include <QWidget>
@@ -49,4 +49,4 @@ private:
     SampleModel* m_sampleModel;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLETREEWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLETREEWIDGET_H
diff --git a/GUI/Views/SampleView.cpp b/GUI/View/SampleDesigner/SampleView.cpp
similarity index 90%
rename from GUI/Views/SampleView.cpp
rename to GUI/View/SampleDesigner/SampleView.cpp
index bbd664f18bb68d46b408b4b874c72db6f5341b5d..201e7c0f98a7288249e12fde7919ed77bf7d0693 100644
--- a/GUI/Views/SampleView.cpp
+++ b/GUI/View/SampleDesigner/SampleView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleView.cpp
+//! @file      GUI/View/SampleDesigner/SampleView.cpp
 //! @brief     Implements class SampleView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,23 +12,21 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleView.h"
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/FilterPropertyProxy.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Views/CommonWidgets/DocksController.h"
-#include "GUI/Views/SampleDesigner/DesignerScene.h"
-#include "GUI/Views/SampleDesigner/DesignerView.h"
-#include "GUI/Views/SampleDesigner/LayerOrientedSampleEditor.h"
-#include "GUI/Views/SampleDesigner/RealSpacePanel.h"
-#include "GUI/Views/SampleDesigner/SampleListView.h"
-#include "GUI/Views/SampleDesigner/SamplePropertyWidget.h"
-#include "GUI/Views/SampleDesigner/SampleToolBar.h"
-#include "GUI/Views/SampleDesigner/SampleToolBox.h"
-#include "GUI/Views/SampleDesigner/SampleTreeWidget.h"
-#include "GUI/Views/SampleDesigner/ScriptPanel.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/View/SampleDesigner/SampleView.h"
+#include "GUI/Model/Group/FilterPropertyProxy.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/View/Common/DocksController.h"
+#include "GUI/View/SampleDesigner/DesignerScene.h"
+#include "GUI/View/SampleDesigner/DesignerView.h"
+#include "GUI/View/SampleDesigner/LayerOrientedSampleEditor.h"
+#include "GUI/View/SampleDesigner/RealSpacePanel.h"
+#include "GUI/View/SampleDesigner/SampleListView.h"
+#include "GUI/View/SampleDesigner/SamplePropertyWidget.h"
+#include "GUI/View/SampleDesigner/SampleToolBar.h"
+#include "GUI/View/SampleDesigner/SampleToolBox.h"
+#include "GUI/View/SampleDesigner/SampleTreeWidget.h"
+#include "GUI/View/SampleDesigner/ScriptPanel.h"
 
 #include <QBoxLayout>
 #include <QDockWidget>
diff --git a/GUI/Views/SampleView.h b/GUI/View/SampleDesigner/SampleView.h
similarity index 85%
rename from GUI/Views/SampleView.h
rename to GUI/View/SampleDesigner/SampleView.h
index 8947d9fd08f240fa95af91acb434e02a4443bc54..28961e4dd405e5f67ed7c21cb505751482d59a5d 100644
--- a/GUI/Views/SampleView.h
+++ b/GUI/View/SampleDesigner/SampleView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleView.h
+//! @file      GUI/View/SampleDesigner/SampleView.h
 //! @brief     Defines class SampleView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEW_H
 
 #include <QMainWindow>
 
@@ -44,4 +44,4 @@ private:
     bool m_useLayerOrientedEditor = false;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEW_H
diff --git a/GUI/Views/SampleDesigner/SampleViewAligner.cpp b/GUI/View/SampleDesigner/SampleViewAligner.cpp
similarity index 92%
rename from GUI/Views/SampleDesigner/SampleViewAligner.cpp
rename to GUI/View/SampleDesigner/SampleViewAligner.cpp
index 66db00d47e51ab93d7676269082f5b1129c409c7..46f04c1b11b598f9eb9b7df62e9b2c895c5ab7f7 100644
--- a/GUI/Views/SampleDesigner/SampleViewAligner.cpp
+++ b/GUI/View/SampleDesigner/SampleViewAligner.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleViewAligner.cpp
+//! @file      GUI/View/SampleDesigner/SampleViewAligner.cpp
 //! @brief     Implements class SampleViewAligner
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,23 +12,23 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/SampleViewAligner.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/SampleDesigner/DesignerScene.h"
-#include "GUI/Views/SampleDesigner/IView.h"
+#include "GUI/View/SampleDesigner/SampleViewAligner.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/View/SampleDesigner/DesignerScene.h"
+#include "GUI/View/SampleDesigner/IView.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QModelIndex>
 
 namespace {
 int step_width()
 {
-    return GUI::Utils::Style::SizeOfLetterM().width() * 12.5;
+    return GUI::Util::Style::SizeOfLetterM().width() * 12.5;
 }
 int step_height()
 {
-    return GUI::Utils::Style::SizeOfLetterM().height() * 11;
+    return GUI::Util::Style::SizeOfLetterM().height() * 11;
 }
 } // namespace
 
diff --git a/GUI/Views/SampleDesigner/SampleViewAligner.h b/GUI/View/SampleDesigner/SampleViewAligner.h
similarity index 85%
rename from GUI/Views/SampleDesigner/SampleViewAligner.h
rename to GUI/View/SampleDesigner/SampleViewAligner.h
index f225d72eeb8e02d32117fef5428822a5c998064b..37dc84f09f9ec418c1e6c5197d12e5b70cb0f15b 100644
--- a/GUI/Views/SampleDesigner/SampleViewAligner.h
+++ b/GUI/View/SampleDesigner/SampleViewAligner.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleViewAligner.h
+//! @file      GUI/View/SampleDesigner/SampleViewAligner.h
 //! @brief     Defines class SampleViewAligner
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEVIEWALIGNER_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEVIEWALIGNER_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEWALIGNER_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEWALIGNER_H
 
 #include <QMap>
 #include <QModelIndex>
@@ -47,4 +47,4 @@ private:
     QMap<IView*, QPointF> m_viewToPos;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEVIEWALIGNER_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEWALIGNER_H
diff --git a/GUI/Views/SampleDesigner/SampleViewFactory.cpp b/GUI/View/SampleDesigner/SampleViewFactory.cpp
similarity index 73%
rename from GUI/Views/SampleDesigner/SampleViewFactory.cpp
rename to GUI/View/SampleDesigner/SampleViewFactory.cpp
index 23e36f0c0c5b2859f7606832223672b5982b6d84..e3f0a6631209c95c2dea71d86d7b7881f4e8266f 100644
--- a/GUI/Views/SampleDesigner/SampleViewFactory.cpp
+++ b/GUI/View/SampleDesigner/SampleViewFactory.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleViewFactory.cpp
+//! @file      GUI/View/SampleDesigner/SampleViewFactory.cpp
 //! @brief     Implements class SampleViewFactory
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,25 +12,25 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/SampleViewFactory.h"
-#include "GUI/Models/InterferenceItems.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MesoCrystalItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/TransformationItem.h"
-#include "GUI/Views/SampleDesigner/InterferenceViews.h"
-#include "GUI/Views/SampleDesigner/LayerView.h"
-#include "GUI/Views/SampleDesigner/MesoCrystalView.h"
-#include "GUI/Views/SampleDesigner/MultiLayerView.h"
-#include "GUI/Views/SampleDesigner/ParticleCompositionView.h"
-#include "GUI/Views/SampleDesigner/ParticleCoreShellView.h"
-#include "GUI/Views/SampleDesigner/ParticleLayoutView.h"
-#include "GUI/Views/SampleDesigner/ParticleView.h"
-#include "GUI/Views/SampleDesigner/TransformationView.h"
+#include "GUI/View/SampleDesigner/SampleViewFactory.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MesoCrystalItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Trafo/TransformationItem.h"
+#include "GUI/View/SampleDesigner/InterferenceViews.h"
+#include "GUI/View/SampleDesigner/LayerView.h"
+#include "GUI/View/SampleDesigner/MesoCrystalView.h"
+#include "GUI/View/SampleDesigner/MultiLayerView.h"
+#include "GUI/View/SampleDesigner/ParticleCompositionView.h"
+#include "GUI/View/SampleDesigner/ParticleCoreShellView.h"
+#include "GUI/View/SampleDesigner/ParticleLayoutView.h"
+#include "GUI/View/SampleDesigner/ParticleView.h"
+#include "GUI/View/SampleDesigner/TransformationView.h"
 
 bool SampleViewFactory::isValidType(const QString& model_type)
 {
diff --git a/GUI/Views/SampleDesigner/SampleViewFactory.h b/GUI/View/SampleDesigner/SampleViewFactory.h
similarity index 75%
rename from GUI/Views/SampleDesigner/SampleViewFactory.h
rename to GUI/View/SampleDesigner/SampleViewFactory.h
index 744ef0f3127cee7d8e0df893505d0f370ccfbe54..4a33db1a184e9136c8615b17f485190bd582a911 100644
--- a/GUI/Views/SampleDesigner/SampleViewFactory.h
+++ b/GUI/View/SampleDesigner/SampleViewFactory.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SampleViewFactory.h
+//! @file      GUI/View/SampleDesigner/SampleViewFactory.h
 //! @brief     Defines class SampleViewFactory
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEVIEWFACTORY_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEVIEWFACTORY_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEWFACTORY_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEWFACTORY_H
 
 #include <QStringList>
 
@@ -25,4 +25,4 @@ public:
     static IView* createSampleView(const QString& model_type);
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SAMPLEVIEWFACTORY_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SAMPLEVIEWFACTORY_H
diff --git a/GUI/Views/SampleDesigner/ScriptPanel.cpp b/GUI/View/SampleDesigner/ScriptPanel.cpp
similarity index 90%
rename from GUI/Views/SampleDesigner/ScriptPanel.cpp
rename to GUI/View/SampleDesigner/ScriptPanel.cpp
index bae2dbb4a3cc42679595bd769c405ecffb097c4c..92c390ed83de96357b7685073c018ca475812f88 100644
--- a/GUI/Views/SampleDesigner/ScriptPanel.cpp
+++ b/GUI/View/SampleDesigner/ScriptPanel.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ScriptPanel.cpp
+//! @file      GUI/View/SampleDesigner/ScriptPanel.cpp
 //! @brief     Implements class ScriptPanel
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,15 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/ScriptPanel.h"
+#include "GUI/View/SampleDesigner/ScriptPanel.h"
 #include "Core/Export/ExportToPython.h"
-#include "GUI/Models/DomainObjectBuilder.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/CommonWidgets/UpdateTimer.h"
-#include "GUI/Views/InfoWidgets/PythonSyntaxHighlighter.h"
-#include "GUI/Views/InfoWidgets/CautionSign.h"
+#include "GUI/Model/Domain/DomainObjectBuilder.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/View/Info/CautionSign.h"
+#include "GUI/View/Info/PythonSyntaxHighlighter.h"
+#include "GUI/View/Tool/DesignerHelper.h"
+#include "GUI/View/Tool/UpdateTimer.h"
 #include "Sample/Multilayer/MultiLayer.h"
 
 #include <QScrollBar>
diff --git a/GUI/Views/SampleDesigner/ScriptPanel.h b/GUI/View/SampleDesigner/ScriptPanel.h
similarity index 83%
rename from GUI/Views/SampleDesigner/ScriptPanel.h
rename to GUI/View/SampleDesigner/ScriptPanel.h
index a7273eb5d570a526d3255a259ae583ee62958fd0..77ce96f4026e721865689165a5ea752dd1960ef9 100644
--- a/GUI/Views/SampleDesigner/ScriptPanel.h
+++ b/GUI/View/SampleDesigner/ScriptPanel.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ScriptPanel.h
+//! @file      GUI/View/SampleDesigner/ScriptPanel.h
 //! @brief     Defines class SampleDesigner
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SCRIPTPANEL_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SCRIPTPANEL_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SCRIPTPANEL_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SCRIPTPANEL_H
 
-#include "GUI/Views/CommonWidgets/InfoPanel.h"
+#include "GUI/View/Common/InfoPanel.h"
 
 class SampleModel;
 class PythonSyntaxHighlighter;
@@ -54,4 +54,4 @@ private:
     CautionSign* m_cautionSign;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SCRIPTPANEL_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SCRIPTPANEL_H
diff --git a/GUI/Views/SampleDesigner/SelectionContainerForm.h b/GUI/View/SampleDesigner/SelectionContainerForm.h
similarity index 87%
rename from GUI/Views/SampleDesigner/SelectionContainerForm.h
rename to GUI/View/SampleDesigner/SelectionContainerForm.h
index 0cac5e243f3450c82b5f11688984a338d0e80079..a694c1c9a54956c0cf2ed4499cfb9a683e66e2f4 100644
--- a/GUI/Views/SampleDesigner/SelectionContainerForm.h
+++ b/GUI/View/SampleDesigner/SelectionContainerForm.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/SelectionContainerForm.h
+//! @file      GUI/View/SampleDesigner/SelectionContainerForm.h
 //! @brief     Defines class SelectionContainerForm
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SELECTIONCONTAINERFORM_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SELECTIONCONTAINERFORM_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SELECTIONCONTAINERFORM_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SELECTIONCONTAINERFORM_H
 
-#include "GUI/Views/SampleDesigner/LayerEditorUtils.h"
-#include "GUI/Views/SampleDesigner/SampleEditorController.h"
-#include "GUI/utils/CustomEventFilters.h"
-#include "GUI/utils/LayoutUtils.h"
+#include "GUI/Util/LayoutUtils.h"
+#include "GUI/View/PropertyEditor/CustomEventFilters.h"
+#include "GUI/View/SampleDesigner/LayerEditorUtils.h"
+#include "GUI/View/SampleDesigner/SampleEditorController.h"
 #include <QComboBox>
 #include <QGridLayout>
 
@@ -87,7 +87,7 @@ private:
     {
         auto layoutItemOfComboBox = m_gridLayout->itemAtPosition(1, 0);
         m_gridLayout->takeAt(m_gridLayout->indexOf(layoutItemOfComboBox));
-        GUI::Utils::Layout::clearLayout(m_gridLayout, true);
+        GUI::Util::Layout::clearLayout(m_gridLayout, true);
         m_gridLayout->addWidget(layoutItemOfComboBox->widget(), 1, 0);
     }
 
@@ -99,4 +99,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_SELECTIONCONTAINERFORM_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_SELECTIONCONTAINERFORM_H
diff --git a/GUI/Views/SampleDesigner/TransformationView.cpp b/GUI/View/SampleDesigner/TransformationView.cpp
similarity index 84%
rename from GUI/Views/SampleDesigner/TransformationView.cpp
rename to GUI/View/SampleDesigner/TransformationView.cpp
index ae78e585e1a16e828d0bf22c231690cf551c411a..75ce9f047e5c11f2bf65168b4c90c2312505cdea 100644
--- a/GUI/Views/SampleDesigner/TransformationView.cpp
+++ b/GUI/View/SampleDesigner/TransformationView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/TransformationView.cpp
+//! @file      GUI/View/SampleDesigner/TransformationView.cpp
 //! @brief     Implements class TransformationView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/TransformationView.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
+#include "GUI/View/SampleDesigner/TransformationView.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 
 TransformationView::TransformationView(QGraphicsItem* parent) : ConnectableView(parent)
 {
diff --git a/GUI/Views/SampleDesigner/TransformationView.h b/GUI/View/SampleDesigner/TransformationView.h
similarity index 71%
rename from GUI/Views/SampleDesigner/TransformationView.h
rename to GUI/View/SampleDesigner/TransformationView.h
index 7c9191ba6088729b9aedf79d7af988c701994d15..13cc712c4aff0b514d9d6c5af254132d9639406f 100644
--- a/GUI/Views/SampleDesigner/TransformationView.h
+++ b/GUI/View/SampleDesigner/TransformationView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/TransformationView.h
+//! @file      GUI/View/SampleDesigner/TransformationView.h
 //! @brief     Defines class TransformationView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_TRANSFORMATIONVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_TRANSFORMATIONVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_TRANSFORMATIONVIEW_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_TRANSFORMATIONVIEW_H
 
-#include "GUI/Views/SampleDesigner/ConnectableView.h"
+#include "GUI/View/SampleDesigner/ConnectableView.h"
 
 class TransformationView : public ConnectableView {
     Q_OBJECT
@@ -26,4 +26,4 @@ public:
     int type() const override { return GUI::View::Types::TRANSFORMATION; }
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_TRANSFORMATIONVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_TRANSFORMATIONVIEW_H
diff --git a/GUI/Views/SampleDesigner/ViewTypes.h b/GUI/View/SampleDesigner/ViewTypes.h
similarity index 84%
rename from GUI/Views/SampleDesigner/ViewTypes.h
rename to GUI/View/SampleDesigner/ViewTypes.h
index 75d006ee5ef32b5722785951512fd59cf8430bd5..716dc0eadcd64217be82a7b74ef5e5650420abe2 100644
--- a/GUI/Views/SampleDesigner/ViewTypes.h
+++ b/GUI/View/SampleDesigner/ViewTypes.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/ViewTypes.h
+//! @file      GUI/View/SampleDesigner/ViewTypes.h
 //! @brief     Defines namespace GUI::View::Types with enum EWidgetTypes (nothing to implement)
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_VIEWTYPES_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_VIEWTYPES_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_VIEWTYPES_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_VIEWTYPES_H
 
 #include <QGraphicsItem>
 
@@ -42,4 +42,4 @@ enum EWidgetTypes {
 
 }
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_VIEWTYPES_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_VIEWTYPES_H
diff --git a/GUI/Views/SampleDesigner/WidgetMoverButton.cpp b/GUI/View/SampleDesigner/WidgetMoverButton.cpp
similarity index 98%
rename from GUI/Views/SampleDesigner/WidgetMoverButton.cpp
rename to GUI/View/SampleDesigner/WidgetMoverButton.cpp
index a3c70f7fd5ba11d9126150c5726992c0788c5a27..12ebdcac66325a2e5f1305e826caddcd04e9fa14 100644
--- a/GUI/Views/SampleDesigner/WidgetMoverButton.cpp
+++ b/GUI/View/SampleDesigner/WidgetMoverButton.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/WidgetMoverButton.cpp
+//! @file      GUI/View/SampleDesigner/WidgetMoverButton.cpp
 //! @brief     Implements class WidgetMoverButton
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SampleDesigner/WidgetMoverButton.h"
+#include "GUI/View/SampleDesigner/WidgetMoverButton.h"
 #include "Base/Utils/Assert.h"
 #include <QLayout>
 #include <QMouseEvent>
diff --git a/GUI/Views/SampleDesigner/WidgetMoverButton.h b/GUI/View/SampleDesigner/WidgetMoverButton.h
similarity index 90%
rename from GUI/Views/SampleDesigner/WidgetMoverButton.h
rename to GUI/View/SampleDesigner/WidgetMoverButton.h
index 95ecfc29c25c25e0a7f9ed67aaa6415334af40cf..1b4fa1217f1e888c4e055760bace4a13593f7c58 100644
--- a/GUI/Views/SampleDesigner/WidgetMoverButton.h
+++ b/GUI/View/SampleDesigner/WidgetMoverButton.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SampleDesigner/WidgetMoverButton.h
+//! @file      GUI/View/SampleDesigner/WidgetMoverButton.h
 //! @brief     Defines class WidgetMoverButton
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_WIDGETMOVERBUTTON_H
-#define BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_WIDGETMOVERBUTTON_H
+#ifndef BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_WIDGETMOVERBUTTON_H
+#define BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_WIDGETMOVERBUTTON_H
 
 #include <QTimer>
 #include <QToolButton>
@@ -68,4 +68,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_SAMPLEDESIGNER_WIDGETMOVERBUTTON_H
+#endif // BORNAGAIN_GUI_VIEW_SAMPLEDESIGNER_WIDGETMOVERBUTTON_H
diff --git a/GUI/Views/SampleDesigner/images/Lattice1D.png b/GUI/View/SampleDesigner/images/Lattice1D.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/Lattice1D.png
rename to GUI/View/SampleDesigner/images/Lattice1D.png
diff --git a/GUI/Views/SampleDesigner/images/Lattice2D.png b/GUI/View/SampleDesigner/images/Lattice2D.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/Lattice2D.png
rename to GUI/View/SampleDesigner/images/Lattice2D.png
diff --git a/GUI/Views/SampleDesigner/images/Lattice2DFinite.png b/GUI/View/SampleDesigner/images/Lattice2DFinite.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/Lattice2DFinite.png
rename to GUI/View/SampleDesigner/images/Lattice2DFinite.png
diff --git a/GUI/Views/SampleDesigner/images/Layer.png b/GUI/View/SampleDesigner/images/Layer.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/Layer.png
rename to GUI/View/SampleDesigner/images/Layer.png
diff --git a/GUI/Views/SampleDesigner/images/Mesocrystal_64x64.png b/GUI/View/SampleDesigner/images/Mesocrystal_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/Mesocrystal_64x64.png
rename to GUI/View/SampleDesigner/images/Mesocrystal_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/MultiLayer.png b/GUI/View/SampleDesigner/images/MultiLayer.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/MultiLayer.png
rename to GUI/View/SampleDesigner/images/MultiLayer.png
diff --git a/GUI/Views/SampleDesigner/images/ParaCrystal1D.png b/GUI/View/SampleDesigner/images/ParaCrystal1D.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ParaCrystal1D.png
rename to GUI/View/SampleDesigner/images/ParaCrystal1D.png
diff --git a/GUI/Views/SampleDesigner/images/ParaCrystal2D.png b/GUI/View/SampleDesigner/images/ParaCrystal2D.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ParaCrystal2D.png
rename to GUI/View/SampleDesigner/images/ParaCrystal2D.png
diff --git a/GUI/Views/SampleDesigner/images/ParticleComposition_64x64.png b/GUI/View/SampleDesigner/images/ParticleComposition_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ParticleComposition_64x64.png
rename to GUI/View/SampleDesigner/images/ParticleComposition_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ParticleCoreShell_64x64.png b/GUI/View/SampleDesigner/images/ParticleCoreShell_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ParticleCoreShell_64x64.png
rename to GUI/View/SampleDesigner/images/ParticleCoreShell_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ParticleDistribution_64x64.png b/GUI/View/SampleDesigner/images/ParticleDistribution_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ParticleDistribution_64x64.png
rename to GUI/View/SampleDesigner/images/ParticleDistribution_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ParticleLayout.png b/GUI/View/SampleDesigner/images/ParticleLayout.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ParticleLayout.png
rename to GUI/View/SampleDesigner/images/ParticleLayout.png
diff --git a/GUI/Views/SampleDesigner/images/Transformation.png b/GUI/View/SampleDesigner/images/Transformation.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/Transformation.png
rename to GUI/View/SampleDesigner/images/Transformation.png
diff --git a/GUI/Views/SampleDesigner/images/alpha-m-box.svg b/GUI/View/SampleDesigner/images/alpha-m-box.svg
similarity index 100%
rename from GUI/Views/SampleDesigner/images/alpha-m-box.svg
rename to GUI/View/SampleDesigner/images/alpha-m-box.svg
diff --git a/GUI/Views/SampleDesigner/images/arrow-top-left.svg b/GUI/View/SampleDesigner/images/arrow-top-left.svg
similarity index 100%
rename from GUI/Views/SampleDesigner/images/arrow-top-left.svg
rename to GUI/View/SampleDesigner/images/arrow-top-left.svg
diff --git a/GUI/Views/SampleDesigner/images/camera-metering-center.svg b/GUI/View/SampleDesigner/images/camera-metering-center.svg
similarity index 100%
rename from GUI/Views/SampleDesigner/images/camera-metering-center.svg
rename to GUI/View/SampleDesigner/images/camera-metering-center.svg
diff --git a/GUI/Views/SampleDesigner/images/delete.svg b/GUI/View/SampleDesigner/images/delete.svg
similarity index 100%
rename from GUI/Views/SampleDesigner/images/delete.svg
rename to GUI/View/SampleDesigner/images/delete.svg
diff --git a/GUI/Views/SampleDesigner/images/ff_AnisoPyramid_64x64.png b/GUI/View/SampleDesigner/images/ff_AnisoPyramid_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_AnisoPyramid_64x64.png
rename to GUI/View/SampleDesigner/images/ff_AnisoPyramid_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_Box_64x64.png b/GUI/View/SampleDesigner/images/ff_Box_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_Box_64x64.png
rename to GUI/View/SampleDesigner/images/ff_Box_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_Cone6_64x64.png b/GUI/View/SampleDesigner/images/ff_Cone6_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_Cone6_64x64.png
rename to GUI/View/SampleDesigner/images/ff_Cone6_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_Cone_64x64.png b/GUI/View/SampleDesigner/images/ff_Cone_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_Cone_64x64.png
rename to GUI/View/SampleDesigner/images/ff_Cone_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_CosineRipple_64x64.png b/GUI/View/SampleDesigner/images/ff_CosineRipple_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_CosineRipple_64x64.png
rename to GUI/View/SampleDesigner/images/ff_CosineRipple_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_Cuboctahedron_64x64.png b/GUI/View/SampleDesigner/images/ff_Cuboctahedron_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_Cuboctahedron_64x64.png
rename to GUI/View/SampleDesigner/images/ff_Cuboctahedron_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_Cylinder_64x64.png b/GUI/View/SampleDesigner/images/ff_Cylinder_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_Cylinder_64x64.png
rename to GUI/View/SampleDesigner/images/ff_Cylinder_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_Dodecahedron_64x64.png b/GUI/View/SampleDesigner/images/ff_Dodecahedron_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_Dodecahedron_64x64.png
rename to GUI/View/SampleDesigner/images/ff_Dodecahedron_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_EllipsoidalCylinder_64x64.png b/GUI/View/SampleDesigner/images/ff_EllipsoidalCylinder_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_EllipsoidalCylinder_64x64.png
rename to GUI/View/SampleDesigner/images/ff_EllipsoidalCylinder_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_FullSphere_64x64.png b/GUI/View/SampleDesigner/images/ff_FullSphere_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_FullSphere_64x64.png
rename to GUI/View/SampleDesigner/images/ff_FullSphere_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_FullSpheroid_64x64.png b/GUI/View/SampleDesigner/images/ff_FullSpheroid_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_FullSpheroid_64x64.png
rename to GUI/View/SampleDesigner/images/ff_FullSpheroid_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_HemiEllipsoid_64x64.png b/GUI/View/SampleDesigner/images/ff_HemiEllipsoid_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_HemiEllipsoid_64x64.png
rename to GUI/View/SampleDesigner/images/ff_HemiEllipsoid_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_Icosahedron_64x64.png b/GUI/View/SampleDesigner/images/ff_Icosahedron_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_Icosahedron_64x64.png
rename to GUI/View/SampleDesigner/images/ff_Icosahedron_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_Prism3_64x64.png b/GUI/View/SampleDesigner/images/ff_Prism3_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_Prism3_64x64.png
rename to GUI/View/SampleDesigner/images/ff_Prism3_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_Prism6_64x64.png b/GUI/View/SampleDesigner/images/ff_Prism6_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_Prism6_64x64.png
rename to GUI/View/SampleDesigner/images/ff_Prism6_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_Pyramid_64x64.png b/GUI/View/SampleDesigner/images/ff_Pyramid_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_Pyramid_64x64.png
rename to GUI/View/SampleDesigner/images/ff_Pyramid_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_SawtoothRipple_64x64.png b/GUI/View/SampleDesigner/images/ff_SawtoothRipple_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_SawtoothRipple_64x64.png
rename to GUI/View/SampleDesigner/images/ff_SawtoothRipple_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_Tetrahedron_64x64.png b/GUI/View/SampleDesigner/images/ff_Tetrahedron_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_Tetrahedron_64x64.png
rename to GUI/View/SampleDesigner/images/ff_Tetrahedron_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_TruncatedCube_64x64.png b/GUI/View/SampleDesigner/images/ff_TruncatedCube_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_TruncatedCube_64x64.png
rename to GUI/View/SampleDesigner/images/ff_TruncatedCube_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_TruncatedSphere_64x64.png b/GUI/View/SampleDesigner/images/ff_TruncatedSphere_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_TruncatedSphere_64x64.png
rename to GUI/View/SampleDesigner/images/ff_TruncatedSphere_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/ff_TruncatedSpheroid_64x64.png b/GUI/View/SampleDesigner/images/ff_TruncatedSpheroid_64x64.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/ff_TruncatedSpheroid_64x64.png
rename to GUI/View/SampleDesigner/images/ff_TruncatedSpheroid_64x64.png
diff --git a/GUI/Views/SampleDesigner/images/hand-right.svg b/GUI/View/SampleDesigner/images/hand-right.svg
similarity index 100%
rename from GUI/Views/SampleDesigner/images/hand-right.svg
rename to GUI/View/SampleDesigner/images/hand-right.svg
diff --git a/GUI/Views/SampleDesigner/images/rotate-3d.svg b/GUI/View/SampleDesigner/images/rotate-3d.svg
similarity index 100%
rename from GUI/Views/SampleDesigner/images/rotate-3d.svg
rename to GUI/View/SampleDesigner/images/rotate-3d.svg
diff --git a/GUI/Views/SampleDesigner/images/sample_layers2.png b/GUI/View/SampleDesigner/images/sample_layers2.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/sample_layers2.png
rename to GUI/View/SampleDesigner/images/sample_layers2.png
diff --git a/GUI/Views/SampleDesigner/images/sample_layers3.png b/GUI/View/SampleDesigner/images/sample_layers3.png
similarity index 100%
rename from GUI/Views/SampleDesigner/images/sample_layers3.png
rename to GUI/View/SampleDesigner/images/sample_layers3.png
diff --git a/GUI/Views/SimulationWidgets/PythonScriptWidget.cpp b/GUI/View/Script/PythonScriptWidget.cpp
similarity index 90%
rename from GUI/Views/SimulationWidgets/PythonScriptWidget.cpp
rename to GUI/View/Script/PythonScriptWidget.cpp
index d167cc9919b458976fa570aa8236c8d5b853e480..30cd453f3201bcbcc01e8328afc54d5c8dab3a19 100644
--- a/GUI/Views/SimulationWidgets/PythonScriptWidget.cpp
+++ b/GUI/View/Script/PythonScriptWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SimulationWidgets/PythonScriptWidget.cpp
+//! @file      GUI/View/Script/PythonScriptWidget.cpp
 //! @brief     Implements class PythonScriptWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,16 +12,16 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SimulationWidgets/PythonScriptWidget.h"
+#include "GUI/View/Script/PythonScriptWidget.h"
 #include "Core/Export/ExportToPython.h"
 #include "Core/Simulation/GISASSimulation.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/DomainSimulationBuilder.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
-#include "GUI/Views/CommonWidgets/StyledToolBar.h"
-#include "GUI/Views/InfoWidgets/PythonSyntaxHighlighter.h"
-#include "GUI/Views/InfoWidgets/CautionSign.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Domain/DomainSimulationBuilder.h"
+#include "GUI/View/Common/StyledToolBar.h"
+#include "GUI/View/Info/CautionSign.h"
+#include "GUI/View/Info/PythonSyntaxHighlighter.h"
+#include "GUI/View/Tool/DesignerHelper.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QFileDialog>
 #include <QMessageBox>
 #include <QPushButton>
@@ -71,7 +71,7 @@ PythonScriptWidget::PythonScriptWidget(QWidget* parent)
     setLayout(mainLayout);
 
     setAttribute(Qt::WA_DeleteOnClose, true);
-    GUI::Utils::Style::setResizable(this);
+    GUI::Util::Style::setResizable(this);
     baApp->settings().loadWindowSizeAndPos(this);
 }
 
diff --git a/GUI/Views/SimulationWidgets/PythonScriptWidget.h b/GUI/View/Script/PythonScriptWidget.h
similarity index 83%
rename from GUI/Views/SimulationWidgets/PythonScriptWidget.h
rename to GUI/View/Script/PythonScriptWidget.h
index 08d11e6a86aea1e8ad659ad6628c878fbd5b4d5c..17e38493dbd8cd4e6ec1e4961884eb9265c89b6b 100644
--- a/GUI/Views/SimulationWidgets/PythonScriptWidget.h
+++ b/GUI/View/Script/PythonScriptWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SimulationWidgets/PythonScriptWidget.h
+//! @file      GUI/View/Script/PythonScriptWidget.h
 //! @brief     Defines class PythonScriptWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SIMULATIONWIDGETS_PYTHONSCRIPTWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_SIMULATIONWIDGETS_PYTHONSCRIPTWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_SCRIPT_PYTHONSCRIPTWIDGET_H
+#define BORNAGAIN_GUI_VIEW_SCRIPT_PYTHONSCRIPTWIDGET_H
 
 #include <QDialog>
 
@@ -47,4 +47,4 @@ private:
     QString m_outputDir;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SIMULATIONWIDGETS_PYTHONSCRIPTWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_SCRIPT_PYTHONSCRIPTWIDGET_H
diff --git a/GUI/Views/SpecularDataWidgets/Plot1DCanvas.cpp b/GUI/View/SpecularData/Plot1DCanvas.cpp
similarity index 84%
rename from GUI/Views/SpecularDataWidgets/Plot1DCanvas.cpp
rename to GUI/View/SpecularData/Plot1DCanvas.cpp
index 062dcc36eca1f5c59b6e054233738987e8630217..70e06d8d8c560711489ae21c071a50fc5a682a53 100644
--- a/GUI/Views/SpecularDataWidgets/Plot1DCanvas.cpp
+++ b/GUI/View/SpecularData/Plot1DCanvas.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/Plot1DCanvas.cpp
+//! @file      GUI/View/SpecularData/Plot1DCanvas.cpp
 //! @brief     Implements class Plot1DCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SpecularDataWidgets/Plot1DCanvas.h"
-#include "GUI/Views/IntensityDataWidgets/FontScalingEvent.h"
-#include "GUI/Views/IntensityDataWidgets/Plot1D.h"
-#include "GUI/Views/IntensityDataWidgets/PlotStatusLabel.h"
+#include "GUI/View/SpecularData/Plot1DCanvas.h"
+#include "GUI/View/Intensity/FontScalingEvent.h"
+#include "GUI/View/Intensity/Plot1D.h"
+#include "GUI/View/Intensity/PlotStatusLabel.h"
 #include <QVBoxLayout>
 
 Plot1DCanvas::Plot1DCanvas(QWidget* parent)
diff --git a/GUI/Views/SpecularDataWidgets/Plot1DCanvas.h b/GUI/View/SpecularData/Plot1DCanvas.h
similarity index 80%
rename from GUI/Views/SpecularDataWidgets/Plot1DCanvas.h
rename to GUI/View/SpecularData/Plot1DCanvas.h
index b5dddacf64920efe4e9d74329ebaacf451f55df5..f4ddd0b7f1102c08ce4a1f076c06d60cadb548a4 100644
--- a/GUI/Views/SpecularDataWidgets/Plot1DCanvas.h
+++ b/GUI/View/SpecularData/Plot1DCanvas.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/Plot1DCanvas.h
+//! @file      GUI/View/SpecularData/Plot1DCanvas.h
 //! @brief     Defines class Plot1DCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_PLOT1DCANVAS_H
-#define BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_PLOT1DCANVAS_H
+#ifndef BORNAGAIN_GUI_VIEW_SPECULARDATA_PLOT1DCANVAS_H
+#define BORNAGAIN_GUI_VIEW_SPECULARDATA_PLOT1DCANVAS_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 
 class FontScalingEvent;
 class PlotStatusLabel;
@@ -48,4 +48,4 @@ private:
     PlotStatusLabel* m_statusLabel;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_PLOT1DCANVAS_H
+#endif // BORNAGAIN_GUI_VIEW_SPECULARDATA_PLOT1DCANVAS_H
diff --git a/GUI/Views/SpecularDataWidgets/SpecularDataCanvas.cpp b/GUI/View/SpecularData/SpecularDataCanvas.cpp
similarity index 85%
rename from GUI/Views/SpecularDataWidgets/SpecularDataCanvas.cpp
rename to GUI/View/SpecularData/SpecularDataCanvas.cpp
index 6fef3db395eb564bddb7a4b88884aaa0ff4adc35..1f1407298c40b210cbcfcc9dbd78083548895533 100644
--- a/GUI/Views/SpecularDataWidgets/SpecularDataCanvas.cpp
+++ b/GUI/View/SpecularData/SpecularDataCanvas.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/SpecularDataCanvas.cpp
+//! @file      GUI/View/SpecularData/SpecularDataCanvas.cpp
 //! @brief     Implements class SpecularDataCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SpecularDataWidgets/SpecularDataCanvas.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/Views/IntensityDataWidgets/SavePlotAssistant.h"
-#include "GUI/Views/SpecularDataWidgets/SpecularPlotCanvas.h"
-#include "GUI/mainwindow/projectmanager.h"
+#include "GUI/View/SpecularData/SpecularDataCanvas.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/View/Intensity/SavePlotAssistant.h"
+#include "GUI/View/SpecularData/SpecularPlotCanvas.h"
 #include <qcustomplot.h>
 
 SpecularDataCanvas::SpecularDataCanvas(QWidget* parent)
@@ -83,10 +83,8 @@ void SpecularDataCanvas::onResetViewAction()
 
 void SpecularDataCanvas::onSavePlotAction()
 {
-    QString dirname = ProjectManager::instance()->userExportDir();
-    SavePlotAssistant saveAssistant;
-    saveAssistant.savePlot(dirname, m_plot_canvas->customPlot(),
-                           specularDataItem()->getOutputData());
+    QString dirname = gSessionData->projectDocument->userExportDir();
+    GUI::Plot::savePlot(dirname, m_plot_canvas->customPlot(), specularDataItem()->getOutputData());
 }
 
 void SpecularDataCanvas::onMousePress(QMouseEvent* event)
diff --git a/GUI/Views/SpecularDataWidgets/SpecularDataCanvas.h b/GUI/View/SpecularData/SpecularDataCanvas.h
similarity index 83%
rename from GUI/Views/SpecularDataWidgets/SpecularDataCanvas.h
rename to GUI/View/SpecularData/SpecularDataCanvas.h
index 78be99e8bcf4b0aa497be3652279b9d4f1ca6fd7..e1bd5427d66888678a301af47eae7f3deff05e5a 100644
--- a/GUI/Views/SpecularDataWidgets/SpecularDataCanvas.h
+++ b/GUI/View/SpecularData/SpecularDataCanvas.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/SpecularDataCanvas.h
+//! @file      GUI/View/SpecularData/SpecularDataCanvas.h
 //! @brief     Defines class SpecularDataCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARDATACANVAS_H
-#define BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARDATACANVAS_H
+#ifndef BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARDATACANVAS_H
+#define BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARDATACANVAS_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 #include <QWidget>
 
 class SpecularDataItem;
@@ -57,4 +57,4 @@ private:
     QAction* m_save_plot_action;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARDATACANVAS_H
+#endif // BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARDATACANVAS_H
diff --git a/GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.cpp b/GUI/View/SpecularData/SpecularDataImportWidget.cpp
similarity index 95%
rename from GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.cpp
rename to GUI/View/SpecularData/SpecularDataImportWidget.cpp
index 567b66cf33eaaf90dd63ef31cdb2ea84ae976c1c..146a87a3a4073c1c65fd4566d66f397ec1217d5e 100644
--- a/GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.cpp
+++ b/GUI/View/SpecularData/SpecularDataImportWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.cpp
+//! @file      GUI/View/SpecularData/SpecularDataImportWidget.cpp
 //! @brief     Implements class SpecularDataImportWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,15 +12,14 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.h"
-#include "GUI/DataLoaders/DataLoaderUtil.h"
-#include "GUI/Models/AbstractDataLoaderResultModel.h"
-#include "GUI/Models/DataItemUtils.h"
-#include "GUI/Models/DataLoaders1D.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/mainwindow/mainwindow.h"
+#include "GUI/View/SpecularData/SpecularDataImportWidget.h"
+#include "GUI/Model/Data/DataItemUtils.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/IO/AbstractDataLoaderResultModel.h"
+#include "GUI/Model/IO/DataLoaders1D.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/View/Loaders/DataLoaderUtil.h"
 #include "ui_SpecularDataImportWidget.h"
 #include <QAction>
 #include <QBoxLayout>
@@ -199,7 +198,7 @@ void SpecularDataImportWidget::onFormatSelectionChanged()
         QSignalBlocker b(m_ui->formatSelectionComboBox);
         m_ui->formatSelectionComboBox->setCurrentText(m_loader->name());
 
-        QMessageBox::information(MainWindow::instance(), "Information",
+        QMessageBox::information(parentWidget(), "Information",
                                  "Changing the loader is not possible because the original file "
                                  "contents are not available any more.");
 
diff --git a/GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.h b/GUI/View/SpecularData/SpecularDataImportWidget.h
similarity index 83%
rename from GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.h
rename to GUI/View/SpecularData/SpecularDataImportWidget.h
index fd1074638be654175dad8603616544f322a7bd97..1b72873c7bdf11a42e07afc23e49393fc8bb2e9b 100644
--- a/GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.h
+++ b/GUI/View/SpecularData/SpecularDataImportWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.h
+//! @file      GUI/View/SpecularData/SpecularDataImportWidget.h
 //! @brief     Defines class SpecularDataImportWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARDATAIMPORTWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARDATAIMPORTWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARDATAIMPORTWIDGET_H
+#define BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARDATAIMPORTWIDGET_H
 
-#include "GUI/Models/AbstractDataLoader1D.h"
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/Model/IO/AbstractDataLoader1D.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 #include "qcustomplot.h"
 #include <memory>
 
@@ -65,4 +65,4 @@ private:
     AbstractDataLoader1D* m_loader; // only borrowed from realDataItem. Do not delete!
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARDATAIMPORTWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARDATAIMPORTWIDGET_H
diff --git a/GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.ui b/GUI/View/SpecularData/SpecularDataImportWidget.ui
similarity index 95%
rename from GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.ui
rename to GUI/View/SpecularData/SpecularDataImportWidget.ui
index 6aba9cc673474eaf5fbb6fdf3f36109141e5ad6f..98ae03ac99071a445ef32e5c3b3546f6f2fd91df 100644
--- a/GUI/Views/SpecularDataWidgets/SpecularDataImportWidget.ui
+++ b/GUI/View/SpecularData/SpecularDataImportWidget.ui
@@ -1,309 +1,309 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>SpecularDataImportWidget</class>
- <widget class="QWidget" name="SpecularDataImportWidget">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>861</width>
-    <height>580</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout_2">
-   <item>
-    <widget class="QSplitter" name="splitter">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="childrenCollapsible">
-      <bool>false</bool>
-     </property>
-     <widget class="QWidget" name="layoutWidget">
-      <layout class="QVBoxLayout" name="verticalLayout">
-       <property name="spacing">
-        <number>20</number>
-       </property>
-       <item>
-        <widget class="QGroupBox" name="propertiesGroupBox">
-         <property name="title">
-          <string>Import settings</string>
-         </property>
-         <layout class="QVBoxLayout" name="verticalLayout_4">
-          <item>
-           <layout class="QHBoxLayout" name="horizontalLayout_3">
-            <item>
-             <layout class="QFormLayout" name="formLayout">
-              <item row="1" column="0">
-               <widget class="QLabel" name="label_2">
-                <property name="text">
-                 <string>Format:</string>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="1">
-               <widget class="QComboBox" name="formatSelectionComboBox">
-                <item>
-                 <property name="text">
-                  <string>ESS - Exported from instrument X</string>
-                 </property>
-                </item>
-                <item>
-                 <property name="text">
-                  <string>ESS - ESTIA export</string>
-                 </property>
-                </item>
-                <item>
-                 <property name="text">
-                  <string>FRM II REFSANS exported file</string>
-                 </property>
-                </item>
-                <item>
-                 <property name="text">
-                  <string>FMR II NREX exported file</string>
-                 </property>
-                </item>
-                <item>
-                 <property name="text">
-                  <string>My import definitions 1</string>
-                 </property>
-                </item>
-                <item>
-                 <property name="text">
-                  <string>Import definitions for project A</string>
-                 </property>
-                </item>
-               </widget>
-              </item>
-             </layout>
-            </item>
-           </layout>
-          </item>
-          <item>
-           <widget class="QWidget" name="propertiesWidget" native="true">
-            <layout class="QVBoxLayout" name="verticalLayout_8">
-             <item>
-              <layout class="QHBoxLayout" name="horizontalLayout_5">
-               <item>
-                <widget class="QLabel" name="label_4">
-                 <property name="text">
-                  <string>&lt;PlaceHolder-Widget---will be removed at runtime&gt;</string>
-                 </property>
-                </widget>
-               </item>
-               <item>
-                <spacer name="horizontalSpacer_4">
-                 <property name="orientation">
-                  <enum>Qt::Horizontal</enum>
-                 </property>
-                 <property name="sizeHint" stdset="0">
-                  <size>
-                   <width>40</width>
-                   <height>20</height>
-                  </size>
-                 </property>
-                </spacer>
-               </item>
-              </layout>
-             </item>
-            </layout>
-           </widget>
-          </item>
-          <item>
-           <layout class="QHBoxLayout" name="horizontalLayout_2">
-            <item>
-             <spacer name="horizontalSpacer">
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>40</width>
-                <height>20</height>
-               </size>
-              </property>
-             </spacer>
-            </item>
-            <item>
-             <widget class="QPushButton" name="createNewFormatButton">
-              <property name="text">
-               <string>Save settings as new format...</string>
-              </property>
-             </widget>
-            </item>
-           </layout>
-          </item>
-         </layout>
-        </widget>
-       </item>
-       <item>
-        <layout class="QVBoxLayout" name="verticalLayout_6">
-         <property name="spacing">
-          <number>5</number>
-         </property>
-         <property name="sizeConstraint">
-          <enum>QLayout::SetDefaultConstraint</enum>
-         </property>
-         <item>
-          <layout class="QHBoxLayout" name="horizontalLayout_4">
-           <item>
-            <widget class="QLabel" name="warningsIcon">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string>(RT)</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QLabel" name="warningsLabel">
-             <property name="sizePolicy">
-              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-               <horstretch>0</horstretch>
-               <verstretch>0</verstretch>
-              </sizepolicy>
-             </property>
-             <property name="text">
-              <string>The file import issued warnings:</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <spacer name="horizontalSpacer_2">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>40</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <widget class="QListWidget" name="warningsListWidget"/>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <widget class="QGroupBox" name="linkedInstrumentGroup">
-         <property name="title">
-          <string>Linked instrument</string>
-         </property>
-         <layout class="QFormLayout" name="formLayout_2">
-          <item row="0" column="0">
-           <widget class="QComboBox" name="linkedInstrumentComboBox">
-            <item>
-             <property name="text">
-              <string>Undefined</string>
-             </property>
-            </item>
-           </widget>
-          </item>
-         </layout>
-        </widget>
-       </item>
-       <item>
-        <spacer name="verticalSpacer">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>40</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QTabWidget" name="tabWidget">
-      <property name="currentIndex">
-       <number>0</number>
-      </property>
-      <widget class="QWidget" name="tab_4">
-       <attribute name="title">
-        <string>Data</string>
-       </attribute>
-       <layout class="QVBoxLayout" name="verticalLayout_5">
-        <item>
-         <widget class="QCheckBox" name="originalRowCheckBox">
-          <property name="text">
-           <string>Show file content</string>
-          </property>
-          <property name="checked">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QCheckBox" name="rawDataCheckBox">
-          <property name="text">
-           <string>Show raw data</string>
-          </property>
-          <property name="checked">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QCheckBox" name="calculatedDataCheckBox">
-          <property name="text">
-           <string>Show resulting data</string>
-          </property>
-          <property name="checked">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QTableView" name="dataResultView"/>
-        </item>
-       </layout>
-      </widget>
-      <widget class="QWidget" name="tab_2">
-       <attribute name="title">
-        <string>Graph</string>
-       </attribute>
-       <layout class="QVBoxLayout" name="verticalLayout_3">
-        <item>
-         <widget class="StyledToolBar" name="plotToolBar" native="true"/>
-        </item>
-        <item>
-         <widget class="SpecularDataCanvas" name="specularDataCanvas" native="true"/>
-        </item>
-       </layout>
-      </widget>
-     </widget>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>SpecularDataCanvas</class>
-   <extends>QWidget</extends>
-   <header location="global">GUI/Views/SpecularDataWidgets/SpecularDataCanvas.h</header>
-   <container>1</container>
-  </customwidget>
-  <customwidget>
-   <class>StyledToolBar</class>
-   <extends>QWidget</extends>
-   <header>GUI/Views/CommonWidgets/StyledToolBar.h</header>
-   <container>1</container>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SpecularDataImportWidget</class>
+ <widget class="QWidget" name="SpecularDataImportWidget">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>861</width>
+    <height>580</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_2">
+   <item>
+    <widget class="QSplitter" name="splitter">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="childrenCollapsible">
+      <bool>false</bool>
+     </property>
+     <widget class="QWidget" name="layoutWidget">
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <property name="spacing">
+        <number>20</number>
+       </property>
+       <item>
+        <widget class="QGroupBox" name="propertiesGroupBox">
+         <property name="title">
+          <string>Import settings</string>
+         </property>
+         <layout class="QVBoxLayout" name="verticalLayout_4">
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout_3">
+            <item>
+             <layout class="QFormLayout" name="formLayout">
+              <item row="1" column="0">
+               <widget class="QLabel" name="label_2">
+                <property name="text">
+                 <string>Format:</string>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="1">
+               <widget class="QComboBox" name="formatSelectionComboBox">
+                <item>
+                 <property name="text">
+                  <string>ESS - Exported from instrument X</string>
+                 </property>
+                </item>
+                <item>
+                 <property name="text">
+                  <string>ESS - ESTIA export</string>
+                 </property>
+                </item>
+                <item>
+                 <property name="text">
+                  <string>FRM II REFSANS exported file</string>
+                 </property>
+                </item>
+                <item>
+                 <property name="text">
+                  <string>FMR II NREX exported file</string>
+                 </property>
+                </item>
+                <item>
+                 <property name="text">
+                  <string>My import definitions 1</string>
+                 </property>
+                </item>
+                <item>
+                 <property name="text">
+                  <string>Import definitions for project A</string>
+                 </property>
+                </item>
+               </widget>
+              </item>
+             </layout>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <widget class="QWidget" name="propertiesWidget" native="true">
+            <layout class="QVBoxLayout" name="verticalLayout_8">
+             <item>
+              <layout class="QHBoxLayout" name="horizontalLayout_5">
+               <item>
+                <widget class="QLabel" name="label_4">
+                 <property name="text">
+                  <string>&lt;PlaceHolder-Widget---will be removed at runtime&gt;</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <spacer name="horizontalSpacer_4">
+                 <property name="orientation">
+                  <enum>Qt::Horizontal</enum>
+                 </property>
+                 <property name="sizeHint" stdset="0">
+                  <size>
+                   <width>40</width>
+                   <height>20</height>
+                  </size>
+                 </property>
+                </spacer>
+               </item>
+              </layout>
+             </item>
+            </layout>
+           </widget>
+          </item>
+          <item>
+           <layout class="QHBoxLayout" name="horizontalLayout_2">
+            <item>
+             <spacer name="horizontalSpacer">
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>40</width>
+                <height>20</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+            <item>
+             <widget class="QPushButton" name="createNewFormatButton">
+              <property name="text">
+               <string>Save settings as new format...</string>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <layout class="QVBoxLayout" name="verticalLayout_6">
+         <property name="spacing">
+          <number>5</number>
+         </property>
+         <property name="sizeConstraint">
+          <enum>QLayout::SetDefaultConstraint</enum>
+         </property>
+         <item>
+          <layout class="QHBoxLayout" name="horizontalLayout_4">
+           <item>
+            <widget class="QLabel" name="warningsIcon">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string>(RT)</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <widget class="QLabel" name="warningsLabel">
+             <property name="sizePolicy">
+              <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+               <horstretch>0</horstretch>
+               <verstretch>0</verstretch>
+              </sizepolicy>
+             </property>
+             <property name="text">
+              <string>The file import issued warnings:</string>
+             </property>
+            </widget>
+           </item>
+           <item>
+            <spacer name="horizontalSpacer_2">
+             <property name="orientation">
+              <enum>Qt::Horizontal</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>40</width>
+               <height>20</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </item>
+         <item>
+          <widget class="QListWidget" name="warningsListWidget"/>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <widget class="QGroupBox" name="linkedInstrumentGroup">
+         <property name="title">
+          <string>Linked instrument</string>
+         </property>
+         <layout class="QFormLayout" name="formLayout_2">
+          <item row="0" column="0">
+           <widget class="QComboBox" name="linkedInstrumentComboBox">
+            <item>
+             <property name="text">
+              <string>Undefined</string>
+             </property>
+            </item>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QTabWidget" name="tabWidget">
+      <property name="currentIndex">
+       <number>0</number>
+      </property>
+      <widget class="QWidget" name="tab_4">
+       <attribute name="title">
+        <string>Data</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_5">
+        <item>
+         <widget class="QCheckBox" name="originalRowCheckBox">
+          <property name="text">
+           <string>Show file content</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="rawDataCheckBox">
+          <property name="text">
+           <string>Show raw data</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QCheckBox" name="calculatedDataCheckBox">
+          <property name="text">
+           <string>Show resulting data</string>
+          </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QTableView" name="dataResultView"/>
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tab_2">
+       <attribute name="title">
+        <string>Graph</string>
+       </attribute>
+       <layout class="QVBoxLayout" name="verticalLayout_3">
+        <item>
+         <widget class="StyledToolBar" name="plotToolBar" native="true"/>
+        </item>
+        <item>
+         <widget class="SpecularDataCanvas" name="specularDataCanvas" native="true"/>
+        </item>
+       </layout>
+      </widget>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>SpecularDataCanvas</class>
+   <extends>QWidget</extends>
+   <header location="global">GUI/View/SpecularData/SpecularDataCanvas.h</header>
+   <container>1</container>
+  </customwidget>
+  <customwidget>
+   <class>StyledToolBar</class>
+   <extends>QWidget</extends>
+   <header>GUI/View/Common/StyledToolBar.h</header>
+   <container>1</container>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/GUI/Views/SpecularDataWidgets/SpecularDataWidget.cpp b/GUI/View/SpecularData/SpecularDataWidget.cpp
similarity index 85%
rename from GUI/Views/SpecularDataWidgets/SpecularDataWidget.cpp
rename to GUI/View/SpecularData/SpecularDataWidget.cpp
index 67ed274b7e21cfd17d2c914c2e53dc2db8c39b89..30ef29496f7ade18309ba97a4a179b1509097dc8 100644
--- a/GUI/Views/SpecularDataWidgets/SpecularDataWidget.cpp
+++ b/GUI/View/SpecularData/SpecularDataWidget.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/SpecularDataWidget.cpp
+//! @file      GUI/View/SpecularData/SpecularDataWidget.cpp
 //! @brief     Implements class SpecularDataWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SpecularDataWidgets/SpecularDataWidget.h"
-#include "GUI/Models/DataItemUtils.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/Views/IntensityDataWidgets/IntensityDataPropertyWidget.h"
-#include "GUI/Views/SpecularDataWidgets/SpecularDataCanvas.h"
+#include "GUI/View/SpecularData/SpecularDataWidget.h"
+#include "GUI/Model/Data/DataItemUtils.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/View/Intensity/IntensityDataPropertyWidget.h"
+#include "GUI/View/SpecularData/SpecularDataCanvas.h"
 #include <QBoxLayout>
 #include <QMenu>
 
diff --git a/GUI/Views/SpecularDataWidgets/SpecularDataWidget.h b/GUI/View/SpecularData/SpecularDataWidget.h
similarity index 76%
rename from GUI/Views/SpecularDataWidgets/SpecularDataWidget.h
rename to GUI/View/SpecularData/SpecularDataWidget.h
index 580c34374e6d5f750dbd12718fffd22f19cc88aa..76a15cf85b2ddecad3ee1f599b62cd496860c9f8 100644
--- a/GUI/Views/SpecularDataWidgets/SpecularDataWidget.h
+++ b/GUI/View/SpecularData/SpecularDataWidget.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/SpecularDataWidget.h
+//! @file      GUI/View/SpecularData/SpecularDataWidget.h
 //! @brief     Defines class SpecularDataWidget
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARDATAWIDGET_H
-#define BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARDATAWIDGET_H
+#ifndef BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARDATAWIDGET_H
+#define BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARDATAWIDGET_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 
 class SpecularDataCanvas;
 class SpecularDataItem;
@@ -41,4 +41,4 @@ private:
     IntensityDataPropertyWidget* m_property_widget;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARDATAWIDGET_H
+#endif // BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARDATAWIDGET_H
diff --git a/GUI/Views/SpecularDataWidgets/SpecularPlot.cpp b/GUI/View/SpecularData/SpecularPlot.cpp
similarity index 95%
rename from GUI/Views/SpecularDataWidgets/SpecularPlot.cpp
rename to GUI/View/SpecularData/SpecularPlot.cpp
index 3b09620a0494750753d91ad691d05d30b4cc4c58..32881fbf78397299a717edfc547795feba8dbeeb 100644
--- a/GUI/Views/SpecularDataWidgets/SpecularPlot.cpp
+++ b/GUI/View/SpecularData/SpecularPlot.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/SpecularPlot.cpp
+//! @file      GUI/View/SpecularData/SpecularPlot.cpp
 //! @brief     Implements class SpecularPlot
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,13 +12,13 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SpecularDataWidgets/SpecularPlot.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/Views/CommonWidgets/UpdateTimer.h"
-#include "GUI/Views/IntensityDataWidgets/ColorMapUtils.h"
-#include "GUI/Views/IntensityDataWidgets/PlotEventInfo.h"
-#include "GUI/Views/IntensityDataWidgets/plot_constants.h"
+#include "GUI/View/SpecularData/SpecularPlot.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/View/Intensity/ColorMapUtils.h"
+#include "GUI/View/Intensity/PlotConstants.h"
+#include "GUI/View/Intensity/PlotEventInfo.h"
+#include "GUI/View/Tool/UpdateTimer.h"
 
 namespace {
 const int replot_update_interval = 10;
diff --git a/GUI/Views/SpecularDataWidgets/SpecularPlot.h b/GUI/View/SpecularData/SpecularPlot.h
similarity index 91%
rename from GUI/Views/SpecularDataWidgets/SpecularPlot.h
rename to GUI/View/SpecularData/SpecularPlot.h
index 2c4954226ffacca8352dd215fbac2deb97b83d9e..8923140ff7a28e48fcfd664b2fbfa544206e49af 100644
--- a/GUI/Views/SpecularDataWidgets/SpecularPlot.h
+++ b/GUI/View/SpecularData/SpecularPlot.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/SpecularPlot.h
+//! @file      GUI/View/SpecularData/SpecularPlot.h
 //! @brief     Defines class SpecularPlot
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARPLOT_H
-#define BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARPLOT_H
+#ifndef BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARPLOT_H
+#define BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARPLOT_H
 
-#include "GUI/Views/IntensityDataWidgets/ScientificPlot.h"
+#include "GUI/View/Intensity/ScientificPlot.h"
 #include <memory>
 #include <qcustomplot.h>
 
@@ -108,4 +108,4 @@ private:
     bool m_block_update;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARPLOT_H
+#endif // BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARPLOT_H
diff --git a/GUI/Views/SpecularDataWidgets/SpecularPlotCanvas.cpp b/GUI/View/SpecularData/SpecularPlotCanvas.cpp
similarity index 82%
rename from GUI/Views/SpecularDataWidgets/SpecularPlotCanvas.cpp
rename to GUI/View/SpecularData/SpecularPlotCanvas.cpp
index 50bf527beeaf5bf5154cce17af6266bf007c305c..7649e298e7f2b029ad1640bc541c1e3244063d69 100644
--- a/GUI/Views/SpecularDataWidgets/SpecularPlotCanvas.cpp
+++ b/GUI/View/SpecularData/SpecularPlotCanvas.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/SpecularPlotCanvas.cpp
+//! @file      GUI/View/SpecularData/SpecularPlotCanvas.cpp
 //! @brief     Declares class SpecularPlotCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SpecularDataWidgets/SpecularPlotCanvas.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/Views/IntensityDataWidgets/FontScalingEvent.h"
-#include "GUI/Views/IntensityDataWidgets/PlotStatusLabel.h"
-#include "GUI/Views/SpecularDataWidgets/SpecularPlot.h"
+#include "GUI/View/SpecularData/SpecularPlotCanvas.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/View/Intensity/FontScalingEvent.h"
+#include "GUI/View/Intensity/PlotStatusLabel.h"
+#include "GUI/View/SpecularData/SpecularPlot.h"
 #include <QVBoxLayout>
 
 SpecularPlotCanvas::SpecularPlotCanvas(QWidget* parent)
diff --git a/GUI/Views/SpecularDataWidgets/SpecularPlotCanvas.h b/GUI/View/SpecularData/SpecularPlotCanvas.h
similarity index 79%
rename from GUI/Views/SpecularDataWidgets/SpecularPlotCanvas.h
rename to GUI/View/SpecularData/SpecularPlotCanvas.h
index 8b1c36ec87742bbc5a6be830c1c44e6d97e0a7dd..f147d968bd9fc9ab119c91b3b23c0a00ca6a0bcf 100644
--- a/GUI/Views/SpecularDataWidgets/SpecularPlotCanvas.h
+++ b/GUI/View/SpecularData/SpecularPlotCanvas.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SpecularDataWidgets/SpecularPlotCanvas.h
+//! @file      GUI/View/SpecularData/SpecularPlotCanvas.h
 //! @brief     Defines class ColorMapCanvas
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARPLOTCANVAS_H
-#define BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARPLOTCANVAS_H
+#ifndef BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARPLOTCANVAS_H
+#define BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARPLOTCANVAS_H
 
-#include "GUI/Views/CommonWidgets/SessionItemWidget.h"
+#include "GUI/View/Common/SessionItemWidget.h"
 
 class FontScalingEvent;
 class PlotStatusLabel;
@@ -47,4 +47,4 @@ private:
     PlotStatusLabel* m_statusLabel;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SPECULARDATAWIDGETS_SPECULARPLOTCANVAS_H
+#endif // BORNAGAIN_GUI_VIEW_SPECULARDATA_SPECULARPLOTCANVAS_H
diff --git a/GUI/Views/CommonWidgets/DesignerHelper.cpp b/GUI/View/Tool/DesignerHelper.cpp
similarity index 92%
rename from GUI/Views/CommonWidgets/DesignerHelper.cpp
rename to GUI/View/Tool/DesignerHelper.cpp
index f603e9a0805e02d2d8218991d9e1503b4da731c3..9d299b3fce8c0f13f6d18a65d4567573a0552aad 100644
--- a/GUI/Views/CommonWidgets/DesignerHelper.cpp
+++ b/GUI/View/Tool/DesignerHelper.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/DesignerHelper.cpp
+//! @file      GUI/View/Tool/DesignerHelper.cpp
 //! @brief     Implements class DesignerHelper
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,9 +12,9 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
+#include "GUI/View/Tool/DesignerHelper.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include <QPainter>
 #include <cmath>
 #include <iostream>
@@ -200,17 +200,17 @@ QPixmap DesignerHelper::getMimePixmap(const QString& name)
 
 int DesignerHelper::getHeaderFontSize()
 {
-    return GUI::Utils::Style::SystemPointSize() * 1.5;
+    return GUI::Util::Style::SystemPointSize() * 1.5;
 }
 
 int DesignerHelper::layerWidth()
 {
-    return GUI::Utils::Style::SizeOfLetterM().width() * 18;
+    return GUI::Util::Style::SizeOfLetterM().width() * 18;
 }
 
 int DesignerHelper::layerHeight()
 {
-    return GUI::Utils::Style::SizeOfLetterM().height() * 2;
+    return GUI::Util::Style::SizeOfLetterM().height() * 2;
 }
 
 QColor DesignerHelper::getDefaultLayerColor()
@@ -255,25 +255,25 @@ QRectF DesignerHelper::getTransformationBoundingRect()
 
 QColor DesignerHelper::getDefaultMaterialColor()
 {
-    return GUI::Model::MaterialItemUtils::randomMaterialColor();
+    return GUI::MaterialUtil::randomMaterialColor();
 }
 
 int DesignerHelper::getSectionFontSize()
 {
-    return GUI::Utils::Style::SystemPointSize() * 1.2;
+    return GUI::Util::Style::SystemPointSize() * 1.2;
 }
 
 int DesignerHelper::getLabelFontSize()
 {
-    return GUI::Utils::Style::SystemPointSize() * 0.9;
+    return GUI::Util::Style::SystemPointSize() * 0.9;
 }
 
 int DesignerHelper::getPortFontSize()
 {
-    return GUI::Utils::Style::SystemPointSize() * 0.7;
+    return GUI::Util::Style::SystemPointSize() * 0.7;
 }
 
 int DesignerHelper::getPythonEditorFontSize()
 {
-    return GUI::Utils::Style::SystemPointSize();
+    return GUI::Util::Style::SystemPointSize();
 }
diff --git a/GUI/Views/CommonWidgets/DesignerHelper.h b/GUI/View/Tool/DesignerHelper.h
similarity index 91%
rename from GUI/Views/CommonWidgets/DesignerHelper.h
rename to GUI/View/Tool/DesignerHelper.h
index 5190ce878b2307a91b901556cf74270581b61695..6348e46e748eebdcb4e9093d725c610f8ac62ed1 100644
--- a/GUI/Views/CommonWidgets/DesignerHelper.h
+++ b/GUI/View/Tool/DesignerHelper.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/DesignerHelper.h
+//! @file      GUI/View/Tool/DesignerHelper.h
 //! @brief     Defines class DesignerHelper
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DESIGNERHELPER_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DESIGNERHELPER_H
+#ifndef BORNAGAIN_GUI_VIEW_TOOL_DESIGNERHELPER_H
+#define BORNAGAIN_GUI_VIEW_TOOL_DESIGNERHELPER_H
 
 #include <QColor>
 #include <QGradient>
@@ -75,4 +75,4 @@ public:
     static int getPythonEditorFontSize();
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_DESIGNERHELPER_H
+#endif // BORNAGAIN_GUI_VIEW_TOOL_DESIGNERHELPER_H
diff --git a/GUI/View/Tool/EditUtil.cpp b/GUI/View/Tool/EditUtil.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8064ff456e1beecd6aaf138b4c20aef427494db6
--- /dev/null
+++ b/GUI/View/Tool/EditUtil.cpp
@@ -0,0 +1,61 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/View/Tool/EditUtil.cpp
+//! @brief     Implements GUIHelpers functions
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2018
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#include "GUI/View/Tool/EditUtil.h"
+#include "Fit/Param/RealLimits.h"
+#include <QDoubleSpinBox>
+#include <QDoubleValidator>
+#include <QLineEdit>
+#include <cmath>
+
+namespace {
+
+//! Single step for QDoubleSpinBox.
+double singleStep(int decimals)
+{
+    // For item with decimals=3 (i.e. 0.001) single step will be 0.1
+    return 1. / std::pow(10., decimals - 1);
+}
+
+} // namespace
+
+
+void GUI::View::EditUtil::configScientificDoubleEdit(QLineEdit* edit, const RealLimits& limits)
+{
+    auto validator = new QDoubleValidator(0.0, 1e+200, 1000, edit);
+    validator->setNotation(QDoubleValidator::ScientificNotation);
+
+    const double minimum =
+        limits.hasLowerLimit() ? std::max(limits.lowerLimit(), -1e+200) : -1e+200;
+    const double maximum =
+        limits.hasUpperLimit() ? std::min(limits.upperLimit(), +1e+200) : +1e+200;
+    validator->setRange(minimum, maximum, 1000);
+
+    edit->setValidator(validator);
+}
+
+void GUI::View::EditUtil::configSpinbox(QDoubleSpinBox* spinBox, int decimals,
+                                        const RealLimits& limits)
+{
+    spinBox->setMaximum(std::numeric_limits<double>::max());
+    spinBox->setMinimum(std::numeric_limits<double>::lowest());
+
+    if (limits.hasLowerLimit())
+        spinBox->setMinimum(limits.lowerLimit());
+    if (limits.hasUpperLimit())
+        spinBox->setMaximum(static_cast<int>(limits.upperLimit()));
+
+    spinBox->setDecimals(decimals);
+    spinBox->setSingleStep(singleStep(decimals));
+}
diff --git a/GUI/View/Tool/EditUtil.h b/GUI/View/Tool/EditUtil.h
new file mode 100644
index 0000000000000000000000000000000000000000..5005143de5f12f6e1cbd2787e02485c1b5588ce8
--- /dev/null
+++ b/GUI/View/Tool/EditUtil.h
@@ -0,0 +1,32 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/View/Tool/EditUtil.h
+//! @brief     Defines class GUIHelpers functions
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2018
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#ifndef BORNAGAIN_GUI_VIEW_TOOL_EDITUTIL_H
+#define BORNAGAIN_GUI_VIEW_TOOL_EDITUTIL_H
+
+#include <QWidget>
+
+class RealLimits;
+class QDoubleSpinBox;
+class QLineEdit;
+
+namespace GUI::View::EditUtil {
+
+void configScientificDoubleEdit(QLineEdit* edit, const RealLimits& limits);
+
+void configSpinbox(QDoubleSpinBox* spinBox, int decimals, const RealLimits& limits);
+
+} // namespace GUI::View::EditUtil
+
+#endif // BORNAGAIN_GUI_VIEW_TOOL_EDITUTIL_H
diff --git a/GUI/Views/CommonWidgets/GroupBoxCollapser.cpp b/GUI/View/Tool/GroupBoxCollapser.cpp
similarity index 96%
rename from GUI/Views/CommonWidgets/GroupBoxCollapser.cpp
rename to GUI/View/Tool/GroupBoxCollapser.cpp
index 500a0e13d8a956923075d5ad8584c1288e607514..d9c28d016c26ce0e5106e016af88ff75f21c7678 100644
--- a/GUI/Views/CommonWidgets/GroupBoxCollapser.cpp
+++ b/GUI/View/Tool/GroupBoxCollapser.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/GroupBoxCollapser.cpp
+//! @file      GUI/View/Tool/GroupBoxCollapser.cpp
 //! @brief     Implements class GroupBoxCollapser
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -13,8 +13,7 @@
 //  ************************************************************************************************
 
 #include "GroupBoxCollapser.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Application/ApplicationSettings.h"
+#include "GUI/Application/GlobalSettings.h"
 #include <QAction>
 #include <QBoxLayout>
 #include <QGroupBox>
diff --git a/GUI/Views/CommonWidgets/GroupBoxCollapser.h b/GUI/View/Tool/GroupBoxCollapser.h
similarity index 90%
rename from GUI/Views/CommonWidgets/GroupBoxCollapser.h
rename to GUI/View/Tool/GroupBoxCollapser.h
index b1d62bb543ab5e04cf0ca431eebae9837ffe2942..04a36a4ea4ad70d5f852695d3ea50b6b02ea62a6 100644
--- a/GUI/Views/CommonWidgets/GroupBoxCollapser.h
+++ b/GUI/View/Tool/GroupBoxCollapser.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/GroupBoxCollapser.h
+//! @file      GUI/View/Tool/GroupBoxCollapser.h
 //! @brief     Defines class GroupBoxCollapser
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_GROUPBOXCOLLAPSER_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_GROUPBOXCOLLAPSER_H
+#ifndef BORNAGAIN_GUI_VIEW_TOOL_GROUPBOXCOLLAPSER_H
+#define BORNAGAIN_GUI_VIEW_TOOL_GROUPBOXCOLLAPSER_H
 
 #include <QObject>
 
@@ -62,4 +62,4 @@ private:
 };
 
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_GROUPBOXCOLLAPSER_H
+#endif // BORNAGAIN_GUI_VIEW_TOOL_GROUPBOXCOLLAPSER_H
diff --git a/GUI/View/Tool/ID.h b/GUI/View/Tool/ID.h
new file mode 100644
index 0000000000000000000000000000000000000000..ac636c5311fe74a770cddc4a85bbbda925f74582
--- /dev/null
+++ b/GUI/View/Tool/ID.h
@@ -0,0 +1,28 @@
+//  ************************************************************************************************
+//
+//  BornAgain: simulate and fit reflection and scattering
+//
+//! @file      GUI/View/Tool/ID.h
+//! @brief     Defines enum ViewId
+//!
+//! @homepage  http://www.bornagainproject.org
+//! @license   GNU General Public License v3 or higher (see COPYING)
+//! @copyright Forschungszentrum Jülich GmbH 2018
+//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
+//
+//  ************************************************************************************************
+
+#ifndef BORNAGAIN_GUI_VIEW_TOOL_ID_H
+#define BORNAGAIN_GUI_VIEW_TOOL_ID_H
+
+namespace GUI::ID {
+
+//! Top-level windows
+enum ViewId { WELCOME, PROJECT, INSTRUMENT, SAMPLE, IMPORT, SIMULATION, JOB, SESSIONMODEL };
+
+//! Which distributions should be available in the selector
+enum class Distributions { All, Symmetric };
+
+} // namespace GUI::ID
+
+#endif // BORNAGAIN_GUI_VIEW_TOOL_ID_H
diff --git a/GUI/Views/CommonWidgets/StyleUtils.cpp b/GUI/View/Tool/StyleUtils.cpp
similarity index 65%
rename from GUI/Views/CommonWidgets/StyleUtils.cpp
rename to GUI/View/Tool/StyleUtils.cpp
index 1f8060527d6b1850672e7a564ea66155ce0f2628..5d4d1b9132de9106566c1897cd767386271d69a5 100644
--- a/GUI/Views/CommonWidgets/StyleUtils.cpp
+++ b/GUI/View/Tool/StyleUtils.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/StyleUtils.cpp
+//! @file      GUI/View/Tool/StyleUtils.cpp
 //! @brief     Defines GUI::StyleUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,10 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/StyleUtils.h"
+#include "GUI/View/Tool/StyleUtils.h"
 #include "Base/Utils/Assert.h"
-#include "GUI/Views/CommonWidgets/DesignerHelper.h"
-#include "GUI/Views/CommonWidgets/detailswidget.h"
-#include "GUI/utils/hostosinfo.h"
+#include "GUI/Util/OSInfo.h"
+#include "GUI/View/Tool/DesignerHelper.h"
 #include <QApplication>
 #include <QBoxLayout>
 #include <QDialog>
@@ -24,16 +23,6 @@
 
 namespace {
 
-GUI::Utils::DetailsWidget* createEmptyDetailsWidget(const QString& name, bool expanded)
-{
-    auto result = new GUI::Utils::DetailsWidget;
-    result->setSummaryText(name);
-    result->setSummaryFontBold(true);
-    if (expanded)
-        result->setState(GUI::Utils::DetailsWidget::Expanded);
-    return result;
-}
-
 //! Calculates size of letter `M` for current system font settings.
 
 QSize FindSizeOfLetterM(const QWidget* widget)
@@ -58,14 +47,14 @@ QSize DefaultSizeOfLetterM()
 } // namespace
 
 
-void GUI::Utils::Style::setPropertyStyle(QTreeView* tree)
+void GUI::Util::Style::setPropertyStyle(QTreeView* tree)
 {
     ASSERT(tree);
-    tree->setStyleSheet(GUI::Utils::Style::propertyTreeStyle());
+    tree->setStyleSheet(GUI::Util::Style::propertyTreeStyle());
     tree->setAlternatingRowColors(true);
 }
 
-QString GUI::Utils::Style::propertyTreeStyle()
+QString GUI::Util::Style::propertyTreeStyle()
 {
     QString result;
 
@@ -91,7 +80,7 @@ QString GUI::Utils::Style::propertyTreeStyle()
     return result;
 }
 
-QFont GUI::Utils::Style::sectionFont(bool bold)
+QFont GUI::Util::Style::sectionFont(bool bold)
 {
     QFont result;
     result.setPointSize(DesignerHelper::getSectionFontSize());
@@ -100,7 +89,7 @@ QFont GUI::Utils::Style::sectionFont(bool bold)
     return result;
 }
 
-QFont GUI::Utils::Style::labelFont(bool bold)
+QFont GUI::Util::Style::labelFont(bool bold)
 {
     QFont result;
     result.setPointSize(DesignerHelper::getLabelFontSize());
@@ -109,42 +98,27 @@ QFont GUI::Utils::Style::labelFont(bool bold)
     return result;
 }
 
-void GUI::Utils::Style::setResizable(QDialog* dialog)
+void GUI::Util::Style::setResizable(QDialog* dialog)
 {
-    if (GUI::Utils::OS::HostOsInfo::isMacHost()) {
+    if (GUI::Util::OS::HostOsInfo::isMacHost()) {
         dialog->setWindowFlags(Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint
                                | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint
                                | Qt::Window);
     }
 }
 
-QWidget* GUI::Utils::Style::createDetailsWidget(QWidget* content, const QString& name,
-                                                bool expanded)
-{
-    auto result = createEmptyDetailsWidget(name, expanded);
-    result->setWidget(content);
-    return result;
-}
-
-QWidget* GUI::Utils::Style::createDetailsWidget(QLayout* layout, const QString& name, bool expanded)
-{
-    auto placeholder = new QWidget();
-    placeholder->setLayout(layout);
-    return createDetailsWidget(placeholder, name, expanded);
-}
-
-QSize GUI::Utils::Style::SizeOfLetterM(const QWidget* widget)
+QSize GUI::Util::Style::SizeOfLetterM(const QWidget* widget)
 {
     static QSize default_size = DefaultSizeOfLetterM();
     return widget ? FindSizeOfLetterM(widget) : default_size;
 }
 
-int GUI::Utils::Style::SystemPointSize()
+int GUI::Util::Style::SystemPointSize()
 {
     return QApplication::font().pointSize();
 }
 
-int GUI::Utils::Style::PropertyPanelWidth()
+int GUI::Util::Style::PropertyPanelWidth()
 {
     return SizeOfLetterM().width() * 16;
 }
diff --git a/GUI/Views/CommonWidgets/StyleUtils.h b/GUI/View/Tool/StyleUtils.h
similarity index 70%
rename from GUI/Views/CommonWidgets/StyleUtils.h
rename to GUI/View/Tool/StyleUtils.h
index f50e9fc18ffc3a39bfd2623c78275841318153a6..d89ff918439946691ec10cc6ba1cad473a6201c4 100644
--- a/GUI/Views/CommonWidgets/StyleUtils.h
+++ b/GUI/View/Tool/StyleUtils.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/StyleUtils.h
+//! @file      GUI/View/Tool/StyleUtils.h
 //! @brief     Defines GUI::StyleUtils namespace
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_STYLEUTILS_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_STYLEUTILS_H
+#ifndef BORNAGAIN_GUI_VIEW_TOOL_STYLEUTILS_H
+#define BORNAGAIN_GUI_VIEW_TOOL_STYLEUTILS_H
 
 #include <QFont>
 #include <QString>
@@ -23,7 +23,7 @@ class QWidget;
 class QLayout;
 class QWidget;
 
-namespace GUI::Utils::Style {
+namespace GUI::Util::Style {
 
 //! Sets style for the tree to use in property editors.
 void setPropertyStyle(QTreeView* tree);
@@ -40,12 +40,6 @@ QFont labelFont(bool bold = false);
 //! Make modal dialog resizable.
 void setResizable(QDialog* dialog);
 
-//! Creates details widget holding user content inside.
-QWidget* createDetailsWidget(QWidget* content, const QString& name, bool expanded = true);
-
-//! Creates details widget holding user layout inside.
-QWidget* createDetailsWidget(QLayout* content, const QString& name, bool expanded = true);
-
 //! Returns size of largest letter of default system font.
 QSize SizeOfLetterM(const QWidget* widget = nullptr);
 
@@ -56,6 +50,6 @@ int SystemPointSize();
 
 int PropertyPanelWidth();
 
-} // namespace GUI::Utils::Style
+} // namespace GUI::Util::Style
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_STYLEUTILS_H
+#endif // BORNAGAIN_GUI_VIEW_TOOL_STYLEUTILS_H
diff --git a/GUI/Views/CommonWidgets/UpdateTimer.cpp b/GUI/View/Tool/UpdateTimer.cpp
similarity index 93%
rename from GUI/Views/CommonWidgets/UpdateTimer.cpp
rename to GUI/View/Tool/UpdateTimer.cpp
index 4e7523ca8722189da54b1fbe0681d2fe71106ac9..36736684456b6576bbf99f82028de38215000bd2 100644
--- a/GUI/Views/CommonWidgets/UpdateTimer.cpp
+++ b/GUI/View/Tool/UpdateTimer.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/UpdateTimer.cpp
+//! @file      GUI/View/Tool/UpdateTimer.cpp
 //! @brief     Implements class UpdateTimer
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,7 +12,7 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/CommonWidgets/UpdateTimer.h"
+#include "GUI/View/Tool/UpdateTimer.h"
 #include <QTimer>
 
 UpdateTimer::UpdateTimer(int timerInterval, QObject* parent)
diff --git a/GUI/Views/CommonWidgets/UpdateTimer.h b/GUI/View/Tool/UpdateTimer.h
similarity index 85%
rename from GUI/Views/CommonWidgets/UpdateTimer.h
rename to GUI/View/Tool/UpdateTimer.h
index 6f76c20ac5fdc42d7a849c2c7bca9c17520eca1a..55a8ee6383eeb932d013a720178508e759e6edd9 100644
--- a/GUI/Views/CommonWidgets/UpdateTimer.h
+++ b/GUI/View/Tool/UpdateTimer.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/CommonWidgets/UpdateTimer.h
+//! @file      GUI/View/Tool/UpdateTimer.h
 //! @brief     Defines class UpdateTimer
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_UPDATETIMER_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_UPDATETIMER_H
+#ifndef BORNAGAIN_GUI_VIEW_TOOL_UPDATETIMER_H
+#define BORNAGAIN_GUI_VIEW_TOOL_UPDATETIMER_H
 
 #include <QObject>
 
@@ -49,4 +49,4 @@ private:
     QTimer* m_timer;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_UPDATETIMER_H
+#endif // BORNAGAIN_GUI_VIEW_TOOL_UPDATETIMER_H
diff --git a/GUI/Views/ProjectSettingsView.cpp b/GUI/View/Toplevel/ProjectSettingsView.cpp
similarity index 92%
rename from GUI/Views/ProjectSettingsView.cpp
rename to GUI/View/Toplevel/ProjectSettingsView.cpp
index 85117f3164b2c1a960ea911c031556423b57c471..3cbb492a2d517b0640061a87821d6ad4ee7d1069 100644
--- a/GUI/Views/ProjectSettingsView.cpp
+++ b/GUI/View/Toplevel/ProjectSettingsView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectSettingsView.cpp
+//! @file      GUI/View/Toplevel/ProjectSettingsView.cpp
 //! @brief     Implements class ProjectSettingsView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,20 +12,16 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/ProjectSettingsView.h"
-#include "GUI/Application/Application.h"
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/mainwindow/projectdocument.h"
-#include "GUI/utils/qstringutils.h"
+#include "GUI/View/Toplevel/ProjectSettingsView.h"
+#include "GUI/Application/GlobalSettings.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Util/Path.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 #include "ui_ProjectSettingsView.h"
 #include <QDir>
 #include <QMessageBox>
 
-using namespace GUI::Utils;
-
 ProjectSettingsView::ProjectSettingsView(QWidget* parentWidget, ProjectDocument* document)
     : QWidget(parentWidget), m_ui(new Ui::ProjectSettingsView), m_document(document)
 {
@@ -103,8 +99,8 @@ void ProjectSettingsView::updateInformation()
 
     QString name = m_document->projectName();
     if (m_document->hasValidNameAndPath())
-        location =
-            String::withTildeHomePath(QDir::toNativeSeparators(m_document->projectFileName()));
+        location = GUI::Util::Path::withTildeHomePath(
+            QDir::toNativeSeparators(m_document->projectFileName()));
 
     m_ui->currentProjectName->setText(name);
     m_ui->currentProjectLocation->setText(location);
diff --git a/GUI/Views/ProjectSettingsView.h b/GUI/View/Toplevel/ProjectSettingsView.h
similarity index 82%
rename from GUI/Views/ProjectSettingsView.h
rename to GUI/View/Toplevel/ProjectSettingsView.h
index 4b37ad409ff0e07610309663a00caf2bbdc7797a..a73c0761a9d3007bad8e63eda1c679de9c7ad587 100644
--- a/GUI/Views/ProjectSettingsView.h
+++ b/GUI/View/Toplevel/ProjectSettingsView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/ProjectSettingsView.h
+//! @file      GUI/View/Toplevel/ProjectSettingsView.h
 //! @brief     Defines class ProjectSettingsView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,10 +12,10 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_PROJECTSETTINGSVIEW_H
-#define BORNAGAIN_GUI_VIEWS_PROJECTSETTINGSVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_TOPLEVEL_PROJECTSETTINGSVIEW_H
+#define BORNAGAIN_GUI_VIEW_TOPLEVEL_PROJECTSETTINGSVIEW_H
 
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/Model/Project/ProjectDocument.h"
 #include <QWidget>
 
 namespace Ui {
@@ -50,4 +50,4 @@ private:
     ProjectDocument* m_document;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_PROJECTSETTINGSVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_TOPLEVEL_PROJECTSETTINGSVIEW_H
diff --git a/GUI/Views/ProjectSettingsView.ui b/GUI/View/Toplevel/ProjectSettingsView.ui
similarity index 100%
rename from GUI/Views/ProjectSettingsView.ui
rename to GUI/View/Toplevel/ProjectSettingsView.ui
diff --git a/GUI/Views/SessionModelView.cpp b/GUI/View/Toplevel/SessionModelView.cpp
similarity index 77%
rename from GUI/Views/SessionModelView.cpp
rename to GUI/View/Toplevel/SessionModelView.cpp
index c6cc343c9ae767ddd180587f2f21d1b87f598866..bbaf42cacb1ba20d5b1e6dd1a3faaa8812c61eca 100644
--- a/GUI/Views/SessionModelView.cpp
+++ b/GUI/View/Toplevel/SessionModelView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SessionModelView.cpp
+//! @file      GUI/View/Toplevel/SessionModelView.cpp
 //! @brief     Implements class SessionModelView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,18 +12,16 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SessionModelView.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Views/CommonWidgets/ModelTreeView.h"
-#include "GUI/Views/SessionModelDelegate.h"
-#include "GUI/Views/TestView.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectdocument.h"
-#include "GUI/mainwindow/projectmanager.h"
+#include "GUI/View/Toplevel/SessionModelView.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/View/Common/ModelTreeView.h"
+#include "GUI/View/Main/ProjectManager.h"
+#include "GUI/View/PropertyEditor/SessionModelDelegate.h"
+#include "GUI/View/Toplevel/TestView.h"
 #include <QToolBar>
 #include <QToolButton>
 #include <QVBoxLayout>
@@ -32,9 +30,8 @@ namespace {
 const bool show_test_view = false;
 }
 
-SessionModelView::SessionModelView(MainWindow* mainWindow, ProjectDocument* document)
-    : QWidget(mainWindow)
-    , m_mainWindow(mainWindow)
+SessionModelView::SessionModelView(QWidget* parent, ProjectDocument* document)
+    : QWidget(parent)
     , m_toolBar(new QToolBar)
     , m_tabs(new QTabWidget)
     , m_expandCollapseButton(new QToolButton)
@@ -92,7 +89,7 @@ QList<SessionModel*> SessionModelView::modelsForTabs()
 
 void SessionModelView::init_test_view()
 {
-    auto view = new TestView(m_mainWindow);
+    auto view = new TestView(parentWidget());
     int index = m_tabs->addTab(view, "Test View");
     m_tabs->setCurrentIndex(index);
 }
diff --git a/GUI/Views/SessionModelView.h b/GUI/View/Toplevel/SessionModelView.h
similarity index 82%
rename from GUI/Views/SessionModelView.h
rename to GUI/View/Toplevel/SessionModelView.h
index b0d4b0781be1ef7b09db52305f901506791294f0..02282840664adf3289fff872daa8618b1697e429 100644
--- a/GUI/Views/SessionModelView.h
+++ b/GUI/View/Toplevel/SessionModelView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SessionModelView.h
+//! @file      GUI/View/Toplevel/SessionModelView.h
 //! @brief     Defines class SessionModelView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,12 +12,11 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SESSIONMODELVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SESSIONMODELVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_TOPLEVEL_SESSIONMODELVIEW_H
+#define BORNAGAIN_GUI_VIEW_TOPLEVEL_SESSIONMODELVIEW_H
 
 #include <QWidget>
 
-class MainWindow;
 class QToolBar;
 class QTabWidget;
 class QToolButton;
@@ -34,7 +33,7 @@ class SessionModelView : public QWidget {
     Q_OBJECT
 
 public:
-    SessionModelView(MainWindow* mainWindow, ProjectDocument* document);
+    SessionModelView(QWidget* parent, ProjectDocument* document);
 
     void setViewActive(bool is_active);
 
@@ -46,7 +45,6 @@ private:
     QList<SessionModel*> modelsForTabs();
     void init_test_view();
 
-    MainWindow* m_mainWindow;
     QToolBar* m_toolBar;
     QTabWidget* m_tabs;
     QToolButton* m_expandCollapseButton;
@@ -55,4 +53,4 @@ private:
     ProjectDocument* m_document;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SESSIONMODELVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_TOPLEVEL_SESSIONMODELVIEW_H
diff --git a/GUI/Views/SimulationView.cpp b/GUI/View/Toplevel/SimulationView.cpp
similarity index 85%
rename from GUI/Views/SimulationView.cpp
rename to GUI/View/Toplevel/SimulationView.cpp
index ef03952f54f1c396cef1ef2dcd146d936ec796f2..5af06ed2497f8b788cecab5205bedff784585374 100644
--- a/GUI/Views/SimulationView.cpp
+++ b/GUI/View/Toplevel/SimulationView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SimulationView.cpp
+//! @file      GUI/View/Toplevel/SimulationView.cpp
 //! @brief     Implements class SimulationView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,32 +12,29 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/SimulationView.h"
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/DocumentModel.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/ModelUtils.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/SampleValidator.h"
-#include "GUI/Models/SimulationOptionsItem.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/Views/SimulationWidgets/PythonScriptWidget.h"
-#include "GUI/mainwindow/mainwindow.h"
-#include "GUI/mainwindow/projectdocument.h"
-#include "GUI/mainwindow/projectmanager.h"
+#include "GUI/View/Toplevel/SimulationView.h"
+#include "GUI/Model/Data/DocumentModel.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Sample/SampleValidator.h"
+#include "GUI/Model/Session/ModelUtils.h"
+#include "GUI/Model/Session/SimulationOptionsItem.h"
+#include "GUI/Model/State/SessionData.h"
+#include "GUI/View/Main/ProjectManager.h"
+#include "GUI/View/Script/PythonScriptWidget.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 #include "ui_SimulationView.h"
 #include <QButtonGroup>
 #include <QMessageBox>
 #include <thread>
 
-SimulationView::SimulationView(MainWindow* mainWindow, ProjectDocument* document)
-    : QWidget(mainWindow), m_ui(new Ui::SimulationView), m_document(document)
+SimulationView::SimulationView(QWidget* parent, ProjectDocument* document)
+    : QWidget(parent), m_ui(new Ui::SimulationView), m_document(document)
 {
     m_ui->setupUi(this);
 
@@ -76,22 +73,22 @@ SimulationView::SimulationView(MainWindow* mainWindow, ProjectDocument* document
             &SimulationView::updateEnabling);
 
     connect(m_ui->runPolicyImmediatelyRadio, &QRadioButton::toggled,
-            []() { ProjectManager::instance()->document()->setModified(true); });
+            []() { gSessionData->projectDocument->setModified(true); });
 
     connect(m_ui->analyticalRadio, &QRadioButton::toggled,
-            []() { ProjectManager::instance()->document()->setModified(true); });
+            []() { gSessionData->projectDocument->setModified(true); });
 
     connect(m_ui->averageLayerRadio, &QRadioButton::toggled,
-            []() { ProjectManager::instance()->document()->setModified(true); });
+            []() { gSessionData->projectDocument->setModified(true); });
 
     connect(m_ui->numberOfThreadsCombo, QOverload<int>::of(&QComboBox::currentIndexChanged),
-            []() { ProjectManager::instance()->document()->setModified(true); });
+            []() { gSessionData->projectDocument->setModified(true); });
 
     connect(m_ui->numberOfMonteCarloPoints, QOverload<int>::of(&QSpinBox::valueChanged),
-            []() { ProjectManager::instance()->document()->setModified(true); });
+            []() { gSessionData->projectDocument->setModified(true); });
 
     connect(m_ui->includeSpecularCheck, &QCheckBox::toggled,
-            []() { ProjectManager::instance()->document()->setModified(true); });
+            []() { gSessionData->projectDocument->setModified(true); });
 
     connect(ProjectManager::instance(), &ProjectManager::documentOpenedOrClosed, this,
             &SimulationView::writeOptionsToUI);
@@ -167,7 +164,7 @@ void SimulationView::exportPythonScript()
                              "Can't export to Python with current settings\n\n" + msg);
         return;
     }
-    PythonScriptWidget* pythonWidget = new PythonScriptWidget(MainWindow::instance());
+    PythonScriptWidget* pythonWidget = new PythonScriptWidget(parentWidget());
     pythonWidget->show();
     pythonWidget->raise();
     pythonWidget->generatePythonScript(selectedSample(), selectedInstrument(), optionsItem(),
diff --git a/GUI/Views/SimulationView.h b/GUI/View/Toplevel/SimulationView.h
similarity index 91%
rename from GUI/Views/SimulationView.h
rename to GUI/View/Toplevel/SimulationView.h
index fb7ccd6402532923ac1b5f7848077742d32f813f..cb7212b90a50360909da9d94f64d3d512ea85dcb 100644
--- a/GUI/Views/SimulationView.h
+++ b/GUI/View/Toplevel/SimulationView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/SimulationView.h
+//! @file      GUI/View/Toplevel/SimulationView.h
 //! @brief     Defines class SimulationView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_SIMULATIONVIEW_H
-#define BORNAGAIN_GUI_VIEWS_SIMULATIONVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_TOPLEVEL_SIMULATIONVIEW_H
+#define BORNAGAIN_GUI_VIEW_TOPLEVEL_SIMULATIONVIEW_H
 
 #include <QWidget>
 
@@ -38,7 +38,7 @@ class SimulationView : public QWidget {
     Q_OBJECT
 
 public:
-    SimulationView(MainWindow* mainWindow, ProjectDocument* document);
+    SimulationView(QWidget* parent, ProjectDocument* document);
 
     void runSimulation();
     void exportPythonScript();
@@ -91,4 +91,4 @@ private:
     ProjectDocument* m_document;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_SIMULATIONVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_TOPLEVEL_SIMULATIONVIEW_H
diff --git a/GUI/Views/SimulationView.ui b/GUI/View/Toplevel/SimulationView.ui
similarity index 100%
rename from GUI/Views/SimulationView.ui
rename to GUI/View/Toplevel/SimulationView.ui
diff --git a/GUI/Views/TestView.cpp b/GUI/View/Toplevel/TestView.cpp
similarity index 90%
rename from GUI/Views/TestView.cpp
rename to GUI/View/Toplevel/TestView.cpp
index 55d0873afe57f2771b4a3e222cc6931ff63726da..0b6ebf5a746451334e30bf042f9477507fe4c7b6 100644
--- a/GUI/Views/TestView.cpp
+++ b/GUI/View/Toplevel/TestView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/TestView.cpp
+//! @file      GUI/View/Toplevel/TestView.cpp
 //! @brief     Implements class TestView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,18 +12,17 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/TestView.h"
-#include "GUI/Models/Data1DViewItem.h"
-#include "GUI/Models/DataPropertyContainer.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/MinimizerItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/Views/FitWidgets/MinimizerSettingsWidget.h"
-#include "GUI/Views/PropertyEditor/TestComponentView.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceWidget.h"
-#include "GUI/Views/SpecularDataWidgets/Plot1DCanvas.h"
-#include "GUI/mainwindow/mainwindow.h"
+#include "GUI/View/Toplevel/TestView.h"
+#include "GUI/Model/Data/Data1DViewItem.h"
+#include "GUI/Model/Data/DataPropertyContainer.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Fit/MinimizerItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/View/Fit/MinimizerSettingsWidget.h"
+#include "GUI/View/PropertyEditor/TestComponentView.h"
+#include "GUI/View/Realspace/RealSpaceWidget.h"
+#include "GUI/View/SpecularData/Plot1DCanvas.h"
 
 #include <qAccordion/contentpane.h>
 
@@ -32,14 +31,17 @@
 #include <QTreeView>
 
 namespace {
+
 // These functions are required for testing purposes only
 // They must be removed after completion of
 // SpecularDataWidget
 double getTestValue(size_t bin, double factor);
 SpecularDataItem* fillTestItem(SessionItem* item, double factor);
+
 } // namespace
 
-TestView::TestView(MainWindow* mainWindow) : QWidget(mainWindow), m_mainWindow(mainWindow)
+
+TestView::TestView(QWidget* parent) : QWidget(parent)
 {
     //    test_ComponentProxyModel();
     //    test_MinimizerSettings();
@@ -54,7 +56,7 @@ void TestView::test_ComponentProxyModel()
     layout->setMargin(0);
     layout->setSpacing(0);
 
-    layout->addWidget(new TestComponentView(m_mainWindow));
+    layout->addWidget(new TestComponentView(parentWidget()));
 
     setLayout(layout);
 }
diff --git a/GUI/Views/TestView.h b/GUI/View/Toplevel/TestView.h
similarity index 75%
rename from GUI/Views/TestView.h
rename to GUI/View/Toplevel/TestView.h
index c5675e154a3ca47034b45c599f2f135d5ddad5a2..15731a2277896da531e8284d289c19d795df032d 100644
--- a/GUI/Views/TestView.h
+++ b/GUI/View/Toplevel/TestView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/TestView.h
+//! @file      GUI/View/Toplevel/TestView.h
 //! @brief     Defines class TestView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,25 +12,21 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_TESTVIEW_H
-#define BORNAGAIN_GUI_VIEWS_TESTVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_TOPLEVEL_TESTVIEW_H
+#define BORNAGAIN_GUI_VIEW_TOPLEVEL_TESTVIEW_H
 
 #include <QWidget>
 
-class MainWindow;
-
 class TestView : public QWidget {
     Q_OBJECT
 public:
-    TestView(MainWindow* mainWindow = nullptr);
+    TestView(QWidget* parent = nullptr);
 
 private:
     void test_ComponentProxyModel();
     void test_MinimizerSettings();
     void test_AccordionWidget();
     void test_specular_data_widget();
-
-    MainWindow* m_mainWindow;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_TESTVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_TOPLEVEL_TESTVIEW_H
diff --git a/GUI/Views/WelcomeView.cpp b/GUI/View/Toplevel/WelcomeView.cpp
similarity index 83%
rename from GUI/Views/WelcomeView.cpp
rename to GUI/View/Toplevel/WelcomeView.cpp
index 3ad7f0b51a82213a8a463f0c49eefcd8a92468ec..12781b03193c94af5009f013206536e11bf55d87 100644
--- a/GUI/Views/WelcomeView.cpp
+++ b/GUI/View/Toplevel/WelcomeView.cpp
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/WelcomeView.cpp
+//! @file      GUI/View/Toplevel/WelcomeView.cpp
 //! @brief     Implements class WelcomeView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,11 +12,11 @@
 //
 //  ************************************************************************************************
 
-#include "GUI/Views/WelcomeView.h"
-#include "GUI/Views/CommonWidgets/GroupBoxCollapser.h"
-#include "GUI/mainwindow/projectmanager.h"
-#include "GUI/utils/LayoutUtils.h"
-#include "GUI/utils/qstringutils.h"
+#include "GUI/View/Toplevel/WelcomeView.h"
+#include "GUI/Util/LayoutUtils.h"
+#include "GUI/Util/Path.h"
+#include "GUI/View/Main/ProjectManager.h"
+#include "GUI/View/Tool/GroupBoxCollapser.h"
 #include "ui_WelcomeView.h"
 
 #include <QCommandLinkButton>
@@ -24,8 +24,6 @@
 #include <QDir>
 #include <QUrl>
 
-using namespace GUI::Utils;
-
 WelcomeView::WelcomeView(QWidget* parent) : QWidget(parent), m_ui(new Ui::WelcomeView)
 {
     m_ui->setupUi(this);
@@ -56,12 +54,12 @@ ProjectManager* WelcomeView::projectManager()
 
 void WelcomeView::updateRecentProjectPanel()
 {
-    Layout::clearLayout(m_ui->recentProjectsLayout);
+    GUI::Util::Layout::clearLayout(m_ui->recentProjectsLayout);
 
     for (const auto& file : projectManager()->recentProjects()) {
         auto button = new QCommandLinkButton;
         button->setText(QFileInfo(file).baseName());
-        button->setDescription(String::withTildeHomePath(QDir::toNativeSeparators(file)));
+        button->setDescription(GUI::Util::Path::withTildeHomePath(QDir::toNativeSeparators(file)));
         button->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
         connect(button, &QCommandLinkButton::clicked, [=] { projectManager()->openProject(file); });
 
diff --git a/GUI/Views/WelcomeView.h b/GUI/View/Toplevel/WelcomeView.h
similarity index 80%
rename from GUI/Views/WelcomeView.h
rename to GUI/View/Toplevel/WelcomeView.h
index 7a178c23cdc2ae8a605d8c7a8a8510b1456df2cd..ce49ad398f261fad01b1f090e538f61c905298cf 100644
--- a/GUI/Views/WelcomeView.h
+++ b/GUI/View/Toplevel/WelcomeView.h
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      GUI/Views/WelcomeView.h
+//! @file      GUI/View/Toplevel/WelcomeView.h
 //! @brief     Defines class WelcomeView
 //!
 //! @homepage  http://www.bornagainproject.org
@@ -12,8 +12,8 @@
 //
 //  ************************************************************************************************
 
-#ifndef BORNAGAIN_GUI_VIEWS_WELCOMEVIEW_H
-#define BORNAGAIN_GUI_VIEWS_WELCOMEVIEW_H
+#ifndef BORNAGAIN_GUI_VIEW_TOPLEVEL_WELCOMEVIEW_H
+#define BORNAGAIN_GUI_VIEW_TOPLEVEL_WELCOMEVIEW_H
 
 #include <QWidget>
 
@@ -35,4 +35,4 @@ private:
     Ui::WelcomeView* m_ui;
 };
 
-#endif // BORNAGAIN_GUI_VIEWS_WELCOMEVIEW_H
+#endif // BORNAGAIN_GUI_VIEW_TOPLEVEL_WELCOMEVIEW_H
diff --git a/GUI/Views/WelcomeView.ui b/GUI/View/Toplevel/WelcomeView.ui
similarity index 100%
rename from GUI/Views/WelcomeView.ui
rename to GUI/View/Toplevel/WelcomeView.ui
diff --git a/GUI/Views/CommonWidgets/AdjustingScrollArea.cpp b/GUI/Views/CommonWidgets/AdjustingScrollArea.cpp
deleted file mode 100644
index 7fd7697ce005d6b6ab4e3764e25c3cb9b2b4cb4a..0000000000000000000000000000000000000000
--- a/GUI/Views/CommonWidgets/AdjustingScrollArea.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      GUI/Views/CommonWidgets/AdjustingScrollArea.cpp
-//! @brief     Implements class AdjustingScrollArea
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2018
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#include "GUI/Views/CommonWidgets/AdjustingScrollArea.h"
-#include <QEvent>
-#include <QScrollBar>
-
-AdjustingScrollArea::AdjustingScrollArea(QWidget* parent) : QScrollArea(parent)
-{
-    setObjectName("MyScrollArea");
-    setContentsMargins(0, 0, 0, 0);
-    setWidgetResizable(true);
-    setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-    setStyleSheet("QScrollArea#MyScrollArea {border: 0px; background-color:transparent;}");
-}
-
-void AdjustingScrollArea::setWidget(QWidget* w)
-{
-    QScrollArea::setWidget(w);
-    w->installEventFilter(this);
-}
-
-QSize AdjustingScrollArea::sizeHint() const
-{
-    QScrollBar* horizontal = horizontalScrollBar();
-    QSize result(viewport()->width(), widget()->height() + horizontal->height() * 2);
-    return result;
-}
-
-bool AdjustingScrollArea::eventFilter(QObject* obj, QEvent* ev)
-{
-    if (obj == widget() && ev->type() != QEvent::Resize) {
-        widget()->setMaximumWidth(viewport()->width());
-        setMaximumHeight(height() - viewport()->height() + widget()->height());
-    }
-
-    return QScrollArea::eventFilter(obj, ev);
-}
diff --git a/GUI/Views/CommonWidgets/AdjustingScrollArea.h b/GUI/Views/CommonWidgets/AdjustingScrollArea.h
deleted file mode 100644
index 67ad5532737248182bbdbfa56a4cb8489ac2b5ed..0000000000000000000000000000000000000000
--- a/GUI/Views/CommonWidgets/AdjustingScrollArea.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      GUI/Views/CommonWidgets/AdjustingScrollArea.h
-//! @brief     Defines class AdjustingScrollArea
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2018
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ADJUSTINGSCROLLAREA_H
-#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ADJUSTINGSCROLLAREA_H
-
-#include <QScrollArea>
-
-//! Modification of standard scroll area, which makes widget with dynamic layout ocuupy whole
-//! available space.
-
-class AdjustingScrollArea : public QScrollArea {
-    Q_OBJECT
-
-public:
-    AdjustingScrollArea(QWidget* parent = 0);
-    void setWidget(QWidget* w);
-
-    QSize sizeHint() const;
-
-private:
-    bool eventFilter(QObject* obj, QEvent* ev);
-};
-
-#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_ADJUSTINGSCROLLAREA_H
diff --git a/GUI/Views/IntensityDataWidgets/SavePlotAssistant.h b/GUI/Views/IntensityDataWidgets/SavePlotAssistant.h
deleted file mode 100644
index 721399f14c89ba728d7a2e05fb13a0dd1139d97d..0000000000000000000000000000000000000000
--- a/GUI/Views/IntensityDataWidgets/SavePlotAssistant.h
+++ /dev/null
@@ -1,51 +0,0 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      GUI/Views/IntensityDataWidgets/SavePlotAssistant.h
-//! @brief     Defines class SavePlotAssistant
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2018
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#ifndef BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_SAVEPLOTASSISTANT_H
-#define BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_SAVEPLOTASSISTANT_H
-
-#include <QString>
-#include <QVector>
-
-class QCustomPlot;
-template <class T> class OutputData;
-
-//! Assistant class which contains all logic for saving IntensityData to various formats
-//! from IntensityDataPlotWidget.
-
-class SavePlotAssistant {
-public:
-    class Format {
-    public:
-        Format() {}
-        Format(const QString& file_extention, const QString& filter);
-        QString m_file_extention;
-        QString m_filter;
-    };
-
-    void savePlot(const QString& dirname, QCustomPlot* plot, OutputData<double>* output_data);
-
-private:
-    void saveToFile(const QString& dirname, QCustomPlot* plot, OutputData<double>* output_data);
-    QString getFilterString() const;
-    QString composeFileName(const QString& fileName, const QString& filterName) const;
-    bool isValidExtension(const QString& fileName) const;
-    QString getExtensionFromFilterName(const QString& filterName) const;
-    bool isPngFile(const QString& fileName) const;
-    bool isJpgFile(const QString& fileName) const;
-    bool isPdfFile(const QString& fileName) const;
-    static QVector<Format> m_formats;
-};
-
-#endif // BORNAGAIN_GUI_VIEWS_INTENSITYDATAWIDGETS_SAVEPLOTASSISTANT_H
diff --git a/GUI/Views/MaskWidgets/MaskWidgets.qrc b/GUI/Views/MaskWidgets/MaskWidgets.qrc
deleted file mode 100644
index 7d75e475b3fdef18c757baf36cac38306d70aae6..0000000000000000000000000000000000000000
--- a/GUI/Views/MaskWidgets/MaskWidgets.qrc
+++ /dev/null
@@ -1,21 +0,0 @@
-<RCC>
-    <qresource prefix="/MaskWidgets">
-        <file>images/maskeditor_arrow.svg</file>
-        <file>images/maskeditor_hand.svg</file>
-        <file>images/maskeditor_refresh.svg</file>
-        <file>images/maskeditor_rectangle.svg</file>
-        <file>images/maskeditor_ellipse.svg</file>
-        <file>images/maskeditor_polygon.svg</file>
-        <file>images/maskeditor_bringtofront.svg</file>
-        <file>images/maskeditor_sendtoback.svg</file>
-        <file>images/maskeditor_maskall.svg</file>
-        <file>images/maskeditor_verticalline.svg</file>
-        <file>images/maskeditor_horizontalline.svg</file>
-        <file>images/maskeditor_toolpanel.svg</file>
-        <file>images/maskeditor_masktrue.svg</file>
-        <file>images/maskeditor_maskfalse.svg</file>
-        <file>images/maskeditor_lightbulb.svg</file>
-        <file>images/maskeditor_roi.svg</file>
-        <file>images/maskeditor_save.svg</file>
-    </qresource>
-</RCC>
diff --git a/GUI/utils/ItemIDFactory.cpp b/GUI/utils/ItemIDFactory.cpp
deleted file mode 100644
index 77d23da9213b7c7844f91f99473eccb1d6ecc8bd..0000000000000000000000000000000000000000
--- a/GUI/utils/ItemIDFactory.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      GUI/utils/ItemIDFactory.cpp
-//! @brief     Implements class ItemIDFactory
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2018
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#include "GUI/utils/ItemIDFactory.h"
-
-ItemIDFactory& ItemIDFactory::instance()
-{
-    static ItemIDFactory instance;
-    return instance;
-}
-
-QString ItemIDFactory::createID(SessionItem* toBeInsertedItem)
-{
-
-    QUuid id = QUuid::createUuid();
-    QString id_String = id.toString();
-
-    // prevent duplicates (very improbable that this ever happens though)
-    while (instance().IDtoItemMap.contains(id_String)) {
-        id = QUuid::createUuid();
-        id_String = id.toString();
-    }
-    instance().ItemtoIDMap.insert(toBeInsertedItem, id_String);
-    instance().IDtoItemMap.insert(id_String, toBeInsertedItem);
-
-    return id_String;
-}
-
-QString ItemIDFactory::getID(SessionItem* existingItem)
-{
-    if (instance().ItemtoIDMap.contains(existingItem))
-        return instance().ItemtoIDMap.value(existingItem);
-    return "";
-}
-
-SessionItem* ItemIDFactory::getItem(QString existingID)
-{
-    if (instance().IDtoItemMap.contains(existingID))
-        return instance().IDtoItemMap.value(existingID);
-    return nullptr;
-}
-
-int ItemIDFactory::IDSize()
-{
-    static QUuid id = QUuid::createUuid();
-    return id.toString().size();
-}
diff --git a/GUI/utils/ItemIDFactory.h b/GUI/utils/ItemIDFactory.h
deleted file mode 100644
index da20563609b2cb2132b2870523e13433ecc1e568..0000000000000000000000000000000000000000
--- a/GUI/utils/ItemIDFactory.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      GUI/utils/ItemIDFactory.h
-//! @brief     Defines class ItemIDFactory
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2018
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#ifndef BORNAGAIN_GUI_UTILS_ITEMIDFACTORY_H
-#define BORNAGAIN_GUI_UTILS_ITEMIDFACTORY_H
-
-#include <QMap>
-#include <QUuid>
-
-class SessionItem;
-
-class ItemIDFactory {
-public:
-    // delete copy/move constructor/assignment:
-    ItemIDFactory(const ItemIDFactory&) = delete;
-    ItemIDFactory(ItemIDFactory&&) = delete;
-    ItemIDFactory& operator=(const ItemIDFactory&) = delete;
-    ItemIDFactory& operator=(ItemIDFactory&&) = delete;
-
-    static ItemIDFactory& instance();
-
-    static QString createID(SessionItem* toBeInsertedItem);
-
-    static QString getID(SessionItem* existingItem);
-
-    static SessionItem* getItem(QString existingID);
-
-    static int IDSize();
-
-private:
-    ItemIDFactory() = default;
-
-    QMap<QString, SessionItem*> IDtoItemMap;
-    QMap<SessionItem*, QString> ItemtoIDMap;
-};
-
-#endif // BORNAGAIN_GUI_UTILS_ITEMIDFACTORY_H
diff --git a/GUI/utils/qstringutils.cpp b/GUI/utils/qstringutils.cpp
deleted file mode 100644
index c8f621c3f6ab6407cb2ca747a3e756e22d06ff58..0000000000000000000000000000000000000000
--- a/GUI/utils/qstringutils.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-//  ************************************************************************************************
-//
-//  BornAgain: simulate and fit reflection and scattering
-//
-//! @file      GUI/utils/qstringutils.cpp
-//! @brief     Implements functions from Utils namespace
-//!
-//! @homepage  http://www.bornagainproject.org
-//! @license   GNU General Public License v3 or higher (see COPYING)
-//! @copyright Forschungszentrum Jülich GmbH 2018
-//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
-//
-//  ************************************************************************************************
-
-#include "GUI/utils/qstringutils.h"
-#include "GUI/utils/hostosinfo.h"
-#include <QDir>
-
-QString GUI::Utils::String::withTildeHomePath(const QString& path)
-{
-    if (GUI::Utils::OS::HostOsInfo::isWindowsHost())
-        return path;
-
-    static const QString homePath = QDir::homePath();
-
-    QFileInfo fi(QDir::cleanPath(path));
-    QString outPath = fi.absoluteFilePath();
-    if (outPath.startsWith(homePath))
-        outPath = QLatin1Char('~') + outPath.mid(homePath.size());
-    else
-        outPath = path;
-    return outPath;
-}
diff --git a/Tests/Functional/GUI/Check.cpp b/Tests/Functional/GUI/Check.cpp
index 63a16b2b13fab9a8ad0d19f337b8889862e1cc2f..3843897fa5db447ec71f0322bf6aae7edfe21c58 100644
--- a/Tests/Functional/GUI/Check.cpp
+++ b/Tests/Functional/GUI/Check.cpp
@@ -19,14 +19,14 @@
 #include "Device/Data/DataUtils.h"
 #include "Device/Histo/IntensityDataIOFactory.h"
 #include "Device/Histo/SimulationResult.h"
-#include "GUI/Models/DocumentModel.h"
-#include "GUI/Models/DomainSimulationBuilder.h"
-#include "GUI/Models/GUIDomainSampleVisitor.h"
-#include "GUI/Models/GUIObjectBuilder.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/SampleModel.h"
+#include "GUI/Model/Data/DocumentModel.h"
+#include "GUI/Model/Domain/DomainSimulationBuilder.h"
+#include "GUI/Model/Domain/GUIObjectBuilder.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Sample/GUIDomainSampleVisitor.h"
+#include "GUI/Model/Sample/SampleModel.h"
 #include <iostream>
 
 namespace {
diff --git a/Tests/Unit/GUI/Comparators.cpp b/Tests/Unit/GUI/Comparators.cpp
index aa8e1b94365628c63e1771f409dc552fb86267f7..1294a6ebc389d6863bf54c7af62b5943ac4859ad 100644
--- a/Tests/Unit/GUI/Comparators.cpp
+++ b/Tests/Unit/GUI/Comparators.cpp
@@ -1,5 +1,5 @@
 #include "Tests/Unit/GUI/Comparators.h"
-#include "GUI/Models/ComboProperty.h"
+#include "GUI/Util/ComboProperty.h"
 #include <QMetaType>
 
 bool Comparators::m_is_registered = false;
diff --git a/Tests/Unit/GUI/TestAxesItems.cpp b/Tests/Unit/GUI/TestAxesItems.cpp
index d0ca125d298e197adc22a8cc09357726014e03e3..47d2609accd4992b94fbf28c48982ebc7ba0c8a5 100644
--- a/Tests/Unit/GUI/TestAxesItems.cpp
+++ b/Tests/Unit/GUI/TestAxesItems.cpp
@@ -1,10 +1,10 @@
 #include "Base/Axis/FixedBinAxis.h"
 #include "Base/Axis/VariableBinAxis.h"
 #include "Base/Const/Units.h"
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/TransformFromDomain.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Domain/FromDomain.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Util/Error.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestAxesItems : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestComboProperty.cpp b/Tests/Unit/GUI/TestComboProperty.cpp
index f6ed04556dceff8c13ba91cb8ed5b782b7c92b09..583d9b17101a758f4133934a59c5485f5ac30b34 100644
--- a/Tests/Unit/GUI/TestComboProperty.cpp
+++ b/Tests/Unit/GUI/TestComboProperty.cpp
@@ -1,4 +1,4 @@
-#include "GUI/Models/ComboProperty.h"
+#include "GUI/Util/ComboProperty.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/Unit/GUI/Comparators.h"
 #include "Tests/Unit/GUI/Utils.h"
@@ -7,7 +7,7 @@ class TestComboProperty : public ::testing::Test {
 public:
     ComboProperty propertyFromXML(const QString& buffer)
     {
-        return GuiUnittestUtils::propertyFromXML<ComboProperty>(buffer);
+        return UTest::GUI::propertyFromXML<ComboProperty>(buffer);
     }
 };
 
@@ -274,7 +274,7 @@ TEST_F(TestComboProperty, comboXML)
 
     QString expected = "<Parameter ParType=\"ComboProperty\" ParRole=\"0\" ParValue=\"0,2\" "
                        "ParExt=\"a1;a2;a3\"/>";
-    EXPECT_EQ(GuiUnittestUtils::propertyToXML(combo), expected);
+    EXPECT_EQ(UTest::GUI::propertyToXML(combo), expected);
 
     // reading from XML
     ComboProperty combo_property = propertyFromXML(expected);
diff --git a/Tests/Unit/GUI/TestComponentProxyModel.cpp b/Tests/Unit/GUI/TestComponentProxyModel.cpp
index 3cbd9e2c445e22e6f544298d16218b140b84b5b5..b49c4bf7c113824cc22105e4222569ba68d7c4f5 100644
--- a/Tests/Unit/GUI/TestComponentProxyModel.cpp
+++ b/Tests/Unit/GUI/TestComponentProxyModel.cpp
@@ -1,15 +1,15 @@
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/ComponentProxyModel.h"
-#include "GUI/Models/ComponentProxyStrategy.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/ModelUtils.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Component/ComponentProxyModel.h"
+#include "GUI/Model/Component/ComponentProxyStrategy.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Session/ModelUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/Util/ComboProperty.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/Unit/GUI/Utils.h"
 #include <QSignalSpy>
diff --git a/Tests/Unit/GUI/TestComponentUtils.cpp b/Tests/Unit/GUI/TestComponentUtils.cpp
index 89956fc97b60269319bab2d91bae48214419c74a..05e79e62910ee7f4a9de981ff3108b7645b02796 100644
--- a/Tests/Unit/GUI/TestComponentUtils.cpp
+++ b/Tests/Unit/GUI/TestComponentUtils.cpp
@@ -1,9 +1,9 @@
-#include "GUI/Models/ComponentUtils.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Component/ComponentUtils.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Model/Types/VectorItem.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestComponentUtils : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestDataItemViews.cpp b/Tests/Unit/GUI/TestDataItemViews.cpp
index 0b3c91ca271807fd51981688eb4ad742a749f5fa..3b878fe1b65b6af58ff010eb66bd2cf736af71a2 100644
--- a/Tests/Unit/GUI/TestDataItemViews.cpp
+++ b/Tests/Unit/GUI/TestDataItemViews.cpp
@@ -1,13 +1,13 @@
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/DataProperties.h"
-#include "GUI/Models/DataPropertyContainer.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/Models/SpecularDataItem.h"
-#include "GUI/mainwindow/projectdocument.h"
-#include "GUI/utils/MessageService.h"
+#include "GUI/Model/Data/ApplicationModels.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Data/DataProperties.h"
+#include "GUI/Model/Data/DataPropertyContainer.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/MessageService.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/Unit/GUI/Utils.h"
 
@@ -19,7 +19,7 @@ public:
 DataItem* TestDataItemViews::insertNewDataItem(SessionModel& model, double val)
 {
     auto item = model.insertItem<SpecularDataItem>();
-    auto data = GuiUnittestUtils::createData(val, GuiUnittestUtils::DIM::D1);
+    auto data = UTest::GUI::createData(val, UTest::GUI::DIM::D1);
     item->setOutputData(data.release());
     return item;
 }
@@ -120,7 +120,7 @@ TEST_F(TestDataItemViews, testWrongHostingModel)
 TEST_F(TestDataItemViews, testSavingLinkedData)
 {
     const QString projectDir("test_savingLinkedData");
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
     const QString projectFileName(projectDir + "/document.pro");
     {
 
diff --git a/Tests/Unit/GUI/TestDataItems.cpp b/Tests/Unit/GUI/TestDataItems.cpp
index 99151d93bbc4a236bf26c2b148f831ffb3565374..db9a5e01d79aa7e20467bce0add89e09579c335f 100644
--- a/Tests/Unit/GUI/TestDataItems.cpp
+++ b/Tests/Unit/GUI/TestDataItems.cpp
@@ -1,6 +1,6 @@
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/SpecularDataItem.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/SpecularDataItem.h"
+#include "GUI/Model/Session/SessionModel.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <QTest>
 
diff --git a/Tests/Unit/GUI/TestDetectorItems.cpp b/Tests/Unit/GUI/TestDetectorItems.cpp
index 876e84eb4a48384d1117ea18c6aa7ee7fd8e4686..5fb3d1be88a8e224f4e840477c3eef8eb27f5fb9 100644
--- a/Tests/Unit/GUI/TestDetectorItems.cpp
+++ b/Tests/Unit/GUI/TestDetectorItems.cpp
@@ -2,12 +2,12 @@
 #include "Device/Detector/IDetector2D.h"
 #include "Device/Resolution/ConvolutionDetectorResolution.h"
 #include "Device/Resolution/ResolutionFunction2DGaussian.h"
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/RectangularDetectorItem.h"
-#include "GUI/Models/ResolutionFunctionItems.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Instrument/RectangularDetectorItem.h"
+#include "GUI/Model/Instrument/ResolutionFunctionItems.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/Util/ComboProperty.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestDetectorItems : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestFTDistributionItems.cpp b/Tests/Unit/GUI/TestFTDistributionItems.cpp
index a694ad71249495f1f52bd5ec016e5ece69376f30..cfeb6b2d4ee2475608669c003863ee9366112467 100644
--- a/Tests/Unit/GUI/TestFTDistributionItems.cpp
+++ b/Tests/Unit/GUI/TestFTDistributionItems.cpp
@@ -1,4 +1,4 @@
-#include "GUI/Models/FTDistributionItems.h"
+#include "GUI/Model/Sample/FTDistributionItems.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestFTDistributionItems : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestFitParameterModel.cpp b/Tests/Unit/GUI/TestFitParameterModel.cpp
index 9af05bc075e96608feb1b49641a77439d4d0188a..e673c79fbc12f9e079cd2036e67d080dfcc45419 100644
--- a/Tests/Unit/GUI/TestFitParameterModel.cpp
+++ b/Tests/Unit/GUI/TestFitParameterModel.cpp
@@ -1,7 +1,7 @@
-#include "GUI/Models/FitParameterItems.h"
-#include "GUI/Models/FitParameterProxyModel.h"
-#include "GUI/Models/FitSuiteItem.h"
-#include "GUI/Models/JobModel.h"
+#include "GUI/Model/Fit/FitParameterItems.h"
+#include "GUI/Model/Fit/FitParameterProxyModel.h"
+#include "GUI/Model/Fit/FitSuiteItem.h"
+#include "GUI/Model/Job/JobModel.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestFitParameterModel : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestFormFactorItems.cpp b/Tests/Unit/GUI/TestFormFactorItems.cpp
index a72b83c1e312e0ce9f21f4ed5035480281e873dc..ccc1a76301ff6c9c8279c5ed0f1cbe912c2a7ed5 100644
--- a/Tests/Unit/GUI/TestFormFactorItems.cpp
+++ b/Tests/Unit/GUI/TestFormFactorItems.cpp
@@ -1,6 +1,6 @@
 #include "Base/Const/Units.h"
 #include "Base/Utils/Algorithms.h"
-#include "GUI/Models/FormFactorItems.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
 #include "Sample/HardParticle/FormFactorAnisoPyramid.h"
 #include "Tests/GTestWrapper/google_test.h"
 
diff --git a/Tests/Unit/GUI/TestGUICoreObjectCorrespondence.cpp b/Tests/Unit/GUI/TestGUICoreObjectCorrespondence.cpp
index 14f5f86f10239ba20ed2d307fbdb06ebebfc6733..0f3fc3914ddb638229e38a5a482aaee8eff4d01a 100644
--- a/Tests/Unit/GUI/TestGUICoreObjectCorrespondence.cpp
+++ b/Tests/Unit/GUI/TestGUICoreObjectCorrespondence.cpp
@@ -1,6 +1,6 @@
 #include "Base/Const/Units.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/InterferenceItems.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
 #include "Sample/Aggregate/Interferences.h"
 #include "Sample/HardParticle/HardParticles.h"
 #include "Tests/GTestWrapper/google_test.h"
diff --git a/Tests/Unit/GUI/TestGroupItem.cpp b/Tests/Unit/GUI/TestGroupItem.cpp
index ebb76683eb204ff9400333b931687c61b70f227e..9a64fcd6aa7360a2a7e287de71bd4e908e43c9c1 100644
--- a/Tests/Unit/GUI/TestGroupItem.cpp
+++ b/Tests/Unit/GUI/TestGroupItem.cpp
@@ -1,10 +1,10 @@
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/DistributionItems.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Group/DistributionItems.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/ComboProperty.h"
+#include "GUI/Util/Error.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/Unit/GUI/Utils.h"
 
diff --git a/Tests/Unit/GUI/TestHelpers.cpp b/Tests/Unit/GUI/TestHelpers.cpp
index dd5aeabb2ad21dc336441e1e54258b970543ec37..a2c949bad385758095ac0b1d61ca42709b162344 100644
--- a/Tests/Unit/GUI/TestHelpers.cpp
+++ b/Tests/Unit/GUI/TestHelpers.cpp
@@ -1,4 +1,4 @@
-#include "GUI/utils/Helpers.h"
+#include "GUI/Util/Path.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestHelpers : public ::testing::Test {
@@ -8,19 +8,19 @@ TEST_F(TestHelpers, test_VersionString)
 {
     int vmajor(0), vminor(0), vpatch(0);
 
-    EXPECT_EQ(true, GUI::Helpers::parseVersion("1.5.0", vmajor, vminor, vpatch));
+    EXPECT_EQ(true, GUI::Util::Path::parseVersion("1.5.0", vmajor, vminor, vpatch));
     EXPECT_EQ(1, vmajor);
     EXPECT_EQ(5, vminor);
     EXPECT_EQ(0, vpatch);
 
-    EXPECT_FALSE(GUI::Helpers::parseVersion("15.0", vmajor, vminor, vpatch));
+    EXPECT_FALSE(GUI::Util::Path::parseVersion("15.0", vmajor, vminor, vpatch));
 
     QString min_version("1.5.0");
-    EXPECT_TRUE(GUI::Helpers::isVersionMatchMinimal("1.5.0", min_version));
-    EXPECT_TRUE(GUI::Helpers::isVersionMatchMinimal("1.5.1", min_version));
-    EXPECT_TRUE(GUI::Helpers::isVersionMatchMinimal("1.6.0", min_version));
-    EXPECT_TRUE(GUI::Helpers::isVersionMatchMinimal("2.4.9", min_version));
+    EXPECT_TRUE(GUI::Util::Path::isVersionMatchMinimal("1.5.0", min_version));
+    EXPECT_TRUE(GUI::Util::Path::isVersionMatchMinimal("1.5.1", min_version));
+    EXPECT_TRUE(GUI::Util::Path::isVersionMatchMinimal("1.6.0", min_version));
+    EXPECT_TRUE(GUI::Util::Path::isVersionMatchMinimal("2.4.9", min_version));
 
-    EXPECT_FALSE(GUI::Helpers::isVersionMatchMinimal("1.4.9", min_version));
-    EXPECT_FALSE(GUI::Helpers::isVersionMatchMinimal("0.6.9", min_version));
+    EXPECT_FALSE(GUI::Util::Path::isVersionMatchMinimal("1.4.9", min_version));
+    EXPECT_FALSE(GUI::Util::Path::isVersionMatchMinimal("0.6.9", min_version));
 }
diff --git a/Tests/Unit/GUI/TestInstrumentModel.cpp b/Tests/Unit/GUI/TestInstrumentModel.cpp
index dfa7fec26d2ac5f684dbff8e8d389e40004f9fb8..20f668c0ae0a848387482fd25bea62e31e5da2ad 100644
--- a/Tests/Unit/GUI/TestInstrumentModel.cpp
+++ b/Tests/Unit/GUI/TestInstrumentModel.cpp
@@ -1,5 +1,5 @@
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <QSignalSpy>
 
diff --git a/Tests/Unit/GUI/TestLayerItems.cpp b/Tests/Unit/GUI/TestLayerItems.cpp
index 36a5f4e16d290a6469da706683b429ac027a00ee..0d284c6b9f62040565ce44be3fc4803b9a25a321 100644
--- a/Tests/Unit/GUI/TestLayerItems.cpp
+++ b/Tests/Unit/GUI/TestLayerItems.cpp
@@ -1,8 +1,8 @@
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MaterialItem.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/SampleModel.h"
+#include "GUI/Model/Data/ApplicationModels.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestLayerItems : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestLayerRoughnessItems.cpp b/Tests/Unit/GUI/TestLayerRoughnessItems.cpp
index ea1cf2facfcb70558eb8d79256c60dd718455e96..dc96694cee1b7239eaf48cb31e89495accc62bc6 100644
--- a/Tests/Unit/GUI/TestLayerRoughnessItems.cpp
+++ b/Tests/Unit/GUI/TestLayerRoughnessItems.cpp
@@ -1,7 +1,7 @@
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/LayerRoughnessItems.h"
-#include "GUI/Models/TransformFromDomain.h"
-#include "GUI/Models/TransformToDomain.h"
+#include "GUI/Model/Domain/FromDomain.h"
+#include "GUI/Model/Domain/ToDomain.h"
+#include "GUI/Model/Sample/LayerRoughnessItems.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestLayerRoughnessItems : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestLinkInstrument.cpp b/Tests/Unit/GUI/TestLinkInstrument.cpp
index 331ad36e8e4f931162681c9122f548912dd9c4df..b7c50f9b4e4fa18b63469022d312c2cfe2d2ef7c 100644
--- a/Tests/Unit/GUI/TestLinkInstrument.cpp
+++ b/Tests/Unit/GUI/TestLinkInstrument.cpp
@@ -1,11 +1,12 @@
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/JobItemUtils.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/Models/RectangularDetectorItem.h"
-#include "GUI/mainwindow/projectdocument.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Instrument/LinkInstrumentManager.h"
+#include "GUI/Model/Instrument/RectangularDetectorItem.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Model/Project/ProjectDocument.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/Unit/GUI/Utils.h"
 #include <QSignalSpy>
@@ -39,12 +40,11 @@ TEST_F(TestLinkInstrument, test_canLinkToInstrument)
     const QString identifier = instrument->id();
 
     // populating real data model, setting intensity data
-    RealDataItem* realData =
-        GuiUnittestUtils::createRealData("RealData", *document.realDataModel());
+    RealDataItem* realData = UTest::GUI::createRealData("RealData", *document.realDataModel());
     GUI::Model::JobItemUtils::createDefaultDetectorMap(realData->dataItem(), instrument);
 
     ASSERT_TRUE(
-        document.linkInstrumentManager()->canLinkDataToInstrument(realData, identifier, true));
+        document.linkInstrumentManager()->canLinkDataToInstrument(realData, identifier, nullptr));
 
     // making link
     realData->setInstrumentId(identifier);
diff --git a/Tests/Unit/GUI/TestMapperCases.cpp b/Tests/Unit/GUI/TestMapperCases.cpp
index 0e87a2401dcf63a73a8423951663ace1e3d6eef0..83c625879a87f53e23a95e2c0986491301eee9bf 100644
--- a/Tests/Unit/GUI/TestMapperCases.cpp
+++ b/Tests/Unit/GUI/TestMapperCases.cpp
@@ -1,13 +1,13 @@
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/DocumentModel.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/SimulationOptionsItem.h"
+#include "GUI/Model/Data/DocumentModel.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Session/SimulationOptionsItem.h"
+#include "GUI/Util/ComboProperty.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <QtTest>
 
diff --git a/Tests/Unit/GUI/TestMapperForItem.cpp b/Tests/Unit/GUI/TestMapperForItem.cpp
index fe7244071f991e7a86092b59e2d2bbfdfbafcf85..12cc192bf23f386899bfe372df8f7b0f00875b2b 100644
--- a/Tests/Unit/GUI/TestMapperForItem.cpp
+++ b/Tests/Unit/GUI/TestMapperForItem.cpp
@@ -1,10 +1,10 @@
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ProjectionItems.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/SessionItemUtils.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Data/ProjectionItems.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <memory>
 
diff --git a/Tests/Unit/GUI/TestMaterialModel.cpp b/Tests/Unit/GUI/TestMaterialModel.cpp
index 39f72eb3ce95af2ebdc699b5000e3b000695d265..a334c735e698a34f11da0446a4816f48bd3fd668 100644
--- a/Tests/Unit/GUI/TestMaterialModel.cpp
+++ b/Tests/Unit/GUI/TestMaterialModel.cpp
@@ -1,6 +1,7 @@
-#include "GUI/Models/MaterialDataItems.h"
-#include "GUI/Models/MaterialItemUtils.h"
-#include "GUI/Models/MaterialModel.h"
+#include "GUI/Model/Material/MaterialDataItems.h"
+#include "GUI/Model/Material/MaterialItem.h"
+#include "GUI/Model/Material/MaterialItemUtils.h"
+#include "GUI/Model/Material/MaterialModel.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <memory>
 
@@ -131,12 +132,12 @@ TEST_F(TestMaterialModel, defaultMaterialProperty)
 
     // testing default material property from MaterialItemUtils
     // in the absence of any materials, property should be in invalid state
-    QString id = GUI::Model::MaterialItemUtils::defaultMaterialIdentifier();
+    QString id = GUI::MaterialUtil::defaultMaterialIdentifier();
     EXPECT_TRUE(id.isEmpty());
 
     // adding materials to the model, default property should refer to first material in a model
     MaterialItem* mat1 = model.addRefractiveMaterial("Something1", 1.0, 2.0);
     model.addRefractiveMaterial("Something2", 3.0, 4.0);
-    id = GUI::Model::MaterialItemUtils::defaultMaterialIdentifier();
+    id = GUI::MaterialUtil::defaultMaterialIdentifier();
     EXPECT_EQ(id, mat1->identifier());
 }
diff --git a/Tests/Unit/GUI/TestMessageService.cpp b/Tests/Unit/GUI/TestMessageService.cpp
index 7ecd70d33ac2a97a637e1e920977d138b9642fbf..3fb73401cab482f3d744a82dea1ef752c7812c53 100644
--- a/Tests/Unit/GUI/TestMessageService.cpp
+++ b/Tests/Unit/GUI/TestMessageService.cpp
@@ -1,4 +1,4 @@
-#include "GUI/utils/MessageService.h"
+#include "GUI/Util/MessageService.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <QObject>
 #include <QString>
diff --git a/Tests/Unit/GUI/TestModelUtils.cpp b/Tests/Unit/GUI/TestModelUtils.cpp
index f32cffd234bb6b23425491d69275a6e6365af339..92c3a92003b0029c22b9e4a5c1fe80a7be7d3708 100644
--- a/Tests/Unit/GUI/TestModelUtils.cpp
+++ b/Tests/Unit/GUI/TestModelUtils.cpp
@@ -1,8 +1,8 @@
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/ModelUtils.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Session/ModelUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Model/Types/VectorItem.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <QVector>
 
diff --git a/Tests/Unit/GUI/TestMultiLayerItem.cpp b/Tests/Unit/GUI/TestMultiLayerItem.cpp
index 5ac15848e5e3964f58e085ee2256db5627cae324..a01313fcdf75eced3dca56af17b74393e8ba5ddc 100644
--- a/Tests/Unit/GUI/TestMultiLayerItem.cpp
+++ b/Tests/Unit/GUI/TestMultiLayerItem.cpp
@@ -1,8 +1,8 @@
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/LayerRoughnessItems.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/SampleModel.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/LayerRoughnessItems.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestMultiLayerItem : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestOutputDataIOService.cpp b/Tests/Unit/GUI/TestOutputDataIOService.cpp
index ba801127b0b9840a0d0f3b160f6f492f2ed4e69d..60abdcffbd131736f7501056603c72d931d995ec 100644
--- a/Tests/Unit/GUI/TestOutputDataIOService.cpp
+++ b/Tests/Unit/GUI/TestOutputDataIOService.cpp
@@ -1,18 +1,18 @@
 #include "Device/Histo/IntensityDataIOFactory.h"
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/ImportDataInfo.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobItemUtils.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/JobModelFunctions.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/mainwindow/OutputDataIOService.h"
-#include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Data/ApplicationModels.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Data/ImportDataInfo.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/Job/JobModelFunctions.h"
+#include "GUI/Model/Project/OutputDataIOService.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/Path.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/Unit/GUI/Utils.h"
 #include <QTest>
@@ -44,7 +44,7 @@ TEST_F(TestOutputDataIOService, test_nonXMLData)
 
     // adding RealDataItem
     auto realData = models.realDataModel()->insertIntensityDataItem();
-    realData->setOutputData(GuiUnittestUtils::createData().release());
+    realData->setOutputData(UTest::GUI::createData().release());
     EXPECT_EQ(models.realDataModel()->nonXMLItems().size(), 1);
 
     // adding JobItem
@@ -55,8 +55,7 @@ TEST_F(TestOutputDataIOService, test_nonXMLData)
     // adding RealDataItem to jobItem
     RealDataItem* realData2 = jobItem->createRealDataItem();
     EXPECT_EQ(models.jobModel()->nonXMLItems().size(), 1);
-    realData2->setOutputData(
-        GuiUnittestUtils::createData(0.0, GuiUnittestUtils::DIM::D1).release());
+    realData2->setOutputData(UTest::GUI::createData(0.0, UTest::GUI::DIM::D1).release());
     EXPECT_EQ(models.jobModel()->nonXMLItems().size(), 2);
 
     // checking data items of OutputDataIOService
@@ -71,11 +70,11 @@ TEST_F(TestOutputDataIOService, test_nonXMLData)
     EXPECT_EQ(dataItems.indexOf(realData2->dataItem()), 2);
 
     // Replacing the data inside RealDataItem with the data of the same dimensions
-    realData->setOutputData(GuiUnittestUtils::createData(2.0).release());
+    realData->setOutputData(UTest::GUI::createData(2.0).release());
     EXPECT_EQ(models.realDataModel()->nonXMLItems().size(), 1);
 
     // Replacing the data inside RealDataItem with the data of different dimensions
-    auto data = GuiUnittestUtils::createData(3.0, GuiUnittestUtils::DIM::D1);
+    auto data = UTest::GUI::createData(3.0, UTest::GUI::DIM::D1);
     EXPECT_THROW(dynamic_cast<RealDataItem*>(realData)->setOutputData(data.get()), Error);
     EXPECT_EQ(models.realDataModel()->nonXMLItems().size(), 1);
 }
@@ -183,15 +182,13 @@ TEST_F(TestOutputDataIOService, test_OutputDataIOHistory)
 TEST_F(TestOutputDataIOService, test_OutputDataIOService)
 {
     const QString projectDir("test_OutputDataIOService");
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
 
     const double value1(1.0), value2(2.0), value3(3.0);
 
     ApplicationModels models;
-    RealDataItem* realData1 =
-        GuiUnittestUtils::createRealData("data1", *models.realDataModel(), value1);
-    RealDataItem* realData2 =
-        GuiUnittestUtils::createRealData("data2", *models.realDataModel(), value2);
+    RealDataItem* realData1 = UTest::GUI::createRealData("data1", *models.realDataModel(), value1);
+    RealDataItem* realData2 = UTest::GUI::createRealData("data2", *models.realDataModel(), value2);
 
     // Saving first time
     OutputDataIOService service(&models);
@@ -209,20 +206,20 @@ TEST_F(TestOutputDataIOService, test_OutputDataIOService)
         IntensityDataIOFactory::readOutputData(fname1.toStdString()));
     std::unique_ptr<OutputData<double>> dataOnDisk2(
         IntensityDataIOFactory::readOutputData(fname2.toStdString()));
-    EXPECT_TRUE(GuiUnittestUtils::isTheSame(*dataOnDisk1, *realData1->dataItem()->getOutputData()));
-    EXPECT_TRUE(GuiUnittestUtils::isTheSame(*dataOnDisk2, *realData2->dataItem()->getOutputData()));
+    EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk1, *realData1->dataItem()->getOutputData()));
+    EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *realData2->dataItem()->getOutputData()));
 
     // Modifying data and saving the project.
-    realData2->setOutputData(GuiUnittestUtils::createData(value3).release());
+    realData2->setOutputData(UTest::GUI::createData(value3).release());
     service.save(projectDir);
     QTest::qSleep(10);
 
-    EXPECT_TRUE(GuiUnittestUtils::isTheSame(*dataOnDisk1, *realData1->dataItem()->getOutputData()));
-    EXPECT_TRUE(GuiUnittestUtils::isTheSame(*dataOnDisk2, *realData2->dataItem()->getOutputData())
+    EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk1, *realData1->dataItem()->getOutputData()));
+    EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *realData2->dataItem()->getOutputData())
                 == false);
     // checking that data on disk has changed
     dataOnDisk2.reset(IntensityDataIOFactory::readOutputData(fname2.toStdString()));
-    EXPECT_TRUE(GuiUnittestUtils::isTheSame(*dataOnDisk2, *realData2->dataItem()->getOutputData()));
+    EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *realData2->dataItem()->getOutputData()));
 
     // Renaming RealData and check that file on disk changed the name
     realData2->setDataName("data2new");
@@ -231,7 +228,7 @@ TEST_F(TestOutputDataIOService, test_OutputDataIOService)
 
     QString fname2new = "./" + projectDir + "/realdata_data2new_0.int.gz";
     EXPECT_TRUE(QFile::exists(fname2new));
-    EXPECT_TRUE(GuiUnittestUtils::isTheSame(fname2new, *realData2->dataItem()->getOutputData()));
+    EXPECT_TRUE(UTest::GUI::isTheSame(fname2new, *realData2->dataItem()->getOutputData()));
 
     // Check that file with old name was removed.
     EXPECT_FALSE(QFile::exists(fname2));
@@ -259,7 +256,7 @@ TEST_F(TestOutputDataIOService, test_RealDataItemWithNativeData)
 
     // adding JobItem
     auto jobItem = models.jobModel()->insertItem<JobItem>();
-    jobItem->setIdentifier(GUI::Helpers::createUuid());
+    jobItem->setIdentifier(QUuid::createUuid().toString());
     jobItem->setDataType<IntensityDataItem>();
     EXPECT_EQ(models.jobModel()->nonXMLItems().size(), 1);
 
@@ -272,7 +269,7 @@ TEST_F(TestOutputDataIOService, test_RealDataItemWithNativeData)
     EXPECT_EQ(service.dataInterfaces().size(), 5);
 
     const QString projectDir("test_NativeData");
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
 
     // Saving
     service.save(projectDir);
@@ -304,8 +301,8 @@ TEST_F(TestOutputDataIOService, test_RealDataItemWithNativeData)
     auto dataOnDisk2 = readData(fname2);
     auto dataOnDisk3 = readData(fname3);
     auto dataOnDisk4 = readData(fname4);
-    EXPECT_TRUE(GuiUnittestUtils::isTheSame(*dataOnDisk1, *data1->getOutputData()));
-    EXPECT_TRUE(GuiUnittestUtils::isTheSame(*dataOnDisk2, *data2->getOutputData()));
-    EXPECT_TRUE(GuiUnittestUtils::isTheSame(*dataOnDisk3, *data3->getOutputData()));
-    EXPECT_TRUE(GuiUnittestUtils::isTheSame(*dataOnDisk4, *data4->getOutputData()));
+    EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk1, *data1->getOutputData()));
+    EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk2, *data2->getOutputData()));
+    EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk3, *data3->getOutputData()));
+    EXPECT_TRUE(UTest::GUI::isTheSame(*dataOnDisk4, *data4->getOutputData()));
 }
diff --git a/Tests/Unit/GUI/TestParaCrystalItems.cpp b/Tests/Unit/GUI/TestParaCrystalItems.cpp
index d68c2ec834b24ecd0c9f836fed9486f3f6e8af57..37f3768219f48aa80b88acbfcc924f00f6ff4dd2 100644
--- a/Tests/Unit/GUI/TestParaCrystalItems.cpp
+++ b/Tests/Unit/GUI/TestParaCrystalItems.cpp
@@ -1,12 +1,12 @@
 #include "Base/Const/Units.h"
-#include "GUI/Models/FTDistributionItems.h"
-#include "GUI/Models/InterferenceItems.h"
-#include "GUI/Models/Lattice2DItems.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/TransformFromDomain.h"
+#include "GUI/Model/Domain/FromDomain.h"
+#include "GUI/Model/Sample/FTDistributionItems.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
+#include "GUI/Model/Sample/Lattice2DItems.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
 #include "Sample/Aggregate/Interference2DParaCrystal.h"
 #include "Tests/GTestWrapper/google_test.h"
 
diff --git a/Tests/Unit/GUI/TestParticleCoreShell.cpp b/Tests/Unit/GUI/TestParticleCoreShell.cpp
index ff7f8b22e96039ad471e821bf02317f958e415b3..d56036beb8a63794195052b98b04afeebadf1981 100644
--- a/Tests/Unit/GUI/TestParticleCoreShell.cpp
+++ b/Tests/Unit/GUI/TestParticleCoreShell.cpp
@@ -1,10 +1,10 @@
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleCoreShellItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleCoreShellItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
+#include "GUI/Model/Types/VectorItem.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <QtTest>
 
diff --git a/Tests/Unit/GUI/TestParticleItem.cpp b/Tests/Unit/GUI/TestParticleItem.cpp
index 1f39906eeab063d21dc9899c99761fc96827bd21..a4e0de423fb125546f506fd6cc1bdf9dffb776fc 100644
--- a/Tests/Unit/GUI/TestParticleItem.cpp
+++ b/Tests/Unit/GUI/TestParticleItem.cpp
@@ -1,9 +1,9 @@
-#include "GUI/Models/DoubleDescriptor.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/ParticleCompositionItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/SessionItemUtils.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Sample/ParticleCompositionItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Types/DoubleDescriptor.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 using namespace GUI::Session::ItemUtils;
diff --git a/Tests/Unit/GUI/TestParticleLayoutItem.h b/Tests/Unit/GUI/TestParticleLayoutItem.h
index 699d6317b79f27ab2f17bd15d98531e1f78719ca..94cad061d0e8916d19cb73516ad55dcb27dda4b7 100644
--- a/Tests/Unit/GUI/TestParticleLayoutItem.h
+++ b/Tests/Unit/GUI/TestParticleLayoutItem.h
@@ -2,11 +2,11 @@
 #define BORNAGAIN_TESTS_UNIT_GUI_TESTPARTICLELAYOUTITEM_H
 
 #include "Base/Math/Constants.h"
-#include "GUI/Models/InterferenceItems.h"
-#include "GUI/Models/Lattice2DItems.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/SessionItemUtils.h"
+#include "GUI/Model/Sample/InterferenceItems.h"
+#include "GUI/Model/Sample/Lattice2DItems.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
 #include "Tests/Unit/utilities/google_test.h"
 
 class TestParticleLayoutItem : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestProjectDocument.cpp b/Tests/Unit/GUI/TestProjectDocument.cpp
index 8937d307e90bf80d5443cce70b9edb72564dea08..a42bc0db46248c842126f28c85e2718e4f9899ea 100644
--- a/Tests/Unit/GUI/TestProjectDocument.cpp
+++ b/Tests/Unit/GUI/TestProjectDocument.cpp
@@ -1,13 +1,13 @@
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/JobItemUtils.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/mainwindow/projectdocument.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Data/ApplicationModels.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/Util/Path.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/Unit/GUI/Utils.h"
 #include <QFileInfo>
@@ -19,14 +19,14 @@ protected:
     void modify_models(ProjectDocument& doc)
     {
         auto instrument = doc.instrumentModel()->instrumentItems().front();
-        instrument->setId(GUI::Helpers::createUuid());
+        instrument->setId(QUuid::createUuid().toString());
     }
 };
 
 TEST_F(TestProjectDocument, test_projectDocument)
 {
     const QString projectDir("test_projectDocument");
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
     const QString projectFileName(projectDir + "/document.pro");
 
     ProjectDocument document;
@@ -68,13 +68,12 @@ TEST_F(TestProjectDocument, test_projectDocument)
 TEST_F(TestProjectDocument, test_projectDocumentWithData)
 {
     const QString projectDir("test_projectDocumentWithData");
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
 
     ProjectDocument document;
     auto instrument = document.instrumentModel()->insertItem<GISASInstrumentItem>();
     instrument->setItemName("GISAS");
-    RealDataItem* realData =
-        GuiUnittestUtils::createRealData("RealData", *document.realDataModel());
+    RealDataItem* realData = UTest::GUI::createRealData("RealData", *document.realDataModel());
     ASSERT(realData);
     DataItem* intensityItem = realData->dataItem();
     GUI::Model::JobItemUtils::createDefaultDetectorMap(
diff --git a/Tests/Unit/GUI/TestProjectUtils.cpp b/Tests/Unit/GUI/TestProjectUtils.cpp
index db044904c53deddf6de72806f00c04d8f4edaa5a..67c3669848ea4f0067adbeb4903ac91155282839 100644
--- a/Tests/Unit/GUI/TestProjectUtils.cpp
+++ b/Tests/Unit/GUI/TestProjectUtils.cpp
@@ -1,6 +1,6 @@
-#include "GUI/Models/Error.h"
-#include "GUI/Models/ItemFileNameUtils.h"
-#include "GUI/mainwindow/ProjectUtils.h"
+#include "GUI/Model/IO/ItemFileNameUtils.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Util/Error.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Utils.h"
 #include <QDir>
@@ -51,7 +51,7 @@ TEST_F(TestProjectUtils, test_nonXMLDataInDir)
         EXPECT_FALSE(dir.exists());
     }
 
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
     EXPECT_TRUE(QFile::exists(projectDir));
 
     EXPECT_EQ(1, 1);
diff --git a/Tests/Unit/GUI/TestPropertyRepeater.cpp b/Tests/Unit/GUI/TestPropertyRepeater.cpp
index 1050074df14d0dc228a7733316f1e0834c243509..e23a8067db70890335e22c959be9d07aea6cab8b 100644
--- a/Tests/Unit/GUI/TestPropertyRepeater.cpp
+++ b/Tests/Unit/GUI/TestPropertyRepeater.cpp
@@ -1,7 +1,7 @@
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/IntensityDataWidgets/PropertyRepeater.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/View/Intensity/PropertyRepeater.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 namespace {
diff --git a/Tests/Unit/GUI/TestProxyModelStrategy.cpp b/Tests/Unit/GUI/TestProxyModelStrategy.cpp
index 1b1864c949b238bd01ce152a04cad0f90f09a001..327e4c8071a157c4f42a4c7e8bda01eed322e2e5 100644
--- a/Tests/Unit/GUI/TestProxyModelStrategy.cpp
+++ b/Tests/Unit/GUI/TestProxyModelStrategy.cpp
@@ -1,12 +1,12 @@
-#include "GUI/Models/ComponentProxyModel.h"
-#include "GUI/Models/ComponentProxyStrategy.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/ModelUtils.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Component/ComponentProxyModel.h"
+#include "GUI/Model/Component/ComponentProxyStrategy.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Session/ModelUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Model/Types/VectorItem.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestProxyModelStrategy : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestRealDataModel.cpp b/Tests/Unit/GUI/TestRealDataModel.cpp
index f29daa675b4d96db1026012c8ce260aaeeff5b71..7eb53122d7aace305781a9c11c4ed3af904d3822 100644
--- a/Tests/Unit/GUI/TestRealDataModel.cpp
+++ b/Tests/Unit/GUI/TestRealDataModel.cpp
@@ -1,7 +1,7 @@
 #include "Base/Axis/PointwiseAxis.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RealDataModel.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/RealDataModel.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <QSignalSpy>
 
diff --git a/Tests/Unit/GUI/TestRealSpaceBuilderUtils.cpp b/Tests/Unit/GUI/TestRealSpaceBuilderUtils.cpp
index d7885eb189064ed3c7d5df121e39c07918d07b19..7ad394243cf24639543028113a5a241c042e2489 100644
--- a/Tests/Unit/GUI/TestRealSpaceBuilderUtils.cpp
+++ b/Tests/Unit/GUI/TestRealSpaceBuilderUtils.cpp
@@ -1,13 +1,13 @@
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/ParticleLayoutItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Views/RealSpaceWidgets/Particle3DContainer.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceBuilder.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h"
-#include "GUI/Views/RealSpaceWidgets/RealSpaceModel.h"
-#include "GUI/Views/RealSpaceWidgets/TransformTo3D.h"
+#include "GUI/Model/Data/ApplicationModels.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Sample/ParticleLayoutItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/View/Realspace/Particle3DContainer.h"
+#include "GUI/View/Realspace/RealSpaceBuilder.h"
+#include "GUI/View/Realspace/RealSpaceBuilderUtils.h"
+#include "GUI/View/Realspace/RealSpaceModel.h"
+#include "GUI/View/Realspace/TransformTo3D.h"
 #include "Sample/Particle/Particle.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <QObject>
diff --git a/Tests/Unit/GUI/TestSaveService.cpp b/Tests/Unit/GUI/TestSaveService.cpp
index 5332555850d602bedc875dd2ac4d226bbcddfbdd..580e168598c5eb9c5e4ddfe2ec7caada5a484356 100644
--- a/Tests/Unit/GUI/TestSaveService.cpp
+++ b/Tests/Unit/GUI/TestSaveService.cpp
@@ -1,16 +1,16 @@
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/JobItemUtils.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/RealDataModel.h"
-#include "GUI/mainwindow/AutosaveController.h"
-#include "GUI/mainwindow/ProjectUtils.h"
-#include "GUI/mainwindow/SaveService.h"
-#include "GUI/mainwindow/projectdocument.h"
-#include "GUI/utils/Helpers.h"
+#include "GUI/Model/Data/ApplicationModels.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/Data/RealDataModel.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Job/JobItemUtils.h"
+#include "GUI/Model/Project/ProjectDocument.h"
+#include "GUI/Util/Error.h"
+#include "GUI/Util/Path.h"
+#include "GUI/View/Main/AutosaveController.h"
+#include "GUI/View/Main/SaveService.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/Unit/GUI/Utils.h"
 #include <QSignalSpy>
@@ -21,7 +21,7 @@ protected:
     void modify_models(ProjectDocument& doc)
     {
         auto instrument = doc.instrumentModel()->instrumentItems().front();
-        instrument->setId(GUI::Helpers::createUuid());
+        instrument->setId(QUuid::createUuid().toString());
     }
     const int m_save_wait = 10000;
 };
@@ -32,7 +32,7 @@ protected:
 TEST_F(TestSaveService, test_autoSaveController)
 {
     const QString projectDir("test_autoSaveController");
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
 
     const QString projectFileName(projectDir + "/document.pro");
 
@@ -105,7 +105,7 @@ TEST_F(TestSaveService, test_autoSaveControllerNewDocument)
 TEST_F(TestSaveService, test_saveService)
 {
     const QString projectDir("test_saveService");
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
     const QString projectFileName(projectDir + "/document.pro");
 
 
@@ -170,15 +170,14 @@ TEST_F(TestSaveService, test_failingSaveService)
 TEST_F(TestSaveService, test_saveServiceWithData)
 {
     const QString projectDir("test_saveServiceWithData");
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
     const QString projectFileName(projectDir + "/document.pro");
 
     std::unique_ptr<ProjectDocument> document(new ProjectDocument);
     auto instrument = document->instrumentModel()->insertItem<GISASInstrumentItem>();
     instrument->setItemName("GISAS");
 
-    RealDataItem* realData =
-        GuiUnittestUtils::createRealData("RealData", *document->realDataModel());
+    RealDataItem* realData = UTest::GUI::createRealData("RealData", *document->realDataModel());
     ASSERT(realData);
     DataItem* intensityItem = realData->dataItem();
     GUI::Model::JobItemUtils::createDefaultDetectorMap(
@@ -206,15 +205,14 @@ TEST_F(TestSaveService, test_saveServiceWithData)
 TEST_F(TestSaveService, test_autosaveEnabled)
 {
     const QString projectDir("test_autosaveEnabled");
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
     const QString projectFileName(projectDir + "/document.pro");
 
     std::unique_ptr<ProjectDocument> document(new ProjectDocument(projectFileName));
     auto instrument = document->instrumentModel()->insertItem<GISASInstrumentItem>();
     instrument->setItemName("GISAS");
 
-    RealDataItem* realData =
-        GuiUnittestUtils::createRealData("RealData", *document->realDataModel());
+    RealDataItem* realData = UTest::GUI::createRealData("RealData", *document->realDataModel());
     DataItem* intensityItem = realData->dataItem();
     GUI::Model::JobItemUtils::createDefaultDetectorMap(
         intensityItem, document->instrumentModel()->instrument2DItems().front());
diff --git a/Tests/Unit/GUI/TestSavingSpecularData.cpp b/Tests/Unit/GUI/TestSavingSpecularData.cpp
index 28de1f026bbda9dee50c54be1ed552ac7af2b33e..1888af06b63d2b4b638aa5ecbf52bc61759e02db 100644
--- a/Tests/Unit/GUI/TestSavingSpecularData.cpp
+++ b/Tests/Unit/GUI/TestSavingSpecularData.cpp
@@ -1,20 +1,20 @@
 #include "Base/Axis/PointwiseAxis.h"
 #include "Device/Histo/IntensityDataIOFactory.h"
-#include "GUI/Models/ApplicationModels.h"
-#include "GUI/Models/DataItem.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/GroupItem.h"
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/IntensityDataItem.h"
-#include "GUI/Models/ItemFileNameUtils.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/JobModelFunctions.h"
-#include "GUI/Models/PointwiseAxisItem.h"
-#include "GUI/Models/SpecularBeamInclinationItem.h"
-#include "GUI/mainwindow/OutputDataIOService.h"
-#include "GUI/mainwindow/ProjectUtils.h"
+#include "GUI/Model/Data/ApplicationModels.h"
+#include "GUI/Model/Data/DataItem.h"
+#include "GUI/Model/Data/IntensityDataItem.h"
+#include "GUI/Model/Data/PointwiseAxisItem.h"
+#include "GUI/Model/Group/GroupItem.h"
+#include "GUI/Model/IO/ItemFileNameUtils.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Instrument/SpecularBeamInclinationItem.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/Job/JobModelFunctions.h"
+#include "GUI/Model/Project/OutputDataIOService.h"
+#include "GUI/Util/Error.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/Unit/GUI/Utils.h"
 #include <QTest>
@@ -59,7 +59,7 @@ bool TestSavingSpecularData::isSame(const QString& filename, const IAxis* axis)
         IntensityDataIOFactory::readOutputData(filename.toStdString()));
     OutputData<double> refData;
     refData.addAxis(*axis);
-    return GuiUnittestUtils::isTheSame(*dataOnDisk, refData);
+    return UTest::GUI::isTheSame(*dataOnDisk, refData);
 }
 
 TEST_F(TestSavingSpecularData, test_SpecularInsturment)
@@ -188,7 +188,7 @@ TEST_F(TestSavingSpecularData, test_DirHistory)
 TEST_F(TestSavingSpecularData, test_OutputDataIOService)
 {
     const QString projectDir("test_SpecularDataSave");
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
 
     // setting up items and data
 
@@ -246,7 +246,7 @@ TEST_F(TestSavingSpecularData, test_OutputDataIOService)
 TEST_F(TestSavingSpecularData, test_CopyInstrumentToJobItem)
 {
     const QString projectDir("test_SpecularDataSave2");
-    GuiUnittestUtils::create_dir(projectDir);
+    UTest::GUI::create_dir(projectDir);
 
     ApplicationModels models;
 
@@ -265,9 +265,9 @@ TEST_F(TestSavingSpecularData, test_CopyInstrumentToJobItem)
 
     // checking filenames
     EXPECT_EQ(pointwise_axis_item->fileName(),
-              GUI::Model::FilenameUtils::instrumentDataFileName(*instrument));
+              GUI::Model::FilenameUtils::instrumentDataFileName(instrument->id()));
     EXPECT_EQ(job_axis_item->fileName(),
-              GUI::Model::FilenameUtils::instrumentDataFileName(*job_instrument));
+              GUI::Model::FilenameUtils::instrumentDataFileName(job_instrument->id()));
 
     // Saving
     OutputDataIOService service(&models);
diff --git a/Tests/Unit/GUI/TestScientificSpinBox.cpp b/Tests/Unit/GUI/TestScientificSpinBox.cpp
index ae5a247dd6869a20671c2b487f613a6e7124cc93..c2ad3e8b846549d5ae5217a093d4606a7c660a83 100644
--- a/Tests/Unit/GUI/TestScientificSpinBox.cpp
+++ b/Tests/Unit/GUI/TestScientificSpinBox.cpp
@@ -1,4 +1,4 @@
-#include "GUI/Views/CommonWidgets/ScientificSpinBox.h"
+#include "GUI/View/Common/ScientificSpinBox.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <limits>
 
diff --git a/Tests/Unit/GUI/TestSessionItem.cpp b/Tests/Unit/GUI/TestSessionItem.cpp
index a1178cf782a4c3dd615602cb4fe90c8520168b3a..619f581e803fba3f662460eb400d11fe3516be68 100644
--- a/Tests/Unit/GUI/TestSessionItem.cpp
+++ b/Tests/Unit/GUI/TestSessionItem.cpp
@@ -1,4 +1,4 @@
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Session/SessionModel.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 #define EXPECT_ASSERT_TRIGGERED(condition) EXPECT_THROW((condition), std::runtime_error)
diff --git a/Tests/Unit/GUI/TestSessionItemController.cpp b/Tests/Unit/GUI/TestSessionItemController.cpp
index 04ea3baa1c767e4bd3107725d213e8921fbbd27a..3bfae4e13f28969165f5796a8d00381ee918d100 100644
--- a/Tests/Unit/GUI/TestSessionItemController.cpp
+++ b/Tests/Unit/GUI/TestSessionItemController.cpp
@@ -1,6 +1,6 @@
-#include "GUI/Models/AxesItems.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Views/CommonWidgets/SessionItemController.h"
+#include "GUI/Model/Data/AxesItems.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/View/Common/SessionItemController.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include "Tests/Unit/GUI/TestSessionItemControllerHelper.h"
 #include <QObject>
diff --git a/Tests/Unit/GUI/TestSessionItemControllerHelper.cpp b/Tests/Unit/GUI/TestSessionItemControllerHelper.cpp
index 2d0e60314213bd3e6ea95b2e609808596d3701d7..bb72b8e38907c1fa4c8524c7b1f2619c5edc9885 100644
--- a/Tests/Unit/GUI/TestSessionItemControllerHelper.cpp
+++ b/Tests/Unit/GUI/TestSessionItemControllerHelper.cpp
@@ -1,6 +1,6 @@
 #include "Tests/Unit/GUI/TestSessionItemControllerHelper.h"
-#include "GUI/Models/SessionItem.h"
-#include "GUI/Views/CommonWidgets/SessionItemController.h"
+#include "GUI/Model/Session/SessionItem.h"
+#include "GUI/View/Common/SessionItemController.h"
 
 TestListener::TestListener()
     : m_onItemDestroyedCount(0), m_onPropertyChangeCount(0), m_onWidgetDestroyed(0)
diff --git a/Tests/Unit/GUI/TestSessionItemData.cpp b/Tests/Unit/GUI/TestSessionItemData.cpp
index 80f680a23897457c639d9056d13517957a26c684..6676b480567dc06e8f79a04806bb79f9f04ce0e1 100644
--- a/Tests/Unit/GUI/TestSessionItemData.cpp
+++ b/Tests/Unit/GUI/TestSessionItemData.cpp
@@ -1,5 +1,5 @@
-#include "GUI/Models/SessionFlags.h"
-#include "GUI/Models/SessionItemData.h"
+#include "GUI/Model/Session/SessionFlags.h"
+#include "GUI/Model/Session/SessionItemData.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestSessionItemData : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestSessionItemTags.cpp b/Tests/Unit/GUI/TestSessionItemTags.cpp
index c382edc7bdb7aae2fb92fc648d2c39f4cbc49237..17dd762be3299d37a3280bfece98aa888f8ce0ad 100644
--- a/Tests/Unit/GUI/TestSessionItemTags.cpp
+++ b/Tests/Unit/GUI/TestSessionItemTags.cpp
@@ -1,7 +1,7 @@
-#include "GUI/Models/Error.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/SessionItemTags.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Session/SessionItemTags.h"
+#include "GUI/Util/Error.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestSessionItemTags : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestSessionItemUtils.cpp b/Tests/Unit/GUI/TestSessionItemUtils.cpp
index 82ab8fff2060df2dccb0a934057c8678d6a3b57b..21fb0c10de4a2d90915f517a9de34b9c8ff92137 100644
--- a/Tests/Unit/GUI/TestSessionItemUtils.cpp
+++ b/Tests/Unit/GUI/TestSessionItemUtils.cpp
@@ -1,8 +1,8 @@
-#include "GUI/Models/ComboProperty.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/SessionItemUtils.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Session/SessionItemUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Model/Types/VectorItem.h"
+#include "GUI/Util/ComboProperty.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 class TestSessionItemUtils : public ::testing::Test {
diff --git a/Tests/Unit/GUI/TestSessionModel.cpp b/Tests/Unit/GUI/TestSessionModel.cpp
index fa59a9979019af90fbec4643a02bdcfb20d2a193..db6b080a3750bb551791d18edc6319d9911da33a 100644
--- a/Tests/Unit/GUI/TestSessionModel.cpp
+++ b/Tests/Unit/GUI/TestSessionModel.cpp
@@ -1,15 +1,15 @@
-#include "GUI/Models/InstrumentItems.h"
-#include "GUI/Models/InstrumentModel.h"
-#include "GUI/Models/JobItem.h"
-#include "GUI/Models/JobModel.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MaskItems.h"
-#include "GUI/Models/MaterialModel.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/SampleModel.h"
-#include "GUI/Models/SessionItemTags.h"
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Data/MaskItems.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Instrument/InstrumentItems.h"
+#include "GUI/Model/Instrument/InstrumentModel.h"
+#include "GUI/Model/Job/JobItem.h"
+#include "GUI/Model/Job/JobModel.h"
+#include "GUI/Model/Material/MaterialModel.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/SampleModel.h"
+#include "GUI/Model/Session/SessionItemTags.h"
+#include "GUI/Model/Types/VectorItem.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <QSignalSpy>
 #include <QXmlStreamWriter>
diff --git a/Tests/Unit/GUI/TestSessionXML.cpp b/Tests/Unit/GUI/TestSessionXML.cpp
index 673ecf8fb45faf6f10d09c974a97ad2e758bafde..ebfda9859a2eebd13f658a1752c243f886a412a7 100644
--- a/Tests/Unit/GUI/TestSessionXML.cpp
+++ b/Tests/Unit/GUI/TestSessionXML.cpp
@@ -1,9 +1,9 @@
-#include "GUI/Models/FormFactorItems.h"
-#include "GUI/Models/LayerItem.h"
-#include "GUI/Models/MultiLayerItem.h"
-#include "GUI/Models/ParticleItem.h"
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/SessionModel.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Sample/FormFactorItems.h"
+#include "GUI/Model/Sample/LayerItem.h"
+#include "GUI/Model/Sample/MultiLayerItem.h"
+#include "GUI/Model/Sample/ParticleItem.h"
+#include "GUI/Model/Session/SessionModel.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <QXmlStreamReader>
 #include <QXmlStreamWriter>
diff --git a/Tests/Unit/GUI/TestUpdateTimer.cpp b/Tests/Unit/GUI/TestUpdateTimer.cpp
index e190926a7373c99f4ec51ffc279439c5962caa92..3d5ce6d7804dbd1394779882cd2f46cb8e2c6033 100644
--- a/Tests/Unit/GUI/TestUpdateTimer.cpp
+++ b/Tests/Unit/GUI/TestUpdateTimer.cpp
@@ -1,4 +1,4 @@
-#include "GUI/Views/CommonWidgets/UpdateTimer.h"
+#include "GUI/View/Tool/UpdateTimer.h"
 #include "Tests/GTestWrapper/google_test.h"
 #include <QSignalSpy>
 
diff --git a/Tests/Unit/GUI/TestVectorItem.cpp b/Tests/Unit/GUI/TestVectorItem.cpp
index 7399d26c30c28411f31e19a7f289d19e49d5e63c..79828ba81ae6e57c44c4da970814f90bc6825752 100644
--- a/Tests/Unit/GUI/TestVectorItem.cpp
+++ b/Tests/Unit/GUI/TestVectorItem.cpp
@@ -1,4 +1,4 @@
-#include "GUI/Models/VectorItem.h"
+#include "GUI/Model/Types/VectorItem.h"
 #include "Tests/GTestWrapper/google_test.h"
 
 //! Tests VectorItem class.
diff --git a/Tests/Unit/GUI/Utils.cpp b/Tests/Unit/GUI/Utils.cpp
index 553035bd4010163d2d06a892a9e251440aa1e7b4..f169e56001dd8f91becf4ab8ea599b5783de3b62 100644
--- a/Tests/Unit/GUI/Utils.cpp
+++ b/Tests/Unit/GUI/Utils.cpp
@@ -16,10 +16,10 @@
 #include "Tests/Unit/GUI/Utils.h"
 #include "Device/Data/DataUtils.h"
 #include "Device/Histo/IntensityDataIOFactory.h"
-#include "GUI/Models/Error.h"
-#include "GUI/Models/RealDataItem.h"
-#include "GUI/Models/SessionModel.h"
-#include "GUI/mainwindow/ProjectUtils.h"
+#include "GUI/Model/Data/RealDataItem.h"
+#include "GUI/Model/IO/ProjectUtils.h"
+#include "GUI/Model/Session/SessionModel.h"
+#include "GUI/Util/Error.h"
 #include <QDir>
 
 namespace {
@@ -27,17 +27,17 @@ const int nxsize = 5;
 const int nysize = 10;
 } // namespace
 
-void GuiUnittestUtils::create_dir(const QString& dir_name)
+void UTest::GUI::create_dir(const QString& dir_name)
 {
     if (QFile::exists(dir_name))
         QDir(dir_name).removeRecursively();
 
     if (!QDir(".").mkdir(dir_name))
-        throw Error("GuiUnittestUtils::create_dir() -> Error. Can't create '" + dir_name
+        throw Error("UTest::GUI::create_dir() -> Error. Can't create '" + dir_name
                     + "' in parent directory '.'.");
 }
 
-std::unique_ptr<OutputData<double>> GuiUnittestUtils::createData(double value, DIM n_dim)
+std::unique_ptr<OutputData<double>> UTest::GUI::createData(double value, DIM n_dim)
 {
     std::unique_ptr<OutputData<double>> result(new OutputData<double>());
     result->addAxis("x", nxsize, -1.0, 1.0);
@@ -47,8 +47,8 @@ std::unique_ptr<OutputData<double>> GuiUnittestUtils::createData(double value, D
     return result;
 }
 
-RealDataItem* GuiUnittestUtils::createRealData(const QString& name, SessionModel& model,
-                                               double value, DIM n_dim)
+RealDataItem* UTest::GUI::createRealData(const QString& name, SessionModel& model, double value,
+                                         DIM n_dim)
 {
     auto result = model.insertItem<RealDataItem>();
     result->setOutputData(createData(value, n_dim).release());
@@ -56,13 +56,13 @@ RealDataItem* GuiUnittestUtils::createRealData(const QString& name, SessionModel
     return result;
 }
 
-bool GuiUnittestUtils::isTheSame(const OutputData<double>& data1, const OutputData<double>& data2)
+bool UTest::GUI::isTheSame(const OutputData<double>& data1, const OutputData<double>& data2)
 {
     double diff = DataUtils::Data::relativeDataDifference(data1, data2);
     return diff < 1e-10;
 }
 
-bool GuiUnittestUtils::isTheSame(const QString& fileName, const OutputData<double>& data)
+bool UTest::GUI::isTheSame(const QString& fileName, const OutputData<double>& data)
 {
     std::unique_ptr<OutputData<double>> dataOnDisk(
         IntensityDataIOFactory::readOutputData(fileName.toStdString()));
diff --git a/Tests/Unit/GUI/Utils.h b/Tests/Unit/GUI/Utils.h
index fb5a307c139a3ae80526ed8bd20803a2a9ac7814..c30ae5b7f67de721db8908255e26468780b94c22 100644
--- a/Tests/Unit/GUI/Utils.h
+++ b/Tests/Unit/GUI/Utils.h
@@ -16,15 +16,16 @@
 #ifndef BORNAGAIN_TESTS_UNIT_GUI_UTILS_H
 #define BORNAGAIN_TESTS_UNIT_GUI_UTILS_H
 
-#include "GUI/Models/PropertyItem.h"
-#include "GUI/Models/SessionXML.h"
+#include "GUI/Model/Group/PropertyItem.h"
+#include "GUI/Model/Session/SessionXML.h"
 #include <QString>
 #include <QXmlStreamWriter>
 
 template <class T> class OutputData;
 class RealDataItem;
 
-namespace GuiUnittestUtils {
+namespace UTest::GUI {
+
 enum class DIM { D1 = 1, D2 = 2 };
 
 //! Creates directory in current working directory. If such directory already exists,
@@ -43,7 +44,7 @@ template <typename T> QString propertyToXML(const T& property)
 {
     QString result;
     QXmlStreamWriter writer(&result);
-    GUI::Session::XML::writeVariant(&writer, property.variant(), /*role*/ 0);
+    ::GUI::Session::XML::writeVariant(&writer, property.variant(), /*role*/ 0);
     return result;
 }
 
@@ -56,8 +57,8 @@ template <typename T> T propertyFromXML(const QString& buffer)
     while (!reader.atEnd()) {
         reader.readNext();
         if (reader.isStartElement()) {
-            if (reader.name() == GUI::Session::XML::ParameterTag) {
-                GUI::Session::XML::readProperty(&reader, item.get());
+            if (reader.name() == ::GUI::Session::XML::ParameterTag) {
+                ::GUI::Session::XML::readProperty(&reader, item.get());
             }
         }
     }
@@ -71,6 +72,6 @@ bool isTheSame(const OutputData<double>& data1, const OutputData<double>& data2)
 //! Helper function to check if file on disk represents same data.
 bool isTheSame(const QString& fileName, const OutputData<double>& data);
 
-} // namespace GuiUnittestUtils
+} // namespace UTest::GUI
 
 #endif // BORNAGAIN_TESTS_UNIT_GUI_UTILS_H
diff --git a/Wrap/Swig/libBornAgainBase.i b/Wrap/Swig/libBornAgainBase.i
index 42d14c8fbae37996e938cdab8ec979684fa41919..4c65257ab78d9a8cc52f223a7fc1db9d0698bfa6 100644
--- a/Wrap/Swig/libBornAgainBase.i
+++ b/Wrap/Swig/libBornAgainBase.i
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Wrap/swig/libBornAgainBase.i
+//! @file      Wrap/Swig/libBornAgainBase.i
 //! @brief     SWIG interface file for libBornAgainBase
 //!
 //! @homepage  http://apps.jcns.fz-juelich.de/BornAgain
diff --git a/Wrap/Swig/libBornAgainCore.i b/Wrap/Swig/libBornAgainCore.i
index c552d1831770b2fb9eac948e53a992096da61323..44d1934ad846069c4bf6ea905b3b8f4ea9e736ae 100644
--- a/Wrap/Swig/libBornAgainCore.i
+++ b/Wrap/Swig/libBornAgainCore.i
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Wrap/swig/libBornAgainCore.i
+//! @file      Wrap/Swig/libBornAgainCore.i
 //! @brief     SWIG interface file for libBornAgainCore
 //!
 //!            Configuration is done in Core/CMakeLists.txt
diff --git a/Wrap/Swig/libBornAgainDevice.i b/Wrap/Swig/libBornAgainDevice.i
index 93a296f71d8226d4505de11386082beb56922f13..b27a4c001e7ce93425fe7e3f0c03d0e707ccc7bf 100644
--- a/Wrap/Swig/libBornAgainDevice.i
+++ b/Wrap/Swig/libBornAgainDevice.i
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Wrap/swig/libBornAgainDevice.i
+//! @file      Wrap/Swig/libBornAgainDevice.i
 //! @brief     SWIG interface file for libBornAgainDevice
 //!
 //!            Configuration is done in Device/CMakeLists.txt
diff --git a/Wrap/Swig/libBornAgainFit.i b/Wrap/Swig/libBornAgainFit.i
index d13da14a0ee7a1c6ef3fa2c29c4378c3cf54036c..67e5e781bfe925e25cd0ce16708c7ae19a215046 100644
--- a/Wrap/Swig/libBornAgainFit.i
+++ b/Wrap/Swig/libBornAgainFit.i
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Wrap/swig/libBornAgainFit.i
+//! @file      Wrap/Swig/libBornAgainFit.i
 //! @brief     SWIG interface file for libBornAgainFit
 //!
 //!            Configuration is done in Fit/CMakeLists.txt
diff --git a/Wrap/Swig/libBornAgainParam.i b/Wrap/Swig/libBornAgainParam.i
index 8aee07f7899f7e8fa168d81da8570ae6c7dc37d2..9fd7783f35ebe29bafc8598b8ec1bffb4987a377 100644
--- a/Wrap/Swig/libBornAgainParam.i
+++ b/Wrap/Swig/libBornAgainParam.i
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Wrap/swig/libBornAgainParam.i
+//! @file      Wrap/Swig/libBornAgainParam.i
 //! @brief     SWIG interface file for libBornAgainParam
 //!
 //!            Configuration is done in Param/CMakeLists.txt
diff --git a/Wrap/Swig/libBornAgainResample.i b/Wrap/Swig/libBornAgainResample.i
index 9c3c9cb6f934369d04341fde13d64c5fd29dbd71..81f040a6e1092ba083804dd3bd16dafdc056d4b3 100644
--- a/Wrap/Swig/libBornAgainResample.i
+++ b/Wrap/Swig/libBornAgainResample.i
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Wrap/swig/libBornAgainResample.i
+//! @file      Wrap/Swig/libBornAgainResample.i
 //! @brief     SWIG interface file for libBornAgainResample
 //!
 //!            Configuration is done in Resample/CMakeLists.txt
diff --git a/Wrap/Swig/libBornAgainSample.i b/Wrap/Swig/libBornAgainSample.i
index 7b488eb7b4dd4481ba61d151f48e4de8d8f9da2e..93705714113b93ff039539221494545638411121 100644
--- a/Wrap/Swig/libBornAgainSample.i
+++ b/Wrap/Swig/libBornAgainSample.i
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Wrap/swig/libBornAgainSample.i
+//! @file      Wrap/Swig/libBornAgainSample.i
 //! @brief     SWIG interface file for libBornAgainSample
 //!
 //!            Configuration is done in Sample/CMakeLists.txt
diff --git a/auto/Doc/man/bornagain.1 b/auto/Doc/man/bornagain.1
index 3a43708bef531db48ce991af8c1a9a5bb66b0865..6e5f37b2b49f4ea90a66519d33643852767c7784 100644
--- a/auto/Doc/man/bornagain.1
+++ b/auto/Doc/man/bornagain.1
@@ -133,7 +133,7 @@
 .\" ========================================================================
 .\"
 .IX Title "BORNAGAIN 1"
-.TH BORNAGAIN 1 "2021-03-09" "perl v5.32.1" "BornAgain manual"
+.TH BORNAGAIN 1 "2021-03-23" "perl v5.32.1" "BornAgain manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
diff --git a/auto/Wrap/doxygenDevice.i b/auto/Wrap/doxygenDevice.i
index 93d347474026a5ade2a21be2b0248ef6922124ff..5dab64f2b9e3ec0cb34d6a2a1147dfd1d5f84252 100644
--- a/auto/Wrap/doxygenDevice.i
+++ b/auto/Wrap/doxygenDevice.i
@@ -2826,9 +2826,6 @@ Returns default units to convert to.
 // File: namespace_0d92.xml
 
 
-// File: namespaceboost_1_1geometry.xml
-
-
 // File: namespaceDataUtils.xml
 
 
diff --git a/auto/Wrap/libBornAgainBase_wrap.cpp b/auto/Wrap/libBornAgainBase_wrap.cpp
index 30e45e7828444a00acecd981984a522dbf5eb4e7..ed5bd2442bcc12c826f0581764c2162903e199aa 100644
--- a/auto/Wrap/libBornAgainBase_wrap.cpp
+++ b/auto/Wrap/libBornAgainBase_wrap.cpp
@@ -5667,7 +5667,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_  (PyObject *o, std::complex<double>* val)
 
 
 SWIGINTERNINLINE PyObject*
-SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/local/share/swig/4.0.2/typemaps/swigmacros.swg,104,%ifcplusplus@*/
+SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/share/swig4.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/
 
 const std::complex<double>&
 
diff --git a/auto/Wrap/libBornAgainCore_wrap.cpp b/auto/Wrap/libBornAgainCore_wrap.cpp
index abf08cab7f18e1c37bdfcfefb700fbfdf99d5782..06e4bc57fdead25d9e3d0db68ef694f622ee66c5 100644
--- a/auto/Wrap/libBornAgainCore_wrap.cpp
+++ b/auto/Wrap/libBornAgainCore_wrap.cpp
@@ -5709,7 +5709,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_  (PyObject *o, std::complex<double>* val)
 
 
 SWIGINTERNINLINE PyObject*
-SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/local/share/swig/4.0.2/typemaps/swigmacros.swg,104,%ifcplusplus@*/
+SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/share/swig4.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/
 
 const std::complex<double>&
 
diff --git a/auto/Wrap/libBornAgainDevice_wrap.cpp b/auto/Wrap/libBornAgainDevice_wrap.cpp
index b8356c617f670a83fd854296ecbc3798a1337601..4959c8f81c0887691bd16ae199c97057ad82ebce 100644
--- a/auto/Wrap/libBornAgainDevice_wrap.cpp
+++ b/auto/Wrap/libBornAgainDevice_wrap.cpp
@@ -5715,7 +5715,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_  (PyObject *o, std::complex<double>* val)
 
 
 SWIGINTERNINLINE PyObject*
-SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/local/share/swig/4.0.2/typemaps/swigmacros.swg,104,%ifcplusplus@*/
+SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/share/swig4.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/
 
 const std::complex<double>&
 
diff --git a/auto/Wrap/libBornAgainFit_wrap.cpp b/auto/Wrap/libBornAgainFit_wrap.cpp
index 11fff5db332cb0b046a355336e32e26d49b50a24..f6ea844528fed43d5bf4f37c64f5fcc2865edcf6 100644
--- a/auto/Wrap/libBornAgainFit_wrap.cpp
+++ b/auto/Wrap/libBornAgainFit_wrap.cpp
@@ -5665,7 +5665,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_  (PyObject *o, std::complex<double>* val)
 
 
 SWIGINTERNINLINE PyObject*
-SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/local/share/swig/4.0.2/typemaps/swigmacros.swg,104,%ifcplusplus@*/
+SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/share/swig4.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/
 
 const std::complex<double>&
 
diff --git a/auto/Wrap/libBornAgainParam_wrap.cpp b/auto/Wrap/libBornAgainParam_wrap.cpp
index 489092be20016672fe7a2485b1daa546d864349d..f8f2d1875b54b88a98da9ec7be4749b4ce91dc65 100644
--- a/auto/Wrap/libBornAgainParam_wrap.cpp
+++ b/auto/Wrap/libBornAgainParam_wrap.cpp
@@ -5785,7 +5785,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_  (PyObject *o, std::complex<double>* val)
 
 
 SWIGINTERNINLINE PyObject*
-SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/local/share/swig/4.0.2/typemaps/swigmacros.swg,104,%ifcplusplus@*/
+SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/share/swig4.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/
 
 const std::complex<double>&
 
diff --git a/auto/Wrap/libBornAgainResample_wrap.cpp b/auto/Wrap/libBornAgainResample_wrap.cpp
index 815cde9ef525a57faf751556332f1af2a0be48cf..85ce54d963dce2812531a5974d7c3c23f26f8695 100644
--- a/auto/Wrap/libBornAgainResample_wrap.cpp
+++ b/auto/Wrap/libBornAgainResample_wrap.cpp
@@ -5656,7 +5656,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_  (PyObject *o, std::complex<double>* val)
 
 
 SWIGINTERNINLINE PyObject*
-SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/local/share/swig/4.0.2/typemaps/swigmacros.swg,104,%ifcplusplus@*/
+SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/share/swig4.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/
 
 const std::complex<double>&
 
diff --git a/auto/Wrap/libBornAgainSample_wrap.cpp b/auto/Wrap/libBornAgainSample_wrap.cpp
index 4095bb696f4bcb75a418d6c0f0f15b457a24fdbb..5fd96f444138eca52ae3f67a2c50c002cf9a4241 100644
--- a/auto/Wrap/libBornAgainSample_wrap.cpp
+++ b/auto/Wrap/libBornAgainSample_wrap.cpp
@@ -5786,7 +5786,7 @@ SWIG_AsVal_std_complex_Sl_double_Sg_  (PyObject *o, std::complex<double>* val)
 
 
 SWIGINTERNINLINE PyObject*
-SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/local/share/swig/4.0.2/typemaps/swigmacros.swg,104,%ifcplusplus@*/
+SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/usr/share/swig4.0/typemaps/swigmacros.swg,104,%ifcplusplus@*/
 
 const std::complex<double>&
 
diff --git a/cmake/configurables/BABuild.h.in b/cmake/configurables/BABuild.h.in
index 68e83932bad36c7057f815f04cf4fa0a379e9ec8..db299ced1956950c9f72183e7c45fbf206fa9320 100644
--- a/cmake/configurables/BABuild.h.in
+++ b/cmake/configurables/BABuild.h.in
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Samples/inc/BABuild.h
+//! @file      cmake/configurables/BABuild.h.in
 //! @brief     Defines functions for access build related info.
 //!
 //! @homepage  http://bornagainproject.org
diff --git a/cmake/configurables/BATesting.h.in b/cmake/configurables/BATesting.h.in
index c7996dcc7bc1b91aeb9c7ff33d0305a5d2deefa1..644541a54b516f6d030c0e3e5feff9358449c18d 100644
--- a/cmake/configurables/BATesting.h.in
+++ b/cmake/configurables/BATesting.h.in
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Samples/inc/BATesting.h
+//! @file      cmake/configurables/BATesting.h.in
 //! @brief     Defines functions for access build related info.
 //!
 //! @homepage  http://bornagainproject.org
diff --git a/cmake/configurables/BAVersion.h.in b/cmake/configurables/BAVersion.h.in
index b9ec1f72995dbcce88b7c1c1f808b4883bfc59dd..7e3cb695b32e1610ac8cef62e3188aa7e80c2b5c 100644
--- a/cmake/configurables/BAVersion.h.in
+++ b/cmake/configurables/BAVersion.h.in
@@ -2,7 +2,7 @@
 //
 //  BornAgain: simulate and fit reflection and scattering
 //
-//! @file      Samples/inc/BAVersion.h
+//! @file      cmake/configurables/BAVersion.h.in
 //! @brief     Defines functions for access to the package version number.
 //!
 //! @homepage  http://bornagainproject.org