diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1786e4b14cc14618b755b3c74952b04638e6c04a..0af9c4a8b96af51b24a0e7f9c489ca25304794dc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,8 +39,6 @@ if(BORNAGAIN_MAN)
     add_subdirectory(Doc/UserManual)
 endif()
 
-#set(CMAKE_MACOSX_RPATH 0)
-
 add_subdirectory(Core)
 add_subdirectory(ThirdParty/gtest)
 add_subdirectory(Tests/UnitTests/TestCore)
diff --git a/GUI/CMakeLists.txt b/GUI/CMakeLists.txt
index 8690abec2a6959a9f218b86f3a794b5b5d88c0eb..153bc32190ddf247fe03aeb6b3582c5c069963c3 100644
--- a/GUI/CMakeLists.txt
+++ b/GUI/CMakeLists.txt
@@ -1,25 +1,21 @@
 ############################################################################
 # CMakeLists.txt file for building BornAgain/GUI libraries and executable
 ############################################################################
-
 cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
 if(POLICY CMP0020)
-cmake_policy(SET CMP0020 NEW)
+    cmake_policy(SET CMP0020 NEW)
 endif()
 if(POLICY CMP0043)
-cmake_policy(SET CMP0043 NEW)
+    cmake_policy(SET CMP0043 NEW)
 endif()
 if(POLICY CMP0042)
-cmake_policy(SET CMP0042 NEW)
+    cmake_policy(SET CMP0042 NEW)
 endif()
 
 message(STATUS "Configuring BornAgain GUI")
 
-#if(POLICY CMP0020)
-#cmake_policy(SET CMP0020 NEW)
-#endif()
-
 find_package(Qt5Widgets REQUIRED)
+
 if(${Qt5Widgets_FOUND})
     message(STATUS "  Found Qt5 version ${Qt5Widgets_VERSION_STRING}")
     get_target_property(Qt5Widgets_location Qt5::Widgets LOCATION_Release)
@@ -35,12 +31,13 @@ add_subdirectory(externals/qt-manhattan-style)
 add_subdirectory(externals/qcustomplot)
 add_subdirectory(externals/qtpropertybrowser)
 add_subdirectory(coregui)
+
 if(BORNAGAIN_CRASHHADLER)
     add_definitions(-DBORNAGAIN_CRASHHANDLER)
     add_subdirectory(crashhandler)
 endif()
-add_subdirectory(main)
 
+add_subdirectory(main)
 
 set(BornAgainGUI_INCLUDE_DIRS ${BornAgainGUI_INCLUDE_DIRS} PARENT_SCOPE)
 set(BornAgainGUI_LIBRARY ${BornAgainGUI_LIBRARY} PARENT_SCOPE)
diff --git a/GUI/externals/qcustomplot/CMakeLists.txt b/GUI/externals/qcustomplot/CMakeLists.txt
index ae0dd59a2557f0377bf16a543c0b0ccacccd99f2..63e393a3bea50cbf419bf6c7c50890ea255adcfa 100644
--- a/GUI/externals/qcustomplot/CMakeLists.txt
+++ b/GUI/externals/qcustomplot/CMakeLists.txt
@@ -1,11 +1,13 @@
+############################################################################
+# CMakeLists.txt file for building qcustomplot static library
+############################################################################
 cmake_minimum_required(VERSION 2.8.9)
 if(POLICY CMP0020)
-cmake_policy(SET CMP0020 NEW)
+    cmake_policy(SET CMP0020 NEW)
 endif()
 if(POLICY CMP0043)
-cmake_policy(SET CMP0043 NEW)
+    cmake_policy(SET CMP0043 NEW)
 endif()
-
 set(library_name qcustomplot)
 
 set(source_files qcustomplot.h qcustomplot.cpp)
diff --git a/GUI/externals/qt-manhattan-style/CMakeLists.txt b/GUI/externals/qt-manhattan-style/CMakeLists.txt
index 7fb09d3c4889a37eb8fb1fc90a8863513e2dad9e..a3b5883cb9d38f335ce8eaa344339e4874cb6add 100644
--- a/GUI/externals/qt-manhattan-style/CMakeLists.txt
+++ b/GUI/externals/qt-manhattan-style/CMakeLists.txt
@@ -1,19 +1,17 @@
 ############################################################################
 # CMakeLists.txt file for building libManhattanStyle
 ############################################################################
-
 cmake_minimum_required(VERSION 2.8.9)
 if(POLICY CMP0020)
-cmake_policy(SET CMP0020 NEW)
+    cmake_policy(SET CMP0020 NEW)
 endif()
 if(POLICY CMP0043)
-cmake_policy(SET CMP0043 NEW)
+    cmake_policy(SET CMP0043 NEW)
 endif()
 if(POLICY CMP0042)
-cmake_policy(SET CMP0042 NEW)
+    cmake_policy(SET CMP0042 NEW)
 endif()
 
-#project(qt-manhattan-style)
 set(library_name ManhattanStyle)
 
 set(SRCS
@@ -72,7 +70,6 @@ set(UI_FILES
 # Qt5
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 set(CMAKE_AUTOMOC ON)
-#find_package(Qt5Widgets)
 
 # Run uic on ui files
 qt5_wrap_ui(UI_HDRS ${UI_FILES})
@@ -86,7 +83,7 @@ add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x040900)
 
 # Create the target
 add_definitions(-DQTMANHATTANSTYLE_LIBRARY)
-add_library(${library_name} SHARED ${SRCS} ${UI_HDRS} ${RC_SRCS})
+add_library(${library_name} STATIC ${SRCS} ${UI_HDRS} ${RC_SRCS})
 set(${library_name}_INCLUDE_DIRS ${include_dirs} PARENT_SCOPE)
 set(${library_name}_LIBRARY ${library_name} PARENT_SCOPE)
 
@@ -97,6 +94,3 @@ target_link_libraries(${library_name} ${Qt5Widgets_LIBRARIES})
 
 qt5_use_modules(${library_name} Widgets)
 
-# --- installation ---
-install (TARGETS ${library_name} DESTINATION ${destination_lib} COMPONENT Libraries)
-
diff --git a/GUI/externals/qtpropertybrowser/CMakeLists.txt b/GUI/externals/qtpropertybrowser/CMakeLists.txt
index 3c1e738413ada1dc7962f183e3fed7c3c2384848..726588a00aa1eb906cd5e59a4d06f3380c75d29e 100644
--- a/GUI/externals/qtpropertybrowser/CMakeLists.txt
+++ b/GUI/externals/qtpropertybrowser/CMakeLists.txt
@@ -1,14 +1,15 @@
+############################################################################
+# CMakeLists.txt file for building static qtpropertybrowser library from qtsolutions
+############################################################################
 cmake_minimum_required(VERSION 2.8.9)
 if(POLICY CMP0020)
-cmake_policy(SET CMP0020 NEW)
+    cmake_policy(SET CMP0020 NEW)
 endif()
 if(POLICY CMP0043)
-cmake_policy(SET CMP0043 NEW)
+    cmake_policy(SET CMP0043 NEW)
 endif()
-
 set(library_name qtpropertybrowser)
 
-
 file(GLOB source_files "*.cpp")
 file(GLOB include_files "*.h")
 
diff --git a/ThirdParty/RootMinimizers/CMakeLists.txt b/ThirdParty/RootMinimizers/CMakeLists.txt
index 8431b802c3e911b3f4b62b068c24cf772c353645..ddc8fd39a63518b100a6ca690146eb88ecf86631 100644
--- a/ThirdParty/RootMinimizers/CMakeLists.txt
+++ b/ThirdParty/RootMinimizers/CMakeLists.txt
@@ -1,10 +1,9 @@
 ############################################################################
 # CMakeLists.txt file for building libRootMinimizers package
 ############################################################################
-
 set(library_name RootMinimizers)
 
-# source and include files
+# --- source and include files ---------
 set(include_dirs
     ${CMAKE_CURRENT_SOURCE_DIR}/inc
 )
@@ -23,39 +22,32 @@ file(GLOB include_files
     "src/Math/*.h"
 )
 
-
 if(NOT ROOT_FOUND)
     list(REMOVE_ITEM source_files "${CMAKE_CURRENT_SOURCE_DIR}/src/Math/GeneticMinimizer.cxx")
     list(REMOVE_ITEM include_files "${CMAKE_CURRENT_SOURCE_DIR}/inc/Math/GeneticMinimizer.h")
 endif()
 
 
+# --- definitions ---------
 add_definitions(-DWARNINGMSG)
-
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMATH_NO_PLUGIN_MANAGER -DHAS_MINUIT2 -DR__HAS_MATHMORE")
 
-# --- making library ---
+
+# --- making library ------------
 add_library(
     ${library_name}
     STATIC
     ${source_files} ${include_files}
 )
-#set_Target_properties(${library_name} PROPERTIES PREFIX ${libprefix} SUFFIX ${libsuffix})
-#set(${library_name}_LIBRARY_TYPE SHARED)
-# exposing library name and list of include directories outside
 set(${library_name}_INCLUDE_DIRS ${include_dirs} PARENT_SCOPE)
 set(${library_name}_LIBRARY ${library_name} PARENT_SCOPE)
 
+
 # --- external dependencies ---
 include_directories(${GSL_INCLUDE_DIR})
 target_link_libraries(${library_name} ${GSL_LIBRARIES})
 
 if(ROOT_FOUND)
-    include_directories(
-        ${ROOT_INCLUDE_DIR}
-    )
+    include_directories(${ROOT_INCLUDE_DIR})
 endif()
 
-
-# --- installation ---
-#install (TARGETS ${library_name} DESTINATION ${destination_lib} COMPONENT Libraries)
diff --git a/ThirdParty/gtest/CMakeLists.txt b/ThirdParty/gtest/CMakeLists.txt
index ae244f3feb5ac31f09668013dcae64ed7f4cc8b9..1d0762c03fba772f32fe2e2ca387c9e87222df57 100644
--- a/ThirdParty/gtest/CMakeLists.txt
+++ b/ThirdParty/gtest/CMakeLists.txt
@@ -1,9 +1,8 @@
 ############################################################################
 # CMakeLists.txt file for building gtest library
 ############################################################################
-
 if(POLICY CMP0042)
-cmake_policy(SET CMP0042 NEW)
+    cmake_policy(SET CMP0042 NEW)
 endif()
 
 if(MSVC)