diff --git a/.gitignore b/.gitignore
index 4fcb243..7e86960 100644
--- a/.gitignore
+++ b/.gitignore
@@ -69,5 +69,6 @@ _deps
 # Configured files
 build.gradle
 AndroidManifest.xml
-src/Example/Deploy/RENAME_ME.json
-src/Library/doctorpill_global.h
+src/Example/Deploy/DoctorPill.json
+src/Core/doctorpill_global.h
+src/GUI/doctorpill_gui_global.h
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 76625a3..a928537 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,15 +53,16 @@ if (ANDROID OR IOS)
 
 endif()
 
-
 initAll()
 
+add_subdirectory(src/Core)
+
 if (NOT DOCTOR_PILL_GUI)
     set(DOCTOR_PILL_EXAMPLE OFF)
+else()
+    add_subdirectory(src/GUI)
 endif()
 
-add_subdirectory(src/Library)
-
 if (DOCTOR_PILL_EXAMPLE)
     add_subdirectory(src/Example)
 endif()
diff --git a/src/Core/CMakeLists.txt b/src/Core/CMakeLists.txt
new file mode 100644
index 0000000..7f724e5
--- /dev/null
+++ b/src/Core/CMakeLists.txt
@@ -0,0 +1,31 @@
+#
+# Copyright (C) 2020-2022 QuasarApp.
+# Distributed under the GPLv3 software license, see the accompanying
+# Everyone is permitted to copy and distribute verbatim copies
+# of this license document, but changing it is not allowed.
+#
+
+cmake_minimum_required(VERSION 3.14)
+
+add_definitions(-DDOCTOR_PILL_LIBRARY)
+
+file(GLOB SOURCE_CPP
+    "*.cpp"
+    "DoctorPillCore/*.cpp"
+    "*.h"
+    "DoctorPillCore/*.h"
+)
+
+set(ALL_SOURCES ${SOURCE_CPP})
+
+set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/private")
+
+add_library(${PROJECT_NAME} ${ALL_SOURCES})
+target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core )
+
+target_include_directories(${PROJECT_NAME} PUBLIC ${PUBLIC_INCUDE_DIR})
+target_include_directories(${PROJECT_NAME} PRIVATE ${PRIVATE_INCUDE_DIR})
+
+set(global_file "${CMAKE_CURRENT_SOURCE_DIR}/doctorpill_global.h")
+configure_file("${global_file}.in" ${global_file} @ONLY)
diff --git a/src/Library/DoctorPillCore/doctor.cpp b/src/Core/DoctorPillCore/doctor.cpp
similarity index 100%
rename from src/Library/DoctorPillCore/doctor.cpp
rename to src/Core/DoctorPillCore/doctor.cpp
diff --git a/src/Library/DoctorPillCore/doctor.h b/src/Core/DoctorPillCore/doctor.h
similarity index 100%
rename from src/Library/DoctorPillCore/doctor.h
rename to src/Core/DoctorPillCore/doctor.h
diff --git a/src/Library/DoctorPillCore/doctortest.cpp b/src/Core/DoctorPillCore/doctortest.cpp
similarity index 100%
rename from src/Library/DoctorPillCore/doctortest.cpp
rename to src/Core/DoctorPillCore/doctortest.cpp
diff --git a/src/Library/DoctorPillCore/doctortest.h b/src/Core/DoctorPillCore/doctortest.h
similarity index 100%
rename from src/Library/DoctorPillCore/doctortest.h
rename to src/Core/DoctorPillCore/doctortest.h
diff --git a/src/Library/DoctorPillCore/ipill.cpp b/src/Core/DoctorPillCore/ipill.cpp
similarity index 100%
rename from src/Library/DoctorPillCore/ipill.cpp
rename to src/Core/DoctorPillCore/ipill.cpp
diff --git a/src/Library/DoctorPillCore/ipill.h b/src/Core/DoctorPillCore/ipill.h
similarity index 100%
rename from src/Library/DoctorPillCore/ipill.h
rename to src/Core/DoctorPillCore/ipill.h
diff --git a/src/Core/doctorpill.cpp b/src/Core/doctorpill.cpp
new file mode 100644
index 0000000..d0fbcfb
--- /dev/null
+++ b/src/Core/doctorpill.cpp
@@ -0,0 +1,15 @@
+//#
+//# Copyright (C) 2021-2022 QuasarApp.
+//# Distributed under the GPLv3 software license, see the accompanying
+//# Everyone is permitted to copy and distribute verbatim copies
+//# of this license document, but changing it is not allowed.
+//#
+
+#include "doctorpill.h"
+
+namespace DP {
+
+QString version() {
+    return DOCTOR_PILL_VERSION;
+}
+}
diff --git a/src/Core/doctorpill.h b/src/Core/doctorpill.h
new file mode 100644
index 0000000..a82eec0
--- /dev/null
+++ b/src/Core/doctorpill.h
@@ -0,0 +1,26 @@
+//#
+//# Copyright (C) 2021-2022 QuasarApp.
+//# Distributed under the GPLv3 software license, see the accompanying
+//# Everyone is permitted to copy and distribute verbatim copies
+//# of this license document, but changing it is not allowed.
+//#
+
+#ifndef DOCTOR_PILL_H
+#define DOCTOR_PILL_H
+
+#include "DoctorPillCore/doctor.h"
+#include "DoctorPillCore/doctortest.h"
+
+/**
+ * @brief DP This is base name space of the DoctorPill(DP) library. Please if you use the gui application and gui models then invoke the DP::init method before use this library.
+ */
+namespace DP {
+
+    /**
+     * @brief version This method return string value of lib version
+     * @return string value of lib version.
+     */
+    QString version();
+}
+
+#endif // DOCTOR_PILL_H
diff --git a/src/Library/doctorpill_global.h.in b/src/Core/doctorpill_global.h.in
similarity index 94%
rename from src/Library/doctorpill_global.h.in
rename to src/Core/doctorpill_global.h.in
index 425bb25..44248cd 100644
--- a/src/Library/doctorpill_global.h.in
+++ b/src/Core/doctorpill_global.h.in
@@ -17,7 +17,6 @@
 #endif
 
 #define DOCTOR_PILL_VERSION "@DOCTOR_PILL_VERSION@"
-#define @DOCTOR_PILL_DEFINE@
 
 #endif //DoctorPill_GLOBAL_H
 
diff --git a/src/Library/CMakeLists.txt b/src/GUI/CMakeLists.txt
similarity index 53%
rename from src/Library/CMakeLists.txt
rename to src/GUI/CMakeLists.txt
index 5e9df1d..071e9de 100644
--- a/src/Library/CMakeLists.txt
+++ b/src/GUI/CMakeLists.txt
@@ -7,47 +7,34 @@
 
 cmake_minimum_required(VERSION 3.14)
 
-add_definitions(-DDOCTOR_PILL_LIBRARY)
+add_definitions(-DDOCTOR_PILL_GUI_LIBRARY)
 
-file(GLOB SOURCE_CPP
+set(CURRENT_PROJECT ${PROJECT_NAME}GUI)
+
+file(GLOB SOURCE_CPP_GUI
+    "DoctorPillGui/*.cpp"
+    "DoctorPillGui/*.h"
     "*.cpp"
-    "DoctorPillCore/*.cpp"
     "*.h"
-    "DoctorPillCore/*.h"
 )
 
-if (DOCTOR_PILL_GUI)
-    file(GLOB SOURCE_CPP_GUI
-        "DoctorPillGui/*.cpp"
-        "DoctorPillGui/*.h"
-
-    )
-
-    file(GLOB SOURCE_QRC
-        "*.qrc"
-        "DoctorPillCore/*.qrc"
-    )
-
-endif()
+file(GLOB SOURCE_QRC
+    "*.qrc"
+    "DoctorPillCore/*.qrc"
+)
 
 set(ALL_SOURCES ${SOURCE_CPP} ${SOURCE_QRC} ${SOURCE_CPP_GUI})
 
 set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
 set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/private")
 
-add_library(${PROJECT_NAME} ${ALL_SOURCES})
-target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core )
+add_library(${CURRENT_PROJECT} ${ALL_SOURCES})
 
-set(DOCTOR_PILL_DEFINE "DOCTOR_PILL_WITHOUT_GUI")
-if (DOCTOR_PILL_GUI)
-    set(DOCTOR_PILL_DEFINE "DOCTOR_PILL_WITH_GUI")
+find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Quick Concurrent REQUIRED)
+target_link_libraries(${CURRENT_PROJECT} PUBLIC ${PROJECT_NAME} Qt${QT_VERSION_MAJOR}::Concurrent Qt${QT_VERSION_MAJOR}::Quick )
 
-    find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Quick Concurrent REQUIRED)
-    target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Concurrent Qt${QT_VERSION_MAJOR}::Quick )
-endif()
-
-target_include_directories(${PROJECT_NAME} PUBLIC ${PUBLIC_INCUDE_DIR})
-target_include_directories(${PROJECT_NAME} PRIVATE ${PRIVATE_INCUDE_DIR})
+target_include_directories(${CURRENT_PROJECT} PUBLIC ${PUBLIC_INCUDE_DIR})
+target_include_directories(${CURRENT_PROJECT} PRIVATE ${PRIVATE_INCUDE_DIR})
 
 
 set(LANGS ${CMAKE_CURRENT_SOURCE_DIR}/languages/en.ts
@@ -61,9 +48,9 @@ set(LANGS ${CMAKE_CURRENT_SOURCE_DIR}/languages/en.ts
           ${CMAKE_CURRENT_SOURCE_DIR}/languages/es.ts
           ${CMAKE_CURRENT_SOURCE_DIR}/languages/pl.ts)
 
-prepareQM(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/../ "${LANGS}")
+prepareQM(${CURRENT_PROJECT} ${CMAKE_CURRENT_SOURCE_DIR}/../ "${LANGS}")
 
 set(QML_IMPORT_PATH ${QML_IMPORT_PATH} "${CMAKE_CURRENT_SOURCE_DIR}" CACHE STRING "" FORCE)
 
-set(global_file "${CMAKE_CURRENT_SOURCE_DIR}/doctorpill_global.h")
+set(global_file "${CMAKE_CURRENT_SOURCE_DIR}/doctorpill_gui_global.h")
 configure_file("${global_file}.in" ${global_file} @ONLY)
diff --git a/src/Library/DoctorPillGui/doctormodel.cpp b/src/GUI/DoctorPillGui/doctormodel.cpp
similarity index 100%
rename from src/Library/DoctorPillGui/doctormodel.cpp
rename to src/GUI/DoctorPillGui/doctormodel.cpp
diff --git a/src/Library/DoctorPillGui/doctormodel.h b/src/GUI/DoctorPillGui/doctormodel.h
similarity index 97%
rename from src/Library/DoctorPillGui/doctormodel.h
rename to src/GUI/DoctorPillGui/doctormodel.h
index 3fd734b..d330bf4 100644
--- a/src/Library/DoctorPillGui/doctormodel.h
+++ b/src/GUI/DoctorPillGui/doctormodel.h
@@ -10,13 +10,14 @@
 
 #include <QAbstractListModel>
 #include <DoctorPillCore/doctor.h>
+#include <doctorpill_gui_global.h>
 
 namespace DP {
 
 /**
  * @brief The PillsModel class This is gui model of available pills.
  */
-class DOCTOR_PILL_EXPORT DoctorModel: public QAbstractListModel
+class DOCTOR_PILL_GUI_EXPORT DoctorModel: public QAbstractListModel
 {
     Q_OBJECT
 
diff --git a/src/Library/DoctorPillModule/DoctorView.qml b/src/GUI/DoctorPillModule/DoctorView.qml
similarity index 100%
rename from src/Library/DoctorPillModule/DoctorView.qml
rename to src/GUI/DoctorPillModule/DoctorView.qml
diff --git a/src/Library/DoctorPillModule/qmldir b/src/GUI/DoctorPillModule/qmldir
similarity index 100%
rename from src/Library/DoctorPillModule/qmldir
rename to src/GUI/DoctorPillModule/qmldir
diff --git a/src/Library/DoctorPillRes.qrc b/src/GUI/DoctorPillRes.qrc
similarity index 100%
rename from src/Library/DoctorPillRes.qrc
rename to src/GUI/DoctorPillRes.qrc
diff --git a/src/GUI/doctorpill_gui_global.h.in b/src/GUI/doctorpill_gui_global.h.in
new file mode 100644
index 0000000..2f4db50
--- /dev/null
+++ b/src/GUI/doctorpill_gui_global.h.in
@@ -0,0 +1,20 @@
+//#
+//# Copyright (C) 2018-2022 QuasarApp.
+//# Distributed under the GPLv3 software license, see the accompanying
+//# Everyone is permitted to copy and distribute verbatim copies
+//# of this license document, but changing it is not allowed.
+//#
+
+#ifndef DoctorPill_GUI_GLOBAL_H
+#define DoctorPill_GUI_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(DOCTOR_PILL_GUI_LIBRARY)
+#  define DOCTOR_PILL_GUI_EXPORT Q_DECL_EXPORT
+#else
+#  define DOCTOR_PILL_GUI_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif //DoctorPill_GUI_GLOBAL_H
+
diff --git a/src/Library/doctorpill.cpp b/src/GUI/doctorpillgui.cpp
similarity index 74%
rename from src/Library/doctorpill.cpp
rename to src/GUI/doctorpillgui.cpp
index 360ed58..942163e 100644
--- a/src/Library/doctorpill.cpp
+++ b/src/GUI/doctorpillgui.cpp
@@ -5,13 +5,11 @@
 //# of this license document, but changing it is not allowed.
 //#
 
-#include "doctorpill.h"
-#ifdef DOCTOR_PILL_WITH_GUI
+#include "doctorpillgui.h"
 #include <QQmlApplicationEngine>
-#endif
+
 namespace DP {
 
-#ifdef DOCTOR_PILL_WITH_GUI
 bool init(QQmlApplicationEngine *engine) {
 
     if (!engine)
@@ -28,14 +26,4 @@ bool init(QQmlApplicationEngine *engine) {
     return true;
 }
 
-#else
-bool init() {
-    return true;
-}
-
-#endif
-
-QString version() {
-    return DOCTOR_PILL_VERSION;
-}
 }
diff --git a/src/Library/doctorpill.h b/src/GUI/doctorpillgui.h
similarity index 58%
rename from src/Library/doctorpill.h
rename to src/GUI/doctorpillgui.h
index 762b165..f564d4a 100644
--- a/src/Library/doctorpill.h
+++ b/src/GUI/doctorpillgui.h
@@ -5,14 +5,12 @@
 //# of this license document, but changing it is not allowed.
 //#
 
-#ifndef DOCTOR_PILL_H
-#define DOCTOR_PILL_H
+#ifndef DOCTOR_PILL_GUI_H
+#define DOCTOR_PILL_GUI_H
 
 #include "DoctorPillCore/doctor.h"
 #include "DoctorPillCore/doctortest.h"
 
-#ifdef DOCTOR_PILL_WITH_GUI
-
 #include "DoctorPillGui/doctormodel.h"
 
 inline void initDoctorPillResources() {
@@ -20,14 +18,9 @@ inline void initDoctorPillResources() {
 }
 
 class QQmlApplicationEngine;
-#endif
 
-/**
- * @brief DP This is base name space of the DoctorPill(DP) library. Please if you use the gui application and gui models then invoke the DP::init method before use this library.
- */
 namespace DP {
 
-#ifdef DOCTOR_PILL_WITH_GUI
 /**
      * @brief init This function initialize the qml gui classes of the DoctorPill library.
      * @note if you do not use GUI then this function do nothing.
@@ -37,21 +30,6 @@ namespace DP {
      * @see DoctorModel
      */
     bool DOCTOR_PILL_EXPORT init(QQmlApplicationEngine *engine);
-#else
-/**
-     * @brief init This function is empty wrapper for non gui build
-     * @return always return true.
-     *
-     * @see DoctorModel
-     */
-    bool DOCTOR_PILL_EXPORT init();
-#endif
-
-    /**
-     * @brief version This method return string value of lib version
-     * @return string value of lib version.
-     */
-    QString version();
 }
 
-#endif // DOCTOR_PILL_H
+#endif // DOCTOR_PILL_GUI_H
diff --git a/src/Library/icons/Failed.png b/src/GUI/icons/Failed.png
similarity index 100%
rename from src/Library/icons/Failed.png
rename to src/GUI/icons/Failed.png
diff --git a/src/Library/icons/Found.png b/src/GUI/icons/Found.png
similarity index 100%
rename from src/Library/icons/Found.png
rename to src/GUI/icons/Found.png
diff --git a/src/Library/icons/Solved.png b/src/GUI/icons/Solved.png
similarity index 100%
rename from src/Library/icons/Solved.png
rename to src/GUI/icons/Solved.png
diff --git a/src/Library/languages/de.ts b/src/GUI/languages/de.ts
similarity index 100%
rename from src/Library/languages/de.ts
rename to src/GUI/languages/de.ts
diff --git a/src/Library/languages/en.ts b/src/GUI/languages/en.ts
similarity index 100%
rename from src/Library/languages/en.ts
rename to src/GUI/languages/en.ts
diff --git a/src/Library/languages/es.ts b/src/GUI/languages/es.ts
similarity index 100%
rename from src/Library/languages/es.ts
rename to src/GUI/languages/es.ts
diff --git a/src/Library/languages/fr.ts b/src/GUI/languages/fr.ts
similarity index 100%
rename from src/Library/languages/fr.ts
rename to src/GUI/languages/fr.ts
diff --git a/src/Library/languages/ja.ts b/src/GUI/languages/ja.ts
similarity index 100%
rename from src/Library/languages/ja.ts
rename to src/GUI/languages/ja.ts
diff --git a/src/Library/languages/pl.ts b/src/GUI/languages/pl.ts
similarity index 100%
rename from src/Library/languages/pl.ts
rename to src/GUI/languages/pl.ts
diff --git a/src/Library/languages/ru.ts b/src/GUI/languages/ru.ts
similarity index 100%
rename from src/Library/languages/ru.ts
rename to src/GUI/languages/ru.ts
diff --git a/src/Library/languages/tr.ts b/src/GUI/languages/tr.ts
similarity index 100%
rename from src/Library/languages/tr.ts
rename to src/GUI/languages/tr.ts
diff --git a/src/Library/languages/uk.ts b/src/GUI/languages/uk.ts
similarity index 100%
rename from src/Library/languages/uk.ts
rename to src/GUI/languages/uk.ts
diff --git a/src/Library/languages/zh.ts b/src/GUI/languages/zh.ts
similarity index 100%
rename from src/Library/languages/zh.ts
rename to src/GUI/languages/zh.ts