diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0477a5a5fa4381eaad3f62f0b62238010b9da238..d6726f24691aa2e63e9ca8180bbaf05620df476b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,43 +1,33 @@
-image: docker.io/evili/labrobotica
+image: docker.io/labrobotica/labrobotica
 
-cmake-build:
+stages:
+  - build
+  - test
+  - deploy
+
+build-package:
   stage: build
   script:
-    - mkdir -pv Build
-    - cd Build
-    - cmake -D CMAKE_BUILD_TYPE=Debug ..
-    - make
+#  Uncomment to install dependencies
+#    - apt update
+#    - apt -y install iri-<package_name>-dev
+    - mkdir -pv build
+    - cd build
+    - cmake -D CMAKE_BUILD_TYPE=RELEASE -DCPACK_PACKAGE_VERSION=$CI_COMMIT_TAG ..
+    - make package -j $(nproc)
   artifacts:
     paths:
-      - Build/
-      - bin/
-      - lib/
+      - build/*.deb
+    expire_in: 2 weeks
+  only:
+    - tags
     
-# unit-test:
-#   stage: test
-#   script:
-#     - cd Build
-#     - ctest --timeout 15 --verbose -T test
-#     - ctest --timeout 15 --verbose -T memcheck
-#   artifacts:
-#     paths:
-#       - Build/
-
-coverage:
+update_repo:
   stage: deploy
   script:
-    - cd Build
-    - ctest --timeout 15 --verbose -T coverage
-
-pages:
-  script:
-  - cd Build
-  - apt-get update
-  - apt-get install -y ttf-freefont graphviz
-  - make doc
-  - mv ../doc/html/ ../public/
-  artifacts:
-    paths:
-    - public/
+    - cd build
+    - "scp -i /root/.ssh/iriLabKeyNopwd -r *iriutils*.deb irilabo@147.83.76.226:packages/"
+    - "ssh irilabo@147.83.76.226 -i /root/.ssh/iriLabKeyNopwd -tt /home/irilabo/repo_scripts/update_repo.sh iriutils"
   only:
-  - master
+    - tags
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e4d8fa673921d5475131bca2955cc212661a843..58f24adcb020cca96c6f15da53b32c3cf85757e3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,7 @@ endif(COMMAND cmake_policy)
 
 # The project name and the type of project
 PROJECT(iriutils)
+SET(PACKAGE_NAME iriutils)
 
 SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
 SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib)
@@ -82,10 +83,7 @@ ELSE(UNIX)
   )
 ENDIF(UNIX)
 
-SET(CPACK_PACKAGE_VERSION "1.0.0")
-SET(CPACK_PACKAGE_VERSION_MAJOR "1")
-SET(CPACK_PACKAGE_VERSION_MINOR "0")
-SET(CPACK_PACKAGE_VERSION_PATCH "0")
+
 IF (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
   SET (X86 TRUE)
   SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
@@ -95,14 +93,18 @@ ELSE ()
 ENDIF()
 
 IF (UNIX)
-  SET(CPACK_PACKAGE_FILE_NAME "iri-${PROJECT_NAME}-dev-${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
-  SET(CPACK_PACKAGE_NAME "iri-${PROJECT_NAME}-dev")
-  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Part of IRI-laboratory libraries. More information at http://wikiri.upc.es/index.php/Robotics_Lab")
-  SET(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
+  SET(CPACK_PACKAGE_FILE_NAME "iri-${PACKAGE_NAME}-dev-${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
+  SET(CPACK_PACKAGE_NAME "iri-${PACKAGE_NAME}-dev")
+  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Part of IRI-laboratory libraries. More information at https://gitlab.iri.upc.edu/labrobotica/labrobotica_how_to")
+  SET(CPACK_PACKAGING_INSTALL_PREFIX /usr)
   SET(CPACK_GENERATOR "DEB")
-  SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "galenya - labrobotica@iri.upc.edu")
-  SET(CPACK_SET_DESTDIR "ON")  # Necessary because of the absolute install paths
-  set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/package_scripts/preinst;${CMAKE_SOURCE_DIR}/package_scripts/postinst;${CMAKE_SOURCE_DIR}/package_scripts/prerm;${CMAKE_SOURCE_DIR}/package_scripts/postrm")
+  SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "labrobotica - labrobotica@iri.upc.edu")
+
+# Uncomment to add the necessary mantainer scripts
+#   SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/package_scripts/preinst;${CMAKE_SOURCE_DIR}/package_scripts/postinst;${CMAKE_SOURCE_DIR}/package_scripts/prerm;${CMAKE_SOURCE_DIR}/package_scripts/postrm")
+
+# Uncomment to add dependencies comma separated
+# SET(CPACK_DEBIAN_PACKAGE_DEPENDS "iri-<package_name>-dev (>= 1.0~${DISTRIB})")
 
   INCLUDE(CPack)
 ELSE(UNIX)
diff --git a/Findiriutils.cmake b/Findiriutils.cmake
index 8faacba73186ba95245ef574f2d44e575f448bec..51b4c68e0b0f97808474f6b1deb0a5b20d9e7935 100644
--- a/Findiriutils.cmake
+++ b/Findiriutils.cmake
@@ -1,16 +1,20 @@
-FIND_PATH(iriutils_INCLUDE_DIR exceptions.h mutex.h mutexexceptions.h event.h eventserver.h eventexceptions.h thread.h threadserver.h threadexceptions.h comm.h commexceptions.h log.h logexceptions.h /usr/include/iridrivers /usr/local/include/iridrivers)
+FIND_PATH(iriutils_INCLUDE_DIRS exceptions.h mutex.h mutexexceptions.h event.h eventserver.h eventexceptions.h thread.h threadserver.h threadexceptions.h ctime.h ctimexceptions.h log.h logexceptions.h /usr/local/include/iri/iriutils /usr/include/iri/iriutils)
 
-FIND_LIBRARY(iriutils_LIBRARY
+
+FIND_LIBRARY(iriutils_LIBRARIES
     NAMES iriutils
-    PATHS /usr/lib/iridrivers /usr/local/lib /usr/local/lib/iridrivers)
+    PATHS /usr/local/lib/iri/iriutils /usr/lib/iri/iriutils) 
+    
+SET(iriutils_INCLUDE_DIR ${iriutils_INCLUDE_DIRS})
+SET(iriutils_LIBRARY    ${iriutils_LIBRARIES})
 
-IF (iriutils_INCLUDE_DIR AND iriutils_LIBRARY)
+IF (iriutils_INCLUDE_DIRS AND iriutils_LIBRARIES)
    SET(iriutils_FOUND TRUE)
-ENDIF (iriutils_INCLUDE_DIR AND iriutils_LIBRARY)
+ENDIF (iriutils_INCLUDE_DIRS AND iriutils_LIBRARIES)
 
 IF (iriutils_FOUND)
    IF (NOT iriutils_FIND_QUIETLY)
-      MESSAGE(STATUS "Found iriutils: ${iriutils_LIBRARY}")
+      MESSAGE(STATUS "Found iriutils: ${iriutils_LIBRARIES}")
    ENDIF (NOT iriutils_FIND_QUIETLY)
 ELSE (iriutils_FOUND)
    IF (iriutils_FIND_REQUIRED)
diff --git a/ReadMe.md b/ReadMe.md
index 06f8ce4c5ae0d9c388c4e69b6c4f016869888bf8..6d3b241d612c5c3fdcbc37eea91a022eec9df94d 100644
--- a/ReadMe.md
+++ b/ReadMe.md
@@ -4,8 +4,11 @@ Iriutils library                         {#mainpage}
 ## Description
 This set of tools provide basic functionalities that are generally needed in many
 applications. These utilities include mutual exclusion objects, exceptions, threads,
-logic events and also generic communication devices. Next, a brief description of
-each one is provided.
+logic events and also generic communication devices. 
+
+
+<details><summary>Utilities description</summary>
+<p>
 
 ### Mutex
 
@@ -68,9 +71,39 @@ time in human readable format.
 There exist an example which uses all of class methods. Also in a bad use
 which reach to an exception.
 
-## Dependencies
+</p>
+</details>
+
+## Installation
+
+* Add the labrobotica repository if it is not already added:
+
+``` sudo sh -c 'echo "deb [arch=amd64] http://147.83.76.226/~irilabo/packages xenial main" > /etc/apt/sources.list.d/labrobotica_repo.list' ```
+
+``` wget -O - http://147.83.76.226/~irilabo/labrobotica_repo.gpg.key | sudo apt-key add - ```
+
+* Install the package:
+
+``` sudo apt update && sudo apt install iri-iriutils-dev ```
 
-**DELETE ME** List all the system dependencies first, for example:
+## Disclaimer  
+
+Copyright (C) 2009-2018 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
+Mantainer IRI labrobotics (labrobotica@iri.upc.edu)
+
+This package is distributed in the hope that it will be useful, but without any warranty. It is provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. should the program prove defective, the GMR group does not assume the cost of any necessary servicing, repair  or correction.
+
+In no event unless required by applicable law the author will be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if the author has been advised of the possibility of such damages.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>
+
+## For developers
+
+<details><summary>click here</summary>
+<p>
+
+## Dependencies
 
 This package requires of the following system libraries and packages
 
@@ -82,15 +115,9 @@ Under linux all of these utilities are available in ready-to-use packages.
 
 Under MacOS most of the packages are available via [fink](http://www.finkproject.org/ "Fink's Homepage")
 
-**DELETE ME** List the IRI dependencies next, for example:
-
-This package also requires of the following IRI libraries:
-
-* [iriutils](https://gitlab.iri.upc.edu/labrobotica/algorithms/iriutils "iriutils gitlab page"), a set of basic tools.
-
-## Compilation and installation
+## Compilation and installation from source
 
-Download this repository and create a build folder inside:
+Clone this repository and create a build folder inside:
 
 ``` mkdir build ```
 
@@ -105,7 +132,7 @@ The RELEASE build mode optimizes for speed. To build in this mode execute instea
 
 The release mode will be kept until next time cmake is executed.
 
-``` make ``` 
+``` make -j $(nproc)``` 
 
 In case no errors are reported, the generated libraries (if any) will be located at the
 _lib_ folder and the executables (if any) will be located at the _bin_ folder.
@@ -115,8 +142,8 @@ To do that, execute
 
 ``` make install ```
 
-as root and the shared libraries will be copied to */usr/local/lib/iridrivers* directory
-and the header files will be copied to */usr/local/include/iridrivers* dierctory. At
+as root and the shared libraries will be copied to */usr/local/lib/iri/iriutils* directory
+and the header files will be copied to */usr/local/include/iri/iriutils* dierctory. At
 this point, the library may be used by any user.
 
 To remove the library from the system, exceute
@@ -143,15 +170,18 @@ and it is also necessary to link with the desired libraries by using the followi
 
 ``` TARGET_LINK_LIBRARIES(<executable name> ${iriutils_LIBRARY}) ```
 
-## Disclaimer  
-
-Copyright (C) 2009-2018 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
-Mantainer IRI labrobotics (labrobotica@iri.upc.edu)
+## Examples
 
-This package is distributed in the hope that it will be useful, but without any warranty. It is provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. should the program prove defective, the GMR group does not assume the cost of any necessary servicing, repair  or correction.
+There are some examples:
+ * _test\_both_: An example of how two threads communicate through events.
+ * _test\_events_: It shows the basic operation with events and the most important feature, which is the wait() function.
+ * _test\_eventserver_: It shows how to handle multiple events using the CEventServer class.
+ * _test\_logs_: It shows the differents log options provided by the class which include logging.
+ * _test\_threads_: It shows how to use the CThread class.
+ * _test\_threadserver_: It shows how to handle multiple threads using the CThreadServer class.
+ * _test\_time_: It checks all functions in CTime class.
 
-In no event unless required by applicable law the author will be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use the program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the program to operate with any other programs), even if the author has been advised of the possibility of such damages.
 
-You should have received a copy of the GNU Lesser General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>
+</p>
+</details>
 
diff --git a/src/events/event.h b/include/events/event.h
similarity index 100%
rename from src/events/event.h
rename to include/events/event.h
diff --git a/src/events/eventexceptions.h b/include/events/eventexceptions.h
similarity index 100%
rename from src/events/eventexceptions.h
rename to include/events/eventexceptions.h
diff --git a/src/events/eventserver.h b/include/events/eventserver.h
similarity index 100%
rename from src/events/eventserver.h
rename to include/events/eventserver.h
diff --git a/src/exceptions/exceptions.h b/include/exceptions/exceptions.h
similarity index 100%
rename from src/exceptions/exceptions.h
rename to include/exceptions/exceptions.h
diff --git a/src/logs/log.h b/include/logs/log.h
similarity index 100%
rename from src/logs/log.h
rename to include/logs/log.h
diff --git a/src/logs/logexceptions.h b/include/logs/logexceptions.h
similarity index 100%
rename from src/logs/logexceptions.h
rename to include/logs/logexceptions.h
diff --git a/src/mutex/mutex.h b/include/mutex/mutex.h
similarity index 100%
rename from src/mutex/mutex.h
rename to include/mutex/mutex.h
diff --git a/src/mutex/mutexexceptions.h b/include/mutex/mutexexceptions.h
similarity index 100%
rename from src/mutex/mutexexceptions.h
rename to include/mutex/mutexexceptions.h
diff --git a/src/threads/thread.h b/include/threads/thread.h
similarity index 100%
rename from src/threads/thread.h
rename to include/threads/thread.h
diff --git a/src/threads/threadexceptions.h b/include/threads/threadexceptions.h
similarity index 100%
rename from src/threads/threadexceptions.h
rename to include/threads/threadexceptions.h
diff --git a/src/threads/threadserver.h b/include/threads/threadserver.h
similarity index 100%
rename from src/threads/threadserver.h
rename to include/threads/threadserver.h
diff --git a/src/time/ctime.h b/include/time/ctime.h
similarity index 100%
rename from src/time/ctime.h
rename to include/time/ctime.h
diff --git a/src/time/ctimeexceptions.h b/include/time/ctimeexceptions.h
similarity index 100%
rename from src/time/ctimeexceptions.h
rename to include/time/ctimeexceptions.h
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 7d8b71cb2cbe4a90ad337da2fc8935ff196642c5..014393509d850680e52fee6a6f109eb8924e1e1e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,10 +1,10 @@
 # edit the following line to add all the source code files of the library
 SET(sources ./exceptions/exceptions.cpp ./mutex/mutex.cpp ./mutex/mutexexceptions.cpp ./events/event.cpp ./events/eventserver.cpp ./events/eventexceptions.cpp ./threads/thread.cpp ./threads/threadserver.cpp ./threads/threadexceptions.cpp ./logs/log.cpp ./logs/logexceptions.cpp ./time/ctime.cpp ./time/ctimeexceptions.cpp)
 # edit the following line to add all the header files of the library
-SET(headers ./exceptions/exceptions.h ./mutex/mutex.h ./mutex/mutexexceptions.h ./events/event.h ./events/eventserver.h ./events/eventexceptions.h ./threads/thread.h ./threads/threadserver.h ./threads/threadexceptions.h ./logs/log.h ./logs/logexceptions.h ./time/ctime.h ./time/ctimeexceptions.h)
+SET(headers ../include/exceptions/exceptions.h ../include/mutex/mutex.h ../include/mutex/mutexexceptions.h ../include/events/event.h ../include/events/eventserver.h ../include/events/eventexceptions.h ../include/threads/thread.h ../include/threads/threadserver.h ../include/threads/threadexceptions.h ../include/logs/log.h ../include/logs/logexceptions.h ../include/time/ctime.h ../include/time/ctimeexceptions.h)
 
 # edit the following line to add the necessary include directories
-INCLUDE_DIRECTORIES(./exceptions ./mutex ./events ./threads ./logs ./time)
+INCLUDE_DIRECTORIES(../include/exceptions ../include/mutex ../include/events ../include/threads ../include/logs ../include/time)
 
 # edit the following line to find the necessary packages
 
@@ -20,11 +20,11 @@ ENDIF(APPLE)
 
 INSTALL(TARGETS iriutils
   RUNTIME DESTINATION bin
-  LIBRARY DESTINATION lib/iridrivers
-  ARCHIVE DESTINATION lib/iridrivers
+  LIBRARY DESTINATION lib/iri/${PROJECT_NAME}
+  ARCHIVE DESTINATION lib/iri/${PROJECT_NAME}
 )
 
-INSTALL(FILES ${headers} DESTINATION include/iridrivers)
+INSTALL(FILES ${headers} DESTINATION include/iri/${PROJECT_NAME})
 
 INSTALL(FILES ../Findiriutils.cmake DESTINATION ${CMAKE_ROOT}/Modules/)
 
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 9147fd59f90adae46a607d3e2e9e3b8c32edaf9a..39092d6819bbf5e85ef121a95a2e02776b56c91f 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,7 +1,7 @@
 include_directories(${GTEST_INCLUDE_DIRS})
 include_directories(${GMOCK_INCLUDE_DIRS})
 
-include_directories(${PROJECT_SOURCE_DIR}/src/mutex)
+include_directories(${PROJECT_SOURCE_DIR}/include/mutex)
 
 set(CTEST_CUSTOM_COVERAGE_EXCLUDE *)