[yarp] 90/109: New upstream version 2.3.66.1

Daniele E. Domenichelli drdanz-guest at moszumanska.debian.org
Thu Jun 22 16:10:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

drdanz-guest pushed a commit to branch master
in repository yarp.

commit 3f54652881b2108e3e178a4d887a85cc30c56b63
Author: Daniele E. Domenichelli <ddomenichelli at drdanz.it>
Date:   Fri Oct 21 10:29:37 2016 +0200

    New upstream version 2.3.66.1
---
 .github/CONTRIBUTING.md                            |  14 +-
 MIRRORING                                          |   2 -
 NEWS                                               |   4 -
 QUICKSTART-DEBIAN.TXT                              |  24 -
 QUICKSTART-WIN-VS6.TXT                             | 111 -----
 README.md                                          |  25 +-
 bindings/CMakeLists.txt                            |   4 +-
 bindings/yarp.i                                    |   2 +-
 conf/AddInstallRPATHSupport.cmake                  |   2 +-
 conf/FindNVIDIACg.cmake                            |  27 ++
 conf/FindQCustomPlot.cmake                         |  26 +-
 conf/YarpDescribe.cmake                            |  20 +-
 conf/YarpFindDependencies.cmake                    | 511 ++++++++++++---------
 conf/YarpIDL.cmake                                 | 240 +++++-----
 conf/YarpInstallationHelpers.cmake                 |  22 +-
 conf/YarpOSXUtilities.cmake                        |   2 +-
 conf/YarpOptions.cmake                             |  22 +-
 conf/YarpPlugin.cmake                              |  35 --
 conf/YarpVersion.cmake                             |   2 +-
 conf/template/Doxyfile.in                          |   6 +-
 doc/{yarp_yarp-config.dox => cmd_yarp-config.dox}  |   6 +-
 doc/cmd_yarp.dox                                   |  34 +-
 doc/cmd_yarpbatterygui.dox                         |   6 +
 doc/{yarpdatadumper.dox => cmd_yarpdatadumper.dox} |  61 +--
 doc/cmd_yarpdatadumperAppGenerator.dox             |  88 ++++
 doc/{yarpdataplayer.dox => cmd_yarpdataplayer.dox} |  13 +-
 doc/cmd_yarpdev.dox                                |   6 +-
 doc/cmd_yarphear.dox                               |   4 +-
 doc/cmd_yarpidl_rosmsg.dox                         |   5 +
 doc/cmd_yarpidl_thrift.dox                         |   5 +
 doc/cmd_yarplaserscannergui.dox                    |  44 ++
 doc/cmd_yarplogger-console.dox                     |   5 +
 doc/cmd_yarplogger.dox                             |   6 +
 doc/cmd_yarpmanager-console.dox                    |   5 +
 doc/{yarpmanager.dox => cmd_yarpmanager.dox}       |   7 +-
 doc/cmd_yarpmanagerpp.dox                          |   6 +
 doc/{yarpmotorgui.dox => cmd_yarpmotorgui.dox}     |  13 +-
 doc/cmd_yarprobotinterface.dox                     |   5 +
 doc/cmd_yarpros.dox                                |   5 +
 doc/cmd_yarprun.dox                                |   4 +-
 doc/{yarpscope.dox => cmd_yarpscope.dox}           |  16 +-
 doc/cmd_yarpserver.dox                             |  40 ++
 doc/cmd_yarpview.dox                               |   7 +-
 doc/download.dox                                   |   2 +-
 doc/dox_footer.html                                |  19 -
 doc/dox_header.html                                | 160 -------
 doc/dox_stylesheet.css                             | 358 ---------------
 doc/{ => images}/app-graph.jpg                     | Bin
 doc/{port_monitor => images}/arbitration.png       | Bin
 .../arbitration_tevent.png                         | Bin
 .../check-your-installation-terminals.png          | Bin
 ...ck-your-installation-yarpdataplayer-example.jpg | Bin
 .../check-your-installation-yarpserver.png         | Bin
 doc/{port_monitor => images}/coder_decoder.png     | Bin
 doc/{ => images}/datasetplayer-app1.jpg            | Bin
 doc/{ => images}/datasetplayer-app2.jpg            | Bin
 doc/{ => images}/datasetplayer.jpg                 | Bin
 .../image_modification.png                         | Bin
 .../install-binaries-no-yarp.png                   | Bin
 .../install-binaries-no-yarp2.png                  | Bin
 doc/{port_monitor => images}/portarbitrator.png    | Bin
 doc/{port_monitor => images}/portmonitor.png       | Bin
 .../portmonitor_lifecycle.png                      | Bin
 doc/{port_monitor => images}/simple_dll.png        | Bin
 .../simple_modification.png                        | Bin
 doc/{port_monitor => images}/type_modification.png | Bin
 doc/{ => images}/yarp-small.eps                    | Bin
 doc/{ => images}/yarp-small.jpg                    | Bin
 doc/{ => images}/yarp-yal01-100.png                | Bin
 doc/{ => images}/yarp-yal01.eps                    | Bin
 doc/{ => images}/yarp-yal01.png                    | Bin
 doc/{ => images}/yarp-yal02-100.png                | Bin
 doc/{ => images}/yarpmotorgui.eps                  |   0
 doc/{ => images}/yarpmotorgui.jpg                  | Bin
 doc/{ => images}/yarpscope.png                     | Bin
 doc/{yarpview => images}/yarpview.png              | Bin
 doc/{ => images}/ymgui.png                         | Bin
 doc/installation/check_your_installation.dox       |   9 +-
 doc/installation/dependencies.dox                  |   6 +-
 doc/installation/install.dox                       |   3 +-
 doc/installation/install_mac.dox                   | 425 +++++++++--------
 doc/installation/install_windows.dox               |  30 +-
 doc/installation/installation_downloads.dox        |  30 +-
 doc/main.dox                                       |  48 +-
 doc/port_monitor/source.svg                        |   2 +-
 doc/release/v2_3_66_1.md                           | 157 +++++++
 doc/releases.dox                                   |   1 +
 doc/resource_finder_installation.dox               |   2 +-
 doc/resource_finder_spec.dox                       |   6 +-
 doc/rfmodule.dox                                   |   2 +-
 doc/what_is_yarp.dox                               |   2 +-
 doc/yarp_cluster.dox                               |   2 +-
 doc/yarp_data_dirs.dox                             |   4 +-
 ...p-rf.dox => yarp_resource_finder_tutorials.dox} |   0
 example/external/c/yarpmin.c                       |   2 +-
 example/matlab/simulink/README.txt                 |   2 +-
 example/port_power/README.TXT                      |   2 +-
 packaging/windows/conf/bundle-2-3-66.sh            |  45 ++
 scripts/admin/README_RELEASE                       |  53 ---
 scripts/admin/README_RELEASE.md                    | 141 ++++++
 scripts/admin/generate-cmake-options.sh            |  12 +-
 src/CMakeLists.txt                                 |  10 +-
 src/carriers/CMakeLists.txt                        |  11 +-
 src/carriers/bayer_carrier/CMakeLists.txt          |   5 +-
 src/carriers/human_carrier/CMakeLists.txt          |  18 +-
 src/carriers/mjpeg_carrier/CMakeLists.txt          |  75 +--
 src/carriers/mpi_carrier/CMakeLists.txt            |  66 ++-
 src/carriers/mpi_carrier/mpi.ini                   |   2 +-
 src/carriers/mpi_carrier/src/MpiBcastCarrier.cpp   |   4 -
 src/carriers/mpi_carrier/src/MpiBcastStream.cpp    |   5 -
 src/carriers/mpi_carrier/src/MpiCarrier.cpp        |  22 +-
 src/carriers/mpi_carrier/src/MpiP2PStream.cpp      |   5 -
 src/carriers/mpi_carrier/src/MpiStream.cpp         |  12 -
 src/carriers/portmonitor_carrier/CMakeLists.txt    |   8 +-
 src/carriers/priority_carrier/CMakeLists.txt       |  39 +-
 src/carriers/tcpros_carrier/CMakeLists.txt         |  57 ++-
 src/carriers/xmlrpc_carrier/CMakeLists.txt         |  27 +-
 src/carriers/xmlrpc_carrier/xmlrpc/XmlRpcValue.cpp |   2 +-
 src/idls/rosmsg/src/RosType.cpp                    |  12 +-
 src/idls/rosmsg/tests/CMakeLists.txt               |   2 +-
 src/idls/thrift/tests/CMakeLists.txt               |   2 +-
 src/libYARP_OS/include/yarp/os/Contactable.h       |  33 +-
 src/libYARP_OS/include/yarp/os/OutputProtocol.h    |   6 +-
 src/libYARP_OS/include/yarp/os/RFModule.h          |  46 +-
 src/libYARP_OS/include/yarp/os/Thread.h            |   7 +-
 src/libYARP_OS/include/yarp/os/impl/Logger.h       |  12 +-
 .../include/yarp/os/impl/PlatformThread.h          |   6 +-
 .../include/yarp/os/impl/RunProcManager.h          |  31 +-
 .../include/yarp/os/impl/SocketTwoWayStream.h      |   2 -
 src/libYARP_OS/src/AuthHMAC.cpp                    |   6 +-
 src/libYARP_OS/src/Companion.cpp                   |   6 -
 src/libYARP_OS/src/DgramTwoWayStream.cpp           | 186 +++++++-
 src/libYARP_OS/src/Logger.cpp                      |   6 +-
 src/libYARP_OS/src/NameConfig.cpp                  |   9 +-
 src/libYARP_OS/src/PortCore.cpp                    |   9 +-
 src/libYARP_OS/src/PortCoreOutputUnit.cpp          |  20 +-
 src/libYARP_OS/src/Property.cpp                    |   1 -
 src/libYARP_OS/src/RFModule.cpp                    |  29 +-
 src/libYARP_OS/src/Run.cpp                         |  60 ++-
 src/libYARP_OS/src/RunProcManager.cpp              |   4 +-
 src/libYARP_OS/src/SharedLibrary.cpp               |   1 +
 src/libYARP_OS/src/SocketTwoWayStream.cpp          |  15 +-
 src/libYARP_OS/src/SystemInfo.cpp                  | 203 +++++++-
 src/libYARP_OS/src/TcpFace.cpp                     |   2 +-
 src/libYARP_OS/src/ThreadImpl.cpp                  |   2 +-
 src/libYARP_OS/src/WireReader.cpp                  | 354 ++++++++++----
 src/libYARP_dev/CMakeLists.txt                     |  12 +
 .../include/yarp/dev/ControlBoardHelper.h          |   9 +
 .../include/yarp/dev/ControlBoardInterfaces.h      |   4 +-
 src/libYARP_dev/include/yarp/dev/IControlMode2.h   |   8 +-
 .../yarp/dev/ImplementControlBoardInterfaces.h     |   6 +-
 src/libYARP_dev/include/yarp/dev/TestMotor.h       |   8 +
 src/libYARP_dev/include/yarp/dev/Wrapper.h         |   4 +-
 src/libYARP_dev/src/ControlMode2Impl.cpp           |  12 +
 src/libYARP_dev/src/ControlModeImpl.cpp            |   9 +
 src/libYARP_dev/src/IEncodersTimedImpl.cpp         |   8 +
 src/libYARP_dev/src/IInteractionModeImpl.cpp       |  12 +-
 src/libYARP_dev/src/IMotorEncodersImpl.cpp         |  11 +-
 src/libYARP_dev/src/IMotorImpl.cpp                 |   7 +
 src/libYARP_dev/src/IPositionControl2Impl.cpp      |  21 +
 src/libYARP_dev/src/IPositionDirectImpl.cpp        |   9 +-
 src/libYARP_dev/src/IVelocityControl2Impl.cpp      |  15 +
 src/libYARP_dev/src/ImpedanceControlImpl.cpp       |   7 +
 src/libYARP_dev/src/OpenLoopControlImpl.cpp        |   6 +
 src/libYARP_dev/src/PolyDriver.cpp                 |   1 +
 src/libYARP_dev/src/TorqueControlImpl.cpp          |  23 +
 .../src/modules/AnalogWrapper/AnalogWrapper.cpp    |   2 +-
 .../src/modules/AnalogWrapper/AnalogWrapper.h      |   2 +
 .../src/modules/BatteryClient/BatteryClient.cpp    |  10 +-
 .../ControlBoardWrapper/ControlBoardWrapper.cpp    | 172 +++----
 .../Rangefinder2DWrapper/Rangefinder2DWrapper.cpp  |  25 +-
 .../Rangefinder2DWrapper/Rangefinder2DWrapper.h    |   7 +-
 .../RemoteControlBoard/RemoteControlBoard.cpp      |   7 +
 src/libYARP_manager/src/manager.cpp                |   2 +-
 src/libYARP_manager/src/yarpbroker.cpp             |   2 +-
 src/libYARP_serversql/src/NameServiceOnTriples.cpp |   2 +
 src/libYARP_serversql/src/NameServiceOnTriples.h   |  71 +--
 src/libYARP_serversql/src/yarpserver3.cpp          |  11 +-
 src/libyarpc/CMakeLists.txt                        |  32 +-
 src/libyarpcxx/CMakeLists.txt                      |  46 +-
 src/modules/CMakeLists.txt                         | 141 +++---
 src/modules/DynamixelAX12Ftdi/CMakeLists.txt       |  29 +-
 .../DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.cpp  |  99 ++--
 .../DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.h    |   2 +-
 .../DynamixelAX12Ftdi/dynamixelAX12Ftdi.ini        |   2 +-
 src/modules/PumaCalibrator/CMakeLists.txt          |   7 +-
 src/modules/SerialServoBoard/CMakeLists.txt        |  34 +-
 src/modules/SerialServoBoard/SerialServoBoard.ini  |   5 +
 src/modules/cuda/CMakeLists.txt                    |  51 +-
 src/modules/cuda/cuda.ini                          |   2 +-
 src/modules/dimax_u2c/CMakeLists.txt               |  48 +-
 src/modules/dimax_u2c/i2cbridge.h                  |   2 +-
 src/modules/fakeIMU/CMakeLists.txt                 |  32 +-
 src/modules/fakeLaser/CMakeLists.txt               |  25 +-
 src/modules/fakeMotionControl/CMakeLists.txt       |  31 +-
 .../fakeMotionControl/fakeMotionControl.cpp        |   3 +-
 src/modules/fakebot/CMakeLists.txt                 |  31 +-
 src/modules/ffmpeg/CMakeLists.txt                  |  58 ++-
 src/modules/imuBosch_BNO055/CMakeLists.txt         |  50 +-
 src/modules/imuBosch_BNO055/imuBosch_BNO055.cpp    | 290 ++++++------
 src/modules/imuBosch_BNO055/imuBosch_BNO055.h      |  37 +-
 src/modules/jrkerr/CMakeLists.txt                  |  65 +--
 src/modules/kinect/OpenNI/CMakeLists.txt           |  12 +-
 .../KinectYarpDeviceClientLib/CMakeLists.txt       |  12 +-
 .../KinectYarpDeviceServerLib/CMakeLists.txt       |  22 +-
 src/modules/kinect/freenect/CMakeLists.txt         |  49 +-
 src/modules/laserHokuyo/CMakeLists.txt             |  30 +-
 src/modules/laserHokuyo/laserHokuyo.cpp            |  13 +-
 src/modules/laserHokuyo/laserHokuyo.h              |   2 +
 src/modules/meiMotionControl/CMakeLists.txt        |  32 +-
 src/modules/microphone/CMakeLists.txt              |  75 +--
 src/modules/nvidia/CMakeLists.txt                  |  74 ++-
 src/modules/opencv/CMakeLists.txt                  |  25 +-
 src/modules/openni2/CMakeLists.txt                 | 116 ++---
 src/modules/ovrheadset/CMakeLists.txt              |   4 +-
 src/modules/ovrheadset/OVRHeadset.h                |   4 +-
 src/modules/portaudio/CMakeLists.txt               |  48 +-
 src/modules/portaudio/PortAudioDeviceDriver.cpp    |  12 +-
 src/modules/rpLidar/CMakeLists.txt                 |  30 +-
 src/modules/serial/CMakeLists.txt                  |  52 +--
 src/modules/stage/CMakeLists.txt                   |  34 +-
 src/modules/urbtc/CMakeLists.txt                   |  50 +-
 src/modules/urbtc/UrbtcControl.cpp                 |   2 +-
 src/modules/vfw/CMakeLists.txt                     | 102 ++--
 src/modules/wxsdl/CMakeLists.txt                   |  69 +--
 src/yarpdatadumper/CMakeLists.txt                  |  40 +-
 src/yarpdatadumper/yarpdatadumperAppGenerator.py   |   4 +
 src/yarpdataplayer-qt/include/UI/mainwindow.ui     |   8 +-
 src/yarpdataplayer-qt/include/mainwindow.h         |   4 +
 src/yarpdataplayer-qt/include/utils.h              |  10 +-
 src/yarpdataplayer-qt/include/worker.h             |   5 +
 src/yarpdataplayer-qt/src/main.cpp                 |   1 +
 src/yarpdataplayer-qt/src/mainwindow.cpp           |  58 ++-
 src/yarpdataplayer-qt/src/utils.cpp                |  24 +-
 src/yarpdataplayer-qt/src/worker.cpp               |  31 +-
 src/yarpfs/CMakeLists.txt                          |  45 +-
 src/yarplaserscannergui/main.cpp                   |  41 --
 src/yarplogger-qt/images/all_ico_b.png             | Bin 932 -> 886 bytes
 src/yarplogger-qt/images/debug_ico_b.png           | Bin 819 -> 974 bytes
 src/yarplogger-qt/images/error_ico_b.png           | Bin 872 -> 756 bytes
 src/yarplogger-qt/images/info_ico_b.png            | Bin 1021 -> 872 bytes
 src/yarplogger-qt/images/trace_ico_b.png           | Bin 936 -> 834 bytes
 src/yarplogger-qt/images/warning_ico_b.png         | Bin 896 -> 786 bytes
 src/yarplogger-qt/logtab.cpp                       |  28 +-
 src/yarplogger-qt/logtab.h                         |   2 +
 src/yarplogger-qt/mainwindow.cpp                   |  33 +-
 src/yarplogger-qt/yarprunPortSorting.cpp           |  20 +-
 src/yarpmanager++/CMakeLists.txt                   |   7 +-
 src/yarpmanager++/src-manager/mainwindow.cpp       |   2 +-
 src/yarpmanager-gtk/main_window.cpp                |   6 +-
 src/yarpmanager-qt/mainwindow.cpp                  |   2 +-
 src/yarpmotorgui-qt/jointitem.cpp                  |   3 +
 src/yarpmotorgui-qt/jointitem.ui                   | 146 +++---
 src/yarpmotorgui-qt/main.cpp                       |   5 +-
 src/yarpmotorgui-qt/partitem.cpp                   |  71 +--
 src/yarpmotorgui-qt/partitem.h                     |  11 +-
 src/yarpmotorgui-qt/sequencewindow.cpp             |  23 +-
 src/yarpmotorgui-qt/sliderWithTarget.h             |   2 +-
 src/yarpmotorgui-qt/yarpmotorgui.h                 |   5 +-
 .../cmake/modules/FindTinyXML.cmake                |  40 --
 ...rprobotInterface.ini => yarprobotinterface.ini} |   0
 src/yarpscope-gtk/src/PortReader.cpp               |   4 +-
 src/yarpscope-qt/CMakeLists.txt                    |   2 +
 src/yarpscope-qt/plugin/CMakeLists.txt             |   2 -
 src/yarpscope-qt/plugin/plotter.cpp                |   4 +-
 src/yarpscope-qt/plugin/xmlloader.cpp              |   4 +-
 src/yarpscope-qt/src/CMakeLists.txt                |  12 +-
 src/yarpview-qt/CMakeLists.txt                     |   2 +
 src/yarpview-qt/plugin/CMakeLists.txt              |   2 -
 src/yarpview-qt/src/CMakeLists.txt                 |  14 +-
 src/yarpview-qt/src/main.cpp                       |   1 +
 tests/CMakeLists.txt                               |   9 +
 tests/integration/CMakeLists.txt                   |   1 +
 tests/libYARP_OS/LogTest.cpp                       |   9 +
 tests/libYARP_OS/NetworkTest.cpp                   |   7 +-
 tests/libYARP_dev/PolyDriverTest.cpp               |   7 +
 276 files changed, 4354 insertions(+), 3356 deletions(-)

diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 8a0df8f..9a9a670 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -124,17 +124,25 @@ git checkout -b <branch_name> origin/master
 
 ```
 git checkout master
-git pull --rebase origin/master
+git pull --rebase origin master
 git checkout devel
-git pull --rebase origin/devel
+git pull --rebase origin devel
 ```
 
   * Merge master into devel and eventually fix the conflicts.
 
 ```
 git merge master
-
 ```
+##### Work in progress PR
+As final note, in case you need to start a PR but you deem it still **work-in-progress**
+and don't want anyone to merge it by mistake, do the following:
+- Put `[WIP]` at the beginning of the PR title.
+- Mark the PR with the label `"Status: In Progress"`.
+
+Once you're happy about your work, just remove the `[WIP]` tag as well as the label,
+and drop a message within the PR to notify the community that reviews are welcome
+and merging is now possible.
 
 ### Development branch: `devel`
 
diff --git a/MIRRORING b/MIRRORING
deleted file mode 100644
index 6adee14..0000000
--- a/MIRRORING
+++ /dev/null
@@ -1,2 +0,0 @@
-
-This repository appears in multiple CVS sites.
diff --git a/NEWS b/NEWS
index 87d502c..fdcc356 100644
--- a/NEWS
+++ b/NEWS
@@ -11,8 +11,4 @@ spending your time writing libraries).
 
 License and copyright information is in COPYING.
 
-*** Moved to SVN from CVS, test commit...
-*** Moved to GIT from SVN, test commit...
-
 ===============================================================================
-
diff --git a/QUICKSTART-DEBIAN.TXT b/QUICKSTART-DEBIAN.TXT
deleted file mode 100644
index 3d6ea89..0000000
--- a/QUICKSTART-DEBIAN.TXT
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright: (C) 2007 RobotCub Consortium
-# Authors: Paul Fitzpatrick
-# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
-
-As superuser:
-  apt-get install libace-dev cmake
-
-As normal user:
-  cmake .
-  cmake .  # just to be sure
-  make
-  make test
-
-If that's working, try:
-  ccmake .
-Which gives you access to configuration options.  See "README" for details.
-
-To compile basic GUIs, you'll need at least:
-  apt-get install libgtk2.0-dev
-
-GUIs are by no means essential to YARP usage.
-
-Welcome to YARP!
-
diff --git a/QUICKSTART-WIN-VS6.TXT b/QUICKSTART-WIN-VS6.TXT
deleted file mode 100644
index 9cf9525..0000000
--- a/QUICKSTART-WIN-VS6.TXT
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright: (C) 2007 RobotCub Consortium
-# Authors: Claudio Castellini, Giorgio Metta
-# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
-
---------------------
-a simple yarp2 HOWTO
---------------------
-Or: how I did it in 60 minutes.
-
-This will guide you through the installation and compilation of
-YARP2. this works, and has been tested, for Windows and Microsoft
-Visual Studio 6 only.
-
-(0) decide a directory where to unpack all and, in general, where to work.
-    I use c:\work. See also the companion software page with useful links
-    for downloading libraries (http://pasa.liralab.it/yarp/software.html).
-
-(1) download and compile ACE
-        1. dial http://deuce.doc.wustl.edu/ACE-5.5.zip
-        2. unpack to c:\work. the archive creates a directory called
-           ACE_wrappers, but I prefer to rename it to ACE-5.5 in order
-           to avoid confusion with earlier versions of ACE.
-        3. create c:\work\ACE-5.5\ace\config.h with the single line
-             #include "ace/config-win32.h"
-           in it.
-        4. in vc++, open c:\work\ACE-5.5\ACE.dsw; compile project ACE, 
-           both in release and debug configurations. you should end up 
-           with ACE{d}.{lib,dll} in c:\work\ACE-5.5\lib.
-        5. add ACE_ROOT = c:\work\ACE-5.5 to env vars, and 
-           %ACE_ROOT%\lib to PATH.
-
-(2) download and install CMake
-
-      http://www.cmake.org/files/v2.4/cmake-2.4.2-win32-x86.exe
-
-      (I chose "add cmake to path for all users')
-
-(3) download yarp2 via CVS to c:\work\yarp2. either use the command line
-
-      cvs -d:pserver:anonymous at yarp0.cvs.sf.net:/cvsroot/yarp0 login
-      cvs -z3 -d:pserver:anonymous at yarp0.cvs.sf.net:/cvsroot/yarp0 co -P yarp2
-
-    or do the same operations specified above in the winCVS GUI. of
-    course, if you already have a username/pwd on the repository, you
-    might use your own.
-    WARNING!! if you download using the anonymous user, you won't be able to
-    change the repository. you won't even be able to commit anything. so if
-    you DO have a user, I strongly recommend you use it instead of anonymous.
-    also, in that case, you might want to use ssh tunneling:
-
-      cvs -d:ssh:username at yarp0.cvs.sf.net:/cvsroot/yarp0 login
-      cvs -z3 -d:ssh:username at yarp0.cvs.sf.net:/cvsroot/yarp0 co -P yarp2
-
-(4) open CMake, indicate c:\work\yarp2 as both the location of the source 
-    code and the destination for the EXEs; then hit "configure". you'll 
-    get some red variables, but if ACE is configured ok, the only really 
-    wrong value should be the yarp installation dir 
-    (CMAKE_INSTALLATION_PREFIX), which I select as c:\work\yarp2. 
-    Hit configure again, everything should turn gray; hit then
-    OK, and a number of .DSP files should appear in c:\work\yarp2
-
-(5) in vc++, open c:\work\yarp2\YARP.dsw and do build > batch build... 
-    then choose build. this will compile all yarp pieces in all possible 
-    flavours. if the RUN_TESTS and/or PACKAGE projects fail, do not worry. 
-    at the end you should have directories c:\work\yarp2\{bin,lib} in which 
-    the EXEs and the libraries are, in turn.
-    Watch out! the *last* configuration compiled by vc++ is the one 
-    you will find in c:\work\yarp2\bin; on my system that is debug, 
-    which is quite undesirable. therefore I copied 
-    c:\work\yarp2\bin\Release\*.exe back to c:\work\yarp2\bin.
-
-You're done!
-
-You might now want to add c:\work\yarp2\bin to your PATH. try then 
-opening a cmd and do "yarp server", then open one more cmd and 
-do "yarp check". this should end with "YARP seems OK!".
-
-------------------------------
-if you need to install the GUI
-------------------------------
-
-you might want to install the GUI as well, since a lot of applications will
-actually rely on them. an example is yarpview, an application which opens
-a window and an input port, and just displays on the screen whtever is read
-off the port.
-
-so, after having done all you saw earlier on,
-
-(1) download and install GLADE (the developer's archive!) for Windows:
-
-      http://gladewin32.sourceforge.net
-
-    any version should do, I work fine with 2.10.7. after the installation,
-    you should also have a new env var GTK_BASEPATH defined and set to the
-    dir you installed Glade to, and %GTK_BASEPATH%\bin should be in the
-    PATH env var.
-
-(2) re-run CMake, and this time set the variable CREATE_GUIS to ON. hit
-    configure and then ok.
-
-that is basically it. as far as I know the code previously compiled needs not
-be recompiled. as a test, try this: open vc++ and build
-C:\work\yarp2\src\yarp-imageviewer\yarpview.dsp. you should then find a yarpview.exe
-in, e.g., c:\work\yarp2\bin\Release. copy that file to c:\work\yarp2\bin, so
-that now it is on your PATH. Now open a shell and do "yarp server"; then open
-another one and do "yarpview":
-- a window called YARP GTK Image Viewer should pop up
-- the yarp server should report a port called /yarpview/i:img being registered.
-
-Claudio
-January 30th, 2007
diff --git a/README.md b/README.md
index 98d8a12..bc907f5 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,16 @@
-    __  __ ___     ____   ____ 
-    \ \/ //   |   / __ \ / __ \
-     \  // /| |  / /_/ // /_/ /
-     / // ___ | / _, _// ____/
-    /_//_/  |_|/_/ |_|/_/        Yet Another Robot Platform
+     __  __ ___  ____   ____
+     \ \/ //   ||  _ \ |  _ \
+      \  // /| || |/ / | |/ /
+      / // ___ ||  _ \ |  _/
+     /_//_/  |_||_| \_\|_|
+     ========================
+    Yet Another Robot Platform
+
 
 YARP
 ====
 
-[![YARP Homepage](https://img.shields.io/badge/YARP-Yet_Another_Robot_Platform-orange.svg)](http://wiki.icub.org/yarpdoc/)
+[![YARP Homepage](https://img.shields.io/badge/YARP-Yet_Another_Robot_Platform-orange.svg)](http://www.yarp.it/)
 [![Latest Release](https://img.shields.io/github/release/robotology/yarp.svg?label=Latest Release)](https://github.com/robotology/yarp/releases)
 
 YARP is a library and toolkit for communication and device interfaces,
@@ -16,9 +19,9 @@ used on everything from humanoids to embedded devices.
 Installation
 ------------
 
-See full instructions at http://wiki.icub.org/yarpdoc/install.html
+See full instructions at http://www.yarp.it/install.html
 
-On OSX:
+On macOS:
 
     brew install yarp
 
@@ -32,7 +35,7 @@ On Linux:
 On Windows:
  * Binaries at https://github.com/robotology/yarp/releases
 
-Regular YARP builds use the ACE library.  On Linux and OSX,
+Regular YARP builds use the ACE library.  On Linux and macOS,
 YARP can be compiled without ACE by adding "-DSKIP_ACE=TRUE" 
 when running cmake.
 
@@ -42,7 +45,7 @@ Tutorials
 
 There's a comprehensive list of tutorials here:
 
- * http://wiki.icub.org/yarpdoc/tutorials.html
+ * http://www.yarp.it/tutorials.html
 
 License
 -------
@@ -59,7 +62,7 @@ requirements than the LGPL:
 Status
 ------
 
-[![Build Status (Linux/OSX)](https://img.shields.io/travis/robotology/yarp/master.svg?label=Build Status (Linux/OSX))](https://travis-ci.org/robotology/yarp)
+[![Build Status (Linux/macOS)](https://img.shields.io/travis/robotology/yarp/master.svg?label=Build Status (Linux/macOS))](https://travis-ci.org/robotology/yarp)
 [![Build status (Windows)](https://img.shields.io/appveyor/ci/robotology/yarp/master.svg?label=Build Status (Windows))](https://ci.appveyor.com/project/robotology/yarp)
 and [more](http://dashboard.icub.org/index.php?project=YARP)
 
diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt
index 7fe0cfe..2e915d2 100644
--- a/bindings/CMakeLists.txt
+++ b/bindings/CMakeLists.txt
@@ -90,10 +90,12 @@ endif()
 
 if(NOT YARP_VERSION)
   find_package(YARP REQUIRED)
+  list(REMOVE_ITEM YARP_LIBRARIES YARP::YARP_math)
 else()
   set(YARP_FOUND TRUE)
   get_property(YARP_INCLUDE_DIRS GLOBAL PROPERTY YARP_TREE_INCLUDE_DIRS)
   get_property(YARP_LIBRARIES GLOBAL PROPERTY YARP_LIBS)
+  list(REMOVE_ITEM YARP_LIBRARIES YARP_math)
   get_property(YARP_DEFINES GLOBAL PROPERTY YARP_DEFS)
 endif()
 include_directories(${YARP_INCLUDE_DIRS})
@@ -340,7 +342,7 @@ if(CREATE_ALLEGRO)
           DESTINATION ${ALLEGRO_INSTALL_DIR}/yarp/lib)
 
   if(UNIX)
-    install(CODE "execute_process(COMMAND \"mkdir\" \"-p\" \"${ALLEGRO_ASDF_SYSTEMS}\"
+    install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" \"-E\" \"make_directory\" \"${ALLEGRO_ASDF_SYSTEMS}\"
                                   COMMAND \"ln\" \"-s\" \"${CMAKE_INSTALL_PREFIX}/${ALLEGRO_INSTALL_DIR}/yarp/yarp.asd\" \"${CMAKE_INSTALL_PREFIX}/${ALLEGRO_ASDF_SYSTEMS}\")")
   endif()
 endif()
diff --git a/bindings/yarp.i b/bindings/yarp.i
index a28e939..a43d5b4 100644
--- a/bindings/yarp.i
+++ b/bindings/yarp.i
@@ -577,7 +577,7 @@ typedef yarp::os::BufferedPort<Sound> BufferedPortSound;
 %template(BufferedPortImageInt) yarp::os::BufferedPort<yarp::sig::ImageOf<yarp::sig::PixelInt> >;
 
 %template(TypedReaderSound) yarp::os::TypedReader<yarp::sig::Sound >;
-%template(TypedReaderCallbackImageMono) yarp::os::TypedReaderCallback<yarp::sig::Sound>;
+%template(TypedReaderCallbackSound) yarp::os::TypedReaderCallback<yarp::sig::Sound>;
 %template(BufferedPortSound) yarp::os::BufferedPort<yarp::sig::Sound >;
 
 // Add getPixel and setPixel methods to access float values
diff --git a/conf/AddInstallRPATHSupport.cmake b/conf/AddInstallRPATHSupport.cmake
index fda5546..116b1f0 100644
--- a/conf/AddInstallRPATHSupport.cmake
+++ b/conf/AddInstallRPATHSupport.cmake
@@ -116,7 +116,7 @@ function(ADD_INSTALL_RPATH_SUPPORT)
       message(WARNING "Your CMake version is too old. RPATH support on OS X requires CMake version at least 2.8.12")
     endif()
 
-    # Enable RPATH on OSX. This also suppress warnings on CMake >= 3.0
+    # Enable RPATH on macOS. This also suppress warnings on CMake >= 3.0
     set(CMAKE_MACOSX_RPATH TRUE PARENT_SCOPE)
 
     # If install RPATH is disabled in CMake, it is useless to evaluate and set
diff --git a/conf/FindNVIDIACg.cmake b/conf/FindNVIDIACg.cmake
new file mode 100644
index 0000000..8691be5
--- /dev/null
+++ b/conf/FindNVIDIACg.cmake
@@ -0,0 +1,27 @@
+# Copyright: (C) 2009 RobotCub Consortium
+#                2016 Istituto Italiano di Tecnologia, iCub Facility
+# Authors: Paul Fitzpatrick <paulfitz at alum.mit.edu>
+#          Daniele E. Domenichelli <daniele.domenichelli at iit.it>
+# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
+
+find_library(NVIDIACg_CgGL_LIBRARY CgGL)
+find_library(NVIDIACg_pthread_LIBRARY pthread)
+find_library(NVIDIACg_GL_LIBRARY GL)
+find_library(NVIDIACg_glut_LIBRARY glut)
+if(NOT WIN32)
+  find_library(NVIDIACg_GLEW_LIBRARY GLEW)
+endif()
+
+set(NVIDIACg_LIBRARIES ${NVIDIACg_pthread_LIBRARY}
+                       ${NVIDIACg_GL_LIBRARY}
+                       ${NVIDIACg_glut_LIBRARY}
+                       ${NVIDIACg_CgGL_LIBRARY})
+if(NOT WIN32)
+  list(APPEND NVIDIACg_LIBRARIES ${NVIDIACg_GLEW_LIBRARY})
+endif()
+
+find_path(NVIDIACg_INCLUDE_DIR "Cg/cg.h")
+set(NVIDIACg_INCLUDE_DIRS ${NVIDIACg_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(NVIDIACg DEFAULT_MSG NVIDIACg_LIBRARIES NVIDIACg_INCLUDE_DIRS)
diff --git a/conf/FindQCustomPlot.cmake b/conf/FindQCustomPlot.cmake
index 0366941..6de846a 100644
--- a/conf/FindQCustomPlot.cmake
+++ b/conf/FindQCustomPlot.cmake
@@ -1,19 +1,15 @@
-# Try to find the QCustomPlot librairies
-#  QCustomPlot_FOUND - system has QCustomPlot lib
-#  QCustomPlot_INCLUDE_DIRS - the GMP include directory
-#  QCustomPlot_LIBRARIES - Libraries needed to use QCustomPlot
+# Try to find the QCustomPlot library
+#  QCUSTOMPLOT_FOUND - system has QCustomPlot lib
+#  QCustomPlot_INCLUDE_DIRS - the include directories needed
+#  QCustomPlot_LIBRARIES - libraries needed
 
-# Copyright (c) 2013, Anton Gladky <gladk at debian.org>
-#
-# Redistribution and use is allowed according to the terms of the GPL-3 license.
+FIND_PATH(QCUSTOMPLOT_INCLUDE_DIR NAMES qcustomplot.h)
+FIND_LIBRARY(QCUSTOMPLOT_LIBRARY NAMES qcustomplot)
 
+SET(QCustomPlot_INCLUDE_DIRS ${QCUSTOMPLOT_INCLUDE_DIR})
+SET(QCustomPlot_LIBRARIES ${QCUSTOMPLOT_LIBRARY})
 
-IF (QCustomPlot_INCLUDE_DIRS AND QCustomPlot_LIBRARIES)
-  SET(QCustomPlot_FIND_QUIETLY TRUE)
-ENDIF (QCustomPlot_INCLUDE_DIRS AND QCustomPlot_LIBRARIES)
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(QCustomPlot DEFAULT_MSG QCUSTOMPLOT_LIBRARY QCUSTOMPLOT_INCLUDE_DIR)
 
-FIND_PATH(QCustomPlot_INCLUDE_DIRS NAMES qcustomplot.h )
-FIND_LIBRARY(QCustomPlot_LIBRARIES NAMES qcustomplot )
-
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(QCustomPlot DEFAULT_MSG QCustomPlot_INCLUDE_DIRS QCustomPlot_LIBRARIES)
+MARK_AS_ADVANCED(QCUSTOMPLOT_INCLUDE_DIR QCUSTOMPLOT_LIBRARY)
diff --git a/conf/YarpDescribe.cmake b/conf/YarpDescribe.cmake
index 3c0d14a..165e626 100644
--- a/conf/YarpDescribe.cmake
+++ b/conf/YarpDescribe.cmake
@@ -22,11 +22,10 @@ message(STATUS "In-tree includes: ${YARP_INCLUDE_DIRS}")
 message(STATUS "YARP libraries: ${YARP_LIBS}")
 
 set(YARP_HAS_IDL TRUE)
-set(YARP_IDL_BINARY_HINT ${CMAKE_BINARY_DIR}/bin)
-if (MSVC)
-    set(YARP_IDL_BINARY_HINT "${YARP_IDL_BINARY_HINT};${YARP_IDL_BINARY_HINT}/Debug;${YARP_IDL_BINARY_HINT}/Release")
-endif(MSVC)
-
+set(YARP_IDL_BINARY_HINT ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
+foreach(_config ${CMAKE_CONFIGURATION_TYPES})
+  set(YARP_IDL_BINARY_HINT "${YARP_IDL_BINARY_HINT};${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/${_config}")
+endforeach()
 set(YARP_BINDINGS ${CMAKE_SOURCE_DIR}/bindings)
 
 # Filter out from YARP_LIBRARIES all the plugins, yarpmod, yarpcar
@@ -87,14 +86,11 @@ if(WIN32)
     # Temporary fix to remove the outdated destination path that will
     # cause issues when looking for YARP package.
     # FIXME Remove this when this hack has been around for enough time.
-    if(EXISTS "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/YARP")
-        message(STATUS "The directory \"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/YARP\" will cause issues when looking for YARP package. It will be automatically deleted when installing")
-        install(CODE
- "if(EXISTS \"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/YARP\")
-    message(STATUS \"Deleted: \\\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/YARP\\\"\")
-    file(REMOVE_RECURSE \"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/YARP\")
+    install(CODE
+ "if(EXISTS \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/YARP\")
+    message(STATUS \"Deleted: \\\"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/YARP\\\"\")
+    file(REMOVE_RECURSE \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/YARP\")
   endif()")
-    endif()
 else()
   set(YARP_CMAKE_DESTINATION ${CMAKE_INSTALL_LIBDIR}/YARP)
 endif()
diff --git a/conf/YarpFindDependencies.cmake b/conf/YarpFindDependencies.cmake
index 8fbc8ef..edebcc1 100644
--- a/conf/YarpFindDependencies.cmake
+++ b/conf/YarpFindDependencies.cmake
@@ -29,169 +29,168 @@ include(CMakeDependentOption)
 # Check if a package is installed and set some cmake variables
 macro(checkandset_dependency package)
 
-    string(TOUPPER ${package} PKG)
+  string(TOUPPER ${package} PKG)
 
-    # YARP_HAS_SYSTEM_${PKG}
-    if(${package}_FOUND OR ${PKG}_FOUND)
-        set(YARP_HAS_SYSTEM_${PKG} TRUE)
-    else()
-        set(YARP_HAS_SYSTEM_${PKG} FALSE)
-    endif()
+  # YARP_HAS_SYSTEM_${PKG}
+  if(${package}_FOUND OR ${PKG}_FOUND)
+    set(YARP_HAS_SYSTEM_${PKG} TRUE)
+  else()
+    set(YARP_HAS_SYSTEM_${PKG} FALSE)
+  endif()
 
-    # YARP_USE_${PKG}
-    cmake_dependent_option(YARP_USE_${PKG} "Use package ${package}" TRUE
-                           YARP_HAS_SYSTEM_${PKG} FALSE)
-    mark_as_advanced(YARP_USE_${PKG})
+  # YARP_USE_${PKG}
+  cmake_dependent_option(YARP_USE_${PKG} "Use package ${package}" TRUE
+                         YARP_HAS_SYSTEM_${PKG} FALSE)
+  mark_as_advanced(YARP_USE_${PKG})
 
-    # YARP_USE_SYSTEM_${PKG}
-    set(YARP_USE_SYSTEM_${PKG} ${YARP_USE_${PKG}} CACHE INTERNAL "Use system-installed ${package}, rather than a private copy (recommended)" FORCE)
+  # YARP_USE_SYSTEM_${PKG}
+  set(YARP_USE_SYSTEM_${PKG} ${YARP_USE_${PKG}} CACHE INTERNAL "Use system-installed ${package}, rather than a private copy (recommended)" FORCE)
 
-    # YARP_HAS_${PKG}
-    if(${YARP_HAS_SYSTEM_${PKG}})
-        set(YARP_HAS_${PKG} ${YARP_USE_${PKG}})
-    else()
-        set(YARP_HAS_${PKG} FALSE)
-    endif()
+  # YARP_HAS_${PKG}
+  if(${YARP_HAS_SYSTEM_${PKG}})
+    set(YARP_HAS_${PKG} ${YARP_USE_${PKG}})
+  else()
+    set(YARP_HAS_${PKG} FALSE)
+  endif()
 
-endmacro (checkandset_dependency)
+endmacro ()
 
 
 # Check if a package is installed or if is going to be built and set some cmake variables
 macro(checkbuildandset_dependency package)
 
-    string(TOUPPER ${package} PKG)
-
-    # YARP_HAS_SYSTEM_${PKG}
-    if (${package}_FOUND OR ${PKG}_FOUND)
-        set(YARP_HAS_SYSTEM_${PKG} TRUE)
-    else()
-        set(YARP_HAS_SYSTEM_${PKG} FALSE)
-    endif()
-
-    # YARP_USE_${PKG}
-    option(YARP_USE_${PKG} "Use package ${package}" TRUE)
-    mark_as_advanced(YARP_USE_${PKG})
-
-    # YARP_USE_SYSTEM_${PKG}
-    cmake_dependent_option(YARP_USE_SYSTEM_${PKG} "Use system-installed ${package}, rather than a private copy (recommended)" TRUE
-                           "YARP_HAS_SYSTEM_${PKG};YARP_USE_${PKG}" FALSE)
-    mark_as_advanced(YARP_USE_SYSTEM_${PKG})
-
-    # YARP_HAS_${PKG}
-    set(YARP_HAS_${PKG} ${YARP_USE_${PKG}})
-
-    # YARP_BUILD_${PKG}
-    if(YARP_USE_${PKG} AND NOT YARP_USE_SYSTEM_${PKG})
-        set(YARP_BUILD_${PKG} TRUE)
-    else()
-        set(YARP_BUILD_${PKG} FALSE)
-    endif()
-
-    if(YARP_USE_${PKG} AND NOT YARP_USE_SYSTEM_${PKG})
-        if(${ARGC} GREATER 1)
-            foreach(_dep ${ARGN})
-                string(TOUPPER ${_dep} _DEP)
-                if(NOT YARP_HAS_${_DEP})
-                    message(WARNING "${_dep} (required to build ${package}) not found.")
-                    set(YARP_HAS_${PKG} FALSE)
-                    set(YARP_BUILD_${PKG} FALSE)
-                endif()
-            endforeach()
+  string(TOUPPER ${package} PKG)
+
+  # YARP_HAS_SYSTEM_${PKG}
+  if (${package}_FOUND OR ${PKG}_FOUND)
+    set(YARP_HAS_SYSTEM_${PKG} TRUE)
+  else()
+    set(YARP_HAS_SYSTEM_${PKG} FALSE)
+  endif()
+
+  # YARP_USE_${PKG}
+  option(YARP_USE_${PKG} "Use package ${package}" TRUE)
+  mark_as_advanced(YARP_USE_${PKG})
+
+  # YARP_USE_SYSTEM_${PKG}
+  cmake_dependent_option(YARP_USE_SYSTEM_${PKG} "Use system-installed ${package}, rather than a private copy (recommended)" TRUE
+                         "YARP_HAS_SYSTEM_${PKG};YARP_USE_${PKG}" FALSE)
+  mark_as_advanced(YARP_USE_SYSTEM_${PKG})
+
+  # YARP_HAS_${PKG}
+  set(YARP_HAS_${PKG} ${YARP_USE_${PKG}})
+
+  # YARP_BUILD_${PKG}
+  if(YARP_USE_${PKG} AND NOT YARP_USE_SYSTEM_${PKG})
+    set(YARP_BUILD_${PKG} TRUE)
+  else()
+      set(YARP_BUILD_${PKG} FALSE)
+  endif()
+
+  if(YARP_USE_${PKG} AND NOT YARP_USE_SYSTEM_${PKG})
+    if(${ARGC} GREATER 1)
+      foreach(_dep ${ARGN})
+        string(TOUPPER ${_dep} _DEP)
+        if(NOT YARP_HAS_${_DEP})
+          message(WARNING "${_dep} (required to build ${package}) not found.")
+          set(YARP_HAS_${PKG} FALSE)
+          set(YARP_BUILD_${PKG} FALSE)
         endif()
+      endforeach()
     endif()
+  endif()
 
-
-endmacro(checkbuildandset_dependency)
+endmacro()
 
 
 # Check if a required package is installed.
 macro(check_required_dependency package)
 
-    string(TOUPPER ${package} PKG)
+  string(TOUPPER ${package} PKG)
 
-    if(NOT YARP_HAS_${PKG})
-        message(FATAL_ERROR "Required package ${package} not found. Please install it to build yarp.")
-#    else()
-#        message(STATUS "${PKG} -> OK")
-    endif()
+  if(NOT YARP_HAS_${PKG})
+      message(FATAL_ERROR "Required package ${package} not found. Please install it to build yarp.")
+#  else()
+#      message(STATUS "${PKG} -> OK")
+  endif()
 
-endmacro(check_required_dependency)
+endmacro()
 
 
 # Check if a dependency required to enable an option is installed.
 macro(check_optional_dependency optionname package)
 
-    string(TOUPPER ${package} PKG)
+  string(TOUPPER ${package} PKG)
 
-    if(${optionname})
-        if(NOT YARP_HAS_${PKG})
-            message(FATAL_ERROR "Optional package ${package} not found. Please install it or disable the option \"${optionname}\" to build yarp.")
-#        else()
-#            message(STATUS "${PKG} ${optionname} -> OK")
-        endif()
-#    else()
-#        message(STATUS "${PKG} ${optionname} -> NOT REQUIRED")
+  if(${optionname})
+    if(NOT YARP_HAS_${PKG})
+      message(FATAL_ERROR "Optional package ${package} not found. Please install it or disable the option \"${optionname}\" to build yarp.")
+#     else()
+#       message(STATUS "${PKG} ${optionname} -> OK")
     endif()
+#   else()
+#     message(STATUS "${PKG} ${optionname} -> NOT REQUIRED")
+  endif()
 
-endmacro(check_optional_dependency)
+endmacro()
 
 
 # Check if at least one of the dependency required to enable an option is installed.
 function(check_alternative_dependency optionname)
-    if(${optionname})
-        foreach(package "${ARGN}")
-            string(TOUPPER ${package} PKG)
-            if(YARP_HAS_${PKG})
-                return()
-            endif()
-        endforeach()
-        message(FATAL_ERROR "None of the alternative packages \"${ARGN}\" was found. Please install at least one of them or disable the option \"${optionname}\" to build yarp.")
-    endif()
+  if(${optionname})
+    foreach(package "${ARGN}")
+      string(TOUPPER ${package} PKG)
+      if(YARP_HAS_${PKG})
+        return()
+      endif()
+    endforeach()
+    message(FATAL_ERROR "None of the alternative packages \"${ARGN}\" was found. Please install at least one of them or disable the option \"${optionname}\" to build yarp.")
+  endif()
 endfunction()
 
 
 # Check if a dependency required to disable an option is installed.
 macro(check_skip_dependency optionname package)
-    string(TOUPPER ${package} PKG)
+  string(TOUPPER ${package} PKG)
 
-    if(NOT ${optionname})
-        if(NOT YARP_HAS_${PKG})
-            message(FATAL_ERROR "Optional package ${package} not found. Please install it or enable the option \"${optionname}\" to build yarp.")
-        endif()
+  if(NOT ${optionname})
+    if(NOT YARP_HAS_${PKG})
+      message(FATAL_ERROR "Optional package ${package} not found. Please install it or enable the option \"${optionname}\" to build yarp.")
     endif()
+  endif()
 endmacro()
 
 
 # Print status for a dependency
 macro(print_dependency package)
 
-    string(TOUPPER ${package} PKG)
-
-#    message("YARP_HAS_SYSTEM_${PKG} = ${YARP_HAS_SYSTEM_${PKG}}")
-#    message("YARP_USE_${PKG} = ${YARP_USE_${PKG}}")
-#    message("YARP_USE_SYSTEM_${PKG} = ${YARP_USE_SYSTEM_${PKG}}")
-#    message("YARP_HAS_${PKG} = ${YARP_HAS_${PKG}}")
-#    if(NOT "${YARP_BUILD_${PKG}}" STREQUAL "")
-#        message("YARP_BUILD_${PKG} = ${YARP_BUILD_${PKG}}")
-#    endif()
+  string(TOUPPER ${package} PKG)
+
+#  message("YARP_HAS_SYSTEM_${PKG} = ${YARP_HAS_SYSTEM_${PKG}}")
+#  message("YARP_USE_${PKG} = ${YARP_USE_${PKG}}")
+#  message("YARP_USE_SYSTEM_${PKG} = ${YARP_USE_SYSTEM_${PKG}}")
+#  message("YARP_HAS_${PKG} = ${YARP_HAS_${PKG}}")
+#  if(NOT "${YARP_BUILD_${PKG}}" STREQUAL "")
+#    message("YARP_BUILD_${PKG} = ${YARP_BUILD_${PKG}}")
+#  endif()
+
+  if(DEFINED ${package}_REQUIRED_VERSION)
+    set(_version " (${${package}_REQUIRED_VERSION})")
+  endif()
+  if(NOT DEFINED YARP_HAS_${PKG})
+    message(STATUS " +++ ${package}${_version}: disabled")
+  elseif(NOT YARP_HAS_${PKG})
+    message(STATUS " +++ ${package}${_version}: not found")
+  elseif(YARP_HAS_SYSTEM_${PKG} AND YARP_USE_SYSTEM_${PKG})
+    message(STATUS " +++ ${package}${_version}: found")
+  elseif(YARP_HAS_SYSTEM_${PKG})
+    message(STATUS " +++ ${package}${_version}: compiling (system package disabled)")
+  else()
+    message(STATUS " +++ ${package}${_version}: compiling (not found)")
+  endif()
+  unset(_version)
 
-    if(DEFINED ${package}_REQUIRED_VERSION)
-        set(_version " (${${package}_REQUIRED_VERSION})")
-    endif()
-    if(NOT DEFINED YARP_HAS_${PKG})
-        message(STATUS " +++ ${package}${_version}: disabled")
-    elseif(NOT YARP_HAS_${PKG})
-        message(STATUS " +++ ${package}${_version}: not found")
-    elseif(YARP_HAS_SYSTEM_${PKG} AND YARP_USE_SYSTEM_${PKG})
-        message(STATUS " +++ ${package}${_version}: found")
-    elseif(YARP_HAS_SYSTEM_${PKG})
-        message(STATUS " +++ ${package}${_version}: compiling (system package disabled)")
-    else()
-        message(STATUS " +++ ${package}${_version}: compiling (not found)")
-    endif()
-    unset(_version)
-
-endmacro(print_dependency)
+endmacro()
 
 
 # OPTIONS:
@@ -202,12 +201,12 @@ mark_as_advanced(SKIP_ACE)
 
 option(CREATE_LIB_MATH "Create math library libYARP_math?" OFF)
 if(CREATE_LIB_MATH)
-    # FIXME YARP_USE_ATLAS is probably not a good choice since it can make
-    #       confusion with YARP_USE_Atlas (generated by checkandset_dependency
-    #       macro)
-    option(YARP_USE_ATLAS "Enable to link to Atlas for BLAS" OFF)
+  # FIXME YARP_USE_ATLAS is probably not a good choice since it can make
+  #       confusion with YARP_USE_Atlas (generated by checkandset_dependency
+  #       macro)
+  option(YARP_USE_ATLAS "Enable to link to Atlas for BLAS" OFF)
 else()
-    unset(YARP_USE_ATLAS)
+  unset(YARP_USE_ATLAS)
 endif()
 
 cmake_dependent_option(CREATE_YARPROBOTINTERFACE "Do you want to compile yarprobotinterface?" ON YARP_COMPILE_EXECUTABLES OFF)
@@ -230,9 +229,9 @@ yarp_renamed_option(CREATE_GYARPMANAGER CREATE_YARPMANAGER)
 yarp_renamed_option(CREATE_GYARPBUILDER CREATE_YARPBUILDER)
 
 if(CREATE_YARPMANAGER_CONSOLE OR CREATE_YARPMANAGER OR CREATE_YARPBUILDER)
-    set(CREATE_LIB_MANAGER ON CACHE INTERNAL "Create manager library libYARP_manager?")
+  set(CREATE_LIB_MANAGER ON CACHE INTERNAL "Create manager library libYARP_manager?")
 else()
-    unset(CREATE_LIB_MANAGER CACHE)
+  unset(CREATE_LIB_MANAGER CACHE)
 endif()
 
 
@@ -243,35 +242,35 @@ message(STATUS "CMake modules directory: ${CMAKE_MODULE_PATH}")
 # FIND PACKAGES:
 
 if(SKIP_ACE)
-    if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-        set(ACE_LIBRARIES pthread rt dl)
-    endif()
+  if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    set(ACE_LIBRARIES pthread rt dl)
+  endif()
 else()
-    find_package(ACE)
-    checkandset_dependency(ACE)
-    # FIXME Replace SKIP_ACE with YARP_USE_ACE
-    set_property(CACHE YARP_USE_ACE PROPERTY TYPE INTERNAL)
-    set_property(CACHE YARP_USE_ACE PROPERTY VALUE TRUE)
-    if(SKIP_ACE)
-        set_property(CACHE YARP_USE_ACE PROPERTY VALUE FALSE)
-    endif()
-
-    # __ACE_INLINE__ is needed in some configurations
-    if(NOT ACE_COMPILES_WITHOUT_INLINE_RELEASE)
-        foreach(_config ${YARP_OPTIMIZED_CONFIGURATIONS})
-            string(TOUPPER ${_config} _CONFIG)
-            set(CMAKE_C_FLAGS_${_CONFIG} "${CMAKE_C_FLAGS_${_CONFIG}} -D__ACE_INLINE__")
-            set(CMAKE_CXX_FLAGS_${_CONFIG} "${CMAKE_CXX_FLAGS_${_CONFIG}} -D__ACE_INLINE__")
-        endforeach()
-    endif()
-
-    if(NOT ACE_COMPILES_WITHOUT_INLINE_DEBUG)
-        foreach(_config ${YARP_DEBUG_CONFIGURATIONS})
-            string(TOUPPER ${_config} _CONFIG)
-            set(CMAKE_C_FLAGS_${_CONFIG} "${CMAKE_C_FLAGS_${_CONFIG}} -D__ACE_INLINE__")
-            set(CMAKE_CXX_FLAGS_${_CONFIG} "${CMAKE_CXX_FLAGS_${_CONFIG}} -D__ACE_INLINE__")
-        endforeach()
-    endif()
+  find_package(ACE)
+  checkandset_dependency(ACE)
+  # FIXME Replace SKIP_ACE with YARP_USE_ACE
+  set_property(CACHE YARP_USE_ACE PROPERTY TYPE INTERNAL)
+  set_property(CACHE YARP_USE_ACE PROPERTY VALUE TRUE)
+  if(SKIP_ACE)
+    set_property(CACHE YARP_USE_ACE PROPERTY VALUE FALSE)
+  endif()
+
+  # __ACE_INLINE__ is needed in some configurations
+  if(NOT ACE_COMPILES_WITHOUT_INLINE_RELEASE)
+    foreach(_config ${YARP_OPTIMIZED_CONFIGURATIONS})
+      string(TOUPPER ${_config} _CONFIG)
+      set(CMAKE_C_FLAGS_${_CONFIG} "${CMAKE_C_FLAGS_${_CONFIG}} -D__ACE_INLINE__")
+      set(CMAKE_CXX_FLAGS_${_CONFIG} "${CMAKE_CXX_FLAGS_${_CONFIG}} -D__ACE_INLINE__")
+    endforeach()
+  endif()
+
+  if(NOT ACE_COMPILES_WITHOUT_INLINE_DEBUG)
+    foreach(_config ${YARP_DEBUG_CONFIGURATIONS})
+      string(TOUPPER ${_config} _CONFIG)
+      set(CMAKE_C_FLAGS_${_CONFIG} "${CMAKE_C_FLAGS_${_CONFIG}} -D__ACE_INLINE__")
+      set(CMAKE_CXX_FLAGS_${_CONFIG} "${CMAKE_CXX_FLAGS_${_CONFIG}} -D__ACE_INLINE__")
+    endforeach()
+  endif()
 endif()
 
 find_package(SQLite)
@@ -281,98 +280,151 @@ find_package(Readline)
 checkandset_dependency(Readline)
 
 if(CREATE_LIB_MATH)
-    find_package(GSL)
-    checkandset_dependency(GSL)
-    if(YARP_USE_ATLAS)
-        find_package(Atlas)
-        checkandset_dependency(Atlas)
-    endif()
+  find_package(GSL)
+  checkandset_dependency(GSL)
+  if(YARP_USE_ATLAS)
+    find_package(Atlas)
+    checkandset_dependency(Atlas)
+  endif()
 endif()
 
 if(CREATE_YARPROBOTINTERFACE OR CREATE_YARPSCOPE OR CREATE_LIB_MANAGER)
-    set(TinyXML_REQUIRED_VERSION 2.6)
-    find_package(TinyXML ${TinyXML_REQUIRED_VERSION})
-    checkbuildandset_dependency(TinyXML)
+  set(TinyXML_REQUIRED_VERSION 2.6)
+  find_package(TinyXML ${TinyXML_REQUIRED_VERSION})
+  checkbuildandset_dependency(TinyXML)
 endif()
 
 if(CREATE_GUIS)
-    if(CREATE_YARPSCOPE)
-        set(GTK2_REQUIRED_VERSION 2.20)
-        set(GTK2_REQUIRED_COMPONENTS gtk gtkmm)
-    elseif(CREATE_YARPMANAGER OR CREATE_YARPBUILDER)
-        set(GTK2_REQUIRED_VERSION 2.8)
-        set(GTK2_REQUIRED_COMPONENTS gtk gtkmm)
-    elseif(CREATE_YARPVIEW)
-        set(GTK2_REQUIRED_VERSION 2.8)
-        set(GTK2_REQUIRED_COMPONENTS gtk)
-    endif()
-    set(GTK2_USE_IMPORTED_TARGETS ON)
-    find_package(GTK2 ${GTK2_REQUIRED_VERSION} COMPONENTS ${GTK2_REQUIRED_COMPONENTS})
-    checkandset_dependency(GTK2)
-
-    find_package(Qt5 COMPONENTS Core Widgets Gui Quick Qml Multimedia Xml PrintSupport QUIET)
-    checkandset_dependency(Qt5)
+  if(CREATE_YARPSCOPE)
+    set(GTK2_REQUIRED_VERSION 2.20)
+    set(GTK2_REQUIRED_COMPONENTS gtk gtkmm)
+  elseif(CREATE_YARPMANAGER OR CREATE_YARPBUILDER)
+    set(GTK2_REQUIRED_VERSION 2.8)
+    set(GTK2_REQUIRED_COMPONENTS gtk gtkmm)
+  elseif(CREATE_YARPVIEW)
+    set(GTK2_REQUIRED_VERSION 2.8)
+    set(GTK2_REQUIRED_COMPONENTS gtk)
+  endif()
+  set(GTK2_USE_IMPORTED_TARGETS ON)
+  find_package(GTK2 ${GTK2_REQUIRED_VERSION} COMPONENTS ${GTK2_REQUIRED_COMPONENTS})
+  checkandset_dependency(GTK2)
+
+  find_package(Qt5 COMPONENTS Core Widgets Gui Quick Qml Multimedia Xml PrintSupport QUIET)
+  checkandset_dependency(Qt5)
 endif()
 
 if(CREATE_YARPSCOPE)
-    if(YARP_HAS_GTK2)
-        set(STANDARD_FIND_MODULE_USE_IMPORTED_TARGET_GtkDatabox 1)
-        find_package(GtkDatabox)
-        checkbuildandset_dependency(GtkDatabox GTK2)
-
-        set(GtkDataboxMM_REQUIRED_VERSION 0.9.3)
-        set(STANDARD_FIND_MODULE_USE_IMPORTED_TARGET_GtkDataboxMM 1)
-        find_package(GtkDataboxMM ${GtkDataboxMM_REQUIRED_VERSION})
-        checkbuildandset_dependency(GtkDataboxMM GTK2 GtkDatabox)
-    endif()
-
-    if(YARP_HAS_QT5)
-        find_package(QCustomPlot)
-        checkbuildandset_dependency(QCustomPlot Qt5)
-    endif()
+  if(YARP_HAS_GTK2)
+    set(STANDARD_FIND_MODULE_USE_IMPORTED_TARGET_GtkDatabox 1)
+    find_package(GtkDatabox)
+    checkbuildandset_dependency(GtkDatabox GTK2)
+
+    set(GtkDataboxMM_REQUIRED_VERSION 0.9.3)
+    set(STANDARD_FIND_MODULE_USE_IMPORTED_TARGET_GtkDataboxMM 1)
+    find_package(GtkDataboxMM ${GtkDataboxMM_REQUIRED_VERSION})
+    checkbuildandset_dependency(GtkDataboxMM GTK2 GtkDatabox)
+  endif()
+
+  if(YARP_HAS_QT5)
+    find_package(QCustomPlot)
+    checkbuildandset_dependency(QCustomPlot Qt5)
+  endif()
 endif()
 
 if(CREATE_YARPBUILDER)
-    set(STANDARD_FIND_MODULE_USE_IMPORTED_TARGET_GooCanvas 1)
-    find_package(GooCanvas)
-    checkbuildandset_dependency(GooCanvas GTK2)
+  set(STANDARD_FIND_MODULE_USE_IMPORTED_TARGET_GooCanvas 1)
+  find_package(GooCanvas)
+  checkbuildandset_dependency(GooCanvas GTK2)
 
-    set(STANDARD_FIND_MODULE_USE_IMPORTED_TARGET_GooCanvasMM 1)
-    find_package(GooCanvasMM)
-    checkbuildandset_dependency(GooCanvasMM GTK2 GooCanvas)
+  set(STANDARD_FIND_MODULE_USE_IMPORTED_TARGET_GooCanvasMM 1)
+  find_package(GooCanvasMM)
+  checkbuildandset_dependency(GooCanvasMM GTK2 GooCanvas)
 endif()
 
 if(YARP_COMPILE_BINDINGS)
-    set(SWIG_REQUIRED_VERSION 1.3.29)
-    find_package(SWIG ${SWIG_REQUIRED_VERSION})
-    checkandset_dependency(SWIG)
+  set(SWIG_REQUIRED_VERSION 1.3.29)
+  find_package(SWIG ${SWIG_REQUIRED_VERSION})
+  checkandset_dependency(SWIG)
 endif()
 
 if(CREATE_YARPDATADUMPER OR CREATE_YARPDATAPLAYER OR ENABLE_yarpmod_opencv_grabber)
-    find_package(OpenCV)
-    checkandset_dependency(OpenCV)
+  find_package(OpenCV)
+  checkandset_dependency(OpenCV)
 endif()
 
 if(ENABLE_yarpcar_portmonitor_carrier)
-    find_package(Lua)
-    checkandset_dependency(Lua)
+  find_package(Lua)
+  checkandset_dependency(Lua)
 endif()
 
 if(ENABLE_yarpcar_bayer_carrier)
-    set(Libdc1394_REQUIRED_VERSION 2.0)
-    find_package(Libdc1394 ${Libdc1394_REQUIRED_VERSION})
-    checkandset_dependency(Libdc1394)
+  set(Libdc1394_REQUIRED_VERSION 2.0)
+  find_package(Libdc1394 ${Libdc1394_REQUIRED_VERSION})
+  checkandset_dependency(Libdc1394)
+endif()
+
+if(ENABLE_yarpcar_mjpeg_carrier)
+  find_package(JPEG)
+  checkandset_dependency(JPEG)
+endif()
+
+if(ENABLE_yarpcar_mpi_carrier OR ENABLE_yarpcar_mpibcast_carrier)
+  find_package(MPI)
+  checkandset_dependency(MPI)
 endif()
 
 if(ENABLE_yarpmod_ovrheadset)
-    find_package(LibOVR)
-    find_package(GLFW3)
-    find_package(GLEW)
-    checkandset_dependency(LibOVR)
-    checkandset_dependency(GLFW3)
-    checkandset_dependency(GLEW)
+  find_package(LibOVR)
+  find_package(GLFW3)
+  find_package(GLEW)
+  checkandset_dependency(LibOVR)
+  checkandset_dependency(GLFW3)
+  checkandset_dependency(GLEW)
+endif()
+
+if(ENABLE_yarpmod_dynamixelAX12Ftdi)
+  find_package(FTDI)
+  checkandset_dependency(FTDI)
 endif()
 
+if(ENABLE_yarpmod_cuda)
+  find_package(CUDA)
+  checkandset_dependency(CUDA)
+endif()
+
+if(ENABLE_yarpmod_ffmpeg_grabber OR ENABLE_yarpmod_ffmpeg_writer)
+  find_package(FFMPEG)
+  checkandset_dependency(FFMPEG)
+endif()
+
+if(ENABLE_yarpmod_wxsdl)
+  find_package(wxWidgets)
+  find_package(SDL)
+  checkandset_dependency(wxWidgets)
+  checkandset_dependency(SDL)
+endif()
+
+if(ENABLE_yarpmod_portaudio)
+  find_package(PortAudio)
+  checkandset_dependency(PortAudio)
+endif()
+
+if(ENABLE_yarpmod_nvidia)
+  find_package(NVIDIACg)
+  checkandset_dependency(NVIDIACg)
+endif()
+
+if(ENABLE_yarpmod_primesensecamera OR ENABLE_yarpmod_kinect)
+  find_package(Libusb1)
+  checkandset_dependency(Libusb1)
+endif()
+
+if(ENABLE_yarpmod_stage)
+  find_package(Stage)
+  checkandset_dependency(Stage)
+endif()
+
+
 # PRINT DEPENDENCIES STATUS:
 
 message(STATUS "I have found the following libraries:")
@@ -396,6 +448,17 @@ print_dependency(LibOVR)
 print_dependency(GLFW3)
 print_dependency(GLEW)
 print_dependency(Libdc1394)
+print_dependency(JPEG)
+print_dependency(MPI)
+print_dependency(FTDI)
+print_dependency(CUDA)
+print_dependency(FFMPEG)
+print_dependency(wxWidgets)
+print_dependency(SDL)
+print_dependency(PortAudio)
+print_dependency(NVIDIACg)
+print_dependency(Libusb1)
+print_dependency(Stage)
 
 
 # CHECK DEPENDENCIES:
@@ -410,18 +473,32 @@ check_alternative_dependency(CREATE_GUIS GTK2 Qt5)
 check_alternative_dependency(CREATE_YARPSCOPE GtkDataboxMM QCustomPlot)
 check_optional_dependency(CREATE_YARPBUILDER GooCanvasMM)
 check_optional_dependency(YARP_COMPILE_BINDINGS SWIG)
+check_optional_dependency(ENABLE_yarpcar_mjpeg_carrier JPEG)
 check_optional_dependency(ENABLE_yarpmod_opencv_grabber OpenCV)
 check_optional_dependency(ENABLE_yarpmod_ovrheadset LibOVR)
 check_optional_dependency(ENABLE_yarpmod_ovrheadset GLFW3)
 check_optional_dependency(ENABLE_yarpmod_ovrheadset GLEW)
-
+check_optional_dependency(ENABLE_yarpcar_mpi_carrier MPI)
+check_optional_dependency(ENABLE_yarpcar_mpibcast_carrier MPI)
+check_optional_dependency(ENABLE_yarpmod_dynamixelAX12Ftdi FTDI)
+check_optional_dependency(ENABLE_yarpmod_cuda CUDA)
+check_optional_dependency(ENABLE_yarpmod_ffmpeg_grabber FFMPEG)
+check_optional_dependency(ENABLE_yarpmod_ffmpeg_writer FFMPEG)
+check_optional_dependency(ENABLE_yarpmod_serial ACE)
+check_optional_dependency(ENABLE_yarpmod_wxsdl wxWidgets)
+check_optional_dependency(ENABLE_yarpmod_wxsdl SDL)
+check_optional_dependency(ENABLE_yarpmod_portaudio PortAudio)
+check_optional_dependency(ENABLE_yarpmod_nvidia NVIDIACg)
+check_optional_dependency(ENABLE_yarpmod_primesensecamera Libusb1)
+check_optional_dependency(ENABLE_yarpmod_kinect Libusb1)
+check_optional_dependency(ENABLE_yarpmod_stage Stage)
 
 
 #########################################################################
 # Print information for user (CDash)
 if (CREATE_LIB_MATH)
-    message(STATUS "YARP_math selected for compilation")
+  message(STATUS "YARP_math selected for compilation")
 endif()
 if (CREATE_GUIS)
-    message(STATUS "GUIs selected for compilation")
+  message(STATUS "GUIs selected for compilation")
 endif()
diff --git a/conf/YarpIDL.cmake b/conf/YarpIDL.cmake
index 4a17624..4ed62ce 100644
--- a/conf/YarpIDL.cmake
+++ b/conf/YarpIDL.cmake
@@ -40,135 +40,135 @@ if(COMMAND yarp_add_idl)
 endif()
 
 function(YARP_IDL_TO_DIR yarpidl_file_base output_dir)
-    # Store optional output variable(s).
-    set(out_vars ${ARGN})
+  # Store optional output variable(s).
+  set(out_vars ${ARGN})
 
-    # Make sure output_dir variable is visible when expanding templates.
-    set(output_dir ${output_dir})
+  # Make sure output_dir variable is visible when expanding templates.
+  set(output_dir ${output_dir})
 
-    # Extract a name and extension.
-    if (IS_ABSOLUTE ${yarpidl_file_base})
-      file(RELATIVE_PATH yarpidl_file ${CMAKE_CURRENT_SOURCE_DIR} ${yarpidl_file_base})
-    else()
-      set(yarpidl_file ${yarpidl_file_base})
-    endif()
-    get_filename_component(include_prefix ${yarpidl_file} PATH)
-    get_filename_component(yarpidlName ${yarpidl_file} NAME_WE)
-    get_filename_component(yarpidlExt ${yarpidl_file} EXT)
-    string(TOLOWER ${yarpidlExt} yarpidlExt)
-    string(TOLOWER ${yarpidlName} yarpidlNameLower)
-    set(dir_add "")
-
-    # Figure out format we are working with.
-    set(family none)
-    if (yarpidlExt STREQUAL ".thrift")
-        set(family thrift)
-        set(dir_add "/${yarpidlNameLower}")
-    endif ()
-    if (yarpidlExt STREQUAL ".msg")
-        set(family rosmsg)
-    endif ()
-    if (yarpidlExt STREQUAL ".srv")
-        set(family rosmsg)
-    endif ()
-    if (family STREQUAL "none")
-        message(FATAL_ERROR "yarp_idl_to_dir does not know what to do with ${yarpidl_file}, unrecognized extension ${yarpidlExt}")
-    endif ()
+  # Extract a name and extension.
+  if(IS_ABSOLUTE ${yarpidl_file_base})
+    file(RELATIVE_PATH yarpidl_file ${CMAKE_CURRENT_SOURCE_DIR} ${yarpidl_file_base})
+  else()
+    set(yarpidl_file ${yarpidl_file_base})
+  endif()
+  get_filename_component(include_prefix ${yarpidl_file} PATH)
+  get_filename_component(yarpidlName ${yarpidl_file} NAME_WE)
+  get_filename_component(yarpidlExt ${yarpidl_file} EXT)
+  string(TOLOWER ${yarpidlExt} yarpidlExt)
+  string(TOLOWER ${yarpidlName} yarpidlNameLower)
+  set(dir_add "")
+
+  # Figure out format we are working with.
+  set(family none)
+  if(yarpidlExt STREQUAL ".thrift")
+    set(family thrift)
+    set(dir_add "/${yarpidlNameLower}")
+  endif()
+  if(yarpidlExt STREQUAL ".msg")
+    set(family rosmsg)
+  endif()
+  if(yarpidlExt STREQUAL ".srv")
+    set(family rosmsg)
+  endif()
+  if(family STREQUAL "none")
+    message(FATAL_ERROR "yarp_idl_to_dir does not know what to do with ${yarpidl_file}, unrecognized extension ${yarpidlExt}")
+  endif()
 
-    if("${family}" STREQUAL "thrift")
-        set(yarpidl_target_name "${yarpidl_file}")
-    else()
-        get_filename_component(rospkg_name "${include_prefix}" NAME)
-        get_filename_component(include_prefix "${include_prefix}" PATH)
-        set(yarpidl_target_name "${rospkg_name}_${yarpidlName}${yarpidlExt}")
-    endif()
-    string(REGEX REPLACE "[^a-zA-Z0-9]" "_" yarpidl_target_name ${yarpidl_target_name})
+  if("${family}" STREQUAL "thrift")
+    set(yarpidl_target_name "${yarpidl_file}")
+  else()
+    get_filename_component(rospkg_name "${include_prefix}" NAME)
+    get_filename_component(include_prefix "${include_prefix}" PATH)
+    set(yarpidl_target_name "${rospkg_name}_${yarpidlName}${yarpidlExt}")
+  endif()
+  string(REGEX REPLACE "[^a-zA-Z0-9]" "_" yarpidl_target_name ${yarpidl_target_name})
 
-    string(LENGTH "${include_prefix}" include_prefix_len)
-    if (include_prefix_len GREATER 0)
-      set(include_prefix "/${include_prefix}")
-    endif ()
+  string(LENGTH "${include_prefix}" include_prefix_len)
+  if(include_prefix_len GREATER 0)
+    set(include_prefix "/${include_prefix}")
+  endif()
 
-    # Set intermediate output directory.
-    set(dir ${CMAKE_CURRENT_BINARY_DIR}/_yarp_idl_${include_prefix}${dir_add})
-    set(settings_file ${output_dir}/${yarpidl_target_name}.cmake)
+  # Set intermediate output directory.
+  set(dir ${CMAKE_CURRENT_BINARY_DIR}/_yarp_idl_${include_prefix}${dir_add})
+  set(settings_file ${output_dir}/${yarpidl_target_name}.cmake)
 
-    # Check if generation has never happened.
-    set(files_missing TRUE)
-    if (EXISTS ${settings_file})
-      set(files_missing FALSE)
-    endif()
+  # Check if generation has never happened.
+  set(files_missing TRUE)
+  if(EXISTS ${settings_file})
+    set(files_missing FALSE)
+  endif()
 
-    # Flag to control whether IDL generation is allowed.
-    option(ALLOW_IDL_GENERATION "Allow YARP to (re)build IDL files as needed" ${files_missing})
-
-    set(full_headers)
-    set(full_sources)
-    if(ALLOW_IDL_GENERATION)
-        # Say what we are doing.
-        message(STATUS "${family} code for ${yarpidl_file} => ${output_dir}")
-        # Generate code at configuration time, so we know filenames.
-        find_program(YARPIDL_${family}_LOCATION yarpidl_${family} HINTS ${YARP_IDL_BINARY_HINT})
-        # Make sure intermediate output directory exists.
-        make_directory(${dir})
-        # Generate a script controlling final layout of files.
-        configure_file(${YARP_MODULE_DIR}/template/placeGeneratedYarpIdlFiles.cmake.in ${dir}/place${yarpidlName}.cmake @ONLY)
-        # Go ahead and generate files.
-        execute_process(COMMAND ${YARPIDL_${family}_LOCATION} --out ${dir} --gen yarp:include_prefix --I ${CMAKE_CURRENT_SOURCE_DIR} ${yarpidl_file}
-                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-                        RESULT_VARIABLE res
-                        OUTPUT_QUIET
-                        ERROR_QUIET)
-        # Failure is bad news, let user know.
-        if (NOT "${res}" STREQUAL "0")
-            message(FATAL_ERROR "yarpidl_${family} (${YARPIDL_${family}_LOCATION}) failed, aborting.")
-        endif()
-        # Place the files in their final location.
-        execute_process(COMMAND ${CMAKE_COMMAND} -P ${dir}/place${yarpidlName}.cmake)
-        set(files_missing FALSE)
+  # Flag to control whether IDL generation is allowed.
+  option(ALLOW_IDL_GENERATION "Allow YARP to (re)build IDL files as needed" ${files_missing})
+
+  set(full_headers)
+  set(full_sources)
+  if(ALLOW_IDL_GENERATION)
+    # Say what we are doing.
+    message(STATUS "${family} code for ${yarpidl_file} => ${output_dir}")
+    # Generate code at configuration time, so we know filenames.
+    find_program(YARPIDL_${family}_LOCATION yarpidl_${family} HINTS ${YARP_IDL_BINARY_HINT})
+    # Make sure intermediate output directory exists.
+    make_directory(${dir})
+    # Generate a script controlling final layout of files.
+    configure_file(${YARP_MODULE_DIR}/template/placeGeneratedYarpIdlFiles.cmake.in ${dir}/place${yarpidlName}.cmake @ONLY)
+    # Go ahead and generate files.
+    execute_process(COMMAND ${YARPIDL_${family}_LOCATION} --out ${dir} --gen yarp:include_prefix --I ${CMAKE_CURRENT_SOURCE_DIR} ${yarpidl_file}
+                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+                    RESULT_VARIABLE res
+                    OUTPUT_QUIET
+                    ERROR_QUIET)
+    # Failure is bad news, let user know.
+    if(NOT "${res}" STREQUAL "0")
+      message(FATAL_ERROR "yarpidl_${family} (${YARPIDL_${family}_LOCATION}) failed, aborting.")
     endif()
+    # Place the files in their final location.
+    execute_process(COMMAND ${CMAKE_COMMAND} -P ${dir}/place${yarpidlName}.cmake)
+    set(files_missing FALSE)
+  endif()
 
-    # Prepare list of generated files.
-    if (NOT files_missing)
-        include(${settings_file})
-        set(DEST_FILES)
-        foreach(generatedFile ${headers})
-            list(APPEND DEST_FILES ${output_dir}/${generatedFile})
-            list(APPEND full_headers ${output_dir}/${generatedFile})
-        endforeach(generatedFile)
-        foreach(generatedFile ${sources})
-            list(APPEND DEST_FILES ${output_dir}/${generatedFile})
-            list(APPEND full_sources ${output_dir}/${generatedFile})
-        endforeach(generatedFile)
-    endif()
+  # Prepare list of generated files.
+  if(NOT files_missing)
+    include(${settings_file})
+    set(DEST_FILES)
+    foreach(generatedFile ${headers})
+      list(APPEND DEST_FILES ${output_dir}/${generatedFile})
+      list(APPEND full_headers ${output_dir}/${generatedFile})
+    endforeach(generatedFile)
+    foreach(generatedFile ${sources})
+      list(APPEND DEST_FILES ${output_dir}/${generatedFile})
+      list(APPEND full_sources ${output_dir}/${generatedFile})
+    endforeach(generatedFile)
+  endif()
 
-    if(ALLOW_IDL_GENERATION)
-        # Add a command/target to regenerate the files if the IDL file changes.
-        add_custom_command(OUTPUT ${output_dir}/${yarpidl_target_name}.cmake ${DEST_FILES}
-                           COMMAND ${YARPIDL_${family}_LOCATION} --out ${dir} --gen yarp:include_prefix --I ${CMAKE_CURRENT_SOURCE_DIR} ${yarpidl_file}
-                           WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-                           COMMAND ${CMAKE_COMMAND} -P ${dir}/place${yarpidlName}.cmake
-                           DEPENDS ${yarpidl_file} ${YARPIDL_LOCATION})
-        add_custom_target(${yarpidl_target_name} DEPENDS ${output_dir}/${yarpidl_target_name}.cmake)
-    else ()
-        if (files_missing)
-            message(FATAL_ERROR "Generated IDL files for ${yarpidl_file} not found and cannot make them because ALLOW_IDL_GENERATION=${ALLOW_IDL_GENERATION} (maybe this should be turned on?)")
-        else ()
-            message(STATUS "Not processing ${family} file ${yarpidl_file}, ALLOW_IDL_GENERATION=${ALLOW_IDL_GENERATION}")
-        endif ()
-    endif(ALLOW_IDL_GENERATION)
-
-    list(LENGTH out_vars len)
-    if (len GREATER 1)
-        list(GET out_vars 0 target_src)
-        list(GET out_vars 1 target_hdr)
-        set(${target_src} ${full_sources} PARENT_SCOPE)
-        set(${target_hdr} ${full_headers} PARENT_SCOPE)
-    endif()
-    if (len GREATER 2)
-        list(GET out_vars 2 target_paths)
-        set(${target_paths} ${output_dir} ${output_dir}/include PARENT_SCOPE)
+  if(ALLOW_IDL_GENERATION)
+    # Add a command/target to regenerate the files if the IDL file changes.
+    add_custom_command(OUTPUT ${output_dir}/${yarpidl_target_name}.cmake ${DEST_FILES}
+                       COMMAND ${YARPIDL_${family}_LOCATION} --out ${dir} --gen yarp:include_prefix --I ${CMAKE_CURRENT_SOURCE_DIR} ${yarpidl_file}
+                       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+                       COMMAND ${CMAKE_COMMAND} -P ${dir}/place${yarpidlName}.cmake
+                       DEPENDS ${yarpidl_file} ${YARPIDL_LOCATION})
+    add_custom_target(${yarpidl_target_name} DEPENDS ${output_dir}/${yarpidl_target_name}.cmake)
+  else()
+    if(files_missing)
+      message(FATAL_ERROR "Generated IDL files for ${yarpidl_file} not found and cannot make them because ALLOW_IDL_GENERATION=${ALLOW_IDL_GENERATION} (maybe this should be turned on?)")
+    else()
+      message(STATUS "Not processing ${family} file ${yarpidl_file}, ALLOW_IDL_GENERATION=${ALLOW_IDL_GENERATION}")
     endif()
+  endif(ALLOW_IDL_GENERATION)
+
+  list(LENGTH out_vars len)
+  if(len GREATER 1)
+    list(GET out_vars 0 target_src)
+    list(GET out_vars 1 target_hdr)
+    set(${target_src} ${full_sources} PARENT_SCOPE)
+    set(${target_hdr} ${full_headers} PARENT_SCOPE)
+  endif()
+  if(len GREATER 2)
+    list(GET out_vars 2 target_paths)
+    set(${target_paths} ${output_dir} ${output_dir}/include PARENT_SCOPE)
+  endif()
 endfunction()
 
 
@@ -201,7 +201,7 @@ function(_YARP_IDL_THRIFT_TO_FILE_LIST file path basename ext gen_srcs_var gen_h
   endforeach()
 
   # Remove "enum"s, "struct"s and "service"s
-  string (REGEX REPLACE "(enum|struct|service)[ \t\n]+([^ \t\n]+)[ \t\n]*{[^}]+}([ \t\n]*\\([^\\)]+\\))?" "" file_content ${file_content})
+  string(REGEX REPLACE "(enum|struct|service)[ \t\n]+([^ \t\n]+)[ \t\n]*{[^}]+}([ \t\n]*\\([^\\)]+\\))?" "" file_content ${file_content})
 
   # Find if at least one "const" or "typedef" is defined
   if("${file_content}" MATCHES "(const|typedef)[ \t]+([^ \t\n]+)[ \t]*([^ \t\n]+)")
@@ -258,7 +258,7 @@ function(YARP_ADD_IDL var first_file)
   foreach(file "${first_file}" ${ARGN})
 
     # Ensure that the filename is relative to the current source directory
-    if (IS_ABSOLUTE "${file}")
+    if(IS_ABSOLUTE "${file}")
       file(RELATIVE_PATH file "${CMAKE_CURRENT_SOURCE_DIR}" "${file}")
     endif()
 
diff --git a/conf/YarpInstallationHelpers.cmake b/conf/YarpInstallationHelpers.cmake
index 0ddda7b..a3a0311 100644
--- a/conf/YarpInstallationHelpers.cmake
+++ b/conf/YarpInstallationHelpers.cmake
@@ -277,22 +277,16 @@ type \"@_type@\"
         message(STATUS "Deleted: \"${CMAKE_BINARY_DIR}/${_destination}/${_f}\"")
         file(REMOVE "${CMAKE_BINARY_DIR}/${_destination}/${_f}")
       endif()
-      if(EXISTS "${CMAKE_INSTALL_PREFIX}/${_f}")
-        message(STATUS "The file \"${CMAKE_INSTALL_PREFIX}/${_f}\" will cause issues when looking for plugins. It will be automatically deleted when installing")
-        install(CODE
- "if(EXISTS \"${CMAKE_INSTALL_PREFIX}/${_f}\")
-    message(STATUS \"Deleted: \\\"${CMAKE_INSTALL_PREFIX}/${_f}\\\"\")
-    file(REMOVE \"${CMAKE_INSTALL_PREFIX}/${_f}\")
+      install(CODE
+ "if(EXISTS \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${_f}\")
+    message(STATUS \"Deleted: \\\"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${_f}\\\"\")
+    file(REMOVE \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${_f}\")
   endif()")
-      endif()
-      if(EXISTS "${CMAKE_INSTALL_PREFIX}/${_destination}/${_f}")
-        message(STATUS "The file \"${CMAKE_INSTALL_PREFIX}/${_destination}/${_f}\" will cause issues when looking for plugins. It will be automatically deleted when installing")
-        install(CODE
- "if(EXISTS \"${CMAKE_INSTALL_PREFIX}/${_destination}/${_f}\")
-    message(STATUS \"Deleted: \\\"${CMAKE_INSTALL_PREFIX}/${_destination}/${_f}\\\"\")
-    file(REMOVE \"${CMAKE_INSTALL_PREFIX}/${_destination}/${_f}\")
+      install(CODE
+ "if(EXISTS \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${_destination}/${_f}\")
+    message(STATUS \"Deleted: \\\"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${_destination}/${_f}\\\"\")
+    file(REMOVE \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${_destination}/${_f}\")
   endif()")
-      endif()
     endforeach()
 
   endif()
diff --git a/conf/YarpOSXUtilities.cmake b/conf/YarpOSXUtilities.cmake
index 57ee454..b3237ad 100644
--- a/conf/YarpOSXUtilities.cmake
+++ b/conf/YarpOSXUtilities.cmake
@@ -28,7 +28,7 @@ function(YARP_OSX_DUPLICATE_AND_ADD_BUNDLE)
     set(_target_orig ${_DADB_TARGET_ORIG})
 
     if(NOT DEFINED _DADB_TARGET_DEST)
-      set(_target_dest ${_target}.app)
+      set(_target_dest ${_target_orig}.app)
     else()
       set(_target_dest ${_DADB_TARGET_DEST})
     endif()
diff --git a/conf/YarpOptions.cmake b/conf/YarpOptions.cmake
index f8acb70..6dfa77f 100644
--- a/conf/YarpOptions.cmake
+++ b/conf/YarpOptions.cmake
@@ -192,6 +192,26 @@ if(YARP_VALGRIND_TESTS)
   endforeach()
 endif()
 
+#########################################################################
+# Run tests under gdb
+
+cmake_dependent_option(YARP_GDB_TESTS
+                       "Run YARP tests under gdb" OFF
+                       "YARP_COMPILE_TESTS" OFF)
+mark_as_advanced(YARP_GDB_TESTS)
+
+if(YARP_GDB_TESTS)
+  find_program(GDB_EXECUTABLE NAMES gdb)
+  mark_as_advanced(GDB_EXECUTABLE)
+  set(GDB_OPTIONS_DEFAULT "")
+  if(GDB_EXECUTABLE)
+    set(GDB_OPTIONS "${GDB_OPTIONS_DEFAULT}"
+        CACHE STRING "gdb options (--return-child-result will be appended)")
+    separate_arguments(GDB_OPTIONS UNIX_COMMAND "${GDB_OPTIONS}")
+    set(GDB_COMMAND "${GDB_EXECUTABLE}" -batch ${GDB_OPTIONS} -ex "run" -ex "bt" --return-child-result --args)
+  endif()
+endif()
+
 
 #########################################################################
 # Enable these messages for debugging flags
@@ -329,7 +349,7 @@ add_install_rpath_support(LIB_DIRS "${CMAKE_INSTALL_FULL_LIBDIR}"       # Librar
 
 
 #########################################################################
-# Specify yarp version and copyright into OSX bundles
+# Specify yarp version and copyright into macOS bundles
 set(MACOSX_BUNDLE_COPYRIGHT "© Istituto Italiano di Tecnologia and RobotCub Consortium. YARP is released under the terms of the LGPL v2.1 or later.")
 set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${YARP_VERSION_STRING}")
 
diff --git a/conf/YarpPlugin.cmake b/conf/YarpPlugin.cmake
index 3bc38d6..3b64d67 100644
--- a/conf/YarpPlugin.cmake
+++ b/conf/YarpPlugin.cmake
@@ -99,21 +99,6 @@ macro(YARP_BEGIN_PLUGIN_LIBRARY bundle_name)
     set_property(GLOBAL PROPERTY YARP_BUNDLE_CODE)    # list of generated code
     set_property(GLOBAL PROPERTY YARP_BUNDLE_LINK_LIBRARIES) # list of additional libraries that will be linked by the master
 
-    # One glitch is that if plugins are used within YARP, rather
-    # than in an external library, then "find_package(YARP)" will
-    # not work correctly yet.  We simulate the operation of
-    # find_package(YARP) here if needed, using properties
-    # maintained during the YARP build.
-    get_property(YARP_TREE_INCLUDE_DIRS GLOBAL PROPERTY YARP_TREE_INCLUDE_DIRS)
-    if(YARP_TREE_INCLUDE_DIRS)
-      # Simulate the operation of find_package(YARP)
-      set(YARP_FOUND TRUE)
-      get_property(YARP_INCLUDE_DIRS GLOBAL PROPERTY YARP_TREE_INCLUDE_DIRS)
-      get_property(YARP_LIBRARIES GLOBAL PROPERTY YARP_LIBS)
-      get_property(YARP_DEFINES GLOBAL PROPERTY YARP_DEFS)
-    else()
-      find_package(YARP REQUIRED)
-    endif()
   endif()
 endmacro()
 
@@ -428,23 +413,3 @@ if(NOT YARP_NO_DEPRECATED)
                  DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
   endmacro()
 endif()
-
-
-
-#########################################################################
-# Lightly redefine FIND_PACKAGE to skip calls to FIND_PACKAGE(YARP).
-# YARP dependencies are guaranteed to have already been satisfied.
-# And if we are compiling YARP, the use of FIND_PACKAGE(YARP) will lead
-# to problems.
-# FIXME This macro must disappear.
-#
-macro(FIND_PACKAGE LIBNAME)
-  if(NOT X_YARP_PLUGIN_MODE)
-    # pass on call without looking at it
-    _FIND_PACKAGE(${LIBNAME} ${ARGN})
-  endif()
-  if(NOT "${LIBNAME}" STREQUAL "YARP")
-    # Skipping requests for YARP, we already have it
-    _FIND_PACKAGE(${LIBNAME} ${ARGN})
-  endif()
-endmacro()
diff --git a/conf/YarpVersion.cmake b/conf/YarpVersion.cmake
index 2edae20..586886a 100644
--- a/conf/YarpVersion.cmake
+++ b/conf/YarpVersion.cmake
@@ -10,7 +10,7 @@
 set(YARP_VERSION_MAJOR "2")
 set(YARP_VERSION_MINOR "3")
 set(YARP_VERSION_PATCH "66")
-set(YARP_VERSION_TWEAK "")
+set(YARP_VERSION_TWEAK "1")
 set(YARP_VERSION_STRING "")
 
 set(YARP_VERSION_ABI "1")
diff --git a/conf/template/Doxyfile.in b/conf/template/Doxyfile.in
index b7fc778..b5400af 100644
--- a/conf/template/Doxyfile.in
+++ b/conf/template/Doxyfile.in
@@ -171,7 +171,6 @@ STRIP_FROM_INC_PATH    = @CMAKE_BINARY_DIR@/generated_include \
                          @CMAKE_SOURCE_DIR@/src/libYARP_name/include/ \
                          @CMAKE_SOURCE_DIR@/src/modules \
                          @CMAKE_SOURCE_DIR@/src/carriers \
-                         @CMAKE_SOURCE_DIR@/doc/spec \
                          @CMAKE_SOURCE_DIR@/doc \
                          @CMAKE_SOURCE_DIR@/.github
 
@@ -799,9 +798,8 @@ INPUT                  = @CMAKE_BINARY_DIR@/generated_include \
                          @CMAKE_SOURCE_DIR@/src/modules \
                          @CMAKE_SOURCE_DIR@/src/carriers \
                          @CMAKE_SOURCE_DIR@/doc \
-                         @CMAKE_SOURCE_DIR@/doc/spec \
                          @CMAKE_SOURCE_DIR@/doc/release \
-                         @CMAKE_SOURCE_DIR@/.github/CONTRIBUTING.md
+                         @CMAKE_SOURCE_DIR@/.github
 
 # 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
@@ -894,7 +892,7 @@ EXAMPLE_RECURSIVE      = YES
 # that contain images that are to be included in the documentation (see the
 # \image command).
 
-IMAGE_PATH             = @CMAKE_SOURCE_DIR@/doc \
+IMAGE_PATH             = @CMAKE_SOURCE_DIR@/doc/images \
                          @CMAKE_SOURCE_DIR@/.github
 
 # The INPUT_FILTER tag can be used to specify a program that doxygen should
diff --git a/doc/yarp_yarp-config.dox b/doc/cmd_yarp-config.dox
similarity index 93%
rename from doc/yarp_yarp-config.dox
rename to doc/cmd_yarp-config.dox
index 1fa158d..816262e 100644
--- a/doc/yarp_yarp-config.dox
+++ b/doc/cmd_yarp-config.dox
@@ -6,7 +6,9 @@
  */
 
 /**
- * @page yarp_yarp-config yarp-config
+\page yarp-config yarp-config: the yarp-config tool
+
+\ingroup yarp_tools
 
 \author Elena Ceseracciu and Lorenzo Natale
 
@@ -39,7 +41,7 @@ To import contexts to the home directory:
   yarp-config context --import-all
 \endverbatim
 
-The first two commands affects individual contexts, and allow to import a whole context (first command) or only some specific files (second one); the third command affects all contexts (not recommended).
+The first two commands affects individual contexts, and allow one to import a whole context (first command) or only some specific files (second one); the third command affects all contexts (not recommended).
 After you finish importing a context, you can go to your local private directory (in Linux usually: $HOME/.local/share/yarp/contexts/) and edit it.
 To remove any local changes and restore the default files, one can do:
 
diff --git a/doc/cmd_yarp.dox b/doc/cmd_yarp.dox
index 749a024..20feb57 100644
--- a/doc/cmd_yarp.dox
+++ b/doc/cmd_yarp.dox
@@ -5,7 +5,9 @@
  */
 
 /**
- * @page yarp The main YARP command-line interface
+\page yarp yarp: the main YARP command-line interface
+
+\ingroup yarp_tools
 
 The command-line utility "yarp" performs a set of useful operations
 for a YARP network.  It can give status information, make and break
@@ -737,31 +739,9 @@ type of connection to use).
 
 @section yarp_server yarp server
 
-\verbatim
-  yarp server
-  yarp server SOCKETPORT
-  yarp server IP SOCKETPORT
-\endverbatim
-
-This starts a name server running on the current machine, optionally
-specifying the socket-port to listen to (default whatever was used in
-the previous invocation, as recorded in a configuration file, or 10000
-if this is the first time to run).
-Also, the IP by which the name server should be identified can
-optionally be specified (default is a fairly random choice of
-the IPs associated with the current machine).
-
-The address of the name server can be determined using
-\ref yarp_where.  The address is cached in a configuration
-file - see \ref yarp_conf.
-
-If possible, a fallback multi-cast server will be started with IP
-224.2.1.1 and port number 10001.  The purpose of this server is
-to allow yarp processes to find the yarp name server in the absence
-of correct configuration.
-
-
-
+This starts a name server running on the current machine.
+See \ref yarpserver "yarpserver" documentation for the options accepted by this
+command.
 
 @section yarp_terminate yarp terminate
 
@@ -937,7 +917,7 @@ Try:
 \verbatim
 [in terminal E] yarpdev --device test_grabber --period 2 --width 8 --height 8 --name /grabber
 \endverbatim
-This creates a test "device" with a port called "/grabber", outputing a
+This creates a test "device" with a port called "/grabber", outputting a
 very small test image every 2 seconds.  You won't see much happen yet.
 Try:
 \verbatim
diff --git a/doc/cmd_yarpbatterygui.dox b/doc/cmd_yarpbatterygui.dox
new file mode 100644
index 0000000..a2b7dcc
--- /dev/null
+++ b/doc/cmd_yarpbatterygui.dox
@@ -0,0 +1,6 @@
+/**
+\page yarpbatterygui yarpbatterygui: visualize battery information
+
+\ingroup yarp_guis
+\ingroup yarp_tools
+*/
\ No newline at end of file
diff --git a/doc/yarpdatadumper.dox b/doc/cmd_yarpdatadumper.dox
similarity index 78%
rename from doc/yarpdatadumper.dox
rename to doc/cmd_yarpdatadumper.dox
index 49055e4..902e1c4 100644
--- a/doc/yarpdatadumper.dox
+++ b/doc/cmd_yarpdatadumper.dox
@@ -1,7 +1,7 @@
 /**
- at ingroup yarp_tools
+\page yarpdatadumper yarpdatadumper: the YARP data recorder
 
-\defgroup yarpdatadumper yarpdatadumper
+\ingroup yarp_tools
 
 Acquires and stores Bottles or Images and Videos from a YARP
 port.
@@ -79,7 +79,7 @@ by the \ref yarpdatadumper.
 
 - Linux: ffmpeg must be properly installed and recognized by
   OpenCV. The command "sudo apt-get ffmpeg" seemed not to work.
-  This is a possible alterative procedure:
+  This is a possible alternative procedure:
 
   -# sudo apt-get install libjpeg62-dev libtiff4-dev
      libjasper-dev libopenexr-dev libeigen2-dev yasm libfaac-dev
@@ -107,7 +107,7 @@ by the \ref yarpdatadumper.
 
 --dir \e dirname
 - The parameter \e dirname serves to specify the storage
-  directory explicitely (relative to the location where the
+  directory explicitly (relative to the location where the
   module has been launched from).
 
 --overwrite
@@ -215,58 +215,9 @@ By pressing CTRL+C the acquisition is terminated.
 
 So, now, have a look inside the directory ./log
 
-\section application_sec Generate a yarpmanager application
-
-To dump data from several yarp ports, it may be convenient
-to launch several yarpdatadumper instances using the yarpmanager.
-
-If you have Python installed on your machine, you can use the
-yarpdatadumperAppGenerator.py utility script to generate a yarpmanager
-application that will launch and connect as many yarpdatadumper as you need.
-
-If for example you need to read the ports /icub/left_leg/stateExt:o and
-/icub/left_leg/analog:o on the host icub15, you can run the generator
-with the following option:
-
-\code
-yarpdatadumperAppGenerator.py  --ports /icub/left_leg/analog:o /icub/left_leg/stateExt:o  --host icub15 --name leftLegDumper
-\endcode
-
-This will generate the following yarpmanager application in the leftLegDumper.xml file:
-
-\code
-<application>
-    <name>leftLegDumper</name>
-    <dependencies>
-        <port>/icub/left_leg/analog:o</port>
-        <port>/icub/left_leg/stateExt:o</port>
-    </dependencies>
-    <module>
-        <name>yarpdatadumper</name>
-        <parameters>--name /dumper/icub/left_leg/analog:o --type bottle </parameters>
-        <node>icub15</node>
-        <tag>data-dumper-icub-left_leg-analog-o</tag>
-    </module>
-    <connection>
-        <from>/icub/left_leg/analog:o</from>
-        <to>/dumper/icub/left_leg/analog:o</to>
-        <protocol>udp</protocol>
-    </connection>
-    <module>
-        <name>yarpdatadumper</name>
-        <parameters>--name /dumper/icub/left_leg/stateExt:o --type bottle </parameters>
-        <node>icub15</node>
-        <tag>data-dumper-icub-left_leg-stateExt-o</tag>
-    </module>
-    <connection>
-        <from>/icub/left_leg/stateExt:o</from>
-        <to>/dumper/icub/left_leg/stateExt:o</to>
-        <protocol>udp</protocol>
-    </connection>
-</application>
-\endcode
 
 \author Ugo Pattacini
 
-\sa yarpdataplayer
+\sa \ref yarpdataplayer
+\sa \ref yarpdatadumperAppGenerator
 */
diff --git a/doc/cmd_yarpdatadumperAppGenerator.dox b/doc/cmd_yarpdatadumperAppGenerator.dox
new file mode 100644
index 0000000..272eca7
--- /dev/null
+++ b/doc/cmd_yarpdatadumperAppGenerator.dox
@@ -0,0 +1,88 @@
+/**
+\page yarpdatadumperAppGenerator yarpdatadumperAppGenerator: Generate yarpmanager applications for yarpdatadumper
+
+\ingroup yarp_tools
+
+\section intro_sec Description
+
+To dump data from several yarp ports, it may be convenient
+to launch several yarpdatadumper instances using the yarpmanager.
+
+If you have Python installed on your machine, you can use the
+yarpdatadumperAppGenerator utility script to generate a yarpmanager
+application that will launch and connect as many yarpdatadumper as you need.
+
+If for example you need to read the ports /icub/left_leg/stateExt:o and
+/icub/left_leg/analog:o on the host icub15, you can run the generator
+with the following option:
+
+\code
+yarpdatadumperAppGenerator  --ports /icub/left_leg/analog:o /icub/left_leg/stateExt:o  --host icub15 --name leftLegDumper
+\endcode
+
+This will generate the following yarpmanager application in the leftLegDumper.xml file:
+
+\code
+<application>
+    <name>leftLegDumper</name>
+    <dependencies>
+        <port>/icub/left_leg/analog:o</port>
+        <port>/icub/left_leg/stateExt:o</port>
+    </dependencies>
+    <module>
+        <name>yarpdatadumper</name>
+        <parameters>--name /dumper/icub/left_leg/analog:o --type bottle </parameters>
+        <node>icub15</node>
+        <tag>data-dumper-icub-left_leg-analog-o</tag>
+    </module>
+    <connection>
+        <from>/icub/left_leg/analog:o</from>
+        <to>/dumper/icub/left_leg/analog:o</to>
+        <protocol>udp</protocol>
+    </connection>
+    <module>
+        <name>yarpdatadumper</name>
+        <parameters>--name /dumper/icub/left_leg/stateExt:o --type bottle </parameters>
+        <node>icub15</node>
+        <tag>data-dumper-icub-left_leg-stateExt-o</tag>
+    </module>
+    <connection>
+        <from>/icub/left_leg/stateExt:o</from>
+        <to>/dumper/icub/left_leg/stateExt:o</to>
+        <protocol>udp</protocol>
+    </connection>
+</application>
+\endcode
+
+
+\section usage Usage
+
+
+```
+usage: yarpdatadumperAppGenerator [-h] --ports PORTS [PORTS ...]
+                                  [--imagePorts IMAGEPORTS [IMAGEPORTS ...]]
+                                  --host HOST --name NAME [--rxTime]
+                                  [--txTime] [--addVideo]
+
+Tool for generating a YarpManager XML application for dumping a list of YARP
+ports using the yarpdatadumper.
+
+optional arguments:
+
+  -h, --help            show this help message and exit
+  --ports PORTS [PORTS ...]
+                        list of ports (serializable to bottles) to dump
+  --imagePorts IMAGEPORTS [IMAGEPORTS ...]
+                        list of ports (of to dump
+  --host HOST           host where to launch the dataDumpers
+  --name NAME           name of the application, the file will be saved as
+                        name.xml
+  --rxTime              pass --rxTime flag to the yarpdatadumpers
+  --txTime              pass --txTime flag to the yarpdatadumpers
+  --addVideo            pass --addVideo flag to the yarpdatadumpers
+```
+
+\sa \ref yarpdataplayer
+\sa \ref yarpmanager
+
+*/
diff --git a/doc/yarpdataplayer.dox b/doc/cmd_yarpdataplayer.dox
similarity index 92%
rename from doc/yarpdataplayer.dox
rename to doc/cmd_yarpdataplayer.dox
index 5128d77..c2f89f4 100644
--- a/doc/yarpdataplayer.dox
+++ b/doc/cmd_yarpdataplayer.dox
@@ -1,16 +1,17 @@
 /**
-\defgroup yarpdataplayer yarpdataplayer
- at ingroup yarp_guis
- at ingroup yarp_tools
+\page yarpdataplayer yarpdataplayer: replay recorded data
+
+\ingroup yarp_guis
+\ingroup yarp_tools
 
 A module that reproduces in a synchronized way, previously acquired data
 (using \ref yarpdatadumper) from a source of input.
 
 \section intro_sec Description
 
-This module uses gtkmm to provide the user a simple but informative
+This module provides the user a simple but informative
 user-interface in order to manipulate the previously acquired data.
-When playing it uses the timestamps provided from the time of aquisition
+When playing it uses the timestamps provided from the time of acquisition
 to synchronize the sending of the data as if the robot was present.
 
 \image html datasetplayer.jpg
@@ -77,7 +78,7 @@ yarpdatadumper info.log file example:
 
 \section in_files_sec Input Data Files
 The player will look, in a recursive way, into directories in order to
-create the parts needed and retreive the data.
+create the parts needed and retrieve the data.
 
 The data name is the default \ref yarpdatadumper names: data.log and
 info.log.
diff --git a/doc/cmd_yarpdev.dox b/doc/cmd_yarpdev.dox
index 50fcbbd..adeeab9 100644
--- a/doc/cmd_yarpdev.dox
+++ b/doc/cmd_yarpdev.dox
@@ -5,7 +5,9 @@
  */
 
 /**
- * @page yarpdev The standard YARP device utility
+\page yarpdev yarpdev: the standard YARP device utility
+
+\ingroup yarp_tools
 
 The command-line utility "yarpdev" can create devices and wrap
 them for network visibility.  This is useful in cases where you
@@ -88,7 +90,7 @@ No framerate specified, polling the device
 yarpdev: created wrapper <grabber>.  See C++ class ServerFrameGrabber for documentation.
 yarpdev: device active...
 yarpdev: device active...
-...
+[...]
 \endverbatim
 
 Here we've asked to create the "test_grabber" device, which acts
diff --git a/doc/cmd_yarphear.dox b/doc/cmd_yarphear.dox
index f927ebb..263b464 100644
--- a/doc/cmd_yarphear.dox
+++ b/doc/cmd_yarphear.dox
@@ -5,7 +5,9 @@
  */
 
 /**
- * @page yarphear Listen to YARP audio streams
+\page yarphear yarphear: listen to YARP audio streams
+
+\ingroup yarp_tools
 
 The command-line utility "yarphear" opens a port and connects it to the
 speakers.  If data is sent to the port, it is rendered to the speakers.
diff --git a/doc/cmd_yarpidl_rosmsg.dox b/doc/cmd_yarpidl_rosmsg.dox
new file mode 100644
index 0000000..70d317a
--- /dev/null
+++ b/doc/cmd_yarpidl_rosmsg.dox
@@ -0,0 +1,5 @@
+/**
+\page yarpidl_rosmsg yarpidl_rosmsg
+
+\ingroup yarp_tools
+*/
diff --git a/doc/cmd_yarpidl_thrift.dox b/doc/cmd_yarpidl_thrift.dox
new file mode 100644
index 0000000..8da0a60
--- /dev/null
+++ b/doc/cmd_yarpidl_thrift.dox
@@ -0,0 +1,5 @@
+/**
+\page yarpidl_thrift yarpidl_thrift
+
+\ingroup yarp_tools
+*/
diff --git a/doc/cmd_yarplaserscannergui.dox b/doc/cmd_yarplaserscannergui.dox
new file mode 100644
index 0000000..c14ff28
--- /dev/null
+++ b/doc/cmd_yarplaserscannergui.dox
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 RobotCub Consortium
+ * Author: Marco Randazzo
+ * CopyPolicy: Released under the terms of the GNU GPL v2.0.
+ */
+
+/**
+\page yarplaserscannergui yarplaserscannergui: visualize data from a laser scanner
+
+\ingroup yarp_guis
+\ingroup yarp_tools
+
+A simple GUI to display the distance measurements of a 2D laser scanner.
+
+\section intro_sec Description
+A simple GUI to display the distance measurements of a 2D laser scanner.
+
+\section lib_sec Libraries
+- YARP libraries.
+- OpenCV libraries.
+
+\section parameters_sec Parameters
+None.
+
+\section portsa_sec Ports Accessed
+None.
+
+\section portsc_sec Ports Created
+The module creates the port /laserScannerGui:i used to receive the laser data.
+
+\section in_files_sec Input Data Files
+None.
+
+\section out_data_sec Output Data Files
+None.
+
+\section conf_file_sec Configuration Files
+None.
+
+\section tested_os_sec Tested OS
+Windows, Linux
+
+\author Marco Randazzo
+*/
diff --git a/doc/cmd_yarplogger-console.dox b/doc/cmd_yarplogger-console.dox
new file mode 100644
index 0000000..744ec58
--- /dev/null
+++ b/doc/cmd_yarplogger-console.dox
@@ -0,0 +1,5 @@
+/**
+\page yarplogger-console yarplogger-console: visualize log from YARP programs
+
+\ingroup yarp_tools
+*/
diff --git a/doc/cmd_yarplogger.dox b/doc/cmd_yarplogger.dox
new file mode 100644
index 0000000..86d0930
--- /dev/null
+++ b/doc/cmd_yarplogger.dox
@@ -0,0 +1,6 @@
+/**
+\page yarplogger yarplogger: visualize log from YARP programs
+
+\ingroup yarp_guis
+\ingroup yarp_tools
+*/
diff --git a/doc/cmd_yarpmanager-console.dox b/doc/cmd_yarpmanager-console.dox
new file mode 100644
index 0000000..5c8c41f
--- /dev/null
+++ b/doc/cmd_yarpmanager-console.dox
@@ -0,0 +1,5 @@
+/**
+\page yarpmanager-console yarpmanager-console: run and manage multiple programs on a set of machines
+
+\ingroup yarp_tools
+*/
diff --git a/doc/yarpmanager.dox b/doc/cmd_yarpmanager.dox
similarity index 99%
rename from doc/yarpmanager.dox
rename to doc/cmd_yarpmanager.dox
index 1c2d1a9..715180e 100644
--- a/doc/yarpmanager.dox
+++ b/doc/cmd_yarpmanager.dox
@@ -6,7 +6,10 @@
  */
 
 /**
-\page yarpmanager yarpmanager: a way of running and managing multiple programs on a set of machines
+\page yarpmanager yarpmanager: run and manage multiple programs on a set of machines
+
+\ingroup yarp_guis
+\ingroup yarp_tools
 
 \author Ali Paikan
 
@@ -616,7 +619,7 @@ Here is an example of module description file in XML format:
 \endlatexonly
 
 \section create Create new XML description file
-yarpmanager allows for creating new application, module and resource description file using predifined templates. To create a new XML file, first make sure you set 'external_editor' to your preferable editor (e.g. gedit, notepad) then
+yarpmanager allows for creating new application, module and resource description file using predefined templates. To create a new XML file, first make sure you set 'external_editor' to your preferable editor (e.g. gedit, notepad) then
 - From "File>New" menu chose "New Application". ("New Module" for module and "New Resource" for resource)
 - Chose your application folder and enter proper name (e.g "my-test-app.xml") to save it. The template file will be open using 'external_editor'.
 - Modify and save it.
diff --git a/doc/cmd_yarpmanagerpp.dox b/doc/cmd_yarpmanagerpp.dox
new file mode 100644
index 0000000..d44fa3c
--- /dev/null
+++ b/doc/cmd_yarpmanagerpp.dox
@@ -0,0 +1,6 @@
+/**
+\page yarpmanagerpp yarpmanager++: edit, run and manage multiple programs on a set of machines
+
+\ingroup yarp_guis
+\ingroup yarp_tools
+*/
\ No newline at end of file
diff --git a/doc/yarpmotorgui.dox b/doc/cmd_yarpmotorgui.dox
similarity index 94%
rename from doc/yarpmotorgui.dox
rename to doc/cmd_yarpmotorgui.dox
index 6f6196c..2064036 100644
--- a/doc/yarpmotorgui.dox
+++ b/doc/cmd_yarpmotorgui.dox
@@ -1,7 +1,8 @@
 /**
-\defgroup yarpmotorgui yarpmotorgui
- at ingroup yarp_guis
- at ingroup yarp_tools
+\page yarpmotorgui yarpmotorgui: move the joints of a robot
+
+\ingroup yarp_guis
+\ingroup yarp_tools
 
 A simple graphical interface for moving all the joints of a robot with
 sliders.
@@ -77,7 +78,7 @@ A set of parameters can be optionally specified in order to
 open a set of tabs which allow cartesian movements trough the cartesian
 interfaces (see the tutorial \ref icub_cartesian_interface). These cartesian
 interfaces can be enabled by inserting a group [cartesian] in the
-yarpmotorgui intialization file. This group should contain the name
+yarpmotorgui initialization file. This group should contain the name
 of the robot parts which should be controlled in the cartesian space:
 \code
 [cartesian]
@@ -102,13 +103,13 @@ In order to make the cartesian tabs working you need to be sure that
 that the \ref iKinCartesianSolver "Cartesian Solvers" are running and working.
 
 \section portsa_sec Ports Accessed
-For each part initalized (e.g. right_leg):
+For each part initialized (e.g. right_leg):
 - /icub/right_leg/rpc:i
 - /icub/right_leg/command:i
 - /icub/gui/right_leg/state:i
 
 \section portsc_sec Ports Created
-For each part initalized (e.g. right_leg):
+For each part initialized (e.g. right_leg):
 - /icub/gui/right_leg/rpc:o
 - /icub/gui/right_leg/command:o
 - /icub/right_leg/state:o
diff --git a/doc/cmd_yarprobotinterface.dox b/doc/cmd_yarprobotinterface.dox
new file mode 100644
index 0000000..88a1490
--- /dev/null
+++ b/doc/cmd_yarprobotinterface.dox
@@ -0,0 +1,5 @@
+/**
+\page yarprobotinterface yarprobotinterface: start all the devices required by a robot
+
+\ingroup yarp_tools
+*/
diff --git a/doc/cmd_yarpros.dox b/doc/cmd_yarpros.dox
new file mode 100644
index 0000000..f7ae41f
--- /dev/null
+++ b/doc/cmd_yarpros.dox
@@ -0,0 +1,5 @@
+/**
+\page yarpros yarpros
+
+\ingroup yarp_tools
+*/
diff --git a/doc/cmd_yarprun.dox b/doc/cmd_yarprun.dox
index 50e3988..f9a784d 100644
--- a/doc/cmd_yarprun.dox
+++ b/doc/cmd_yarprun.dox
@@ -5,7 +5,9 @@
  */
 
 /**
- * @page yarprun yarprun: a way of running programs on a set of machines
+\page yarprun yarprun: run programs on a set of machines
+
+\ingroup yarp_tools
 
 
 The command-line utility "yarprun" provides a client-server environment that is able to run, kill and monitor applications commands on a remote machine, with the same syntax and behaviour in Windows and Linux.
diff --git a/doc/yarpscope.dox b/doc/cmd_yarpscope.dox
similarity index 94%
rename from doc/yarpscope.dox
rename to doc/cmd_yarpscope.dox
index 8e6c570..9d63b26 100644
--- a/doc/yarpscope.dox
+++ b/doc/cmd_yarpscope.dox
@@ -6,14 +6,18 @@
  */
 
 /**
-\page yarpscope yarpscope: A simple graphical user interface for visualizing the numerical content of a a port.
+\page yarpscope yarpscope: visualize the numerical content of a port
+
+\ingroup yarp_guis
+\ingroup yarp_tools
 
 \author Daniele E. Domenichelli
 \author The original Qt version of portScope was written by Francesco Nori.
 
 \section intro_sec Description
-This simple graphical user interface allows to visualize on a plot the content
-of a YARP port. The input port is assumed to contain a vector of numbers.
+This simple graphical user interface allows one to visualize on a plot the
+content of a YARP port. The input port is assumed to contain a vector of
+numbers.
 
  - The main window can contain one or more plots.
  - Each plot can contain one or more graphs.
@@ -54,8 +58,8 @@ The syntax is
  --index [...]          Index(es) of the vector to plot.
                         It can be an [uint] or an array of [uint]s
  --plot_title [string]  Plot title (default = remote)
- --min [float]          Minimum value for the X axis (default -100)
- --max [float]          Maximum value for the X axis (default 100)
+ --min [float]          Minimum value for the Y axis (default -100)
+ --max [float]          Maximum value for the Y axis (default 100)
  --size [uint]          Plot size (Number of samples to plot) (default 201)
  --bgcolor [string]     Background color.
  --color [...]          Graph color(s).
@@ -219,7 +223,7 @@ Now declare a plot:
 \endcode
 
 - \a gridx and \a gridy are the position in the main table of the portscope.
-\a gridx corresponds to the column (the first colums
+\a gridx corresponds to the column (the first columns
 index is 0), and \a gridy is corresponds to the row. Columns and rows are
 indexed from zero, therefore (0,0) is the top-left plot [mandatory].
 - \a hspan and \a vspan are the number of cells in the main table that the plot will
diff --git a/doc/cmd_yarpserver.dox b/doc/cmd_yarpserver.dox
new file mode 100644
index 0000000..2cb922e
--- /dev/null
+++ b/doc/cmd_yarpserver.dox
@@ -0,0 +1,40 @@
+/**
+\page yarpserver yarpserver: the YARP name server
+
+\ingroup yarp_tools
+
+\verbatim
+  yarpserver [OPTIONS]
+
+  --config filename.conf   Load options from a file.
+  --portdb ports.db        Store port information in named database.
+                           Must not be on an NFS file system.
+                           Set to :memory: to store in memory (faster).
+  --subdb subs.db          Store subscription information in named database.
+                           Must not be on an NFS file system.
+                           Set to :memory: to store in memory (faster).
+  --ip IP.AD.DR.ESS        Set IP address of server.
+  --socket NNNNN           Set port number of server.
+  --web dir                Serve web resources from given directory.
+  --no-web-cache           Reload pages from file for each request.
+  --ros                    Delegate pub/sub to ROS name server.
+\endverbatim
+
+This starts a name server running on the current machine, optionally
+specifying the socket-port to listen to (default whatever was used in
+the previous invocation, as recorded in a configuration file, or 10000
+if this is the first time to run).
+Also, the IP by which the name server should be identified can
+optionally be specified (default is a fairly random choice of
+the IPs associated with the current machine).
+
+The address of the name server can be determined using
+\ref yarp_where.  The address is cached in a configuration
+file - see \ref yarp_conf.
+
+If possible, a fallback multi-cast server will be started with IP
+224.2.1.1 and port number 10001.  The purpose of this server is
+to allow yarp processes to find the yarp name server in the absence
+of correct configuration.
+
+*/
\ No newline at end of file
diff --git a/doc/cmd_yarpview.dox b/doc/cmd_yarpview.dox
index 08d0181..70e4100 100644
--- a/doc/cmd_yarpview.dox
+++ b/doc/cmd_yarpview.dox
@@ -5,7 +5,10 @@
  */
 
 /**
- * @page yarpview The YARP image viewer: yarpview
+\page yarpview yarpview: visualize YARP images
+
+\ingroup yarp_guis
+\ingroup yarp_tools
 
 \tableofcontents
 
@@ -68,7 +71,7 @@ At its bottom yarpview shows statistics related to the frequency at which it rec
  
  As an example the images above show two instances of yarpview. In this case the port receives data with the framerate of 30Hz while the display runs at 10Hz. Images are from two instances of "test_grabber".
  
-Notice that the values in Port and Display should be approximatly equal when the option "Synch display" is selected.
+Notice that the values in Port and Display should be approximately equal when the option "Synch display" is selected.
  
 \section sec-yarpview-getting-clicks Getting image coordinates
 
diff --git a/doc/download.dox b/doc/download.dox
index 03021ec..5d7cecd 100644
--- a/doc/download.dox
+++ b/doc/download.dox
@@ -5,7 +5,7 @@
  */
 
 /**
- * @page download Download YARP
+ * @page download Downloading YARP
 
 This page is outdated and remains here only to support old links.
 
diff --git a/doc/dox_footer.html b/doc/dox_footer.html
deleted file mode 100644
index eccf0eb..0000000
--- a/doc/dox_footer.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<!--- window showing the filter options -->
-<div id="MSearchSelectWindow"
-     onmouseover="return searchBox.OnSearchSelectShow()"
-     onmouseout="return searchBox.OnSearchSelectHide()"
-     onkeydown="return searchBox.OnSearchSelectKey(event)">
-<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectIt [...]
-
-<!-- iframe showing the search results (closed by default) -->
-<div id="MSearchResultsWindow">
-<iframe src="" frameborder="0"
-        name="MSearchResults" id="MSearchResults">
-</iframe>
-</div>
-
-
-<hr class="footer"/><address class="footer"><small>
-Generated on $datetime for $projectname by <a href="http://www.doxygen.org/index.html"><img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion</small></address>
-</body>
-</html>
diff --git a/doc/dox_header.html b/doc/dox_header.html
deleted file mode 100644
index 3f34520..0000000
--- a/doc/dox_header.html
+++ /dev/null
@@ -1,160 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>$title</title>
-<link href="$relpath$tabs.css" rel="stylesheet" type="text/css"/>
-<link href="$relpath$search/search.css" rel="stylesheet" type="text/css"/>
-<script type="text/javaScript" src="$relpath$search/search.js"></script>
-<link href="$relpath$doxygen.css" rel="stylesheet" type="text/css"/>
-<style type="text/css">
-ul.menu {
-   position:relative;
-   margin-bottom:0px;
-   margin-top:0px;
-   left:-2.5em;
-}
-li.menu {
-   list-style-type: none;
-   position: relative;
-   text-decoration: none;
-}
-#sidebar {
-   display: float;
-   float: right;
-   width:13em;
-   margin-top: 7em;
-   margin-bottom: 2em;
-   margin-right: 0;
-   margin-left: 1em;
-   background: #fff;
-   border: 1px solid #ccc;
-   -webkit-border-radius: 5px;
-   -moz-border-radius: 5px;
-   border-radius: 5px;
-}
-
-div.mbox {
-  background-color:#EEEEFF;
-  border: 1px solid #bbbbff;
-  padding: 0.5em 0.5em 0.5em 0.5em;
-  margin:1em;
-  width: 10em;
-  -webkit-border-radius: 9px;
-  -moz-border-radius: 9px;
-  border-radius: 9px;
-}
-
-div.title {
-  font-weight:bold;
-  background-color:#DDDDFF;
-  margin-bottom:1px;
-}
-h1,h2,h3 {
-  font-family: sans-serif;
-}
-h2 {
-  display: block;
-  color: black;
-  background: #eef;
-  padding: 10px;
-  -webkit-border-radius: 5px;
-  -moz-border-radius: 5px;
-  border-radius: 5px;
-}
-h2:after {
-  content: " :";
-  color: #fff;
-}
-</style>
-</head>
-<body onload='searchBox.OnSelectItem(0);'>
-
-<div id="sidebar">
-
-<div style="text-align:center;">
-<a href="$relpath$index.html"><img width=100 height=47 src="$relpath$yarp-yal02-100.png" alt="YARP: Yet Another Robot Platform" style="border: 0px;"></a><br>
-</div>
-
-
-
-<div class="mbox">
-<div class=title>YARP Manual</div>
-<ul class=menu>
-<li class=menu><a href="$relpath$index.html">Main Page</a></li>
-<li class=menu><a href="$relpath$install.html">Installation</a></li>
-<li class=menu><a href="$relpath$tutorials.html">Tutorials</a></li>
-<li class=menu><a href="$relpath$namespaces.html">Namespaces</a></li>
-<li class=menu><a href="$relpath$examples.html">Examples</a></li>
-<li class=menu><a href="$relpath$modules.html">Reference</a></li>
-<li class=menu><a href="$relpath$warning.html">Warning</a></li>
-</ul>
-</div>
-
-<div class="mbox">
-<div class=title>YARP Online</div>
-<ul class=menu>
-<li class=menu><a href="http://wiki.icub.org/yarp">Home Page</a></li>
-<li class=menu><a href="http://wiki.icub.org/yarpdoc/download.html">Downloads</a></li>
-<li class=menu><a href="http://wiki.icub.org/wiki/YARP">Wiki</a></li>
-<li class=menu><a href="http://wiki.icub.org/wiki/Robotcub-hackers">Mailing list</a></li>
-</ul>
-</div>
-
-
-<div class="mbox">
-<div class=title>Related Links</div>
-<ul class=menu>
-<li class=menu><a href="http://www.icub.org">iCub family</a></li>
-<li class=menu><a href="http://www.ros.org">ROS</a></li>
-<li class=menu><a href="http://www.orocos.org/">Orocos</a></li>
-<li class=menu><a href="http://playerstage.sourceforge.net/">Player/Stage</a></li>
-<li class=menu><a href="http://www.zeromq.org/">ØMQ</a></li>
-
-</ul>
-</div>
-
-
-
-</div>
-
-
-
-
-<!-- Generated by Doxygen 1.7.1 -->
-<script type="text/javascript"><!--
-var searchBox = new SearchBox("searchBox", "search",false,'Search');
---></script>
-<div class="navigation" id="top">
-
-  <div class="tabs">
-    <ul class="tablist">
-      <li><a href="$relpath$index.html"><span>Main Page</span></a></li>
-      <li><a href="$relpath$pages.html"><span>Related Pages</span></a></li>
-      <li><a href="$relpath$modules.html"><span>Modules</span></a></li>
-      <li><a href="$relpath$namespaces.html"><span>Namespaces</span></a></li>
-
-      <li><a href="$relpath$annotated.html"><span>Data Structures</span></a></li>
-      <li><a href="$relpath$files.html"><span>Files</span></a></li>
-      <li class="current"><a href="$relpath$examples.html"><span>Examples</span></a></li>
-      <li id="searchli">
-        <div id="MSearchBox" class="MSearchBoxInactive">
-        <span class="left">
-          <img id="MSearchSelect" src="$relpath$search/mag_sel.png"
-               onmouseover="return searchBox.OnSearchSelectShow()"
-               onmouseout="return searchBox.OnSearchSelectHide()"
-               alt=""/>
-
-          <input type="text" id="MSearchField" value="Search" accesskey="S"
-               onfocus="searchBox.OnSearchFieldFocus(true)"
-               onblur="searchBox.OnSearchFieldFocus(false)"
-               onkeyup="searchBox.OnSearchFieldChange(event)"/>
-          </span><span class="right">
-            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="$relpath$search/close.png" alt=""/></a>
-          </span>
-        </div>
-      </li>
-    </ul>
-  </div>
-</div>
-
diff --git a/doc/dox_stylesheet.css b/doc/dox_stylesheet.css
deleted file mode 100644
index 26aa798..0000000
--- a/doc/dox_stylesheet.css
+++ /dev/null
@@ -1,358 +0,0 @@
-BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
-	font-family: Geneva, Arial, Helvetica, sans-serif;
-}
-BODY,TD {
-       font-size: 90%;
-}
-H1 {
-	text-align: center;
-       font-size: 160%;
-}
-H2 {
-       font-size: 120%;
-}
-H3 {
-       font-size: 100%;
-}
-CAPTION { font-weight: bold }
-DIV.qindex {
-	width: 100%;
-	background-color: #e8eef2;
-	border: 1px solid #84b0c7;
-	text-align: center;
-	margin: 2px;
-	padding: 2px;
-	line-height: 140%;
-}
-DIV.nav {
-	width: 100%;
-	background-color: #e8eef2;
-	border: 1px solid #84b0c7;
-	text-align: center;
-	margin: 2px;
-	padding: 2px;
-	line-height: 140%;
-}
-DIV.navtab {
-       background-color: #e8eef2;
-       border: 1px solid #84b0c7;
-       text-align: center;
-       margin: 2px;
-       margin-right: 15px;
-       padding: 2px;
-}
-TD.navtab {
-       font-size: 70%;
-}
-A.qindex {
-       text-decoration: none;
-       font-weight: bold;
-       color: #1A419D;
-}
-A.qindex:visited {
-       text-decoration: none;
-       font-weight: bold;
-       color: #1A419D
-}
-A.qindex:hover {
-	text-decoration: none;
-	background-color: #ddddff;
-}
-A.qindexHL {
-	text-decoration: none;
-	font-weight: bold;
-	background-color: #6666cc;
-	color: #ffffff;
-	border: 1px double #9295C2;
-}
-A.qindexHL:hover {
-	text-decoration: none;
-	background-color: #6666cc;
-	color: #ffffff;
-}
-A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
-A.el { text-decoration: none; font-weight: bold }
-A.elRef { font-weight: bold }
-A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
-A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
-A.codeRef:link { font-weight: normal; color: #0000FF}
-A.codeRef:visited { font-weight: normal; color: #0000FF}
-A:hover { text-decoration: none; background-color: #f2f2ff }
-DL.el { margin-left: -1cm }
-.fragment {
-       font-family: monospace, fixed;
-       font-size: 95%;
-}
-PRE.fragment {
-	border: 1px solid #CCCCCC;
-	background-color: #f5f5f5;
-	margin-top: 4px;
-	margin-bottom: 4px;
-	margin-left: 2px;
-	margin-right: 8px;
-	padding-left: 6px;
-	padding-right: 6px;
-	padding-top: 4px;
-	padding-bottom: 4px;
-}
-DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
-
-DIV.groupHeader {
-       margin-left: 16px;
-       margin-top: 12px;
-       margin-bottom: 6px;
-       font-weight: bold;
-}
-DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
-BODY {
-	background: white;
-	color: black;
-	margin-right: 20px;
-	margin-left: 20px;
-}
-TD.indexkey {
-	background-color: #e8eef2;
-	font-weight: bold;
-	padding-right  : 10px;
-	padding-top    : 2px;
-	padding-left   : 10px;
-	padding-bottom : 2px;
-	margin-left    : 0px;
-	margin-right   : 0px;
-	margin-top     : 2px;
-	margin-bottom  : 2px;
-	border: 1px solid #CCCCCC;
-}
-TD.indexvalue {
-	background-color: #e8eef2;
-	font-style: italic;
-	padding-right  : 10px;
-	padding-top    : 2px;
-	padding-left   : 10px;
-	padding-bottom : 2px;
-	margin-left    : 0px;
-	margin-right   : 0px;
-	margin-top     : 2px;
-	margin-bottom  : 2px;
-	border: 1px solid #CCCCCC;
-}
-TR.memlist {
-   background-color: #f0f0f0;
-}
-P.formulaDsp { text-align: center; }
-IMG.formulaDsp { }
-IMG.formulaInl { vertical-align: middle; }
-SPAN.keyword       { color: #008000 }
-SPAN.keywordtype   { color: #604020 }
-SPAN.keywordflow   { color: #e08000 }
-SPAN.comment       { color: #800000 }
-SPAN.preprocessor  { color: #806020 }
-SPAN.stringliteral { color: #002080 }
-SPAN.charliteral   { color: #008080 }
-.mdescLeft {
-       padding: 0px 8px 4px 8px;
-	font-size: 80%;
-	font-style: italic;
-	background-color: #FAFAFA;
-	border-top: 1px none #E0E0E0;
-	border-right: 1px none #E0E0E0;
-	border-bottom: 1px none #E0E0E0;
-	border-left: 1px none #E0E0E0;
-	margin: 0px;
-}
-.mdescRight {
-       padding: 0px 8px 4px 8px;
-	font-size: 80%;
-	font-style: italic;
-	background-color: #FAFAFA;
-	border-top: 1px none #E0E0E0;
-	border-right: 1px none #E0E0E0;
-	border-bottom: 1px none #E0E0E0;
-	border-left: 1px none #E0E0E0;
-	margin: 0px;
-}
-.memItemLeft {
-	padding: 1px 0px 0px 8px;
-	margin: 4px;
-	border-top-width: 1px;
-	border-right-width: 1px;
-	border-bottom-width: 1px;
-	border-left-width: 1px;
-	border-top-color: #E0E0E0;
-	border-right-color: #E0E0E0;
-	border-bottom-color: #E0E0E0;
-	border-left-color: #E0E0E0;
-	border-top-style: solid;
-	border-right-style: none;
-	border-bottom-style: none;
-	border-left-style: none;
-	background-color: #FAFAFA;
-	font-size: 80%;
-}
-.memItemRight {
-	padding: 1px 8px 0px 8px;
-	margin: 4px;
-	border-top-width: 1px;
-	border-right-width: 1px;
-	border-bottom-width: 1px;
-	border-left-width: 1px;
-	border-top-color: #E0E0E0;
-	border-right-color: #E0E0E0;
-	border-bottom-color: #E0E0E0;
-	border-left-color: #E0E0E0;
-	border-top-style: solid;
-	border-right-style: none;
-	border-bottom-style: none;
-	border-left-style: none;
-	background-color: #FAFAFA;
-	font-size: 80%;
-}
-.memTemplItemLeft {
-	padding: 1px 0px 0px 8px;
-	margin: 4px;
-	border-top-width: 1px;
-	border-right-width: 1px;
-	border-bottom-width: 1px;
-	border-left-width: 1px;
-	border-top-color: #E0E0E0;
-	border-right-color: #E0E0E0;
-	border-bottom-color: #E0E0E0;
-	border-left-color: #E0E0E0;
-	border-top-style: none;
-	border-right-style: none;
-	border-bottom-style: none;
-	border-left-style: none;
-	background-color: #FAFAFA;
-	font-size: 80%;
-}
-.memTemplItemRight {
-	padding: 1px 8px 0px 8px;
-	margin: 4px;
-	border-top-width: 1px;
-	border-right-width: 1px;
-	border-bottom-width: 1px;
-	border-left-width: 1px;
-	border-top-color: #E0E0E0;
-	border-right-color: #E0E0E0;
-	border-bottom-color: #E0E0E0;
-	border-left-color: #E0E0E0;
-	border-top-style: none;
-	border-right-style: none;
-	border-bottom-style: none;
-	border-left-style: none;
-	background-color: #FAFAFA;
-	font-size: 80%;
-}
-.memTemplParams {
-	padding: 1px 0px 0px 8px;
-	margin: 4px;
-	border-top-width: 1px;
-	border-right-width: 1px;
-	border-bottom-width: 1px;
-	border-left-width: 1px;
-	border-top-color: #E0E0E0;
-	border-right-color: #E0E0E0;
-	border-bottom-color: #E0E0E0;
-	border-left-color: #E0E0E0;
-	border-top-style: solid;
-	border-right-style: none;
-	border-bottom-style: none;
-	border-left-style: none;
-       color: #606060;
-	background-color: #FAFAFA;
-	font-size: 80%;
-}
-.search     { color: #003399;
-              font-weight: bold;
-}
-FORM.search {
-              margin-bottom: 0px;
-              margin-top: 0px;
-}
-INPUT.search { font-size: 75%;
-               color: #000080;
-               font-weight: normal;
-               background-color: #e8eef2;
-}
-TD.tiny      { font-size: 75%;
-}
-a {
-	color: #1A41A8;
-}
-a:visited {
-	color: #2A3798;
-}
-.dirtab { padding: 4px;
-          border-collapse: collapse;
-          border: 1px solid #84b0c7;
-}
-TH.dirtab { background: #e8eef2;
-            font-weight: bold;
-}
-HR { height: 1px;
-     border: none;
-     border-top: 1px solid black;
-}
-
-/* Style for detailed member documentation */
-.memtemplate {
-  font-size: 80%;
-  color: #606060;
-  font-weight: normal;
-}
-.memnav {
-  background-color: #e8eef2;
-  border: 1px solid #84b0c7;
-  text-align: center;
-  margin: 2px;
-  margin-right: 15px;
-  padding: 2px;
-}
-.memitem {
-  padding: 4px;
-  background-color: #eef3f5;
-  border-width: 1px;
-  border-style: solid;
-  border-color: #dedeee;
-  -moz-border-radius: 8px 8px 8px 8px;
-}
-.memname {
-  white-space: nowrap;
-  font-weight: bold;
-}
-.memdoc{
-  padding-left: 10px;
-}
-.memproto {
-  background-color: #d5e1e8;
-  width: 100%;
-  border-width: 1px;
-  border-style: solid;
-  border-color: #84b0c7;
-  font-weight: bold;
-  -moz-border-radius: 8px 8px 8px 8px;
-}
-.paramkey {
-  text-align: right;
-}
-.paramtype {
-  white-space: nowrap;
-}
-.paramname {
-  color: #602020;
-  font-style: italic;
-  white-space: nowrap;
-}
-/* End Styling for detailed member documentation */
-
-/* for the tree view */
-.ftvtree {
-	font-family: sans-serif;
-	margin:0.5em;
-}
-.directory { font-size: 9pt; font-weight: bold; }
-.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; }
-.directory > h3 { margin-top: 0; }
-.directory p { margin: 0px; white-space: nowrap; }
-.directory div { display: none; margin: 0px; }
-.directory img { vertical-align: -30%; }
diff --git a/doc/app-graph.jpg b/doc/images/app-graph.jpg
similarity index 100%
rename from doc/app-graph.jpg
rename to doc/images/app-graph.jpg
diff --git a/doc/port_monitor/arbitration.png b/doc/images/arbitration.png
similarity index 100%
rename from doc/port_monitor/arbitration.png
rename to doc/images/arbitration.png
diff --git a/doc/port_monitor/arbitration_tevent.png b/doc/images/arbitration_tevent.png
similarity index 100%
rename from doc/port_monitor/arbitration_tevent.png
rename to doc/images/arbitration_tevent.png
diff --git a/doc/installation/check-your-installation-terminals.png b/doc/images/check-your-installation-terminals.png
similarity index 100%
rename from doc/installation/check-your-installation-terminals.png
rename to doc/images/check-your-installation-terminals.png
diff --git a/doc/installation/check-your-installation-yarpdataplayer-example.jpg b/doc/images/check-your-installation-yarpdataplayer-example.jpg
similarity index 100%
rename from doc/installation/check-your-installation-yarpdataplayer-example.jpg
rename to doc/images/check-your-installation-yarpdataplayer-example.jpg
diff --git a/doc/installation/check-your-installation-yarpserver.png b/doc/images/check-your-installation-yarpserver.png
similarity index 100%
rename from doc/installation/check-your-installation-yarpserver.png
rename to doc/images/check-your-installation-yarpserver.png
diff --git a/doc/port_monitor/coder_decoder.png b/doc/images/coder_decoder.png
similarity index 100%
rename from doc/port_monitor/coder_decoder.png
rename to doc/images/coder_decoder.png
diff --git a/doc/datasetplayer-app1.jpg b/doc/images/datasetplayer-app1.jpg
similarity index 100%
rename from doc/datasetplayer-app1.jpg
rename to doc/images/datasetplayer-app1.jpg
diff --git a/doc/datasetplayer-app2.jpg b/doc/images/datasetplayer-app2.jpg
similarity index 100%
rename from doc/datasetplayer-app2.jpg
rename to doc/images/datasetplayer-app2.jpg
diff --git a/doc/datasetplayer.jpg b/doc/images/datasetplayer.jpg
similarity index 100%
rename from doc/datasetplayer.jpg
rename to doc/images/datasetplayer.jpg
diff --git a/doc/port_monitor/image_modification.png b/doc/images/image_modification.png
similarity index 100%
rename from doc/port_monitor/image_modification.png
rename to doc/images/image_modification.png
diff --git a/doc/installation/install-binaries-no-yarp.png b/doc/images/install-binaries-no-yarp.png
similarity index 100%
rename from doc/installation/install-binaries-no-yarp.png
rename to doc/images/install-binaries-no-yarp.png
diff --git a/doc/installation/install-binaries-no-yarp2.png b/doc/images/install-binaries-no-yarp2.png
similarity index 100%
rename from doc/installation/install-binaries-no-yarp2.png
rename to doc/images/install-binaries-no-yarp2.png
diff --git a/doc/port_monitor/portarbitrator.png b/doc/images/portarbitrator.png
similarity index 100%
rename from doc/port_monitor/portarbitrator.png
rename to doc/images/portarbitrator.png
diff --git a/doc/port_monitor/portmonitor.png b/doc/images/portmonitor.png
similarity index 100%
rename from doc/port_monitor/portmonitor.png
rename to doc/images/portmonitor.png
diff --git a/doc/port_monitor/portmonitor_lifecycle.png b/doc/images/portmonitor_lifecycle.png
similarity index 100%
rename from doc/port_monitor/portmonitor_lifecycle.png
rename to doc/images/portmonitor_lifecycle.png
diff --git a/doc/port_monitor/simple_dll.png b/doc/images/simple_dll.png
similarity index 100%
rename from doc/port_monitor/simple_dll.png
rename to doc/images/simple_dll.png
diff --git a/doc/port_monitor/simple_modification.png b/doc/images/simple_modification.png
similarity index 100%
rename from doc/port_monitor/simple_modification.png
rename to doc/images/simple_modification.png
diff --git a/doc/port_monitor/type_modification.png b/doc/images/type_modification.png
similarity index 100%
rename from doc/port_monitor/type_modification.png
rename to doc/images/type_modification.png
diff --git a/doc/yarp-small.eps b/doc/images/yarp-small.eps
similarity index 100%
rename from doc/yarp-small.eps
rename to doc/images/yarp-small.eps
diff --git a/doc/yarp-small.jpg b/doc/images/yarp-small.jpg
similarity index 100%
rename from doc/yarp-small.jpg
rename to doc/images/yarp-small.jpg
diff --git a/doc/yarp-yal01-100.png b/doc/images/yarp-yal01-100.png
similarity index 100%
rename from doc/yarp-yal01-100.png
rename to doc/images/yarp-yal01-100.png
diff --git a/doc/yarp-yal01.eps b/doc/images/yarp-yal01.eps
similarity index 100%
rename from doc/yarp-yal01.eps
rename to doc/images/yarp-yal01.eps
diff --git a/doc/yarp-yal01.png b/doc/images/yarp-yal01.png
similarity index 100%
rename from doc/yarp-yal01.png
rename to doc/images/yarp-yal01.png
diff --git a/doc/yarp-yal02-100.png b/doc/images/yarp-yal02-100.png
similarity index 100%
rename from doc/yarp-yal02-100.png
rename to doc/images/yarp-yal02-100.png
diff --git a/doc/yarpmotorgui.eps b/doc/images/yarpmotorgui.eps
similarity index 100%
rename from doc/yarpmotorgui.eps
rename to doc/images/yarpmotorgui.eps
diff --git a/doc/yarpmotorgui.jpg b/doc/images/yarpmotorgui.jpg
similarity index 100%
rename from doc/yarpmotorgui.jpg
rename to doc/images/yarpmotorgui.jpg
diff --git a/doc/yarpscope.png b/doc/images/yarpscope.png
similarity index 100%
rename from doc/yarpscope.png
rename to doc/images/yarpscope.png
diff --git a/doc/yarpview/yarpview.png b/doc/images/yarpview.png
similarity index 100%
rename from doc/yarpview/yarpview.png
rename to doc/images/yarpview.png
diff --git a/doc/ymgui.png b/doc/images/ymgui.png
similarity index 100%
rename from doc/ymgui.png
rename to doc/images/ymgui.png
diff --git a/doc/installation/check_your_installation.dox b/doc/installation/check_your_installation.dox
index 89cddec..6c898cb 100644
--- a/doc/installation/check_your_installation.dox
+++ b/doc/installation/check_your_installation.dox
@@ -8,7 +8,7 @@
  * @page check_your_installation Check your installation
 
 \section check_basic_functionalities Check basic YARP functionalities
- 
+
 The first step is to have the \c yarpserver running.
 
 At a terminal type:
@@ -18,7 +18,7 @@ At a terminal type:
 
 Depending on your system the console will look something like this:
 
-\image html installation/check-your-installation-yarpserver.png
+\image html check-your-installation-yarpserver.png
 
 If you type on a web browser http://127.0.0.1:10000 you get information about the name server (registered ports, info, etc.).
 
@@ -53,12 +53,11 @@ Now, anything typed on the YARP write will be sent and printed on the read side.
 
 You can also use the yarpdataplayer to replay a recorded sequence. This will reproduce all the sensory information available on the real robot during a simple experiment. Follow the instructions here:
 
-http://wiki.icub.org/yarpdoc/group__yarpdataplayerExample.html
+http://www.yarp.it/group__yarpdataplayerExample.html
 
-\image html installation/check-your-installation-yarpdataplayer-example.jpg
+\image html check-your-installation-yarpdataplayer-example.jpg
 
 You are now ready to learn more, proceed to the \ref tutorials.
 
  */
- 
  
\ No newline at end of file
diff --git a/doc/installation/dependencies.dox b/doc/installation/dependencies.dox
index 2a9df73..730b526 100644
--- a/doc/installation/dependencies.dox
+++ b/doc/installation/dependencies.dox
@@ -50,7 +50,7 @@ compilers. Just look carefully for your combination.
     <a href="http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#msvc">here (FIXME broken)</a>.
 \li UNIX/gcc instructions are
     <a href="http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#unix_traditional">here (FIXME broken)</a>.
-\li OSX/gcc users, follow the UNIX instructions.
+\li macOS/gcc users, follow the UNIX instructions.
 
 ACE will take a while to compile, but if you can do it you'll be able to
 deal with anything we throw at you.
@@ -105,7 +105,7 @@ can just install that and you are done. Otherwise you need to download
     export LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH
     setenv LD_LIBRARY_PATH $ACE_ROOT/lib:$LD_LIBRARY_PATH
     \endverbatim
-\li (On OSX, the variable you need to set is \c DYLD_LIBRARY_PATH).
+\li (On macOS, the variable you need to set is \c DYLD_LIBRARY_PATH).
 \li An alternative is to copy the files in \c $ACE_ROOT/lib to a
     standard library directory, for example, \c /usr/lib.
 \li We've given a simple procedure that works for most people. But if
@@ -364,7 +364,7 @@ download the source code, and build it yourself.
 Qt5 binary package for Windows is available from the
 <a href="http://qt-project.org/downloads">Qt Project website</a>
 
-\subsubsection dependencies_qt5_macosx Mac OSX
+\subsubsection dependencies_qt5_macos macOS
 
 Qt5 binary package for Mac is available from the
 <a href="http://qt-project.org/downloads">Qt Project website</a>
diff --git a/doc/installation/install.dox b/doc/installation/install.dox
index e6472d5..309f314 100644
--- a/doc/installation/install.dox
+++ b/doc/installation/install.dox
@@ -5,7 +5,7 @@
  */
 
 /**
- * @page install Installing YARP
+ * @page install Downloading and Installing YARP
 
 Source for YARP are available from https://github.com/robotology/yarp. Installing YARP is easy it can be done from sources or directly from binary packages. We provide in the links below detailed installation instructions for all systems.
 
@@ -18,4 +18,3 @@ Installing the software is easy but if you are really in a rush you can download
 After your are done installing YARP you can proceed with the following link: \subpage check_your_installation.
 
 */
-
diff --git a/doc/installation/install_mac.dox b/doc/installation/install_mac.dox
index ade8211..8a8d565 100644
--- a/doc/installation/install_mac.dox
+++ b/doc/installation/install_mac.dox
@@ -5,19 +5,19 @@
  */
 
 /**
- * @page install_yarp_mac Installing YARP on MacOS X
+ * @page install_yarp_mac Installing YARP on macOS
 
 \tableofcontents
 
-\section install_mac_installation_prerequisites Installation prerequisites
-This installation has been confirmed to work on OSX Mavericks and Yosemite with Homebrew.
+\section install_mac_installation_prerequisites Prerequisites installation
+This installation has been confirmed to work on macOS from 10.9 on with Homebrew.
 
 \subsection install_mac_Xcode Installing Xcode
 
-To compile anything on OS X (including YARP), you'll need to have <a href="http://developer.apple.com/xcode/"><b>Xcode</b></a> installed. This can be done through the <b>App Store</b>. 
+To compile anything on macOS (including YARP), you'll need to have <a href="http://developer.apple.com/xcode/"><b>Xcode</b></a> installed. This can be done through the <b>App Store</b>.
 
 Once installed, you need to install the <b>Command Line Tools</b>.
-To do this, open XCode, go to XCode->Preferences->Downloads and install Command Line Tools.
+To do this, open Xcode, go to Xcode->Preferences->Downloads and install Command Line Tools.
 
 If you do not see the option install Command Line Tools, run the following on a terminal
 
@@ -25,13 +25,13 @@ If you do not see the option install Command Line Tools, run the following on a
 xcode-select --install
 \endcode
 
-Once this is done, you can now continue with the installation steps:
+Once this is done, you can now continue with the next installation steps.
 
 \subsection install_mac_homebrew Installing Homebrew
 
-Please install homebrew using the following commands or visit and follow the official <a href="http://brew.sh"><b>installation steps</b></a>
+Please install Homebrew using the following commands or visit and follow the official <a href="http://brew.sh"><b>installation steps</b></a>
 
-\code 
+\code
 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
 \endcode
 
@@ -41,23 +41,37 @@ After the installation, you can run the following command to check if your setup
 brew doctor
 \endcode
 
-If you had Homebrew already installed on your system, update and upgrade:
+\section install_yarp Installing YARP
 
-\code
-brew update
-brew upgrade
-\endcode
+Once you have installed the prerequisites, you can now proceed to install YARP choosing between two options:
 
-Also, you will need to add the homebrew-x11 and homebrew-science taps:
+1. \subpage install_mac_Homebrew_YARP : if you are not explicitly interested  in the source code, this is the easiest way to install YARP but it implies that you will rely on the official stable releases.
+
+2. \subpage install_mac_from_source : being manual, this is a bit longer way for the installation but it allows you the full access to the source code and to be always updated with the latest features.
+
+In any case, you have to update and upgrade your Homebrew version.
+
+
+\subsection update_brew Updating and upgrading pre-existent Homebrew versions
+
+ If you had Homebrew already installed on your system, update and upgrade:
+
+ \code
+ brew update
+ brew upgrade
+ \endcode
+
+ Also, you will need to add the homebrew-x11 and homebrew-science taps:
+
+ \code
+ brew tap robotology/cask
+ brew tap homebrew/science
+ \endcode
 
-\code
-brew tap homebrew/x11
-brew tap homebrew/science
-\endcode
 
-\section install_mac_Homebrew_YARP Installing YARP from Homebrew
-The easiest way to install YARP is through Homebrew. 
- 
+\subsection  install_mac_Homebrew_YARP Install YARP from Homebrew
+Run on your terminal:
+
 \code
  brew install yarp
 \endcode
@@ -65,228 +79,273 @@ The easiest way to install YARP is through Homebrew.
 The following options are also available:
 
 \code
---with-lua
- 	Build with Lua bindings
---with-python
-  Build with Python bindings
+--with-bindings
+    Build with binding (LUA, Python) support
 --with-opencv
- 	Build the opencv_grabber device
---with-qt5
- 	Build the Qt5 GUI applications
+    Build with opencv support
 --with-serial
- 	Build the serial/serialport devices
+    Build the serial/serialport devices
 --with-yarprun-log
- 	Build with yarprun_log support
+    Build with LOG support for YARPRUN processes
+--without-qt5
+    Build without GUI applications
 --HEAD
- 	Install HEAD version
-\endcode
- 
-After the installation, you will need to add the $YARP_DATA_DIRS environmental variable (in order to follow the KISS principle we are using the native mac editor Textedit. Please feel free to use whichever tool/editor you prefer):
- 
-\code
-cd ~
-open -a TextEdit .bash_profile
+    Install HEAD version
 \endcode
- 
-If the following command result in an error: The file .... does not exist, do the following first:
 
-\code
-cd ~
-touch .bash_profile
-\endcode
- 
-and add the line:
+After the installation, you will need to set your \subpage environment_configuration.
 
-\code
-export YARP_DATA_DIRS=/usr/local/share/yarp
-\endcode
- 
-To refresh and load these environment settings type:
 
-\code
-source ~/.bash_profile 
-\endcode
- 
-Now you can proceed with the following link: \subpage check_your_installation.
+\subsection install_mac_from_source Install YARP from source
+If the options above are not enough and you want to install YARP with additional options or in a difference location, you can compile it from source, directly from the repository. First install the dependencies, download the code from the repository and then proceed with the installation.
 
-\subsection install_mac_bash_completion_brew Bash completion
-Installing YARP using Homebrew, the bash completion is automatically installed and enabled.
+ \subsubsection install_mac_YARP_Dependencies Installing YARP Dependencies
+ Here we provide information for installing the <b>YARP dependencies</b> via Homebrew.
+ In order to install the YARP dependencies enter the following command in a terminal:
 
-\section install_mac_from_source Install YARP from source
-If the options above are not enough and you want to install YARP with additional options or in a difference location, you can compile it from source, directly from the repository.
- 
-\subsection install_mac_YARP_Dependencies Installing YARP Dependencies
-Here we provide information for installing the <b>YARP dependencies</b> via <b>Homebrew</b>
-In order to install the YARP dependencies enter the following command in a terminal:
+ \code
+ brew install yarp --only-dependencies
+ \endcode
 
-\code
-brew install yarp --only-dependencies
-\endcode
- 
 
-For compiling the required bindings (LUA, JAVA, PYTHON etc) you need <b>swig</b>
+ For compiling the required bindings (LUA, JAVA, PYTHON etc) you need <b>swig</b>
 
-\code
-brew install swig
-\endcode
- 
-and the following for yarpbuilder:
+ \code
+ brew install swig
+ \endcode
 
-\code
-brew install goocanvas gtkmm libglademm gtk+
-\endcode
+ and the following for yarpbuilder:
 
-For compiling the Qt5 GUIS:
-\code
-brew install qt5
-\endcode
+ \code
+ brew install goocanvas gtkmm libglademm gtk+
+ \endcode
 
-Now, add the <b>environmental variable</b> for Qt5
+ For compiling the Qt5 GUIS:
+ \code
+ brew install qt5
+ \endcode
 
-\code
-cd ~
-open -a TextEdit .bash_profile
-\endcode
+ Now, add the <b>environmental variable</b> for Qt5
 
-and copy the following lines (obviously changing the path with your version):
+ \code
+ cd ~
+ open -a TextEdit .bash_profile
+ \endcode
 
-\code
-export Qt5_DIR=/usr/local/Cellar/qt5/5.4.2/lib/cmake
-\endcode
-Substitute version
+ and copy the following line
 
+ \code
+ export Qt5_DIR=/usr/local/opt/qt5/lib/cmake
+ \endcode
 
-\subsubsection install_mac_YARP_optional_GDK Optional: Installing YARP Dependencies: GDK PIXBUF 
 
-Programs that require this <b>GDK PIXBUF</b> need to set the environment variable correctly. Just to be on the safe side add this to the .bash_profile
+ \subsubsection install_mac_YARP_optional_GDK [Optional]: Installing GDK PIXBUF Dependencies
 
-\code
-cd ~
-open -a TextEdit .bash_profile
-\endcode
+ Programs that require this <b>GDK PIXBUF</b> need to set the environment variable correctly. Just to be on the safe side add this to the .bash_profile
 
-\code
-export GDK_PIXBUF_MODULEDIR="/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"
-\endcode
+ \code
+ cd ~
+ open -a TextEdit .bash_profile
+ \endcode
 
-To refresh and load these environment settings type:
+ \code
+ export GDK_PIXBUF_MODULEDIR="/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"
+ \endcode
 
-\code
-source ~/.bash_profile 
-\endcode
+ To refresh and load these environment settings type:
 
+ \code
+ source ~/.bash_profile
+ \endcode
 
-\subsection install_mac_YARP Installing YARP
 
-In the directory where you would like to store your code, e.g. /Users/your_user_name/Dev/ run the following git command to clone YARP on your system
+ \subsubsection install_mac_YARP Download and install
 
-\code
-git clone https://github.com/robotology/yarp.git
-\endcode
+ In the directory where you would like to store your code, e.g. /Users/your_user_name/Dev/ run the following git command to clone YARP on your system
 
-\subsubsection install_mac_YARP_terminal Compile YARP using terminal:
+ \code
+ git clone https://github.com/robotology/yarp.git
+ \endcode
 
-\code
-cd yarp
-mkdir build
-cd build
-ccmake ..
-\endcode
+ Now move into the source folder and create the build directory
 
-configure it correctly by enabling the following flags (simple solution):
+ \code
+ cd yarp
+ mkdir build
+ cd build
+ \endcode
 
-\code
-CREATE_GUIS
-CREATE_LIB_MATH  
-\endcode
+ You can now compile and install YARP with (at least) two different methods: GNU Makefile and Xcode.
+ The former is simpler, while the latter creates an Xcode project which can come in handy if you wish to contribute to the YARP development.
 
-configure & generate, then:
+ If not stated differently (e.g. we are compiling YARP on a robot environment which can have different policies), we strongly suggest to install YARP after the compilation.
+ Note that, by default, YARP is installed in /usr/local. We strongly suggest to change this folder to a non-system one.
 
-\code
-make
-\endcode
+ \subsubsection install_mac_YARP_terminal Compile YARP using GNU Makefiles
 
-\subsubsection install_mac_YARP_Xcode Compile YARP using Xcode:
+ In this case, you simply have to issue the cmake command
+ \code
+ ccmake ..
+ \endcode
 
-In order to generate and Xcode project do the following:
+ configure it correctly by enabling the following flags (simple solution):
 
-\code
-cd yarp
-mkdir build
-cd build
-ccmake .. -G Xcode
-\endcode
+ \code
+ CREATE_GUIS
+ CREATE_LIB_MATH
+ \endcode
 
-This will generate a <b>YARP.xcodeproj</b> file which can be opened with Xcode.
-Build it by clicking <b>Product -> Build</b> or <b>cmd+B</b> shortcut.
-One can also compile the Release binaries by clicking <b>Product -> Archive</b>.
+ and, if you want to install YARP, by changing the path pointed by the CMake variable
 
-\subsubsection install_mac_YARP_Environment Setting YARP environmental Variables:
+ \code
+ CMAKE_INSTALL_PREFIX
+ \endcode
 
-Once YARP has been compiled, you need to set its environmental variables:
+ configure (press 'c' until all the * disappers) & generate ('g'), then:
 
-\code
-cd ~
-open -a TextEdit .bash_profile
-\endcode
+ \code
+ make
+ \endcode
 
-and copy the following lines:
+ If you want to install issue also a
+ \code
+ make install
+ \endcode
+ (Note: if the install directory is a system directory you may need administrator privileges, e.g. you have to use sudo).
 
-\code
-export code=/Users/your_user_name/Dev
-export YARP_ROOT=/Users/your_user_name/Dev/yarp
-export YARP_DIR=/Users/your_user_name/Dev/yarp/build
-export PATH=$YARP_DIR/bin/Release:$PATH 
-\endcode
+After the installation, you will need to set your \subpage environment_configuration and the \subpage bash_completion.
 
-Notice that if you used the terminal version without Xcode the last line becomes:
+ \subsubsection install_mac_YARP_Xcode Compile YARP using Xcode
 
-\code
-export PATH=$YARP_DIR/bin:$PATH
-\endcode
+ In order to generate and Xcode project do the following:
 
-Now setup YARP_DATA_DIRS by adding this to the .bash_profile:
+ \code
+ ccmake .. -G Xcode
+ \endcode
 
-\code
-export YARP_DATA_DIRS=/Users/your_user_name/Dev/yarp/build/share/yarp
-\endcode
+ As before, configure the project and the install directory:
+ \code
+ CREATE_GUIS=ON
+ CREATE_LIB_MATH=ON
+ CMAKE_INSTALL_PREFIX=/path/to/install/dir
+ \endcode
 
-To refresh and load these environment settings type:
+ This will generate a <b>YARP.xcodeproj</b> file which can be opened with Xcode.
+ Build it by clicking <b>Product -> Build</b> or <b>cmd+B</b> shortcut.
+ One can also compile the Release binaries by clicking <b>Product -> Archive</b>.
 
-\code
-source ~/.bash_profile 
-\endcode
+ Alternatively, it is possible to directly compile the project on the command line by
+ \code
+ xcodebuild [-configuration Debug|Release|Other Configs] [-target ALL_BUILD|install|Other Targets]
+ \endcode
+ If no options are specified the ALL_BUILD target is compiled in Debug configuration.
+ In general the following command will build and install YARP in release mode:
+ \code
+ xcodebuild -configuration Release -target install
+ \endcode
 
-Now to quickly test the system run this in a terminal:
 
-\code
-yarp
-\endcode
+ After the installation, you will need to set your \subpage environment_configuration and the \subpage bash_completion.
 
-and you should get something like:
 
-\code
-This is the YARP network companion.
-Call with the argument "help" to see a list of ways to use this program.
-\endcode
 
-\section install_mac_bash_completion_source Bash completion
-To enable bash completion when building YARP from source, do the following:
+\subsection environment_configuration Environment variables configuration
 
-\code
-brew install bash-completion
-\endcode
+In order to follow the KISS principle we are using the native mac editor Textedit. Please feel free to use whichever tool/editor you prefer.
 
-Then add the following lines to your .bash_profile:
+Add the YARP environment variable in
 
-\code
-if [ -f `brew --prefix`/etc/bash_completion ]; then
-      . `brew --prefix`/etc/bash_completion
-fi
-source $YARP_ROOT/scripts/yarp_completion
-\endcode
+ \code
+ cd ~
+ open -a TextEdit .bash_profile
+ \endcode
 
+ If the following command result in an error: The file .... does not exist, do the following first:
 
-*/
+ \code
+ cd ~
+ touch .bash_profile
+ \endcode
+
+
+<b>If you installed from Homebrew</b>:
+
+ \code
+ export YARP_DATA_DIRS=/usr/local/share/yarp
+ \endcode
+
+ To refresh and load these environment settings type:
 
+ \code
+ source ~/.bash_profile
+ \endcode
+
+ Now you can check if YARP has been properly installed by running a \subpage quick_test_yarp.
+
+ <b>If you installed from source</b>:
+
+ In the following we assume that YARP has been installed.
+ In case you are using the build version, instead, the YARP_DIR path should point to the build directory.
+ \code
+ # YARP_ROOT points to the repository
+ export YARP_ROOT=/Users/your_user_name/Dev/yarp
+ export YARP_DIR=/path/to/install/dir
+ export PATH=$PATH:$YARP_DIR/bin
+ \endcode
+
+ Notice that if you did not install AND you used the Xcode version the last line becomes
+
+ \code
+  export PATH=$PATH:$YARP_DIR/bin/Release
+ \endcode
+
+ Now setup YARP_DATA_DIRS by adding this to the .bash_profile:
+
+ \code
+ export YARP_DATA_DIRS=${YARP_DIR}/share/yarp
+ \endcode
+
+ To refresh and load these environment settings type:
+
+ \code
+ source ~/.bash_profile
+ \endcode
+
+
+ Check if YARP has been properly installed by running a \subpage quick_test_yarp.
+
+\subsection bash_completion Bash completion
+
+ \code
+ brew install bash-completion
+ \endcode
+
+ Then add the following lines to your .bash_profile:
+
+ \code
+ if [ -f `brew --prefix`/etc/bash_completion ]; then
+       . `brew --prefix`/etc/bash_completion
+ fi
+ source $YARP_ROOT/scripts/yarp_completion
+ \endcode
+
+
+ \section quick_test_yarp Quick YARP run test
+
+ Now to quickly test the system run this in a terminal:
+
+ \code
+ yarp
+ \endcode
+
+ and you should get something like:
+
+ \code
+ This is the YARP network companion.
+ Call with the argument "help" to see a list of ways to use this program.
+ \endcode
+
+ If this test run properly, you can proceed with the following link: \subpage check_your_installation.
+
+*/
 
diff --git a/doc/installation/install_windows.dox b/doc/installation/install_windows.dox
index 5daa4ef..abda652 100644
--- a/doc/installation/install_windows.dox
+++ b/doc/installation/install_windows.dox
@@ -6,14 +6,14 @@
 
 /**
  * @page install_yarp_windows Installing YARP on Windows
- 
+
 \section install_on_windows Installation on Windows
 
 \tableofcontents
- 
+
 \subsection install_windows_from_binaries Install from binaries
 
-We provide precompiled binaries for Visual Studio compilers. Download and execute the installer from this page \ref installation_downloads. 
+We provide precompiled binaries for Visual Studio compilers. Download and execute the installer from this page \ref installation_downloads.
 
 You are now ready to check you installation, see \ref check_your_installation.
 
@@ -25,21 +25,29 @@ Instructions in this page allows you to build YARP from sources. This allows get
 
 We recommend you follow the procedure described below, which will install precompiled binaries for all the required dependencies. Download the YARP installer according to the compiler you use from this page (\ref installation_downloads). Execute the YARP installer. Disable the YARP tick and proceed with the installation.
 
-\image html installation/install-binaries-no-yarp.png
+\image html install-binaries-no-yarp.png
 
 Pick installation directory, all dependencies will be installed in separate folders in this directory:
 
-\image html installation/install-binaries-no-yarp2.png
+\image html install-binaries-no-yarp2.png
 
 Alternatively you can compile all dependencies yourself following the procedure here: \ref dependencies (notice however that this can be tedious, time consuming and error prone).
 
 \subsubsection windows_development_environment Setting up development environment
 
+To compile YARP from sources, you need a C++ compiler.
+
+On Windows, you can compile Visual Studio 2013 Community Edition
+from the [Microsoft website](https://www.visualstudio.com/en-en/downloads/download-visual-studio-vs.aspx#).
+
+Please note that is reccomended to use Visual Studio 2013 because at the moment we do not provide precompiled
+binaries for YARP dependencies for Visual Studio 2015.
+
 Besides the C++ compiler you also need the following tools.
 
 \paragraph CMake
 
-Get the latest release from: http://cmake.org/cmake/resources/software.html. 
+Get the latest release from: http://cmake.org/cmake/resources/software.html.
 Execute the installer and follow the instructions, no special actions are required.
 
 \paragraph GIT
@@ -49,7 +57,7 @@ There are some competing git solutions for Windows. Among them we recommend
 \li msysgit (http://msysgit.github.io/)
 \li GitHub for Windows (https://windows.github.com/)
 
-\remark Learning git: to get sources you don't need to understand git in detail (just follow our instructions). If you are willing to learn more there are many useful guides available on the internet. Checkout this page to learn more (http://wiki.icub.org/wiki/Learning_more_about_git). 
+\remark Learning git: to get sources you don't need to understand git in detail (just follow our instructions). If you are willing to learn more there are many useful guides available on the internet. Checkout this page to learn more (http://wiki.icub.org/wiki/Learning_more_about_git).
 
 \subsubsection getting_the_sources_windows Getting the sources
 
@@ -65,7 +73,7 @@ For example:
   cd /home/user
   git clone https://github.com/robotology/yarp.git
 \endcode
- 
+
 \subsubsection create_project_files_windows Create YARP project files
 
 \li Run the CMake GUI.
@@ -75,7 +83,7 @@ For example:
 
 Choose the following options:
 
-\code  
+\code
  CREATE_GUIS, set to ON
  CREATE_LIB_MATH, set to ON
 \endcode
@@ -99,8 +107,8 @@ Now we are ready to compile. Go to the build directory (i.e. \c /home/usr/yarp/b
 
 \subsubsection set_up_your_environment_windows Setup your environment
 
- + Set the environment variable \c YARP_DIR so that it points to the installation directory you have chosen (e.g. \c C:/Program Files/YARP). Set \c YARP_DATA_DIRS to %YARP_DIR%/share/yarp. 
- + Update your \c PATH environment variable so that it points to the directories bin and lib within the installation directory you have chose (i.e. \c C:/Program Files/YARP/bin and \c C:/Program Files/YARP/lib).
+ + Set the environment variable \c YARP_DIR so that it points to the installation directory you have chosen (e.g. \c C:/Program Files/YARP). Set \c YARP_DATA_DIRS to %YARP_DIR%/share/yarp.
+ + Add to the \c PATH environment variable the paths of the directories bin and lib within the installation directory you have chose (i.e. \c C:/Program Files/YARP/bin and \c C:/Program Files/YARP/lib).
 
 You are now ready to check you installation, see \ref check_your_installation.
 
diff --git a/doc/installation/installation_downloads.dox b/doc/installation/installation_downloads.dox
index cef0d07..b778da8 100644
--- a/doc/installation/installation_downloads.dox
+++ b/doc/installation/installation_downloads.dox
@@ -8,26 +8,34 @@
 * @page installation_downloads Downloads
 
 Latest releases:
- + 01/06/2016, latest release: __YARP-2.3.66__
+ + 01/06/2016: YARP 2.3.66
 
 Previous releases:
- + 18/07/2014, latest release: __YARP-2.3.64__
- + 18/07/2014: YARP-2.3.63
- + 06/08/2013 : YARP-2.3.22
- + 10/07/2013 : YARP-2.3.21
- + 04/03/2013 : YARP 2.3.20 binaries for windows 64bits
- + 7/12/2012 : YARP-2.3.20 (support for Visual Studio 11)
- + YARP-2.3.19
+ + 2016/05/13: YARP 2.3.65
+ + 2015/06/15: YARP 2.3.64
+ + 2014/07/14: YARP 2.3.63
+ + 2014/02/19: YARP 2.3.62
+ + 2014/01/31: YARP 2.3.61
+ + 2014/01/29: YARP 2.3.60
+ + 2013/07/26: YARP 2.3.22
+ + 2013/07/08: YARP 2.3.21
+ + 2012/12/19: YARP 2.3.20.1
+ + 2012/11/23: YARP 2.3.20
+ + 2012/07/05: YARP 2.3.19
 
 \section download_windows Windows
 
- \remark Important: to develop code using precompiled binaries packages have to match the compiler you use, make sure you download and install the correct version (i.e. MSVC12 for Visual Studio 12, etc..).
- If in doubt about the version number of your copy of Visual Studio, find the internal version number shown for it in this [version history table](http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Version_history).
+\remark Important: to develop code using precompiled binaries packages have to
+        match the compiler you use, make sure you download and install the
+        correct version (i.e. MSVC12 for Visual Studio 2013, etc..).
+        If in doubt about the version number of your copy of Visual Studio, find
+        the internal version number shown for it in this
+        [version history table](http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#History).
 
 
 __Installers__:
 
-  \li [MSVC10 x86] (https://github.com/robotology/yarp/releases/download/v2.3.66/yarp_2.3.65_v10_x86_1.exe),  [MSVC10 amd64] (https://github.com/robotology/yarp/releases/download/v2.3.66/yarp_2.3.66_v10_x86_amd64_1.exe)
+ \li [MSVC10 x86] (https://github.com/robotology/yarp/releases/download/v2.3.66/yarp_2.3.66_v10_x86_1.exe), [MSVC10 amd64] (https://github.com/robotology/yarp/releases/download/v2.3.66/yarp_2.3.66_v10_x86_amd64_1.exe)
  \li [MSVC11 x86] (https://github.com/robotology/yarp/releases/download/v2.3.66/yarp_2.3.66_v11_x86_1.exe), [MSVC11 amd64] (https://github.com/robotology/yarp/releases/download/v2.3.66/yarp_2.3.66_v11_x86_amd64_1.exe)
  \li [MSVC12 x86] (https://github.com/robotology/yarp/releases/download/v2.3.66/yarp_2.3.66_v12_x86_1.exe), [MSVC12 amd64] (https://github.com/robotology/yarp/releases/download/v2.3.66/yarp_2.3.66_v12_x86_amd64_1.exe)
 
diff --git a/doc/main.dox b/doc/main.dox
index e61f446..9a81dc4 100644
--- a/doc/main.dox
+++ b/doc/main.dox
@@ -36,7 +36,7 @@ see the
 \ref yarp_without_yarp "YARP without YARP" tutorial. YARP is written
 in C++.  The <a href="http://www.cs.wustl.edu/~schmidt/ACE.html">ACE</a>
 library is used for Windows builds, and to support extra
-protocols.  On Linux and Mac OSX, ACE can optionally be omitted,
+protocols.  On Linux and macOS, ACE can optionally be omitted,
 giving a very light footprint (with the trade-off being the
 loss of support for some non-TCP-based protocols).
 YARP is free and open, under the LGPL (*).
@@ -44,31 +44,46 @@ YARP is free and open, under the LGPL (*).
 Getting set up:
 \li \subpage install
 \li \subpage yarp_cluster
-\li \subpage yarp
 
 The basics of using YARP:
-\li \ref yarp_cmake_hello
+\li \subpage yarp_cmake_hello
 \li \subpage tutorials
-\li \ref note_ports
-\li \ref note_devices
-\li \ref yarp_data_dirs
+\li \subpage note_ports
+\li \subpage note_devices
+\li \subpage yarp_data_dirs
 
-Some helpful programs:
+Command line tools:
+\li \subpage yarp
+\li \subpage yarpserver
 \li \subpage yarpdev
+\li \subpage yarprobotinterface
 \li \subpage yarprun
-\li \subpage yarpmanager
-\li \subpage yarpscope
+\li \subpage yarp-config
 \li \subpage yarpdatadumper
+\li \subpage yarpdatadumperAppGenerator
+\li \subpage yarphear
+\li \subpage yarplogger-console
+\li \subpage yarpmanager-console
+\li \subpage yarpidl_rosmsg
+\li \subpage yarpidl_thrift
+\li \subpage yarpros
+
+GUIs:
+\li \subpage yarplogger
+\li \subpage yarpview
+\li \subpage yarpscope
+\li \subpage yarpmanager
+\li \subpage yarpmanagerpp
 \li \subpage yarpdataplayer
 \li \subpage yarpmotorgui
-\li \subpage yarpview
-\li \subpage yarp_yarp-config
+\li \subpage yarpbatterygui
+\li \subpage yarplaserscannergui
 
 Interoperability:
-\li \ref yarp_without_yarp
-\li \ref yarp_with_ros
-\li \ref yarp_swig
-\li \ref portmonitor
+\li \subpage yarp_without_yarp
+\li \subpage yarp_with_ros
+\li \subpage yarp_swig
+\li \subpage portmonitor
 
 More information:
 \li \subpage what_is_yarp
@@ -76,7 +91,8 @@ More information:
 \li \subpage changelog
 
 YARP resources:
-\li \ref download
+\li <a href="http://github.com/robotology/yarp">YARP project on GitHub</a>
+\li <a href="http://github.com/robotology/yarp/issues">YARP issue tracker</a>
 \li <a href="http://wiki.icub.org/wiki/YARP">Wiki</a>
 \li <a href="http://wiki.icub.org/wiki/Robotcub-hackers">Mailing list</a>
 
diff --git a/doc/port_monitor/source.svg b/doc/port_monitor/source.svg
index 0905835..fbf0933 100644
--- a/doc/port_monitor/source.svg
+++ b/doc/port_monitor/source.svg
@@ -15,7 +15,7 @@
    version="1.1"
    inkscape:version="0.48.3.1 r9886"
    sodipodi:docname="source.svg"
-   inkscape:export-filename="/home/apaikan/Install/yarp-apaikan/doc/port_monitor/image_modification.png"
+   inkscape:export-filename="image_modification.png"
    inkscape:export-xdpi="90"
    inkscape:export-ydpi="90">
   <defs
diff --git a/doc/release/v2_3_66_1.md b/doc/release/v2_3_66_1.md
new file mode 100644
index 0000000..47d0899
--- /dev/null
+++ b/doc/release/v2_3_66_1.md
@@ -0,0 +1,157 @@
+YARP 2.3.66.1 (2016-10-20) Release Notes
+========================================
+
+
+A (partial) list of bug fixed and issues resolved in this release can be found
+[here](https://github.com/robotology/yarp/issues?q=label%3A%22Fixed+in%3A+YARP+2.3.66.1%22).
+
+
+Important Changes
+-----------------
+
+### YARP_dev
+
+* The `analogServer` device (implemented in `yarp::dev::AnalogWrapper` has
+  removed the support for the `deviceId` parameter, that has been
+  deprecated since 2014. Invalid configuration files of the form:
+~~~
+robotName icub
+deviceId left_arm
+~~~
+  can be updated with the valid:
+~~~
+name /icub/left_arm/analog:o
+~~~
+
+* The `controlboardwrapper2` device (implemented in
+  `yarp::dev::ControlBoardWrapper` has removed the supported for the
+  `threadrate` parameter, that has been deprecated since 2014.
+  Invalid configuration files of the form `threadrate 10` can be update with the
+  valid form `period 10`.
+
+Bug Fixes
+---------
+
+### YARP_OS
+
+* Fixed `PlatformThread` for macOS, no ACE, no c++11.
+* Fixed memory leak in `SharedLibrary`.
+* Fixed memory leak in `Property::fromArgs`.
+* Use reentrant version of `get_host_addr` in `NameConfig` and
+  `SocketTwoWayStream` (fixes a few possible race conditions).
+* Fixed memory leak in `NameConfig::getHostName` with `SKIP_ACE` enabled.
+* Fixed "Conditional jump or move depends on uninitialised value" issues
+  reported by `valgrind --memcheck` in `SocketTwoWayStream` with `SKIP_ACE`
+  enabled.
+* Added implementation of `SystemInfo` for macOS.
+* Fixed bug in `yarprun` currently occuring only on macOS, but potentially on
+  other platforms (#633)
+* `yarp plugin` command now works with `SKIP_ACE` enabled.
+* Fixed UDP and MCAST on macOS (#637)
+* Fixed SIGPIPE when closing input port before output ports.
+
+
+### YARP_DEV
+
+* Fixed `yarp::dev::BatteryClient::getBatteryTemperature()`.
+* Fixed memory leak in `ImplementTorqueControl`.
+* Export some important classes that were erroneously not exported in the ABI.
+* Fixed memory leak in `PolyDriver`.
+* ControlBoardWrapper: Added checks for testing if joint number is out of bound.
+
+
+### Modules
+
+* `Rangefinder2DWrapper`: angle_increment is now obtained from the hardware
+  device.
+* `laserHokuyo`: added parameters max_angle and min_angle.
+* `imuBosch_BNO055`: fixed use of char (a signed type) for the byte buffer that
+  was corrupting positive measures when converting from 2 bytes to a single 16
+  bit value.
+* `fakeMotionControl`: Fix memory leak.
+* `portaudio`: fix bug in number of samples recorded, changed default values to
+  have the device more responsive.
+
+
+### Tools
+
+* `yarpdatadumperAppGenerator.py` is now installed as
+  `yarpdatadumperAppGenerator` on non Windows platforms.
+
+
+### GUIs
+
+* `yarpview`:
+  * Fixed .app bundle on macOS.
+  * `QT_DEVICE_PIXEL_RATIO` is now set to "auto" to support 4k displays.
+* `yarpscope`:
+  * Fixed .app bundle on macOS.
+  * Fixed help for --min and --max arguments.
+  * Fixed reading minval and maxval from xml.
+* `yarpmotorgui`:
+  * Max number of joints was fixed to 16. Now memory is dynamically allocated.
+  * Fixed issue preventing sequence tab to acquire encoder positions on double
+    click, if the control mode of the selected joint is not POSITION.
+  * Fixed bug preventing correct copy-and-paste action
+  * Fixed issue preventing a GO action from being executed if timing is less
+    than zero.
+  * Allow copying single lines to clipboard from sequence tab.
+  * `QT_DEVICE_PIXEL_RATIO` is now set to "auto" to support 4k displays.
+  * Added box to display openloop output.
+* `yarpdataplayer`
+  * `QT_DEVICE_PIXEL_RATIO` is now set to "auto" to support 4k displays.
+  * Fixed error when opening readonly files.
+  * Fixed variable sample rate data playing too fast.
+* `yarplogger`:
+  * The date is now taken into account.
+  * Copying to clipboard preserves new lines.
+  * New icon-set is displayed in the "filter" section when a log is disabled.
+  * Double-clicking on the table to make each line of the logger to adjusts
+    the row height to display all of its contents. Added context menu entry.
+  * New lines at the end of log messages are now removed.
+  * The log is now displayed using a fixed size font.
+
+
+### IDLs
+
+* The script executed by RosTypeSearch::fetchFromRos now supports the creation
+  of .msg files in a non-existing directory.
+
+
+### Bindings
+
+* Properly define TypedReaderCallbackSound (Fixes TypedReaderCallbackImageMono
+  redefinition).
+
+
+### Build System
+
+* `YarpPlugin.cmake` no longer redefines the `FIND_PACKAGE` CMake command.
+
+
+Contributors
+------------
+
+This is a list of people that contributed to this release (generated from the
+git history using `git shortlog -ens --no-merges v2.3.66..v2.3.66.1`):
+
+```
+   153  Daniele E. Domenichelli <daniele.domenichelli at iit.it>
+    15  Francesco Romano <francesco.romano at iit.it>
+    11  Marco Randazzo <marco.randazzo at iit.it>
+     9  Silvio Traversaro <silvio.traversaro at iit.it>
+     9  Tobias Fischer <t.fischer at imperial.ac.uk>
+     6  Alexandros Paraschos <paraschos at ias.tu-darmstadt.de>
+     6  Matteo Brunettini <matteo.brunettini at iit.it>
+     5  Alberto Cardellino <alberto.cardellino at iit.it>
+     2  Andrea Ruzzenenti <andrea.ruzzenenti at iit.it>
+     2  Daniele E. Domenichelli <ddomenichelli at drdanz.it>
+     2  Giovanni Saponaro <gsaponaro at isr.ist.utl.pt>
+     2  Lorenzo Natale <lorenzo.natale at iit.it>
+     2  Ugo Pattacini <ugo.pattacini at iit.it>
+     2  Vadim Tikhanoff <vadim.tikhanoff at iit.it>
+     1  Claudia Latella <claudia.latella.86 at gmail.com>
+     1  Claudio Fantacci <claudio.fantacci at iit.it>
+     1  Plinio Moreno <plinio at isr.tecnico.ulisboa.pt>
+     1  Valentina Gaggero <valentina.gaggero at iit.it>
+```
diff --git a/doc/releases.dox b/doc/releases.dox
index 1316576..fd4a2d5 100644
--- a/doc/releases.dox
+++ b/doc/releases.dox
@@ -12,6 +12,7 @@ This page lists the main changes introduced in YARP at each release.
 \tableofcontents
 
 \section rel-v2_3_66 YARP 2.3.66 Series
+\li \subpage md_doc_release_v2_3_66_1
 \li \subpage md_doc_release_v2_3_66
 
 \section rel-v2_3_65 YARP 2.3.65 Series
diff --git a/doc/resource_finder_installation.dox b/doc/resource_finder_installation.dox
index ca00934..73637e2 100644
--- a/doc/resource_finder_installation.dox
+++ b/doc/resource_finder_installation.dox
@@ -82,7 +82,7 @@ but <em>GLOBBING is EVIL</em>, so we do not recommend it.
 \section rf_install_finalnotes Notes
 Keep in mind that the \c ${YARP_CONTEXTS_INSTALL_DIR} variable expands to a relative path that will be appended to the installation prefix chosen by the user; the user should be warned to use the same installation directory as YARP, or to configure their system as explained \ref datafiles_3rdparty here.
 
-Remember that you can always inspect the state of contexts on your machine, and customize installed configuration files, using the \ref yarp_yarp-config utility.
+Remember that you can always inspect the state of contexts on your machine, and customize installed configuration files, using the \ref yarp-config utility.
 
 \section rf_code Code
 
diff --git a/doc/resource_finder_spec.dox b/doc/resource_finder_spec.dox
index 77e326b..2fd22cf 100644
--- a/doc/resource_finder_spec.dox
+++ b/doc/resource_finder_spec.dox
@@ -85,10 +85,10 @@ Default values for Yarp are therefore:
 <b>\%YARP\_CONFIG\_DIRS%</b>:
 > `%%ALLUSERSPROFILE%\yarp\`  
 
-Mac OSX
--------
+macOS
+-----
 
-On OSX, the following environment variable is used:
+On maxOS, the following environment variable is used:
 
 <b>$HOME</b>: 
 > `/Users/<username>`  
diff --git a/doc/rfmodule.dox b/doc/rfmodule.dox
index d1ebfc8..58a3a02 100644
--- a/doc/rfmodule.dox
+++ b/doc/rfmodule.dox
@@ -13,7 +13,7 @@ The RFModule helper class simplify writing a generic module. It provides support
 \li Parses messages from a port to monitor module activity and set/get parameters 
 \li Use the ResourceFinder class to handle parameters
 
-You do not need to understand the details of the ResourceFinder to proceed with this tutorial. However it may be useful: <a href="http://wiki.icub.org/yarpdoc/yarp_resource_finder_tutorials.html">Resource Finder Tutorials</a>.
+You do not need to understand the details of the ResourceFinder to proceed with this tutorial. However it may be useful: <a href="http://www.yarp.it/yarp_resource_finder_tutorials.html">Resource Finder Tutorials</a>.
 
 This is how a module will look like:
 
diff --git a/doc/what_is_yarp.dox b/doc/what_is_yarp.dox
index 7a45aba..e818013 100644
--- a/doc/what_is_yarp.dox
+++ b/doc/what_is_yarp.dox
@@ -58,7 +58,7 @@ The components of YARP can be broken down into:
 \li \link yarp_os libYARP_OS \endlink - interfacing with the operating system(s) to support
 easy streaming of data across many threads across many
 machines. YARP is written to be OS neutral, and has been used
-on Linux, Microsoft Windows, Mac OSX and Solaris.
+on Linux, Microsoft Windows, Apple macOS and iOS, Solaris, and Android.
 YARP uses the open-source ACE (ADAPTIVE
 Communication Environment) library, which is portable across a very
 broad range of environments, and YARP inherits that
diff --git a/doc/yarp_cluster.dox b/doc/yarp_cluster.dox
index 2ca5e2c..5a32f1f 100644
--- a/doc/yarp_cluster.dox
+++ b/doc/yarp_cluster.dox
@@ -23,7 +23,7 @@ in this battle is the "iperf" program.
 
 - Download from http://iperf.sourceforge.net/
 - Linux: apt-get install iperf (or similar command)
-- OSX: brew install iperf (if you use homebrew)
+- macOS: brew install iperf (if you use homebrew)
 
 Please make sure you have iperf available on all your machines
 before going any further.
diff --git a/doc/yarp_data_dirs.dox b/doc/yarp_data_dirs.dox
index cf25599..e8eba38 100644
--- a/doc/yarp_data_dirs.dox
+++ b/doc/yarp_data_dirs.dox
@@ -26,7 +26,7 @@ The key points to keep in mind are:
 \li    External packages can install files so that YARP can find them (see \ref datafiles_3rdparty "here");
 \li    Type of files are divided in families that are placed in specific sub-directories. Current allowed sub-directories are listed \ref datafiles_datadirs "here".
 
-File customization can happen by copying files or contexts from the shared installation directories to the ones private to the user. The \ref yarp_yarp-config utility simplifies this process.
+File customization can happen by copying files or contexts from the shared installation directories to the ones private to the user. The \ref yarp-config utility simplifies this process.
 
 \section datafiles_datadirs Data directories contents
 Files are normally organized in the following directories:
@@ -117,7 +117,7 @@ Templates are XML files with a .template extension. Typical templates are applic
 
 \section managing_data_files Managing data files: the yarp-config utility
 
-Managing configuration and data files requires nothing special, you can copy, edit and remove them using the shell. However YARP provides an utility that simplifies this, see \ref yarp_yarp-config.
+Managing configuration and data files requires nothing special, you can copy, edit and remove them using the shell. However YARP provides an utility that simplifies this, see \ref yarp-config.
 
 
 \section datafiles_3rdparty 3rd party packages (for developers)
diff --git a/doc/yarp-rf.dox b/doc/yarp_resource_finder_tutorials.dox
similarity index 100%
rename from doc/yarp-rf.dox
rename to doc/yarp_resource_finder_tutorials.dox
diff --git a/example/external/c/yarpmin.c b/example/external/c/yarpmin.c
index 091c1ca..2159efe 100644
--- a/example/external/c/yarpmin.c
+++ b/example/external/c/yarpmin.c
@@ -460,7 +460,7 @@ yarpConnection yarp_prepare_to_read_binary(yarpAddressPtr address) {
     }
 
     // Following tcp protocol documented at: 
-    //   http://wiki.icub.org/yarpdoc/yarp_protocol.html
+    //   http://www.yarp.it/yarp_protocol.html
 
     // Send header to select connection type.
     // this header is for fast_tcp, so we don't have to deal with flow control
diff --git a/example/matlab/simulink/README.txt b/example/matlab/simulink/README.txt
index 5ebfcc1..831a2d4 100644
--- a/example/matlab/simulink/README.txt
+++ b/example/matlab/simulink/README.txt
@@ -8,7 +8,7 @@ The licence of Simulink® Real Time Execution is attached as "license.txt" in th
 
 These three YARP/Simulink examples have been developed by Juan G. Victores
 (http://roboticslab.uc3m.es/roboticslab/persona.php?id_pers=72), licenced as the rest of
-the YARP Repository (http://wiki.icub.org/yarpdoc/index.html) from where this
+the YARP Repository (http://www.yarp.it/index.html) from where this
 source can be downloaded.
 
 Install
diff --git a/example/port_power/README.TXT b/example/port_power/README.TXT
index e3e4d9d..ed6c3e8 100644
--- a/example/port_power/README.TXT
+++ b/example/port_power/README.TXT
@@ -12,6 +12,6 @@ Similarly for ports called:
 
 The examples follow the "Port Power" tutorial.  Do a web search for
 YARP port power, or go to the last known address of the tutorial:
-  http://yarp.it/port_expert.html
+  http://www.yarp.it/port_expert.html
 
 -paulfitz
diff --git a/packaging/windows/conf/bundle-2-3-66.sh b/packaging/windows/conf/bundle-2-3-66.sh
new file mode 100644
index 0000000..7d4faa5
--- /dev/null
+++ b/packaging/windows/conf/bundle-2-3-66.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+export BUNDLE_YARP_VERSION=2.3.66
+export BUNDLE_TWEAK=1
+export BUNDLE_CMAKE_VERSION=3.5.2
+export BUNDLE_NSIS_VERSION=2.46
+export BUNDLE_GSL_VERSION=1.14
+export BUNDLE_EXT_REPO_URL=http://www.icub.org/download/software/windows/common
+# Empty version means no support, yarp will be compiled without it
+export BUNDLE_ACE_VERSION_v10=6.2.7
+export BUNDLE_ACE_VERSION_v11=6.3.2
+export BUNDLE_ACE_VERSION_v12=6.3.4
+export BUNDLE_ACE_VERSION_v14=6.3.4
+export BUNDLE_QT_VERSION_v10_x86=5.4.1
+export BUNDLE_QT_VERSION_v10_x86_amd64=
+export BUNDLE_QT_VERSION_v11_x86=5.4.1
+export BUNDLE_QT_VERSION_v11_x86_amd64=5.2.1
+export BUNDLE_QT_VERSION_v12_x86=5.4.1
+export BUNDLE_QT_VERSION_v12_x86_amd64=5.4.1
+export BUNDLE_QT_VERSION_v14_x86=5.6.0
+export BUNDLE_QT_VERSION_v14_x86_amd64=5.6.0
+export BUNDLE_GTKMM_VERSION_v10_x86=2.22.0
+export BUNDLE_GTKMM_VERSION_v10_x86_amd64=2.22.0
+export BUNDLE_GTKMM_VERSION_v11_x86=2.22.0
+export BUNDLE_GTKMM_VERSION_v11_x86_amd64=2.22.0
+export BUNDLE_GTKMM_VERSION_v12_x86=
+export BUNDLE_GTKMM_VERSION_v12_x86_amd64=
+export BUNDLE_GTKMM_VERSION_v14_x86=
+export BUNDLE_GTKMM_VERSION_v14_x86_amd64=
+YARP_CMAKE_OPTIONS="\
+ -DCREATE_YARPMANAGER_CONSOLE=TRUE \
+ -DCREATE_YARPMANAGER=TRUE \
+ -DCREATE_LIB_MATH=TRUE \
+ -DCREATE_GUIS=TRUE \
+ -DCREATE_SHARED_LIBRARY=TRUE \
+ -DYARP_COMPILE_TESTS=FALSE \
+ -DYARP_FILTER_API=TRUE \
+ -DCREATE_IDLS=TRUE \
+ -DENABLE_yarpidl_thrift=TRUE \
+ -DCREATE_OPTIONAL_CARRIERS=TRUE \
+ -DENABLE_yarpcar_tcpros_carrier=TRUE \
+ -DENABLE_yarpcar_xmlrpc_carrier=TRUE \
+ -DENABLE_yarpcar_bayer_carrier=TRUE \
+ -DUSE_LIBDC1394=FALSE \
+ -DENABLE_yarpcar_priority_carrier=TRUE"
+ 
\ No newline at end of file
diff --git a/scripts/admin/README_RELEASE b/scripts/admin/README_RELEASE
deleted file mode 100644
index 6760468..0000000
--- a/scripts/admin/README_RELEASE
+++ /dev/null
@@ -1,53 +0,0 @@
-=== Steps for building a release ==
-
-* Look at this page to get the current YARP version, say 2.3.21:
-
-  http://wiki.icub.org/yarpdoc/download.html
-
-* Checkout latest master and make sure that there are no local modifications
-
-  git checkout -f master
-  git fetch origin
-  git reset --hard origin/master
-  git status 
-  (check that there are no uncommitted modifications or new files)
-
-* Check regression tests
-
-* Make sure that conf/YarpVersion.cmake is different to the latest
-  public version, bumping up the version number if needed.
-
-  Reset "YARP_VERSION_TWEAK" to 0
-
-* Prepare licenses
-
-  rm -rf license_check
-  ./scripts/admin/update-license
-  # check license-statement.txt for sanity
-  cp license-statement.txt COPYING
-
-* Update the file ChangeLog with " * tagging version x.y.x"
-
-* Update doc/download.dox
-
-* Update the Chagelog in doxygen
-
-* Commit :
-  git commit -a -m "YARP 2.3.21"
-
-* Tag:
-  git tag -a -m "YARP release 2.3.21" v2.3.21 HEAD
-
-* Further checks :
-  git log --oneline --graph --decorate origin/master...HEAD
- (Check that the only commit is like "* xxxxxxx (tag: v2.3.21, HEAD, master) YARP 2.3.21)
-
-* Push your modifications
-  git push origin master
-  git push origin v2.3.21
-
-* Build source packages:
-  ./scripts/admin/make-source-package-svn yarp-2.3.21
-
-* Upload to sourceforge
-
diff --git a/scripts/admin/README_RELEASE.md b/scripts/admin/README_RELEASE.md
new file mode 100644
index 0000000..2e611f6
--- /dev/null
+++ b/scripts/admin/README_RELEASE.md
@@ -0,0 +1,141 @@
+Steps for building a YARP release
+=================================
+
+* Checkout latest `devel` branch and make sure that there are no local modifications or uncommited files:
+
+```
+  git checkout -f devel
+  git fetch origin
+  git reset --hard origin/devel
+  git status 
+```
+
+* Checkout latest `master` and make sure that there are no local modifications or uncommited files:
+
+```
+  git checkout -f master
+  git fetch origin
+  git reset --hard origin/master
+  git status 
+```
+
+* Merge `devel` into master
+
+```
+  git merge --no-ff devel
+```
+
+* Check git tags to get the current version, say `v2.3.66`.
+  Next release stable release will be `v2.3.66.1`, next feature release
+  will be `v2.3.68`.
+  Let's release `v2.3.68`.
+
+* Check regression tests
+
+* Make sure that `conf/YarpVersion.cmake` is different to the latest
+  public version, bumping up the version number if needed.
+
+  Bump `YARP_VERSION_PATCH` and make `YARP_VERSION_TWEAK` to empty for
+  feature releases.
+  Bump `YARP_VERSION_TWEAK` for stable releases.
+  
+  Ensure that the version should is the same of the tag that we are
+  going to create.
+
+* Prepare licenses
+
+```
+  rm -rf license_check
+  ./scripts/admin/update-license
+  # check license-statement.txt for sanity
+  cp license-statement.txt COPYING
+```
+
+* Ensure that the release file for the release exists in `doc/release/`
+  (for example `v2_3_68.md` for `v2.3.68`, `v2_3_66_1` for `v2.3.66.1`.
+  Update the date for the release in this file.
+  Update the list of contributors by running
+  
+```  
+  git shortlog -ens --no-merges v2.3.66..master
+```
+
+* Ensure that the release file is linked in `doc/releases.dox`
+
+* Update the file `doc/installation/installation_downloads.dox`
+
+* Commit:
+
+```
+  git commit -a -m "YARP 2.3.68"
+```
+
+* Tag:
+
+```
+  git tag -a -m "YARP 2.3.68" v2.3.68 HEAD
+```
+
+* Further checks before pushing:
+
+```
+  git log --oneline --graph --decorate origin/master...HEAD
+```
+
+ (Check that the only commit is like `* xxxxxxx (tag: v2.3.68, HEAD, master) YARP 2.3.68`)
+
+
+* Prepare for the next stable release by adding the relative file in `doc/release/` (in this example `v2_3_68_1.md)
+  and add the releative file in `doc/releases.dox` in the same "Series" above the one for the file just released.
+
+* Commit
+
+```
+git add doc/release/v2_3_68_1.md
+git add doc/releases.dox
+git commit -m "Prepare for next stable release (2.3.68.1)"
+```
+
+* Merge the changes into the `devel` branch
+
+```
+  git checkout -f devel
+  git fetch origin
+  git reset --hard origin/devel
+  git merge --no-ff master
+```
+
+* Bump `YARP_VERSION_PATCH` in `conf/YarpVersion.cmake` by one (it should be an odd number, in this example `69`).
+
+* Prepare for the next feature release by adding the relative file in `doc/release/` (in this example `v2_3_70.md)
+  and add the releative file in `doc/releases.dox` in a new same "Series" on top.
+
+* Commit
+
+```
+git add conf/YarpVersion.cmake
+git add doc/release/v2_3_70.md
+git add doc/releases.dox
+git commit -m "Prepare for next feature release (2.3.70)"
+```
+
+* Create a label on github (in https://github.com/robotology/yarp/labels) for bug fixed
+  in next stable release (`Fixed in: YARP 2.3.68.1`) and one for bug fixed in next feature release (`Fixed in: YARP 2.3.70`). Use `#fbca04` as color.
+
+* Open https://github.com/robotology/yarp/settings/branches/master, remove tick from `Include administrators` and save changes.
+
+* Push with:
+
+```
+  git push origin master
+  git push origin v2.3.68
+  git push origin devel
+```
+
+* Open https://github.com/robotology/yarp/settings/branches/master, restore tick in `Include administrators` and save changes.
+
+* Create the release on github, copying the release notes file as the release description and save as draft.
+
+* Create and upload the binary packages.
+
+* Publish the release.
diff --git a/scripts/admin/generate-cmake-options.sh b/scripts/admin/generate-cmake-options.sh
index 1f0e9a5..c6a9d9d 100755
--- a/scripts/admin/generate-cmake-options.sh
+++ b/scripts/admin/generate-cmake-options.sh
@@ -29,6 +29,7 @@ OS_TYPE=""
 echo "$2" | grep -iq "Debian\|Ubuntu"
 if [ "$?" == "0" ]; then
   OS_TYPE="linux"
+  RELEASE_CODENAME=$(lsb_release -c | awk '{print $2}')
 fi
 
 echo "$2" | grep -iq "Windows"
@@ -57,10 +58,13 @@ case $3 in
         $CMAKE_OPTIONS \
       "
       if [ "$OS_TYPE" == "linux" ]; then
-        CMAKE_OPTIONS=" \
-          $CMAKE_OPTIONS \
-          -DYARP_VALGRIND_TESTS=ON
-        "
+        # On Debian 8 there are some issues with valgrind tests
+        if [ "$RELEASE_CODENAME" != "jessie" ]; then
+          CMAKE_OPTIONS=" \
+            $CMAKE_OPTIONS \
+            -DYARP_VALGRIND_TESTS=ON
+          "
+        fi
       fi
      ;;
 esac
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cec81e1..891fc2e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -66,10 +66,8 @@ endif()
 
 
 # unmaintained stuff
-if(YARP_COMPILE_UNMAINTAINED)
-    add_subdirectory(libyarpc)
-    add_subdirectory(libyarpcxx)
-    if(YARP_COMPILE_EXECUTABLES)
-        add_subdirectory(yarpfs)
-    endif()
+add_subdirectory(libyarpc)
+add_subdirectory(libyarpcxx)
+if(YARP_COMPILE_EXECUTABLES)
+  add_subdirectory(yarpfs)
 endif()
diff --git a/src/carriers/CMakeLists.txt b/src/carriers/CMakeLists.txt
index 8a61948..b8d22db 100644
--- a/src/carriers/CMakeLists.txt
+++ b/src/carriers/CMakeLists.txt
@@ -3,10 +3,19 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 option(CREATE_OPTIONAL_CARRIERS "Compile some optional carriers" FALSE)
+
+
+
 if(CREATE_OPTIONAL_CARRIERS)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS})
+
+  # This is required until Carriers is in the impl namespace, see also #402
+  include_directories(${ACE_INCLUDE_DIRS})
+
   add_subdirectory(wire_rep_utils)
+
   include(YarpPlugin)
-  include_directories(SYSTEM ${ACE_INCLUDE_DIRS})
   YARP_BEGIN_PLUGIN_LIBRARY(yarpcar)
     add_subdirectory(human_carrier)
     add_subdirectory(mpi_carrier)
diff --git a/src/carriers/bayer_carrier/CMakeLists.txt b/src/carriers/bayer_carrier/CMakeLists.txt
index 2a35069..3fab862 100644
--- a/src/carriers/bayer_carrier/CMakeLists.txt
+++ b/src/carriers/bayer_carrier/CMakeLists.txt
@@ -7,7 +7,9 @@ include(YarpDeprecatedOption)
 yarp_deprecated_option(USE_LIBDC1394)
 
 if (COMPILE_PLUGIN_LIBRARY)
-  yarp_prepare_carrier(bayer_carrier TYPE yarp::os::BayerCarrier INCLUDE BayerCarrier.h)
+  yarp_prepare_carrier(bayer_carrier
+                       TYPE yarp::os::BayerCarrier
+                       INCLUDE BayerCarrier.h)
   yarp_install(FILES bayer.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
@@ -39,7 +41,6 @@ if (NOT SKIP_bayer_carrier)
 
   target_link_libraries(yarp_bayer YARP_OS
                                    YARP_sig
-                                   ${ACE_LIBRARIES}
                                    ${Libdc1394_LIBRARIES})
 
   yarp_install(TARGETS yarp_bayer
diff --git a/src/carriers/human_carrier/CMakeLists.txt b/src/carriers/human_carrier/CMakeLists.txt
index f7ad779..33ecb16 100644
--- a/src/carriers/human_carrier/CMakeLists.txt
+++ b/src/carriers/human_carrier/CMakeLists.txt
@@ -3,19 +3,23 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_PLUGIN_LIBRARY)
-  yarp_prepare_carrier(human_carrier TYPE HumanCarrier INCLUDE HumanCarrier.h)
+  yarp_prepare_carrier(human_carrier
+                       TYPE HumanCarrier
+                       INCLUDE HumanCarrier.h)
   yarp_install(FILES human.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
 endif()
 
 if(NOT SKIP_human_carrier)
-  find_package(YARP REQUIRED)
-  include_directories(${YARP_INCLUDE_DIRS})
-  include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-  yarp_add_plugin(yarp_human HumanCarrier.h HumanStream.h HumanCarrier.cpp HumanStream.cpp)
-  target_link_libraries(yarp_human YARP_OS YARP_sig)
-  target_link_libraries(yarp_human ${ACE_LIBRARIES})
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS})
+  yarp_add_plugin(yarp_human HumanCarrier.h
+                             HumanStream.h
+                             HumanCarrier.cpp
+                             HumanStream.cpp)
+  target_link_libraries(yarp_human YARP_OS)
   yarp_install(TARGETS yarp_human
                EXPORT YARP
                COMPONENT runtime
diff --git a/src/carriers/mjpeg_carrier/CMakeLists.txt b/src/carriers/mjpeg_carrier/CMakeLists.txt
index dda8288..fa29714 100644
--- a/src/carriers/mjpeg_carrier/CMakeLists.txt
+++ b/src/carriers/mjpeg_carrier/CMakeLists.txt
@@ -3,48 +3,53 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_PLUGIN_LIBRARY)
-  yarp_prepare_carrier(mjpeg_carrier TYPE yarp::os::MjpegCarrier INCLUDE MjpegCarrier.h)
+  yarp_prepare_carrier(mjpeg_carrier
+                       TYPE yarp::os::MjpegCarrier
+                       INCLUDE MjpegCarrier.h)
   yarp_install(FILES mjpeg.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-endif(COMPILE_PLUGIN_LIBRARY)
+endif()
 
 if(NOT SKIP_mjpeg_carrier)
-    option(MJPEG_AUTOCOMPRESS "Automatically compress/decompress images on mjpeg stream" TRUE)
-    if(MJPEG_AUTOCOMPRESS)
-        add_definitions(-DMJPEG_AUTOCOMPRESS)
-    endif()
-    find_package(YARP REQUIRED)
-    find_package(JPEG REQUIRED)
-    # on windows, a handy place to get libjpeg in compiled form is:
-    #   svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows/jpeg (for 32-bit)
-    #   svn checkout https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64/jpeg (for 64-bit)
-    include_directories(SYSTEM ${JPEG_INCLUDE_DIR})
-    include_directories(${YARP_INCLUDE_DIRS})
-    include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-    get_property(WIRE_INCLUDE_DIRS TARGET YARP_wire_rep_utils PROPERTY INCLUDE_DIRS)
-    include_directories(${WIRE_INCLUDE_DIRS})
-    yarp_add_plugin(yarp_mjpeg MjpegCarrier.h MjpegCarrier.cpp
-                    MjpegStream.h MjpegStream.cpp
-                    MjpegDecompression.h MjpegDecompression.cpp
-                    ${JPEG_SOURCES})
-    target_link_libraries(yarp_mjpeg YARP_wire_rep_utils)
-    target_link_libraries(yarp_mjpeg YARP_OS YARP_sig)
-    target_link_libraries(yarp_mjpeg ${ACE_LIBRARIES})
-    target_link_libraries(yarp_mjpeg ${JPEG_LIBRARY})
-
-    yarp_install(TARGETS yarp_mjpeg
-                 EXPORT YARP
-                 COMPONENT runtime
-                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
-                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-if(YARP_COMPILE_TESTS)
+  option(MJPEG_AUTOCOMPRESS "Automatically compress/decompress images on mjpeg stream" TRUE)
+  if(MJPEG_AUTOCOMPRESS)
+    add_definitions(-DMJPEG_AUTOCOMPRESS)
+  endif()
+
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_wire_rep_utils_INCLUDE_DIRS TARGET YARP_wire_rep_utils PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_wire_rep_utils_INCLUDE_DIRS})
+
+  include_directories(SYSTEM ${JPEG_INCLUDE_DIR})
+
+  yarp_add_plugin(yarp_mjpeg
+                  MjpegCarrier.h
+                  MjpegCarrier.cpp
+                  MjpegStream.h
+                  MjpegStream.cpp
+                  MjpegDecompression.h
+                  MjpegDecompression.cpp)
+  target_link_libraries(yarp_mjpeg YARP_OS
+                                   YARP_sig
+                                   YARP_wire_rep_utils
+                                   ${JPEG_LIBRARY})
+
+  yarp_install(TARGETS yarp_mjpeg
+               EXPORT YARP
+               COMPONENT runtime
+               LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+               ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
+
+  if(YARP_COMPILE_TESTS)
     add_executable(test_mjpeg test_mjpeg.cpp
                               MjpegDecompression.cpp)
     target_link_libraries(test_mjpeg YARP_OS YARP_sig YARP_init)
-    target_link_libraries(test_mjpeg ${ACE_LIBRARIES})
     target_link_libraries(test_mjpeg ${JPEG_LIBRARY})
-endif(YARP_COMPILE_TESTS)
+  endif()
 
-endif (NOT SKIP_mjpeg_carrier)
+endif()
diff --git a/src/carriers/mpi_carrier/CMakeLists.txt b/src/carriers/mpi_carrier/CMakeLists.txt
index ba5b077..e46027a 100644
--- a/src/carriers/mpi_carrier/CMakeLists.txt
+++ b/src/carriers/mpi_carrier/CMakeLists.txt
@@ -3,27 +3,27 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_PLUGIN_LIBRARY)
-  yarp_prepare_carrier(mpi_carrier TYPE yarp::os::MpiP2PCarrier INCLUDE include/yarp/os/MpiP2PCarrier.h)
+  yarp_prepare_carrier(mpi_carrier
+                       TYPE yarp::os::MpiP2PCarrier
+                       INCLUDE include/yarp/os/MpiP2PCarrier.h)
   yarp_install(FILES mpi.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-endif(COMPILE_PLUGIN_LIBRARY)
+endif()
+
+cmake_dependent_option(MPI_DEBUG_MSG "Turn on status messages for MPI Carrier" OFF
+                       "NOT SKIP_mpi_carrier OR NOT SKIP_mpibcast_carrier" OFF)
+if(MPI_DEBUG_MSG)
+  add_definitions(-DMPI_DEBUG)
+endif(MPI_DEBUG_MSG)
 
 if(NOT SKIP_mpi_carrier)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS})
+  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
-  find_package(MPI REQUIRED)
   include_directories(SYSTEM ${MPI_INCLUDE_PATH})
-  add_definitions(-DCREATE_MPI_CARRIER)
 
-  # include print statements for debugging purpose
-  option(MPI_DEBUG_MSG "Turn on status messages for MPI Carrier" OFF)
-  if(MPI_DEBUG_MSG)
-    add_definitions(-DMPI_DEBUG)
-  endif(MPI_DEBUG_MSG)
-
-  find_package(YARP REQUIRED)
-  include_directories(${YARP_INCLUDE_DIRS})
-  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
   yarp_add_plugin(yarp_mpi src/MpiCarrier.cpp
                            src/MpiComm.cpp
                            src/MpiStream.cpp
@@ -32,39 +32,30 @@ if(NOT SKIP_mpi_carrier)
                            include/yarp/os/MpiP2PCarrier.h
                            include/yarp/os/MpiStream.h
                            include/yarp/os/MpiP2PStream.h
-                           include/yarp/os/MpiComm.h
-  )
-  target_link_libraries(yarp_mpi YARP_OS YARP_sig)
-  target_link_libraries(yarp_mpi ${ACE_LIBRARIES})
-  target_link_libraries(yarp_mpi ${MPI_LIBRARIES})
+                           include/yarp/os/MpiComm.h)
+  target_link_libraries(yarp_mpi YARP_OS
+                                 ${MPI_LIBRARIES})
   yarp_install(TARGETS yarp_mpi
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-endif(NOT SKIP_mpi_carrier)
+endif()
 
 
 if(COMPILE_PLUGIN_LIBRARY)
-  yarp_prepare_carrier(mpibcast_carrier TYPE yarp::os::MpiBcastCarrier INCLUDE include/yarp/os/MpiBcastCarrier.h)
+  yarp_prepare_carrier(mpibcast_carrier
+                       TYPE yarp::os::MpiBcastCarrier
+                       INCLUDE include/yarp/os/MpiBcastCarrier.h)
 endif(COMPILE_PLUGIN_LIBRARY)
 
 if(NOT SKIP_mpibcast_carrier)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS})
+  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
-  find_package(MPI REQUIRED)
   include_directories(SYSTEM ${MPI_INCLUDE_PATH})
-  add_definitions(-DCREATE_MPI_CARRIER)
-
-  # include print statements for debugging purpose
-  option(MPI_DEBUG_MSG "Turn on status messages for MPI Carrier" OFF)
-  if(MPI_DEBUG_MSG)
-    add_definitions(-DMPI_DEBUG)
-  endif(MPI_DEBUG_MSG)
 
-  find_package(YARP REQUIRED)
-  include_directories(${YARP_INCLUDE_DIRS})
-  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
   yarp_add_plugin(yarp_mpibcast src/MpiCarrier.cpp
                                 src/MpiBcastCarrier.cpp
                                 src/MpiComm.cpp
@@ -74,15 +65,12 @@ if(NOT SKIP_mpibcast_carrier)
                                 include/yarp/os/MpiBcastCarrier.h
                                 include/yarp/os/MpiStream.h
                                 include/yarp/os/MpiBcastStream.h
-                                include/yarp/os/MpiComm.h
-  )
-  target_link_libraries(yarp_mpibcast YARP_OS YARP_sig)
-  target_link_libraries(yarp_mpibcast ${ACE_LIBRARIES})
-  target_link_libraries(yarp_mpibcast ${MPI_LIBRARIES})
+                                include/yarp/os/MpiComm.h)
+  target_link_libraries(yarp_mpibcast YARP_OS
+                                      ${MPI_LIBRARIES})
   yarp_install(TARGETS yarp_mpibcast
                COMPONENT runtime
                EXPORT YARP
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-endif(NOT SKIP_mpibcast_carrier)
+endif()
diff --git a/src/carriers/mpi_carrier/mpi.ini b/src/carriers/mpi_carrier/mpi.ini
index b7e97a8..2518cc7 100644
--- a/src/carriers/mpi_carrier/mpi.ini
+++ b/src/carriers/mpi_carrier/mpi.ini
@@ -9,5 +9,5 @@ code "MPI_____"
 type carrier
 name bcast
 library yarp_mpibcast
-part bcast_carrier
+part mpibcast_carrier
 code "MPIBCAST"
diff --git a/src/carriers/mpi_carrier/src/MpiBcastCarrier.cpp b/src/carriers/mpi_carrier/src/MpiBcastCarrier.cpp
index 1ba158d..176ace7 100644
--- a/src/carriers/mpi_carrier/src/MpiBcastCarrier.cpp
+++ b/src/carriers/mpi_carrier/src/MpiBcastCarrier.cpp
@@ -5,8 +5,6 @@
  *
  */
 
-#ifdef CREATE_MPI_CARRIER
-
 #include <yarp/os/MpiBcastCarrier.h>
 #include <yarp/os/Network.h>
 #include <yarp/os/Log.h>
@@ -107,5 +105,3 @@ bool MpiBcastCarrier::isActive() {
 /*
  * ----------------------------
  */
-
-#endif
diff --git a/src/carriers/mpi_carrier/src/MpiBcastStream.cpp b/src/carriers/mpi_carrier/src/MpiBcastStream.cpp
index 0ac22d4..b730433 100644
--- a/src/carriers/mpi_carrier/src/MpiBcastStream.cpp
+++ b/src/carriers/mpi_carrier/src/MpiBcastStream.cpp
@@ -5,8 +5,6 @@
  *
  */
 
-#ifdef CREATE_MPI_CARRIER
-
 #include <yarp/os/MpiBcastStream.h>
 
 using namespace yarp::os;
@@ -122,6 +120,3 @@ void MpiBcastStream::write(const Bytes& b) {
     printf("[MpiBcastStream @ %s] done writing\n", name.c_str());
     #endif
 }
-
-
-#endif
diff --git a/src/carriers/mpi_carrier/src/MpiCarrier.cpp b/src/carriers/mpi_carrier/src/MpiCarrier.cpp
index 81deb78..8d12cdc 100644
--- a/src/carriers/mpi_carrier/src/MpiCarrier.cpp
+++ b/src/carriers/mpi_carrier/src/MpiCarrier.cpp
@@ -5,8 +5,6 @@
  *
  */
 
-#ifdef CREATE_MPI_CARRIER
-
 #include <yarp/os/MpiCarrier.h>
 #include <yarp/os/Route.h>
 #include <sys/types.h>
@@ -36,7 +34,7 @@ void  MpiCarrier::getHeader(const Bytes& header) {
     }
 }
 
- bool MpiCarrier::checkHeader(const Bytes& header) {
+bool MpiCarrier::checkHeader(const Bytes& header) {
     if (header.length()!=8) {
         return false;
     }
@@ -48,7 +46,7 @@ void  MpiCarrier::getHeader(const Bytes& header) {
     return true;
 }
 
- bool MpiCarrier::sendHeader(ConnectionState& proto) {
+bool MpiCarrier::sendHeader(ConnectionState& proto) {
     // Send the "magic number" for this carrier
     ManagedBytes header(8);
     getHeader(header.bytes());
@@ -102,7 +100,7 @@ void  MpiCarrier::getHeader(const Bytes& header) {
 
 
 
- bool MpiCarrier::expectSenderSpecifier(ConnectionState& proto) {
+bool MpiCarrier::expectSenderSpecifier(ConnectionState& proto) {
     // interpret everything that sendHeader wrote
     name = proto.getRoute().getToName();
 
@@ -132,7 +130,7 @@ void  MpiCarrier::getHeader(const Bytes& header) {
     return notLocal && proto.is().isOk();
 }
 
- bool MpiCarrier::respondToHeader(ConnectionState& proto) {
+bool MpiCarrier::respondToHeader(ConnectionState& proto) {
     // SWITCH TO NEW STREAM TYPE
     #ifdef MPI_DEBUG
     printf("[MpiCarrier @ %s] trying to connect to MpiPort '%s'\n", route.c_str(), port.c_str());
@@ -151,7 +149,7 @@ void  MpiCarrier::getHeader(const Bytes& header) {
     return proto.is().isOk();
 }
 
- bool MpiCarrier::expectReplyToHeader(ConnectionState& proto) {
+bool MpiCarrier::expectReplyToHeader(ConnectionState& proto) {
     // SWITCH TO NEW STREAM TYPE
     if (!comm->accept()) {
         delete stream;
@@ -165,13 +163,3 @@ void  MpiCarrier::getHeader(const Bytes& header) {
 
     return proto.os().isOk();
 }
-
-
-#else
-
-extern "C" int MpiCarrierStatus() {
-    return 0;
-}
-
-
-#endif
diff --git a/src/carriers/mpi_carrier/src/MpiP2PStream.cpp b/src/carriers/mpi_carrier/src/MpiP2PStream.cpp
index 23b75d4..f7ba717 100644
--- a/src/carriers/mpi_carrier/src/MpiP2PStream.cpp
+++ b/src/carriers/mpi_carrier/src/MpiP2PStream.cpp
@@ -5,8 +5,6 @@
  *
  */
 
-#ifdef CREATE_MPI_CARRIER
-
 #include <yarp/os/MpiP2PStream.h>
 
 using namespace yarp::os;
@@ -94,6 +92,3 @@ void MpiP2PStream::write(const Bytes& b) {
         Time::yield();
     }
 }
-
-
-#endif
diff --git a/src/carriers/mpi_carrier/src/MpiStream.cpp b/src/carriers/mpi_carrier/src/MpiStream.cpp
index 0dfee5e..1b0f157 100644
--- a/src/carriers/mpi_carrier/src/MpiStream.cpp
+++ b/src/carriers/mpi_carrier/src/MpiStream.cpp
@@ -5,8 +5,6 @@
  *
  */
 
-#ifdef CREATE_MPI_CARRIER
-
 #include <yarp/os/MpiStream.h>
 #include <yarp/os/Log.h>
 
@@ -70,13 +68,3 @@ void MpiStream::beginPacket() {
 void MpiStream::endPacket() {
      // nothing to do
 }
-
-
-
-#else
-
-extern "C" int MpiStreamStatus() {
-    return 0;
-}
-
-#endif
diff --git a/src/carriers/portmonitor_carrier/CMakeLists.txt b/src/carriers/portmonitor_carrier/CMakeLists.txt
index facf31f..b85e3f9 100644
--- a/src/carriers/portmonitor_carrier/CMakeLists.txt
+++ b/src/carriers/portmonitor_carrier/CMakeLists.txt
@@ -3,7 +3,9 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if (COMPILE_PLUGIN_LIBRARY)
-  yarp_prepare_carrier(portmonitor_carrier TYPE yarp::os::PortMonitor INCLUDE PortMonitor.h)
+  yarp_prepare_carrier(portmonitor_carrier
+                       TYPE yarp::os::PortMonitor
+                       INCLUDE PortMonitor.h)
   yarp_install(FILES portmonitor.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
@@ -19,8 +21,8 @@ if (NOT SKIP_portmonitor_carrier)
     add_definitions(" -DENABLED_PORTMONITOR_LUA")
   endif()
 
-  include_directories(${YARP_INCLUDE_DIRS}                      
-                      ${CMAKE_CURRENT_SOURCE_DIR}/dll)  
+  include_directories(${YARP_INCLUDE_DIRS}
+                      ${CMAKE_CURRENT_SOURCE_DIR}/dll)
   yarp_add_plugin(yarp_portmonitor
                   PortMonitor.h
                   MonitorBinding.h
diff --git a/src/carriers/priority_carrier/CMakeLists.txt b/src/carriers/priority_carrier/CMakeLists.txt
index 71883d5..374394d 100644
--- a/src/carriers/priority_carrier/CMakeLists.txt
+++ b/src/carriers/priority_carrier/CMakeLists.txt
@@ -2,32 +2,37 @@
 # Authors: Ali Paikan and Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-if (COMPILE_PLUGIN_LIBRARY)
-  yarp_prepare_carrier(priority_carrier TYPE yarp::os::PriorityCarrier INCLUDE PriorityCarrier.h)
+if(COMPILE_PLUGIN_LIBRARY)
+  yarp_prepare_carrier(priority_carrier
+                       TYPE yarp::os::PriorityCarrier
+                       INCLUDE PriorityCarrier.h)
   yarp_install(FILES priority.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-endif (COMPILE_PLUGIN_LIBRARY)
+endif()
 
-if (NOT SKIP_priority_carrier)
-
-  find_package(YARP REQUIRED)
-  include_directories(${YARP_INCLUDE_DIRS})
-
-  yarp_add_plugin(yarp_priority PriorityCarrier.h PriorityCarrier.cpp)
+if(NOT SKIP_priority_carrier)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS})
+  if(CREATE_LIB_MATH)
+    get_property(YARP_math_INCLUDE_DIRS TARGET YARP_math PROPERTY INCLUDE_DIRS)
+    include_directories(${YARP_math_INCLUDE_DIRS})
+    add_definitions(-DWITH_YARPMATH)
+  endif()
 
+  yarp_add_plugin(yarp_priority PriorityCarrier.h
+                                PriorityCarrier.cpp)
+  target_link_libraries(yarp_priority YARP_OS
+                                      YARP_sig)
   if(CREATE_LIB_MATH)
-    ADD_DEFINITIONS( -DWITH_YARPMATH )
-    target_link_libraries(yarp_priority YARP_OS YARP_sig YARP_math)
-  else(CREATE_LIB_MATH)
-     target_link_libraries(yarp_priority YARP_OS YARP_sig)
-  endif(CREATE_LIB_MATH)
+     target_link_libraries(yarp_priority YARP_math)
+  endif()
 
-  target_link_libraries(yarp_priority ${ACE_LIBRARIES})
   yarp_install(TARGETS yarp_priority
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-endif ()
+endif()
diff --git a/src/carriers/tcpros_carrier/CMakeLists.txt b/src/carriers/tcpros_carrier/CMakeLists.txt
index 9f9b848..29f21f4 100644
--- a/src/carriers/tcpros_carrier/CMakeLists.txt
+++ b/src/carriers/tcpros_carrier/CMakeLists.txt
@@ -2,29 +2,39 @@
 # Authors: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-if (COMPILE_PLUGIN_LIBRARY)
-  yarp_prepare_carrier(tcpros_carrier TYPE yarp::os::TcpRosCarrier INCLUDE TcpRosCarrier.h)
-  yarp_prepare_carrier(rossrv_carrier TYPE yarp::os::RosSrvCarrier INCLUDE TcpRosCarrier.h)
+if(COMPILE_PLUGIN_LIBRARY)
+  yarp_prepare_carrier(tcpros_carrier
+                       TYPE yarp::os::TcpRosCarrier
+                       INCLUDE TcpRosCarrier.h)
+  yarp_prepare_carrier(rossrv_carrier
+                       TYPE yarp::os::RosSrvCarrier
+                       INCLUDE TcpRosCarrier.h)
   yarp_install(FILES ros.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-endif (COMPILE_PLUGIN_LIBRARY)
+endif()
 
-if (NOT SKIP_tcpros_carrier)
-  find_package(YARP REQUIRED)
-  include_directories(${YARP_INCLUDE_DIRS})
-  include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-  get_property(WIRE_INCLUDE_DIRS TARGET YARP_wire_rep_utils PROPERTY INCLUDE_DIRS)
-  include_directories(${WIRE_INCLUDE_DIRS})
+if(NOT SKIP_tcpros_carrier)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_wire_rep_utils_INCLUDE_DIRS TARGET YARP_wire_rep_utils PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_wire_rep_utils_INCLUDE_DIRS})
   yarp_add_plugin(yarp_tcpros
-                  TcpRosCarrier.h TcpRosCarrier.cpp
-                  TcpRosStream.h TcpRosStream.cpp
-                  RosHeader.h RosHeader.cpp
+                  TcpRosCarrier.h
+                  TcpRosCarrier.cpp
+                  TcpRosStream.h
+                  TcpRosStream.cpp
+                  RosHeader.h
+                  RosHeader.cpp
                   RosSlave.h
-                  RosLookup.h RosLookup.cpp)
-  target_link_libraries(yarp_tcpros YARP_wire_rep_utils)
-  target_link_libraries(yarp_tcpros YARP_OS YARP_sig)
-  target_link_libraries(yarp_tcpros ${ACE_LIBRARIES})
+                  RosLookup.h
+                  RosLookup.cpp)
+  target_link_libraries(yarp_tcpros YARP_OS
+                                    YARP_sig
+                                    YARP_wire_rep_utils)
   yarp_install(TARGETS yarp_tcpros
                EXPORT YARP
                COMPONENT runtime
@@ -34,8 +44,11 @@ if (NOT SKIP_tcpros_carrier)
   add_executable(yarpros yarpros.cpp
                          TcpRosStream.cpp
                          RosLookup.cpp)
-  target_link_libraries(yarpros YARP_wire_rep_utils)
-  target_link_libraries(yarpros YARP_OS YARP_init)
-  target_link_libraries(yarpros ${ACE_LIBRARIES})
-  install(TARGETS yarpros COMPONENT utilities DESTINATION ${CMAKE_INSTALL_BINDIR})
-endif (NOT SKIP_tcpros_carrier)
+  target_link_libraries(yarpros YARP_OS
+                                YARP_init
+                                YARP_wire_rep_utils)
+  install(TARGETS yarpros
+          EXPORT YARP
+          COMPONENT utilities
+          DESTINATION ${CMAKE_INSTALL_BINDIR})
+endif()
diff --git a/src/carriers/xmlrpc_carrier/CMakeLists.txt b/src/carriers/xmlrpc_carrier/CMakeLists.txt
index 997d37f..e332802 100644
--- a/src/carriers/xmlrpc_carrier/CMakeLists.txt
+++ b/src/carriers/xmlrpc_carrier/CMakeLists.txt
@@ -2,18 +2,20 @@
 # Authors: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-if (COMPILE_PLUGIN_LIBRARY)
-  yarp_prepare_carrier(xmlrpc_carrier TYPE yarp::os::XmlRpcCarrier INCLUDE XmlRpcCarrier.h)
+if(COMPILE_PLUGIN_LIBRARY)
+  yarp_prepare_carrier(xmlrpc_carrier
+                       TYPE yarp::os::XmlRpcCarrier
+                       INCLUDE XmlRpcCarrier.h)
   yarp_install(FILES xmlrpc.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-endif (COMPILE_PLUGIN_LIBRARY)
+endif()
 
-if (NOT SKIP_xmlrpc_carrier)
-  find_package(YARP REQUIRED)
-  include_directories(${YARP_INCLUDE_DIRS})
-  include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+if(NOT SKIP_xmlrpc_carrier)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
   include_directories(${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS})
 
   check_cxx_compiler_flag("-Wformat-nonliteral" CXX_HAS_WFORMAT_NONLITERAL)
   if(CXX_HAS_WFORMAT_NONLITERAL)
@@ -21,8 +23,10 @@ if (NOT SKIP_xmlrpc_carrier)
   endif()
 
   yarp_add_plugin(yarp_xmlrpc
-                  XmlRpcCarrier.h XmlRpcCarrier.cpp
-                  XmlRpcStream.h XmlRpcStream.cpp
+                  XmlRpcCarrier.h
+                  XmlRpcCarrier.cpp
+                  XmlRpcStream.h
+                  XmlRpcStream.cpp
                   xmlrpc/XmlRpcClient.cpp
                   xmlrpc/XmlRpcServer.cpp
                   xmlrpc/XmlRpcServerConnection.cpp
@@ -30,11 +34,10 @@ if (NOT SKIP_xmlrpc_carrier)
                   xmlrpc/XmlRpcSource.cpp
                   xmlrpc/XmlRpcUtil.cpp
                   xmlrpc/XmlRpcValue.cpp)
-  target_link_libraries(yarp_xmlrpc YARP_OS YARP_sig)
-  target_link_libraries(yarp_xmlrpc ${ACE_LIBRARIES})
+  target_link_libraries(yarp_xmlrpc YARP_OS)
   yarp_install(TARGETS yarp_xmlrpc
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-endif (NOT SKIP_xmlrpc_carrier)
+endif()
diff --git a/src/carriers/xmlrpc_carrier/xmlrpc/XmlRpcValue.cpp b/src/carriers/xmlrpc_carrier/xmlrpc/XmlRpcValue.cpp
index 7efb039..2e176a6 100644
--- a/src/carriers/xmlrpc_carrier/xmlrpc/XmlRpcValue.cpp
+++ b/src/carriers/xmlrpc_carrier/xmlrpc/XmlRpcValue.cpp
@@ -148,7 +148,7 @@ namespace YarpXmlRpc {
   // Predicate for tm equality
   static bool tmEq(struct tm const& t1, struct tm const& t2) {
     return t1.tm_sec == t2.tm_sec && t1.tm_min == t2.tm_min &&
-            t1.tm_hour == t2.tm_hour && t1.tm_mday == t1.tm_mday &&
+            t1.tm_hour == t2.tm_hour && t1.tm_mday == t2.tm_mday &&
             t1.tm_mon == t2.tm_mon && t1.tm_year == t2.tm_year;
   }
 
diff --git a/src/idls/rosmsg/src/RosType.cpp b/src/idls/rosmsg/src/RosType.cpp
index a4229ac..ebab225 100644
--- a/src/idls/rosmsg/src/RosType.cpp
+++ b/src/idls/rosmsg/src/RosType.cpp
@@ -135,7 +135,7 @@ bool RosType::read(const char *tname, RosTypeSearch& env, RosTypeCodeGen& gen,
         indent += "  ";
     }
     if (nesting>0) env.lookForService(false); // no srv nesting allowed in ros
-    //printf("Checking %s\n", tname);
+    printf("[type]%s Checking %s\n", indent.c_str(), tname);
     clear();
 
     std::string base = tname;
@@ -318,7 +318,10 @@ bool RosType::read(const char *tname, RosTypeSearch& env, RosTypeCodeGen& gen,
         }
     }
 
-    cursor->isValid = ok;
+    isValid = ok;
+    if (!isValid) {
+        fprintf(stderr, "[type]%s Check failed: %s\n", indent.c_str(), tname);
+    }
     return isValid;
 }
 
@@ -524,7 +527,7 @@ std::string RosTypeSearch::readFile(const char *fname) {
 bool RosTypeSearch::fetchFromRos(const std::string& target_file,
                                  const std::string& type_name,
                                  bool find_service) {
-    std::string cmd = std::string(find_service?"rossrv":"rosmsg") + " show -r "+type_name+" > " + target_file + " || rm -f " + type_name;
+    std::string cmd = std::string(find_service?"rossrv":"rosmsg") + " show -r "+type_name+" | install -D /dev/stdin " + target_file + " || rm -f " + type_name;
     if (verbose) {
         fprintf(stderr,"[ros]  %s\n", cmd.c_str());
     }
@@ -714,7 +717,10 @@ std::string RosTypeSearch::findFile(const char *tname) {
 
     // File not found. abort if needed
     if (abort_on_error) {
+        fprintf(stderr, "[type] %s not found. Aborting\n", tname);
         exit(1);
+    } else {
+        fprintf(stderr, "[type] %s not found. Continuing\n", tname);
     }
 
     return std::string();
diff --git a/src/idls/rosmsg/tests/CMakeLists.txt b/src/idls/rosmsg/tests/CMakeLists.txt
index bfad990..e5ecdc1 100644
--- a/src/idls/rosmsg/tests/CMakeLists.txt
+++ b/src/idls/rosmsg/tests/CMakeLists.txt
@@ -13,7 +13,7 @@ macro(add_config_test name dir)
   set(bin_dir ${CMAKE_CURRENT_BINARY_DIR}/make/${dir})
   file(MAKE_DIRECTORY ${bin_dir})
   add_test(NAME ${name} WORKING_DIRECTORY ${bin_dir}
-    COMMAND ${CMAKE_COMMAND} -DALLOW_IDL_GENERATION=TRUE -DYARP_DIR=${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${dir} )
+    COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DALLOW_IDL_GENERATION=TRUE -DYARP_DIR=${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${dir} )
 endmacro()
 
 macro(add_make_test name dir)
diff --git a/src/idls/thrift/tests/CMakeLists.txt b/src/idls/thrift/tests/CMakeLists.txt
index c88ad8e..a1b5bcf 100644
--- a/src/idls/thrift/tests/CMakeLists.txt
+++ b/src/idls/thrift/tests/CMakeLists.txt
@@ -13,7 +13,7 @@ macro(add_config_test name dir)
   set(bin_dir ${CMAKE_CURRENT_BINARY_DIR}/make/${dir})
   file(MAKE_DIRECTORY ${bin_dir})
   add_test(NAME ${name} WORKING_DIRECTORY ${bin_dir}
-    COMMAND ${CMAKE_COMMAND} -DALLOW_IDL_GENERATION=TRUE -DYARP_DIR=${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${dir} )
+    COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DALLOW_IDL_GENERATION=TRUE -DYARP_DIR=${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${dir} )
 endmacro()
 
 macro(add_make_test name dir)
diff --git a/src/libYARP_OS/include/yarp/os/Contactable.h b/src/libYARP_OS/include/yarp/os/Contactable.h
index 939cfc9..5f3bbe5 100644
--- a/src/libYARP_OS/include/yarp/os/Contactable.h
+++ b/src/libYARP_OS/include/yarp/os/Contactable.h
@@ -129,38 +129,39 @@ public:
 
 
     /**
-     * Every message sent by a port can have some information added
-     * to it called an envelope (this could be a timestamp, for example).
-     * You can set that envelope with this method.
+     * Set an envelope (e.g., a timestamp) to the next message which will be
+     * sent.
+     *
+     * You must be sure to match the type of your envelope for setEnvelope with
+     * whatever will be read using getEnvelope. The Stamp class is a typical
+     * choice for timestamps. The Bottle class also works as an envelope, but it
+     * is not specialized to be efficient.
      *
      * Currently, for proper operation, the envelope must serialize
      * correctly in text-mode (even if you do not explicitly use
-     * text-mode connections).  The Bottle or Stamp class are good
-     * choices.
+     * text-mode connections). Bottle or Stamp are good choices.
      *
-     * @param envelope some information to add to the next message sent
+     * @param envelope information to add to the next message which will be sent
      *
-     * @return true iff write was successful
+     * @return true iff setting the envelope was successful
      *
      */
     virtual bool setEnvelope(PortWriter& envelope) = 0;
 
 
     /**
-     * Every message sent by a port can have some information added to
-     * it called an envelope (this could be a timestamp, for example).
-     * If a port has received a message with such information, you can
-     * extract that envelope with this method.
+     * Get the envelope information (e.g., a timestamp) from the last message
+     * received on the port.
      *
-     * You must be sure to match the type of your envelope for
-     * getEnvelope with whatever is being sent using setEnvelope.
-     * The Bottle class can read any kind of envelope (but is
-     * not specialized to be efficient).
+     * You must be sure to match the type of your envelope for getEnvelope with
+     * whatever is being sent using setEnvelope. The Stamp class is a typical
+     * choice for timestamps. The Bottle class also works as an envelope, but it
+     * is not specialized to be efficient.
      *
      * @param envelope recipient for envelope information for last
      * message received by port.
      *
-     * @return true iff read was successful
+     * @return true iff reading the envelope was successful
      *
      */
     virtual bool getEnvelope(PortReader& envelope) = 0;
diff --git a/src/libYARP_OS/include/yarp/os/OutputProtocol.h b/src/libYARP_OS/include/yarp/os/OutputProtocol.h
index 9094f33..6665620 100644
--- a/src/libYARP_OS/include/yarp/os/OutputProtocol.h
+++ b/src/libYARP_OS/include/yarp/os/OutputProtocol.h
@@ -41,7 +41,7 @@ public:
 
     /**
      * Relabel the route after the fact (e.g. if the direction
-     * of initiative switches and the route essentially 
+     * of initiative switches and the route essentially
      * reverses)
      */
     virtual void rename(const Route& route) = 0;
@@ -103,7 +103,7 @@ public:
 
     virtual void interrupt() = 0;
 
-    
+
     /**
      *
      * Get an interface for doing read operations on the connection.
@@ -140,7 +140,7 @@ public:
      *
      */
     virtual void attachPort(Contactable *port) = 0;
-    
+
     /**
      *
      * Notify connection that we intend to write to it.
diff --git a/src/libYARP_OS/include/yarp/os/RFModule.h b/src/libYARP_OS/include/yarp/os/RFModule.h
index 4e0bff7..9c233d8 100644
--- a/src/libYARP_OS/include/yarp/os/RFModule.h
+++ b/src/libYARP_OS/include/yarp/os/RFModule.h
@@ -61,16 +61,19 @@ public:
      *
      * Make sure you first configure your module by calling the configure()
      * function. updateModule() is then called every getPeriod()
-     * seconds.  During execution of updateModule() the following methods may be executed 
-     * asynchronously:
-     *  - respond(): this is called if there is input from the standard input or a message
-     *               from an input port connected to the module via attach().
-     *  - interruptModule(): this method is called by the handlers of  the following signals: 
-     *               SIGINT, SIGTERM and SIGBREAK (WIN32). Interrupt is a good place to execute
-     *               code that unblocks pending reads (i.e. blocking reads on port).
-     * 
-     * After the last iteration of updateModule() the function close() is executed. 
-     * 
+     * seconds.  During execution of updateModule() the following methods may be
+     * executed asynchronously:
+     *  - respond(): this is called if there is input from the standard input or
+     *               a message from an input port connected to the module via
+     *               attach().
+     *  - interruptModule(): this method is called by the handlers of  the
+     *               following signals: SIGINT, SIGTERM and SIGBREAK (WIN32).
+     *               Interrupt is a good place to execute code that unblocks
+     *               pending reads (i.e. blocking reads on port).
+     *
+     * After the last iteration of updateModule() the function close() is
+     * executed.
+     *
      * @return 0 on success
      *
      * \note attachTerminal() is no longer called automatically.
@@ -78,7 +81,7 @@ public:
     virtual int runModule();
 
     /**
-     * Simple helper method to call configure() and then runModule(). 
+     * Simple helper method to call configure() and then runModule().
      * See documentation of configure() and runModule() for more details.
      *
      * @param rf a previously initialized ResourceFinder
@@ -88,11 +91,12 @@ public:
 
     /**
      * Configure the module, pass a ResourceFinder object to the module.
-     * This function can perform initialization including object creation and 
+     * This function can perform initialization including object creation and
      * memory allocation; returns false to notify that initialization was not
-     * successful and that the module should not start. Cleanup should be performed
-     * by the function close(). In case of failure during the initialization and before
-     * returning false, the function configure() should cleanup memory and resources allocated.
+     * successful and that the module should not start. Cleanup should be
+     * performed by the function close(). In case of failure during the
+     * initialization and before returning false, the function configure()
+     * should cleanup memory and resources allocated.
      *
      * @param rf a previously initialized ResourceFinder
      * @return true/false upon success/failure
@@ -164,17 +168,19 @@ public:
      * Close function.
      *
      * This is called automatically when the module closes, after the last call
-     * to updateModule. Override this to cleanup memory allocated in the configure() 
-     * function or perform other activities that ensure graceful shutdown.
+     * to updateModule. Override this to cleanup memory allocated in the
+     * configure() function or perform other activities that ensure graceful
+     * shutdown.
      *
      * @return true/false on success failure.
      */
     virtual bool close();
 
     /**
-     * Ask the module to stop. Called automatically by signal handlers or when a quit message
-     * is received by the respond() (by the console or by a port if attached). It raises an internal flag 
-     * that notifies the module to stop executing updateModule() and then calls interruptModule().
+     * Ask the module to stop. Called automatically by signal handlers or when a
+     * quit message is received by the respond() (by the console or by a port if
+     * attached). It raises an internal flag that notifies the module to stop
+     * executing updateModule() and then calls interruptModule().
      *
      * @param wait specifies if stop should block and wait termination. This is
      * not implemented yet.
diff --git a/src/libYARP_OS/include/yarp/os/Thread.h b/src/libYARP_OS/include/yarp/os/Thread.h
index 1e81bff..17ec916 100644
--- a/src/libYARP_OS/include/yarp/os/Thread.h
+++ b/src/libYARP_OS/include/yarp/os/Thread.h
@@ -193,9 +193,10 @@ public:
     static void setDefaultStackSize(int stackSize);
 
     /**
-     * Stops the execution of the current thread until either this thread
-     * has finished execution (when it returns from run()) or after \a seconds
-     * seconds.
+     * The function returns when the thread execution has completed.
+     * Stops the execution of the thread that calls this function until either
+     * the thread to join has finished execution (when it returns from run())
+     * or after \a seconds seconds.
      * @param seconds the maximum number of seconds to block the thread.
      * @return true if the thread execution is finished, false on time out.
      */
diff --git a/src/libYARP_OS/include/yarp/os/impl/Logger.h b/src/libYARP_OS/include/yarp/os/impl/Logger.h
index 497eade..0e3b72e 100644
--- a/src/libYARP_OS/include/yarp/os/impl/Logger.h
+++ b/src/libYARP_OS/include/yarp/os/impl/Logger.h
@@ -18,10 +18,10 @@
 #  include <ace/Log_Record.h>
 #  include <ace/Log_Msg_Callback.h>
 #else
-#  define LM_DEBUG -1
-#  define LM_WARNING 1
-#  define LM_INFO 2
-#  define LM_ERROR 3
+#  define LM_DEBUG      04
+#  define LM_INFO      010
+#  define LM_WARNING   040
+#  define LM_ERROR    0200
 #endif
 #include <yarp/os/impl/PlatformStdio.h>
 
@@ -174,14 +174,14 @@ public:
     }
 
 private:
-    void show(int level, const String& txt);
+    void show(unsigned YARP_INT32 level, const String& txt);
     void exit(int level);
 
     static Logger *root;
     String prefix;
     Logger *parent;
     int verbose;
-    int low;
+    unsigned YARP_INT32 low;
     long int pid;
     FILE *stream;
 };
diff --git a/src/libYARP_OS/include/yarp/os/impl/PlatformThread.h b/src/libYARP_OS/include/yarp/os/impl/PlatformThread.h
index 7f9a353..d118d5c 100644
--- a/src/libYARP_OS/include/yarp/os/impl/PlatformThread.h
+++ b/src/libYARP_OS/include/yarp/os/impl/PlatformThread.h
@@ -27,7 +27,11 @@
 #else
 #  include <pthread.h>
 #  define Platform_hthread_t pthread_t
-#  define Platform_thread_t long int
+#  if !defined(__APPLE__)
+#    define Platform_thread_t long int
+#  else
+#    define Platform_thread_t pthread_t
+#  endif
 #  define PLATFORM_THREAD_SELF() pthread_self()
 #  define PLATFORM_THREAD_RETURN void *
 #  define PLATFORM_THREAD_JOIN(x) pthread_join(x,0/*NULL*/)
diff --git a/src/libYARP_OS/include/yarp/os/impl/RunProcManager.h b/src/libYARP_OS/include/yarp/os/impl/RunProcManager.h
index 29cb0a7..632bd2b 100644
--- a/src/libYARP_OS/include/yarp/os/impl/RunProcManager.h
+++ b/src/libYARP_OS/include/yarp/os/impl/RunProcManager.h
@@ -28,15 +28,11 @@
 
 
 #if defined(WIN32)
-
 typedef DWORD PID;
 typedef HANDLE FDESC;
-
 #else
-
 #include <yarp/os/Thread.h>
-
-typedef int PID;
+typedef pid_t PID;
 typedef int FDESC;
 typedef void* HANDLE;
 
@@ -51,30 +47,41 @@ public:
         int warn_suppress = pipe(pipe_sync);
         YARP_UNUSED(warn_suppress);
     }
-   ~ZombieHunterThread(){}
+    virtual ~ZombieHunterThread(){}
 
-    void onStop()
+    virtual void onStop()
     {
         close(pipe_sync[0]);
         close(pipe_sync[1]);
     }
 
-    void run()
+    virtual void run()
     {
         char dummy[8];
 
         while (!isStopping())
         {
-            if (read(pipe_sync[0],dummy,1)<=0) break;
+
+            if (read(pipe_sync[0], dummy, sizeof(char) * 8) <= 0) {
+                //If EOF or error
+                break;
+            }
+            //else if I'm here it means a child has terminated
+            //If I call wait I can find the exit status of the child process
 
             while (true)
             {
-                PID zombie=wait(NULL);
+                //check exit status of the child
+                PID zombie = wait(NULL);
+                //PID can be:
+                // - Child stopped or terminated => PID of child
+                // - Error => -1
 
                 //PID zombie=waitpid(-1,NULL,WNOHANG);
 
-                if (zombie>0)
+                if (zombie > 0)
                 {
+                    //Remove child information from the process info table
                     yarp::os::Run::CleanZombie(zombie);
                 }
                 else
@@ -87,7 +94,7 @@ public:
 
     void sigchldHandler()
     {
-        ssize_t warn_suppress = write(pipe_sync[1],"zombie",1);
+        ssize_t warn_suppress = write(pipe_sync[1], "zombie", sizeof(char) * (strlen("zombie") + 1));
         YARP_UNUSED(warn_suppress);
     }
 
diff --git a/src/libYARP_OS/include/yarp/os/impl/SocketTwoWayStream.h b/src/libYARP_OS/include/yarp/os/impl/SocketTwoWayStream.h
index 91f36e4..14032a0 100644
--- a/src/libYARP_OS/include/yarp/os/impl/SocketTwoWayStream.h
+++ b/src/libYARP_OS/include/yarp/os/impl/SocketTwoWayStream.h
@@ -84,8 +84,6 @@ public:
             stream.close();
             YARP_DEBUG(Logger::get(),"^^^^^^^^^^^ interrupting socket fully");
         }
-        //stream.close_writer();
-        //stream.close();
     }
 
     virtual void close() {
diff --git a/src/libYARP_OS/src/AuthHMAC.cpp b/src/libYARP_OS/src/AuthHMAC.cpp
index a12104b..12e67ba 100644
--- a/src/libYARP_OS/src/AuthHMAC.cpp
+++ b/src/libYARP_OS/src/AuthHMAC.cpp
@@ -76,10 +76,10 @@ AuthHMAC::AuthHMAC() :
         return;
     }
 
-    int key_len = key.length();
+    size_t key_len = key.length();
     unsigned char * tmp = new unsigned char[key_len];
     strcpy((char*) tmp, key.c_str());
-    HMAC_INIT(&context, tmp, key_len);
+    HMAC_INIT(&context, tmp, (unsigned int)key_len);
     srand((unsigned)time(NULL));
 
     if(!authentication_enabled) {
@@ -269,5 +269,5 @@ bool AuthHMAC::check_hmac(unsigned char * mac, unsigned char * mac_check)
 
 void AuthHMAC::fill_nonce(unsigned char* nonce) {
     for (unsigned int i=0; i < NONCE_LEN; i++)
-        nonce[i] = int(rand())%256;
+        nonce[i] = static_cast<unsigned char>(rand()%256);
 }
diff --git a/src/libYARP_OS/src/Companion.cpp b/src/libYARP_OS/src/Companion.cpp
index bafa769..c322147 100644
--- a/src/libYARP_OS/src/Companion.cpp
+++ b/src/libYARP_OS/src/Companion.cpp
@@ -2312,7 +2312,6 @@ String Companion::version() {
 }
 
 
-#ifdef YARP_HAS_ACE
 static void plugin_signal_handler(int) {
    // prevent infinite recursion if say_hi() causes another segfault
     std::signal(SIGSEGV, SIG_DFL);
@@ -2384,10 +2383,8 @@ static void plugin_usage()
     printf("     yarp plugin --help\n");
     printf("\n");
 }
-#endif
 
 int Companion::cmdPlugin(int argc, char *argv[]) {
-#ifdef YARP_HAS_ACE
     if (argc<1) {
         plugin_usage();
         return 1;
@@ -2478,9 +2475,6 @@ int Companion::cmdPlugin(int argc, char *argv[]) {
         }
         return plugin_test(settings) ? 0 : 1;
     }
-#endif
-    fprintf(stderr,"Command not available without ACE\n");
-    return 1;
 }
 
 
diff --git a/src/libYARP_OS/src/DgramTwoWayStream.cpp b/src/libYARP_OS/src/DgramTwoWayStream.cpp
index 19a9b9b..0efac15 100644
--- a/src/libYARP_OS/src/DgramTwoWayStream.cpp
+++ b/src/libYARP_OS/src/DgramTwoWayStream.cpp
@@ -33,6 +33,8 @@
 #endif
 
 #include <yarp/os/Time.h>
+#include <cerrno>
+#include <cstring>
 
 using namespace yarp::os::impl;
 using namespace yarp::os;
@@ -173,6 +175,95 @@ bool DgramTwoWayStream::open(const Contact& local, const Contact& remote) {
 }
 
 void DgramTwoWayStream::allocate(int readSize, int writeSize) {
+#ifdef __APPLE__
+    //These are only as another default. We should modify the method to return bool
+    //and fail if we cannot read the socket size.
+    
+    int _read_size = READ_SIZE+CRC_SIZE;
+    int _write_size = WRITE_SIZE+CRC_SIZE;
+
+    int socketSendBufferSize = -1;
+    int socketRecvBufferSize = -1;
+
+#ifdef YARP_HAS_ACE
+    //Defaults to socket size
+    if (dgram) {
+        int len = sizeof(_read_size);
+        int result = dgram->get_option(SOL_SOCKET, SO_SNDBUF, &_write_size, &len);
+        if (result < 0) {
+            YARP_ERROR(Logger::get(), String("Failed to read buffer size from SNDBUF socket with error: ") +
+                       String(strerror(errno)));
+        }
+        socketSendBufferSize = _write_size;
+
+        result = dgram->get_option(SOL_SOCKET, SO_RCVBUF, &_read_size, &len);
+        if (result < 0) {
+            YARP_ERROR(Logger::get(), String("Failed to read buffer size from RCVBUF socket with error: ") +
+                       String(strerror(errno)));
+        }
+        socketRecvBufferSize = _read_size;
+    }
+#else
+    socklen_t len = sizeof(_read_size);
+    int result = getsockopt(dgram_sockfd, SOL_SOCKET, SO_SNDBUF, &_write_size, &len);
+    if (result < 0) {
+        YARP_ERROR(Logger::get(), String("Failed to read buffer size from SNDBUF socket with error: ") +
+                   String(strerror(errno)));
+    }
+    socketSendBufferSize = _write_size;
+
+    result = getsockopt(dgram_sockfd, SOL_SOCKET, SO_RCVBUF, &_read_size, &len);
+    if (result < 0) {
+        YARP_ERROR(Logger::get(), String("Failed to read buffer size from RCVBUF socket with error: ") +
+                   String(strerror(errno)));
+    }
+    socketRecvBufferSize = _read_size;
+#endif
+
+    ConstString _env_dgram = NetworkBase::getEnvironment("YARP_DGRAM_SIZE");
+    ConstString _env_mode = "";
+    if (multiMode) {
+        _env_mode = NetworkBase::getEnvironment("YARP_MCAST_SIZE");
+    } else {
+        _env_mode = NetworkBase::getEnvironment("YARP_UDP_SIZE");
+    }
+    if ( _env_mode!="") {
+        _env_dgram = _env_mode;
+    }
+    if (_env_dgram!="") {
+        int sz = NetType::toInt(_env_dgram);
+        if (sz!=0) {
+            _read_size = _write_size = sz;
+        }
+        YARP_INFO(Logger::get(),String("Datagram packet size set to ") +
+                  NetType::toString(_read_size));
+    }
+    if (readSize!=0) {
+        _read_size = readSize;
+        YARP_INFO(Logger::get(),String("Datagram read size reset to ") +
+                  NetType::toString(_read_size));
+    }
+    if (writeSize!=0) {
+        _write_size = writeSize;
+        YARP_INFO(Logger::get(),String("Datagram write size reset to ") +
+                  NetType::toString(_write_size));
+    }
+    readBuffer.allocate(_read_size);
+    writeBuffer.allocate(_write_size);
+    readAt = 0;
+    readAvail = 0;
+    writeAvail = CRC_SIZE;
+    //happy = true;
+    pct = 0;
+
+    if (_read_size < socketRecvBufferSize && socketRecvBufferSize != -1) {
+        YARP_WARN(Logger::get(), "RECV buffer size smaller than socket RECV size. Errors can occur during reading");
+    }
+    if (_write_size > socketSendBufferSize && socketSendBufferSize != -1) {
+        YARP_WARN(Logger::get(), "SND buffer size bigger than socket SND size. Errors can occur during writing");
+    }
+
+#else
     int _read_size = READ_SIZE+CRC_SIZE;
     int _write_size = WRITE_SIZE+CRC_SIZE;
 
@@ -211,10 +302,83 @@ void DgramTwoWayStream::allocate(int readSize, int writeSize) {
     writeAvail = CRC_SIZE;
     //happy = true;
     pct = 0;
+#endif
 }
 
 
 void DgramTwoWayStream::configureSystemBuffers() {
+#ifdef __APPLE__
+    //By default use system buffer size.
+    //These can be overwritten by environment variables
+    //Generic variable
+    ConstString socketBufferSize = NetworkBase::getEnvironment("YARP_DGRAM_BUFFER_SIZE");
+    //Specific read
+    ConstString socketReadBufferSize = NetworkBase::getEnvironment("YARP_DGRAM_RECV_BUFFER_SIZE");
+    //Specific write
+    ConstString socketSendBufferSize = NetworkBase::getEnvironment("YARP_DGRAM_SND_BUFFER_SIZE");
+
+    int readBufferSize = -1;
+    if (socketReadBufferSize != "") {
+        readBufferSize = NetType::toInt(socketReadBufferSize);
+    } else if (socketBufferSize != "") {
+        readBufferSize = NetType::toInt(socketBufferSize);
+    }
+
+    int writeBufferSize = -1;
+    if (socketSendBufferSize != "") {
+        writeBufferSize = NetType::toInt(socketSendBufferSize);
+    } else if (socketBufferSize != "") {
+        writeBufferSize = NetType::toInt(socketBufferSize);
+    }
+
+    if (readBufferSize > 0) {
+        int actualReadSize = -1;
+
+#ifdef YARP_HAS_ACE
+        int intSize = sizeof(readBufferSize);
+        int setResult = dgram->set_option(SOL_SOCKET, SO_RCVBUF,
+                                          (void*)&readBufferSize, intSize);
+
+        int getResult = dgram->get_option(SOL_SOCKET, SO_RCVBUF,
+                                          (void*)&actualReadSize, &intSize);
+#else
+        socklen_t intSize = sizeof(readBufferSize);
+        int setResult = setsockopt(dgram_sockfd, SOL_SOCKET, SO_RCVBUF,
+                                   (void*)&readBufferSize, intSize);
+        int getResult = getsockopt(dgram_sockfd, SOL_SOCKET, SO_RCVBUF,
+                                   (void *) &actualReadSize, &intSize);
+#endif
+        if (setResult < 0 || getResult < 0 || readBufferSize != actualReadSize) {
+            bufferAlertNeeded = true;
+            bufferAlerted = false;
+            YARP_WARN(Logger::get(), "Failed to set RECV socket buffer to desired size. Actual: " + NetType::toString(actualReadSize) + ", Desired: " + NetType::toString(readBufferSize));
+        }
+    }
+    if (writeBufferSize > 0) {
+        int actualWriteSize = -1;
+#ifdef YARP_HAS_ACE
+        int intSize = sizeof(writeBufferSize);
+        int setResult = dgram->set_option(SOL_SOCKET, SO_SNDBUF,
+                                          (void*)&writeBufferSize, intSize);
+        int getResult = dgram->get_option(SOL_SOCKET, SO_SNDBUF,
+                                          (void*)&actualWriteSize, &intSize);
+#else
+        socklen_t intSize = sizeof(readBufferSize);
+        int setResult = setsockopt(dgram_sockfd, SOL_SOCKET, SO_SNDBUF,
+                                   (void*)&writeBufferSize, intSize);
+        int getResult = getsockopt(dgram_sockfd, SOL_SOCKET, SO_SNDBUF,
+                                   (void *) &actualWriteSize, &intSize);
+#endif
+        if (setResult < 0 || getResult < 0 || writeBufferSize != actualWriteSize) {
+            bufferAlertNeeded = true;
+            bufferAlerted = false;
+            YARP_WARN(Logger::get(), "Failed to set SND socket buffer to desired size. Actual: " + NetType::toString(actualWriteSize) + ", Desired: " + NetType::toString(writeBufferSize));
+        }
+    }
+
+
+
+#else
     // ask for more buffer space for udp/mcast
 
     ConstString _dgram_buffer_size = NetworkBase::getEnvironment("YARP_DGRAM_BUFFER_SIZE");
@@ -228,6 +392,8 @@ void DgramTwoWayStream::configureSystemBuffers() {
 #ifdef YARP_HAS_ACE
     int result = dgram->set_option(SOL_SOCKET, SO_RCVBUF,
                                    (char *) &window_size, sizeof(window_size));
+    dgram->set_option(SOL_SOCKET, SO_SNDBUF,
+                                   (char *) &window_size, sizeof(window_size));
 #else
     int result = setsockopt(dgram_sockfd, SOL_SOCKET, SO_RCVBUF,
                             (void*) &window_size, sizeof(window_size));
@@ -250,6 +416,7 @@ void DgramTwoWayStream::configureSystemBuffers() {
     }
     YARP_DEBUG(Logger::get(),
                String("Warning: buffer size set to ")+ NetType::toString(window_size) + String(", you requested ") + NetType::toString(window_size_desired));
+#endif
 }
 
 
@@ -322,7 +489,12 @@ bool DgramTwoWayStream::openMcast(const Contact& group,
     localHandle = ACE_INET_Addr((u_short)(localAddress.getPort()),
                                 (ACE_UINT32)INADDR_ANY);
 
-    ACE_SOCK_Dgram_Mcast *dmcast = new ACE_SOCK_Dgram_Mcast;
+    ACE_SOCK_Dgram_Mcast::options mcastOptions = ACE_SOCK_Dgram_Mcast::DEFOPTS;
+#ifdef __APPLE__
+    mcastOptions = static_cast<ACE_SOCK_Dgram_Mcast::options>(ACE_SOCK_Dgram_Mcast::OPT_BINDADDR_NO | ACE_SOCK_Dgram_Mcast::DEFOPT_NULLIFACE);
+#endif
+
+    ACE_SOCK_Dgram_Mcast *dmcast = new ACE_SOCK_Dgram_Mcast(mcastOptions);
     dgram = dmcast;
     mgram = dmcast;
     yAssert(dgram!=NULL);
@@ -377,9 +549,13 @@ bool DgramTwoWayStream::join(const Contact& group, bool sender,
         //return;
     }
 
-    ACE_SOCK_Dgram_Mcast *dmcast = new ACE_SOCK_Dgram_Mcast;
 
-    //possible flags: ((ACE_SOCK_Dgram_Mcast::options)(ACE_SOCK_Dgram_Mcast::OPT_NULLIFACE_ALL | ACE_SOCK_Dgram_Mcast::OPT_BINDADDR_YES));
+    ACE_SOCK_Dgram_Mcast::options mcastOptions = ACE_SOCK_Dgram_Mcast::DEFOPTS;
+#ifdef __APPLE__
+    mcastOptions = static_cast<ACE_SOCK_Dgram_Mcast::options>(ACE_SOCK_Dgram_Mcast::OPT_BINDADDR_NO | ACE_SOCK_Dgram_Mcast::DEFOPT_NULLIFACE);
+#endif
+
+    ACE_SOCK_Dgram_Mcast *dmcast = new ACE_SOCK_Dgram_Mcast(mcastOptions);
 
     dgram = dmcast;
     mgram = dmcast;
@@ -762,9 +938,9 @@ void DgramTwoWayStream::flush() {
             } while (now-first<0.001);
         }
 
-        if (len<0) {
+        if (len < 0) {
             happy = false;
-            YARP_DEBUG(Logger::get(),"DGRAM failed to write");
+            YARP_DEBUG(Logger::get(), "DGRAM failed to send message with error: " + String(strerror(errno)));
             return;
         }
         writeAt += len;
diff --git a/src/libYARP_OS/src/Logger.cpp b/src/libYARP_OS/src/Logger.cpp
index 9ed8bd9..7b6c208 100644
--- a/src/libYARP_OS/src/Logger.cpp
+++ b/src/libYARP_OS/src/Logger.cpp
@@ -29,14 +29,14 @@ void Logger::fini() {
 }
 
 
-void Logger::show(int level, const String& txt) {
-    int inLevel = level;
+void Logger::show(unsigned YARP_INT32 level, const String& txt) {
+    unsigned YARP_INT32 inLevel = level;
     //ACE_OS::fprintf(stderr,"level %d txt %s\n", level, txt.c_str());
     if (verbose>0) {
         level = 10000;
     }
     if (verbose<0) {
-        level = -10000;
+        level = 0;
     }
     if (stream == NULL) {
         stream = stderr;
diff --git a/src/libYARP_OS/src/NameConfig.cpp b/src/libYARP_OS/src/NameConfig.cpp
index f9e4d04..76bf154 100644
--- a/src/libYARP_OS/src/NameConfig.cpp
+++ b/src/libYARP_OS/src/NameConfig.cpp
@@ -237,9 +237,10 @@ String NameConfig::getHostName(bool prefer_loopback, String seed) {
 #ifdef YARP_HAS_ACE
     ACE_INET_Addr *ips = NULL;
     size_t count = 0;
+    char hostAddress[256];
     if (ACE::get_ip_interfaces(count,ips)>=0) {
         for (size_t i=0; i<count; i++) {
-            ConstString ip = ips[i].get_host_addr();
+            ConstString ip = ips[i].get_host_addr(hostAddress, 256);
 #else
     int family, s;
     char hostname[NI_MAXHOST]; hostname[NI_MAXHOST-1] = '\0';
@@ -316,10 +317,12 @@ String NameConfig::getHostName(bool prefer_loopback, String seed) {
                 continue;
             }
         }
+    }
 #ifdef YARP_HAS_ACE
-        delete[] ips;
+    delete[] ips;
+#else
+    freeifaddrs(ifaddr);
 #endif
-    }
 
     return result.c_str();
 }
diff --git a/src/libYARP_OS/src/PortCore.cpp b/src/libYARP_OS/src/PortCore.cpp
index 2fe3e23..3410aaf 100644
--- a/src/libYARP_OS/src/PortCore.cpp
+++ b/src/libYARP_OS/src/PortCore.cpp
@@ -373,7 +373,6 @@ void PortCore::closeMain() {
             if (unit!=NULL) {
                 if (unit->isInput()) {
                     if (!unit->isDoomed()) {
-                        unit->interrupt();
                         Route r = unit->getRoute();
                         String s = r.getFromName();
                         if (s.length()>=1) {
@@ -1524,6 +1523,10 @@ bool PortCore::adminBlock(ConnectionReader& reader, void *id,
     // it.  So let's read the message and see what we're supposed to do.
     cmd.read(reader);
 
+    YARP_SPRINTF2(log, debug,
+                  "Port %s received command %s", getName().c_str(),
+                                                 cmd.toString().c_str());
+
     StringOutputStream cache;
 
     int vocab = cmd.get(0).asVocab();
@@ -1561,7 +1564,7 @@ bool PortCore::adminBlock(ConnectionReader& reader, void *id,
         result.addString("[prop] [get] $prop      # get a user-defined port property (prop, val)");
         result.addString("[prop] [set] $prop $val # set a user-defined port property (prop, val)");
         result.addString("[prop] [get] $portname  # get Qos properties of a connection to/from a port");
-        result.addString("[prop] [set] $portname  # set Qos properies of a connection to/from a port");
+        result.addString("[prop] [set] $portname  # set Qos properties of a connection to/from a port");
         result.addString("[prop] [get] $cur_port  # get information about current process (e.g., scheduling priority, pid)");
         result.addString("[prop] [set] $cur_port  # set properties of the current process (e.g., scheduling priority, pid)");
         result.addString("[atch] [out] $prop      # attach a portmonitor plug-in to the port's output");
@@ -2219,7 +2222,7 @@ bool PortCore::adminBlock(ConnectionReader& reader, void *id,
                                             if(qos_prop != NULL) {
                                                 if(qos_prop->check("priority")) {
                                                     NetInt32 priority = qos_prop->find("priority").asVocab();
-                                                    // set the packet DSCP value based on some predifined priority levels
+                                                    // set the packet DSCP value based on some predefined priority levels
                                                     // the expected levels are: LOW, NORM, HIGH, CRIT
                                                     int dscp;
                                                     switch(priority) {
diff --git a/src/libYARP_OS/src/PortCoreOutputUnit.cpp b/src/libYARP_OS/src/PortCoreOutputUnit.cpp
index b86cc0b..7fa5b91 100644
--- a/src/libYARP_OS/src/PortCoreOutputUnit.cpp
+++ b/src/libYARP_OS/src/PortCoreOutputUnit.cpp
@@ -234,8 +234,8 @@ Route PortCoreOutputUnit::getRoute() {
 
 bool PortCoreOutputUnit::sendHelper() {
     bool replied = false;
-    bool done = false;
     if (op!=NULL) {
+        bool done = false;
         BufferedConnectionWriter buf(op->getConnection().isTextMode(),
                                      op->getConnection().isBareMode());
         if (cachedReader!=NULL) {
@@ -313,6 +313,9 @@ bool PortCoreOutputUnit::sendHelper() {
         if (!done) {
             if (op->getConnection().isActive()) {
                 replied = op->write(buf);
+                if(replied && op->getSender().modifiesReply()) {
+                    cachedReader = &op->getSender().modifyReply(*cachedReader);
+                }
             }
             if (!op->isOk()) {
                 done = true;
@@ -322,17 +325,14 @@ bool PortCoreOutputUnit::sendHelper() {
         if (buf.dropRequested()) {
             done = true;
         }
-    }
-    if (done) {
-        closeBasic();
-        finished = true;
-        closing = true;
-        setDoomed();
+        if (done) {
+            closeBasic();
+            closing = true;
+            finished = true;
+            setDoomed();
+        }
     }
 
-    if(replied && op->getSender().modifiesReply()) {
-            cachedReader = &op->getSender().modifyReply(*cachedReader);
-    }
 
     return replied;
 }
diff --git a/src/libYARP_OS/src/Property.cpp b/src/libYARP_OS/src/Property.cpp
index 832b7f1..96d88d1 100644
--- a/src/libYARP_OS/src/Property.cpp
+++ b/src/libYARP_OS/src/Property.cpp
@@ -803,7 +803,6 @@ public:
         char** szarg = new char*[128 + 1];  // maximum 128 arguments
         char* szcmd = new char[strlen(command)+1];
         strcpy(szcmd, command);
-        szarg = new char*[128 + 1];
         int nargs = 0;
         parseArguments(szcmd, &nargs, szarg, 128);
         szarg[nargs]=0;
diff --git a/src/libYARP_OS/src/RFModule.cpp b/src/libYARP_OS/src/RFModule.cpp
index 8ed52cd..eb4557a 100644
--- a/src/libYARP_OS/src/RFModule.cpp
+++ b/src/libYARP_OS/src/RFModule.cpp
@@ -253,21 +253,26 @@ static void handler (int sig) {
    // }
 
 #if defined(WIN32)
-	//on windows we need to reset the handler after beeing called, otherwise it will not be called anymore.
-	//see http://www.geeksforgeeks.org/write-a-c-program-that-doesnt-terminate-when-ctrlc-is-pressed/
-
-	//Additionally, from http://www.linuxprogrammingblog.com/all-about-linux-signals?page=show 
-	//The signal(2) function is the oldest and simplest way to install a signal handler but it's deprecated. 
-	// There are few reasons and most important is that the original Unix implementation would reset the signal handler to it's default value after signal is received.
-	ACE_OS::signal(SIGINT, (ACE_SignalHandler)handler);
+    // on windows we need to reset the handler after beeing called, otherwise it
+    // will not be called anymore.
+    // see http://www.geeksforgeeks.org/write-a-c-program-that-doesnt-terminate-when-ctrlc-is-pressed/
+
+    // Additionally, from
+    // http://www.linuxprogrammingblog.com/all-about-linux-signals?page=show
+    // The signal(2) function is the oldest and simplest way to install a signal
+    // handler but it's deprecated.
+    // There are few reasons and most important is that the original Unix
+    // implementation would reset the signal handler to it's default value after
+    // signal is received.
+    ACE_OS::signal(SIGINT, (ACE_SignalHandler)handler);
 #endif
 }
 
-// Special case for windows. Do not return, wait for the the main thread to return.
-// In any case windows will shut down the application after a timeout of 5 seconds.
-// This wait is required otherwise windows shuts down the process after we return from
-// the signal handler. We could not find better way to handle clean remote shutdown of
-// processes in windows.
+// Special case for windows. Do not return, wait for the the main thread to
+// return.  In any case windows will shut down the application after a timeout
+// of 5 seconds.  This wait is required otherwise windows shuts down the process
+// after we return from the signal handler.  We could not find better way to
+// handle clean remote shutdown of processes in windows.
 #if defined(WIN32)
 static void handler_sigbreak(int sig) {
     raise(SIGINT);
diff --git a/src/libYARP_OS/src/Run.cpp b/src/libYARP_OS/src/Run.cpp
index 20dca92..864ffee 100644
--- a/src/libYARP_OS/src/Run.cpp
+++ b/src/libYARP_OS/src/Run.cpp
@@ -1192,11 +1192,9 @@ int yarp::os::Run::server()
 
         if (mBraveZombieHunter)
         {
-            //ZombieHunterThread *p=mBraveZombieHunter;
-            //mBraveZombieHunter=NULL;
-            //p->stop();
-            //delete p;
             mBraveZombieHunter->stop();
+            delete mBraveZombieHunter;
+            mBraveZombieHunter = 0;
         }
 
         delete mProcessVector;
@@ -2500,7 +2498,10 @@ int yarp::os::Run::executeCmdAndStdio(yarp::os::Bottle& msg,yarp::os::Bottle& re
         CLOSE(pipe_cmd_to_stdout[WRITE_TO_PIPE]);
         CLOSE(pipe_child_to_parent[READ_FROM_PIPE]);
 
-        cleanBeforeExec();
+        //Why removing vectors and stop threads?
+        //exec* never returns and memory is claimed by the system
+        //furthermore after fork() only the thread which called fork() is forked!
+        //            cleanBeforeExec();
 
         //signal(SIGPIPE,SIG_DFL);
 
@@ -2574,7 +2575,10 @@ int yarp::os::Run::executeCmdAndStdio(yarp::os::Bottle& msg,yarp::os::Bottle& re
             CLOSE(pipe_cmd_to_stdout[WRITE_TO_PIPE]);
             CLOSE(pipe_child_to_parent[READ_FROM_PIPE]);
 
-            cleanBeforeExec();
+            //Why removing vectors and stop threads?
+            //exec* never returns and memory is claimed by the system
+            //furthermore after fork() only the thread which called fork() is forked!
+            //            cleanBeforeExec();
 
             //signal(SIGPIPE,SIG_DFL);
 
@@ -2718,7 +2722,10 @@ int yarp::os::Run::executeCmdAndStdio(yarp::os::Bottle& msg,yarp::os::Bottle& re
                     strcat(cwd_arg_str[0],"/");
                     strcat(cwd_arg_str[0],arg_str[0]);
 
-                    cleanBeforeExec();
+                    //Why removing vectors and stop threads?
+                    //exec* never returns and memory is claimed by the system
+                    //furthermore after fork() only the thread which called fork() is forked!
+                    //            cleanBeforeExec();
 
                     ret=execvp(cwd_arg_str[0],cwd_arg_str);
 
@@ -2728,7 +2735,10 @@ int yarp::os::Run::executeCmdAndStdio(yarp::os::Bottle& msg,yarp::os::Bottle& re
 
                 if (ret==YARPRUN_ERROR)
                 {
-                    cleanBeforeExec();
+                    //Why removing vectors and stop threads?
+                    //exec* never returns and memory is claimed by the system
+                    //furthermore after fork() only the thread which called fork() is forked!
+                    //            cleanBeforeExec();
 
                     ret=execvp(arg_str[0],arg_str);
                 }
@@ -2919,7 +2929,10 @@ int yarp::os::Run::executeCmdStdout(yarp::os::Bottle& msg,yarp::os::Bottle& resu
         CLOSE(pipe_cmd_to_stdout[WRITE_TO_PIPE]);
         CLOSE(pipe_child_to_parent[READ_FROM_PIPE]);
 
-        cleanBeforeExec();
+        //Why removing vectors and stop threads?
+        //exec* never returns and memory is claimed by the system
+        //furthermore after fork() only the thread which called fork() is forked!
+        //            cleanBeforeExec();
 
         //signal(SIGPIPE,SIG_DFL);
 
@@ -3061,7 +3074,10 @@ int yarp::os::Run::executeCmdStdout(yarp::os::Bottle& msg,yarp::os::Bottle& resu
                     strcat(cwd_arg_str[0],"/");
                     strcat(cwd_arg_str[0],arg_str[0]);
 
-                    cleanBeforeExec();
+                    //Why removing vectors and stop threads?
+                    //exec* never returns and memory is claimed by the system
+                    //furthermore after fork() only the thread which called fork() is forked!
+                    //            cleanBeforeExec();
 
                     ret=execvp(cwd_arg_str[0],cwd_arg_str);
 
@@ -3071,7 +3087,10 @@ int yarp::os::Run::executeCmdStdout(yarp::os::Bottle& msg,yarp::os::Bottle& resu
 
                 if (ret==YARPRUN_ERROR)
                 {
-                    cleanBeforeExec();
+                    //Why removing vectors and stop threads?
+                    //exec* never returns and memory is claimed by the system
+                    //furthermore after fork() only the thread which called fork() is forked!
+                    //            cleanBeforeExec();
 
                     ret=execvp(arg_str[0],arg_str);
                 }
@@ -3272,7 +3291,10 @@ int yarp::os::Run::userStdio(yarp::os::Bottle& msg,yarp::os::Bottle& result)
 
         REDIRECT_TO(STDERR_FILENO,pipe_child_to_parent[WRITE_TO_PIPE]);
 
-        cleanBeforeExec();
+        //Why removing vectors and stop threads?
+        //exec* never returns and memory is claimed by the system
+        //furthermore after fork() only the thread which called fork() is forked!
+        //            cleanBeforeExec();
 
         //signal(SIGHUP,rwSighupHandler);
 
@@ -3435,8 +3457,7 @@ int yarp::os::Run::executeCmd(yarp::os::Bottle& msg,yarp::os::Bottle& result)
         {
             char* szenv = new char[msg.find("env").asString().length()+1];
             strcpy(szenv,msg.find("env").asString().c_str());
-            putenv(szenv); // putenv doesn't make copy of the string
-            //delete [] szenv;
+            putenv(szenv); // putenv becomes owner of the string. DO NOT RELEASE it
         }
 
         if (msg.check("workdir"))
@@ -3480,7 +3501,10 @@ int yarp::os::Run::executeCmd(yarp::os::Bottle& msg,yarp::os::Bottle& result)
             strcat(cwd_arg_str[0],"/");
             strcat(cwd_arg_str[0],arg_str[0]);
 
-            cleanBeforeExec();
+            //Why removing vectors and stop threads?
+            //exec* never returns and memory is claimed by the system
+            //furthermore after fork() only the thread which called fork() is forked!
+//            cleanBeforeExec();
 
             ret=execvp(cwd_arg_str[0],cwd_arg_str);
 
@@ -3490,8 +3514,10 @@ int yarp::os::Run::executeCmd(yarp::os::Bottle& msg,yarp::os::Bottle& result)
 
         if (ret==YARPRUN_ERROR)
         {
-            cleanBeforeExec();
-
+            //Why removing vectors and stop threads?
+            //exec* never returns and memory is claimed by the system
+            //furthermore after fork() only the thread which called fork() is forked!
+            //            cleanBeforeExec();
             ret=execvp(arg_str[0],arg_str);
         }
 
diff --git a/src/libYARP_OS/src/RunProcManager.cpp b/src/libYARP_OS/src/RunProcManager.cpp
index fd4a31d..30d6c51 100644
--- a/src/libYARP_OS/src/RunProcManager.cpp
+++ b/src/libYARP_OS/src/RunProcManager.cpp
@@ -445,8 +445,8 @@ YarpRunProcInfo(alias,on,pidCmd,handleCmd,hold)
     mStdioUUID="";
     mStdioVector=NULL;
 
-    mReadFromPipeStdinToCmd=0/*NULL*/;
-    mWriteToPipeStdinToCmd=0/*NULL*/;
+    mReadFromPipeStdinToCmd = 0;
+    mWriteToPipeStdinToCmd = 0;
     mReadFromPipeCmdToStdout=readFromPipeCmdToStdout;
     mWriteToPipeCmdToStdout=writeToPipeCmdToStdout;
 
diff --git a/src/libYARP_OS/src/SharedLibrary.cpp b/src/libYARP_OS/src/SharedLibrary.cpp
index cd32ed9..c4abde8 100644
--- a/src/libYARP_OS/src/SharedLibrary.cpp
+++ b/src/libYARP_OS/src/SharedLibrary.cpp
@@ -98,6 +98,7 @@ bool SharedLibrary::close()
     if (implementation->dll != NULL) {
 #ifdef YARP_HAS_ACE
         result = implementation->dll->close();
+        delete implementation->dll;
 #else
         result = dlclose(implementation->dll);
 #endif
diff --git a/src/libYARP_OS/src/SocketTwoWayStream.cpp b/src/libYARP_OS/src/SocketTwoWayStream.cpp
index 9dc647c..46001ab 100644
--- a/src/libYARP_OS/src/SocketTwoWayStream.cpp
+++ b/src/libYARP_OS/src/SocketTwoWayStream.cpp
@@ -79,12 +79,19 @@ void SocketTwoWayStream::updateAddresses() {
     ACE_INET_Addr local, remote;
     stream.get_local_addr(local);
     stream.get_remote_addr(remote);
-    localAddress = Contact(local.get_host_addr(),local.get_port_number());
-    remoteAddress = Contact(remote.get_host_addr(),remote.get_port_number());
+    char localHostAddress[256];
+    char remoteHostAddress[256];
+    local.get_host_addr(localHostAddress, 256);
+    remote.get_host_addr(remoteHostAddress, 256);
+    localAddress = Contact(localHostAddress,local.get_port_number());
+    remoteAddress = Contact(remoteHostAddress,remote.get_port_number());
 #else
     stream.set_option (IPPROTO_TCP, TCP_NODELAY, &one,
                        sizeof(int));
-    struct sockaddr local, remote;
+    struct sockaddr local;
+    struct sockaddr remote;
+    memset(&local, 0, sizeof(local));
+    memset(&remote, 0, sizeof(remote));
     stream.get_local_addr(local);
     stream.get_remote_addr(remote);
     if (local.sa_family == AF_INET) {
@@ -95,7 +102,7 @@ void SocketTwoWayStream::updateAddresses() {
     } else {
         YARP_ERROR(Logger::get(),"ipv6 address type not propagated without ACE");
     }
-#endif    
+#endif
 }
 
 bool SocketTwoWayStream::setTypeOfService(int tos) {
diff --git a/src/libYARP_OS/src/SystemInfo.cpp b/src/libYARP_OS/src/SystemInfo.cpp
index 87a270f..2c833c5 100644
--- a/src/libYARP_OS/src/SystemInfo.cpp
+++ b/src/libYARP_OS/src/SystemInfo.cpp
@@ -32,6 +32,15 @@ using namespace yarp::os;
 
 extern char **environ;
 
+#elif defined(__APPLE__)
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#include <mach/mach.h>
+#include <unistd.h>
+#include <sstream>
+#include <pwd.h>
+#include <sys/param.h>
+#include <sys/mount.h>
 #endif
 
 #if defined(WIN32)
@@ -262,7 +271,34 @@ SystemInfo::MemoryInfo SystemInfo::getMemoryInfo()
         }
         fclose(procmem);
     }
+#elif defined(__APPLE__)
+
+    vm_size_t page_size;
+    mach_port_t mach_port;
+    mach_msg_type_number_t count;
+    vm_statistics64_data_t vm_stats;
+
+    mach_port = mach_host_self();
+    count = HOST_VM_INFO64_COUNT;
+    if (KERN_SUCCESS == host_page_size(mach_port, &page_size) &&
+        KERN_SUCCESS == host_statistics64(mach_port, HOST_VM_INFO,
+                                          (host_info64_t)&vm_stats, &count))
+    {
+        //These seem to return the # of pages
+        natural_t activePages = vm_stats.active_count + vm_stats.wire_count;
+        natural_t inactivePages = vm_stats.inactive_count + vm_stats.free_count;
+        natural_t totalPages = activePages + inactivePages;
+
+        int64_t total = totalPages * page_size;
+        int64_t freeSpace = inactivePages * page_size;
+
+        memory.totalSpace = total / 1024;
+        memory.freeSpace = freeSpace / 1024;
+    }
+
 #endif
+
+
     return memory;
 }
 
@@ -301,6 +337,20 @@ SystemInfo::StorageInfo SystemInfo::getStorageInfo()
     }
 
 #endif
+
+#if defined(__APPLE__)
+    yarp::os::ConstString strHome = getUserInfo().homeDir;
+    if(!strHome.length())
+        strHome = "/";
+
+    struct statfs vfs;
+    if (statfs(strHome.c_str(), &vfs) == 0)
+    {
+        storage.totalSpace = (int)(vfs.f_blocks*vfs.f_bsize/(1048576)); // in MB
+        storage.freeSpace = (int)(vfs.f_bavail*vfs.f_bsize/(1048576));  // in MB
+    }
+#endif
+
     return storage;
 }
 
@@ -466,6 +516,43 @@ SystemInfo::ProcessorInfo SystemInfo::getProcessorInfo()
     {
       processor.architecture = uts.machine;  
     }
+#elif defined(__APPLE__)
+//    yarp::os::ConstString architecture;
+
+    int mib [] = { CTL_HW, HW_CPU_FREQ };
+    int64_t value = 0;
+    size_t length = sizeof(value);
+
+    if (!sysctl(mib, 2, &value, &length, NULL, 0)) {
+        processor.frequency = value / 1e+6; //this is in Hz. What is the expected frequency?
+    }
+
+    if (!sysctlbyname("hw.logicalcpu", &value, &length, NULL, 0)) {
+        processor.cores = value; //this is the number of cores
+        //or cpus: hw.physicalcpu
+    }
+
+    char buff[513];
+    size_t buffLen = 512;
+    if (!sysctlbyname("machdep.cpu.vendor", buff, &buffLen, NULL, 0)) {
+        processor.vendor = buff; //this is the number of cores
+        //or cpus: hw.physicalcpu
+    }
+    buffLen = 512;
+    if (!sysctlbyname("machdep.cpu.brand_string", buff, &buffLen, NULL, 0)) {
+        processor.model = buff; //this is the number of cores
+        //or cpus: hw.physicalcpu
+    }
+    if (!sysctlbyname("machdep.cpu.family", &value, &length, NULL, 0)) {
+        processor.family = value; //this is the number of cores
+        //or cpus: hw.physicalcpu
+    }
+    if (!sysctlbyname("machdep.cpu.model", &value, &length, NULL, 0)) {
+        processor.modelNumber = value; //this is the number of cores
+        //or cpus: hw.physicalcpu
+    }
+
+
 #endif
     return processor;
 }
@@ -574,6 +661,20 @@ SystemInfo::PlatformInfo SystemInfo::getPlatformInfo()
 
     }
 #endif
+
+#if defined(__APPLE__)
+
+    char buff[513];
+    size_t buffLen = 512;
+    if (!sysctlbyname("kern.ostype", buff, &buffLen, NULL, 0)) {
+        platform.name = buff;
+    }
+
+    if (!sysctlbyname("kern.osrelease", buff, &buffLen, NULL, 0)) {
+        platform.release = buff;
+    }
+
+#endif
         return platform;
 }
 
@@ -597,7 +698,7 @@ SystemInfo::UserInfo SystemInfo::getUserInfo()
     }
 #endif
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__APPLE__)
     struct passwd* pwd = getpwuid(getuid());
     user.userID = getuid();
     if(pwd)
@@ -650,6 +751,24 @@ SystemInfo::LoadInfo SystemInfo::getLoadInfo()
         fclose(procload);
     }
 #endif
+
+#if defined(__APPLE__)
+
+    mach_msg_type_number_t count = HOST_CPU_LOAD_INFO_COUNT;
+    host_cpu_load_info_data_t cpu_load;
+
+    if (KERN_SUCCESS == host_statistics(mach_host_self(), HOST_CPU_LOAD_INFO,
+                                        (host_info64_t)&cpu_load, &count))
+    {
+        //How to map this information into yarp structure?
+        natural_t total = 0;
+        for (int i = 0; i < CPU_STATE_MAX; ++i) {
+            total += cpu_load.cpu_ticks[i];
+        }
+
+        load.cpuLoad1 = 100.0 * cpu_load.cpu_ticks[CPU_STATE_USER] / total;
+    }
+#endif
     return load;
 }
 
@@ -666,23 +785,24 @@ SystemInfo::ProcessInfo SystemInfo::getProcessInfo(int pid) {
     sprintf(filename, "/proc/%d/cmdline", pid);
     file = fopen(filename, "r");
     if (file) {
-        fgets(cmdline, sizeof(cmdline) / sizeof(*cmdline), file);
+        char *p = fgets(cmdline, sizeof(cmdline) / sizeof(*cmdline), file);
         fclose(file);
-        char *p = cmdline;
-        while (*p) {
-            p += strlen(p);
-            if (*(p + 1))
-                *p = ' ';
-            p++;
-        }
-        info.pid = pid;
-        // split the cmdline to find the arguments
-        info.name = cmdline;
-        size_t index = info.name.find(" ");
-        if(index != info.name.npos) {
-            info.name = info.name.substr(0, index);
-            info.arguments = cmdline;
-            info.arguments = info.arguments.substr(index+1);
+        if (p != NULL) {
+            while (*p) {
+                p += strlen(p);
+                if (*(p + 1))
+                    *p = ' ';
+                p++;
+            }
+            info.pid = pid;
+            // split the cmdline to find the arguments
+            info.name = cmdline;
+            size_t index = info.name.find(" ");
+            if(index != info.name.npos) {
+                info.name = info.name.substr(0, index);
+                info.arguments = cmdline;
+                info.arguments = info.arguments.substr(index+1);
+            }
         }
     }
 
@@ -751,7 +871,54 @@ SystemInfo::ProcessInfo SystemInfo::getProcessInfo(int pid) {
     EnumWbem->Release();
     WbemServices->Release();
     WbemLocator->Release();
-    CoUninitialize();    
+    CoUninitialize();
+#elif defined(__APPLE__)
+    kinfo_proc procInfo;
+    size_t length = sizeof(procInfo);
+
+    int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid};
+
+    if (!sysctl(mib, 4, &procInfo, &length, NULL, 0)) {
+        info.name = procInfo.kp_proc.p_comm;
+        info.pid = procInfo.kp_proc.p_pid;
+
+        //Some info here: https://gist.github.com/nonowarn/770696
+        mib[1] = KERN_PROCARGS;
+        mib[2] = pid;
+        char *proc_argv;
+        size_t argv_len;
+        //getting length of execute string
+        int result = sysctl(mib, 3, NULL, &argv_len, NULL, 0);
+
+        //now getting the string
+        proc_argv = (char*)malloc(sizeof(char) * argv_len);
+        result = sysctl(mib, 3, proc_argv, &argv_len, NULL, 0);
+        //looking for '\0', i.e. NULL char
+        //skip first string which is the executable
+        size_t index = 0;
+        while (index < argv_len && proc_argv[index] != '\0') {
+            index++;
+        }
+        index++;
+        //now we have to split the remaining string
+        //Note: this is not easy. We don't know the format
+        //See: http://lists.apple.com/archives/darwin-kernel/2012/Mar/msg00025.html
+        //for example, I get both arguments and environment variables
+
+        std::stringstream arguments;
+        while (index < argv_len) {
+            if (proc_argv[index] == '\0' && index != argv_len - 1) {
+                arguments << " ";
+            } else {
+                arguments << proc_argv[index];
+            }
+            index++;
+        }
+
+        free(proc_argv);
+        info.arguments = arguments.str();
+    }
+
 #endif
     return info;
 }
diff --git a/src/libYARP_OS/src/TcpFace.cpp b/src/libYARP_OS/src/TcpFace.cpp
index ef77a40..4c37e04 100644
--- a/src/libYARP_OS/src/TcpFace.cpp
+++ b/src/libYARP_OS/src/TcpFace.cpp
@@ -71,7 +71,7 @@ static void showError(Logger& log) {
     YARP_ERROR(log,"If you do not want to use authentication, please");
     YARP_ERROR(log,"remove this file.");
     YARP_ERROR(log,"If you do want to set up authentication, check:");
-    YARP_ERROR(log,"  http://wiki.icub.org/yarpdoc/yarp_port_auth.html");
+    YARP_ERROR(log,"  http://www.yarp.it/yarp_port_auth.html");
 }
 
 /**
diff --git a/src/libYARP_OS/src/ThreadImpl.cpp b/src/libYARP_OS/src/ThreadImpl.cpp
index ff66d86..cc4c283 100644
--- a/src/libYARP_OS/src/ThreadImpl.cpp
+++ b/src/libYARP_OS/src/ThreadImpl.cpp
@@ -384,7 +384,7 @@ int ThreadImpl::getPolicy() {
     if (active) {
 #if defined(YARP_HAS_CXX11)
         // FIXME Use std::thread::native_handle()
-        YARP_ERROR(Logger::get(),"Cannot get scheduiling policy with C++11");
+        YARP_ERROR(Logger::get(),"Cannot get scheduling policy with C++11");
 #elif defined(YARP_HAS_ACE) // Use ACE API
         int prio;
         ACE_Thread::getprio(hid, prio, policy);
diff --git a/src/libYARP_OS/src/WireReader.cpp b/src/libYARP_OS/src/WireReader.cpp
index 54cf98a..8ae5f45 100644
--- a/src/libYARP_OS/src/WireReader.cpp
+++ b/src/libYARP_OS/src/WireReader.cpp
@@ -2,7 +2,6 @@
  * Copyright (C) 2013 iCub Facility
  * Authors: Paul Fitzpatrick
  * CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
- *
  */
 
 #include <yarp/os/idl/WireReader.h>
@@ -10,7 +9,8 @@
 using namespace yarp::os::idl;
 using namespace yarp::os;
 
-WireReader::WireReader(ConnectionReader& reader) : reader(reader) {
+WireReader::WireReader(ConnectionReader& reader) : reader(reader)
+{
     reader.convertTextMode();
     state = &baseState;
     flush_if_needed = false;
@@ -19,7 +19,8 @@ WireReader::WireReader(ConnectionReader& reader) : reader(reader) {
     expecting = false;
 }
 
-WireReader::~WireReader() {
+WireReader::~WireReader()
+{
     if (state->need_ok) {
         YARP_INT32 dummy;
         readVocab(dummy);
@@ -30,20 +31,24 @@ WireReader::~WireReader() {
     }
 }
 
-void WireReader::expectAccept() {
+void WireReader::expectAccept()
+{
     expecting = true;
     flush_if_needed = true;
 }
 
-void WireReader::accept() {
+void WireReader::accept()
+{
     expecting = false;
 }
 
-void WireReader::allowGetMode() {
+void WireReader::allowGetMode()
+{
     support_get_mode = true;
 }
 
-bool WireReader::clear() {
+bool WireReader::clear()
+{
     size_t pending = reader.getSize();
     if (pending>0) {
         while (pending>0) {
@@ -57,29 +62,35 @@ bool WireReader::clear() {
     return false;
 }
 
-void WireReader::fail() {
+void WireReader::fail()
+{
     clear();
     Bottle b("[fail]");
     b.write(getWriter());
 }
 
-bool WireReader::read(WirePortable& obj) {
+bool WireReader::read(WirePortable& obj)
+{
     return obj.read(*this);
 }
 
-bool WireReader::read(yarp::os::PortReader& obj) {
+bool WireReader::read(yarp::os::PortReader& obj)
+{
     return obj.read(reader);
 }
 
-bool WireReader::readNested(WirePortable& obj) {
+bool WireReader::readNested(WirePortable& obj)
+{
     return obj.read(reader);
 }
 
-bool WireReader::readNested(yarp::os::PortReader& obj) {
+bool WireReader::readNested(yarp::os::PortReader& obj)
+{
     return obj.read(reader);
 }
 
-bool WireReader::readI16(YARP_INT16& x) {
+bool WireReader::readI16(YARP_INT16& x)
+{
     int tag = state->code;
     if (tag<0) {
         if (noMore()) return false;
@@ -93,28 +104,42 @@ bool WireReader::readI16(YARP_INT16& x) {
     return !reader.isError();
 }
 
-bool WireReader::readI32(YARP_INT32& x) {
+bool WireReader::readI32(YARP_INT32& x)
+{
     int tag = state->code;
     if (tag<0) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         tag = reader.expectInt();
     }
-    if (tag!=BOTTLE_TAG_INT) return false;
-    if (noMore()) return false;
+    if (tag!=BOTTLE_TAG_INT) {
+        return false;
+    }
+    if (noMore()) {
+        return false;
+    }
     int v = reader.expectInt();
     x = (YARP_INT32) v;
     state->len--;
     return !reader.isError();
 }
 
-bool WireReader::readI64(YARP_INT64& x) {
+bool WireReader::readI64(YARP_INT64& x)
+{
     int tag = state->code;
     if (tag<0) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         tag = reader.expectInt();
     }
-    if (tag!=BOTTLE_TAG_INT && tag!=BOTTLE_TAG_INT64) return false;
-    if (noMore()) return false;
+    if (tag!=BOTTLE_TAG_INT && tag!=BOTTLE_TAG_INT64) {
+        return false;
+    }
+    if (noMore()) {
+        return false;
+    }
     if (tag==BOTTLE_TAG_INT) {
         int v = reader.expectInt();
         x = (YARP_INT32) v;
@@ -125,89 +150,140 @@ bool WireReader::readI64(YARP_INT64& x) {
     return !reader.isError();
 }
 
-bool WireReader::readBool(bool& x) {
+bool WireReader::readBool(bool& x)
+{
     if (state->code<0) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         int tag = reader.expectInt();
-        if (tag!=BOTTLE_TAG_INT&&tag!=BOTTLE_TAG_VOCAB) return false;
+        if (tag!=BOTTLE_TAG_INT&&tag!=BOTTLE_TAG_VOCAB) {
+            return false;
+        }
+    }
+    if (noMore()) {
+        return false;
     }
-    if (noMore()) return false;
     int v = reader.expectInt();
     x = (v!=0) && (v!=VOCAB4('f','a','i','l'));
     state->len--;
     return !reader.isError();
 }
 
-bool WireReader::readByte(YARP_INT8& x) {
+bool WireReader::readByte(YARP_INT8& x)
+{
     int tag = state->code;
     if (tag<0) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         tag = reader.expectInt();
     }
-    if (tag!=BOTTLE_TAG_INT) return false;
-    if (noMore()) return false;
+    if (tag!=BOTTLE_TAG_INT) {
+        return false;
+    }
+    if (noMore()) {
+        return false;
+    }
     int v = reader.expectInt();
     x = (YARP_INT8) v;
     state->len--;
     return !reader.isError();
 }
 
-bool WireReader::readVocab(YARP_INT32& x) {
+bool WireReader::readVocab(YARP_INT32& x)
+{
     int tag = state->code;
     if (tag<0) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         tag = reader.expectInt();
     }
-    if (tag!=BOTTLE_TAG_VOCAB) return false;
-    if (noMore()) return false;
+    if (tag!=BOTTLE_TAG_VOCAB) {
+        return false;
+    }
+    if (noMore()) {
+        return false;
+    }
     int v = reader.expectInt();
     x = (YARP_INT32) v;
     state->len--;
     return !reader.isError();
 }
 
-bool WireReader::readDouble(double& x) {
+bool WireReader::readDouble(double& x)
+{
     int tag = state->code;
     if (tag<0) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         tag = reader.expectInt();
     }
     if (tag==BOTTLE_TAG_INT) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         int v = reader.expectInt();
         x = v;
         state->len--;
         return !reader.isError();
     }
-    if (tag!=BOTTLE_TAG_DOUBLE) return false;
-    if (noMore()) return false;
+    if (tag!=BOTTLE_TAG_DOUBLE) {
+        return false;
+    }
+    if (noMore()) {
+        return false;
+    }
     x = reader.expectDouble();
     state->len--;
     return !reader.isError();
 }
 
-bool WireReader::readString(ConstString& str, bool *is_vocab) {
-    if (state->len<=0) return false;
+bool WireReader::readString(ConstString& str, bool *is_vocab)
+{
+    if (state->len<=0) {
+        return false;
+    }
     int tag = state->code;
     if (state->code<0) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         tag = reader.expectInt();
-        if (tag!=BOTTLE_TAG_STRING&&tag!=BOTTLE_TAG_VOCAB) return false;
+        if (tag!=BOTTLE_TAG_STRING&&tag!=BOTTLE_TAG_VOCAB) {
+            return false;
+        }
     }
     state->len--;
     if (tag==BOTTLE_TAG_VOCAB) {
-        if (is_vocab) *is_vocab = true;
-        if (noMore()) return false;
+        if (is_vocab) {
+            *is_vocab = true;
+        }
+        if (noMore()) {
+            return false;
+        }
         NetInt32 v = reader.expectInt();
-        if (reader.isError()) return false;
+        if (reader.isError()) {
+            return false;
+        }
         str = Vocab::decode(v);
         return true;
     }
-    if (is_vocab) *is_vocab = false;
-    if (noMore()) return false;
+    if (is_vocab) {
+        *is_vocab = false;
+    }
+    if (noMore()) {
+        return false;
+    }
     int len = reader.expectInt();
-    if (reader.isError()) return false;
-    if (noMore()) return false;
+    if (reader.isError()) {
+        return false;
+    }
+    if (noMore()) {
+        return false;
+    }
     str.resize(len);
     reader.expectBlock((const char *)str.c_str(),len);
     // This is needed for compatiblity with versions of yarp before March 2015
@@ -219,110 +295,174 @@ bool WireReader::readString(ConstString& str, bool *is_vocab) {
     return !reader.isError();
 }
 
-bool WireReader::readBinary(ConstString& str) {
-    if (state->len<=0) return false;
+bool WireReader::readBinary(ConstString& str)
+{
+    if (state->len<=0) {
+        return false;
+    }
     int tag = state->code;
     if (state->code<0) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         tag = reader.expectInt();
-        if (tag!=BOTTLE_TAG_BLOB) return false;
+        if (tag!=BOTTLE_TAG_BLOB) {
+            return false;
+        }
     }
     state->len--;
-    if (noMore()) return false;
+    if (noMore()) {
+        return false;
+    }
     int len = reader.expectInt();
-    if (reader.isError()) return false;
+    if (reader.isError()) {
+        return false;
+    }
     if (len == 0) {
         str = ConstString();
         return true;
     }
-    if (len<0) return false;
-    if (noMore()) return false;
+    if (len<0) {
+        return false;
+    }
+    if (noMore()) {
+        return false;
+    }
     str.resize(len);
     reader.expectBlock((const char *)str.c_str(),len);
     return !reader.isError();
 }
 
-bool WireReader::readEnum(YARP_INT32& x, WireVocab& converter) {
+bool WireReader::readEnum(YARP_INT32& x, WireVocab& converter)
+{
     int tag = state->code;
     if (tag<0) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         tag = reader.expectInt();
     }
     if (tag==BOTTLE_TAG_INT) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         int v = reader.expectInt();
         x = (YARP_INT32) v;
         state->len--;
         return !reader.isError();
     }
     if (tag==BOTTLE_TAG_STRING) {
-        if (noMore()) return false;
+        if (noMore()) {
+            return false;
+        }
         int len = reader.expectInt();
-        if (reader.isError()) return false;
-        if (len<1) return false;
-        if (noMore()) return false;
+        if (reader.isError()) {
+            return false;
+        }
+        if (len<1) {
+            return false;
+        }
+        if (noMore()) {
+            return false;
+        }
         std::string str;
         str.resize(len);
         reader.expectBlock((const char *)str.c_str(),len);
         str.resize(len-1);
         state->len--;
-        if (reader.isError()) return false;
+        if (reader.isError()) {
+            return false;
+        }
         x = (YARP_INT32)converter.fromString(str);
         return (x>=0);
     }
     return false;
 }
 
-bool WireReader::readListHeader() {
-    int x1 = 0, x2 = 0;
-    if (noMore()) return false;
+bool WireReader::readListHeader()
+{
+    int x1 = 0;
+    int x2 = 0;
+    if (noMore()) {
+        return false;
+    }
     x1 = reader.expectInt();
-    if (!(x1&BOTTLE_TAG_LIST)) return false;
-    if (noMore()) return false;
+    if (!(x1 & BOTTLE_TAG_LIST)) {
+        return false;
+    }
+    if (noMore()) {
+        return false;
+    }
     x2 = reader.expectInt();
-    int code = x1&(~BOTTLE_TAG_LIST);
+    int code = (x1 & (~BOTTLE_TAG_LIST));
     state->len = x2;
-    if (code!=0) state->code = code;
+    if (code != 0) {
+        state->code = code;
+    }
     return !reader.isError();
 }
 
-bool WireReader::readListHeader(int len) {
-    if (!readListHeader()) return false;
+bool WireReader::readListHeader(int len)
+{
+    if (!readListHeader()) {
+        return false;
+    }
     return len == state->len;
 }
 
-bool WireReader::readListReturn() {
-    if (!readListHeader()) return false;
-    if (!support_get_mode) return true;
-    if (state->len == 1) return true;
-    if (state->len != 4) return false;
+bool WireReader::readListReturn()
+{
+    if (!readListHeader()) {
+        return false;
+    }
+    if (!support_get_mode) {
+        return true;
+    }
+    if (state->len == 1) {
+        return true;
+    }
+    if (state->len != 4) {
+        return false;
+    }
     // possibly old-style return: [is] foo val [ok]
     YARP_INT32 v = 0;
-    if (!readVocab(v)) return false;
-    if (v!=VOCAB2('i','s')) return false;
+    if (!readVocab(v)) {
+        return false;
+    }
+    if (v!=VOCAB2('i','s')) {
+        return false;
+    }
     ConstString dummy;
-    if (!readString(dummy)) return false; // string OR vocab
+    if (!readString(dummy)) {
+        return false; // string OR vocab
+    }
     // now we are ready to consume real result
     state->need_ok = true;
     return true;
 }
 
-ConnectionWriter& WireReader::getWriter() {
+ConnectionWriter& WireReader::getWriter()
+{
     flush_if_needed = false;
     ConnectionWriter *writer = reader.getWriter();
-    if (writer) return *writer;
+    if (writer) {
+        return *writer;
+    }
     return null_writer;
 }
 
-bool WireReader::isValid() {
+bool WireReader::isValid()
+{
     return reader.isValid();
 }
 
-bool WireReader::isError() {
+bool WireReader::isError()
+{
     return reader.isError();
 }
 
-yarp::os::ConstString WireReader::readTag() {
+yarp::os::ConstString WireReader::readTag()
+{
     flush_if_needed = true;
     ConstString str;
     bool is_vocab;
@@ -352,7 +492,8 @@ yarp::os::ConstString WireReader::readTag() {
     return str.c_str();
 }
 
-void WireReader::readListBegin(WireState& nstate, unsigned YARP_INT32& len) {
+void WireReader::readListBegin(WireState& nstate, unsigned YARP_INT32& len)
+{
     nstate.parent = state;
     state = &nstate;
     len = 0;
@@ -360,34 +501,44 @@ void WireReader::readListBegin(WireState& nstate, unsigned YARP_INT32& len) {
     len = (unsigned YARP_INT32)state->len;
 }
 
-void WireReader::readSetBegin(WireState& nstate, unsigned YARP_INT32& len) {
+void WireReader::readSetBegin(WireState& nstate, unsigned YARP_INT32& len)
+{
     readListBegin(nstate,len);
 }
 
-void WireReader::readMapBegin(WireState& nstate, WireState& nstate2, 
-                              unsigned YARP_INT32& len) {
+void WireReader::readMapBegin(WireState& nstate,
+                              WireState& nstate2,
+                              unsigned YARP_INT32& len)
+{
     readListBegin(nstate,len);
 }
 
-void WireReader::readListEnd() {
+void WireReader::readListEnd()
+{
     state = state->parent;
 }
 
-void WireReader::readSetEnd() {
+void WireReader::readSetEnd()
+{
     state = state->parent;
 }
 
-void WireReader::readMapEnd() {
+void WireReader::readMapEnd()
+{
     state = state->parent;
 }
 
-bool WireReader::noMore() {
-    if (!flush_if_needed) return false;
+bool WireReader::noMore()
+{
+    if (!flush_if_needed) {
+        return false;
+    }
     size_t pending = reader.getSize();
     return pending==0;
 }
 
-void WireReader::scanString(ConstString& str, bool is_vocab) {
+void WireReader::scanString(ConstString& str, bool is_vocab)
+{
     if (!support_get_mode) return;
     if (get_string=="") {
         if (get_mode && get_string=="") {
@@ -402,15 +553,18 @@ void WireReader::scanString(ConstString& str, bool is_vocab) {
 }
 
 
-bool WireReader::getMode() const {
+bool WireReader::getMode() const
+{
     return get_mode;
 }
 
-bool WireReader::getIsVocab() const {
+bool WireReader::getIsVocab() const
+{
     return get_is_vocab;
 }
 
-const ConstString& WireReader::getString() const {
+const ConstString& WireReader::getString() const
+{
     return get_string;
 }
 
diff --git a/src/libYARP_dev/CMakeLists.txt b/src/libYARP_dev/CMakeLists.txt
index 653a5ca..889a814 100644
--- a/src/libYARP_dev/CMakeLists.txt
+++ b/src/libYARP_dev/CMakeLists.txt
@@ -157,6 +157,18 @@ set(YARP_devices_HDRS   src/modules/AnalogWrapper/AnalogWrapper.h
 # handle the ros / yarp thrift messages
 # the variables cbw2_msgs_srcs, cbw2_msgs_hrds and cbw2_msgs_incl_dirs will be set inside
 add_subdirectory(src/modules/msgs)
+# relative paths should be relative to current directory
+unset(_tmp)
+foreach(_var cbw2_msgs_srcs cbw2_msgs_hrds)
+  foreach(_f ${${_var}})
+    file(RELATIVE_PATH _f "${CMAKE_CURRENT_SOURCE_DIR}" "${_f}")
+    list(APPEND _tmp "${_f}")
+  endforeach()
+  set(${_var} ${_tmp})
+endforeach()
+
+
+
 list(APPEND YARP_devices_SRCS ${cbw2_msgs_srcs})
 list(APPEND YARP_devices_HDRS ${cbw2_msgs_hrds})
 include_directories(${cbw2_msgs_incl_dirs})
diff --git a/src/libYARP_dev/include/yarp/dev/ControlBoardHelper.h b/src/libYARP_dev/include/yarp/dev/ControlBoardHelper.h
index 7ed30e0..0e5e2d6 100644
--- a/src/libYARP_dev/include/yarp/dev/ControlBoardHelper.h
+++ b/src/libYARP_dev/include/yarp/dev/ControlBoardHelper.h
@@ -146,6 +146,15 @@ public:
         return true;
     }
 
+    inline bool checkAxisId(int id)
+    {
+        if (id >= nj)
+        {
+            return false;
+        }
+        return true;
+    }
+
     inline int toHw(int axis)
     { return axisMap[axis]; }
 
diff --git a/src/libYARP_dev/include/yarp/dev/ControlBoardInterfaces.h b/src/libYARP_dev/include/yarp/dev/ControlBoardInterfaces.h
index 31bb5e1..76e3302 100644
--- a/src/libYARP_dev/include/yarp/dev/ControlBoardInterfaces.h
+++ b/src/libYARP_dev/include/yarp/dev/ControlBoardInterfaces.h
@@ -220,7 +220,7 @@ public:
  * Interface for a generic control board device implementing a PID controller,
  * with scaled arguments.
  */
-class yarp::dev::IPidControl
+class YARP_dev_API yarp::dev::IPidControl
 {
 public:
     /**
@@ -360,7 +360,7 @@ public:
  *
  * Interface for control devices, amplifier commands.
  */
-class yarp::dev::IAmplifierControl
+class YARP_dev_API yarp::dev::IAmplifierControl
 {
 public:
     /**
diff --git a/src/libYARP_dev/include/yarp/dev/IControlMode2.h b/src/libYARP_dev/include/yarp/dev/IControlMode2.h
index 3e53624..19ffc14 100644
--- a/src/libYARP_dev/include/yarp/dev/IControlMode2.h
+++ b/src/libYARP_dev/include/yarp/dev/IControlMode2.h
@@ -55,7 +55,7 @@ public:
     * Set the current control mode.
     * @param j: joint number
     * @param mode: a vocab of the desired control mode for joint j.
-    * @return true if the new controlMode was succesfully set, false if the message was not received or
+    * @return true if the new controlMode was successfully set, false if the message was not received or
     *         the joint was unable to switch to the desired controlMode
     *         (e.g. the joint is on a fault condition or the desired mode is not implemented).    */
     virtual bool setControlMode(const int j, const int mode)=0;
@@ -70,7 +70,7 @@ public:
     *          n_joint  3
     *          joints   0  2  4
     *          modes    VOCAB_CM_POSITION VOCAB_CM_VELOCITY VOCAB_CM_POSITION
-    * @return true if the new controlMode was succesfully set, false if the message was not received or
+    * @return true if the new controlMode was successfully set, false if the message was not received or
     *         the joint was unable to switch to the desired controlMode
     *         (e.g. the joint is on a fault condition or the desired mode is not implemented).
     */
@@ -79,7 +79,7 @@ public:
     /**
     * Set the current control mode (multiple joints).
     * @param modes: a vector containing vocabs for the desired control modes of the joints.
-    * @return true if the new controlMode was succesfully set, false if the message was not received or
+    * @return true if the new controlMode was successfully set, false if the message was not received or
     *         the joint was unable to switch to the desired controlMode
     *         (e.g. the joint is on a fault condition or the desired mode is not implemented).
     */
@@ -126,7 +126,7 @@ public:
 // Read only (imposed by the board on special events)
 #define VOCAB_CM_HW_FAULT           VOCAB4('h','w','f','a')
 #define VOCAB_CM_CALIBRATING        VOCAB3('c','a','l')     // the joint is calibrating
-#define VOCAB_CM_CALIB_DONE         VOCAB4('c','a','l','d') // calibration succesfully completed
+#define VOCAB_CM_CALIB_DONE         VOCAB4('c','a','l','d') // calibration successfully completed
 #define VOCAB_CM_NOT_CONFIGURED     VOCAB4('c','f','g','n') // missing initial configuration (default value at start-up)
 #define VOCAB_CM_CONFIGURED         VOCAB4('c','f','g','y') // initial configuration completed, if any
 
diff --git a/src/libYARP_dev/include/yarp/dev/ImplementControlBoardInterfaces.h b/src/libYARP_dev/include/yarp/dev/ImplementControlBoardInterfaces.h
index ce36a9b..ca62cf8 100644
--- a/src/libYARP_dev/include/yarp/dev/ImplementControlBoardInterfaces.h
+++ b/src/libYARP_dev/include/yarp/dev/ImplementControlBoardInterfaces.h
@@ -769,7 +769,7 @@ public:
  * missed to implement useful functionalities.
  *
  */
-class yarp::dev::StubImplPidControlRaw: public IPidControlRaw
+class YARP_dev_API yarp::dev::StubImplPidControlRaw: public IPidControlRaw
 {
 private:
     /**
@@ -857,7 +857,7 @@ public:
  * missed to implement useful functionalities.
  *
  */
-class yarp::dev::StubImplPositionControlRaw: public IPositionControlRaw
+class YARP_dev_API yarp::dev::StubImplPositionControlRaw: public IPositionControlRaw
 {
 private:
     /**
@@ -935,7 +935,7 @@ public:
  * missed to implement useful functionalities.
  *
  */
-class yarp::dev::StubImplEncodersRaw: public IEncodersRaw
+class YARP_dev_API yarp::dev::StubImplEncodersRaw: public IEncodersRaw
 {
 private:
     /**
diff --git a/src/libYARP_dev/include/yarp/dev/TestMotor.h b/src/libYARP_dev/include/yarp/dev/TestMotor.h
index e89d38b..1373b79 100644
--- a/src/libYARP_dev/include/yarp/dev/TestMotor.h
+++ b/src/libYARP_dev/include/yarp/dev/TestMotor.h
@@ -323,6 +323,11 @@ public:
     }
 
 #ifndef YARP_NO_DEPRECATED // since YARP 2.3.65
+#if !defined(_MSC_VER)
+// On the other compilers the warning is disabled only here.
+YARP_WARNING_PUSH
+YARP_DISABLE_DEPRECATED_WARNING
+#endif
     YARP_DEPRECATED virtual bool setPositionMode() {
         posMode = true;
         return true;
@@ -332,6 +337,9 @@ public:
         posMode = false;
         return false;
     }
+#if !defined(_MSC_VER)
+YARP_WARNING_POP
+#endif
 #endif // YARP_NO_DEPRECATED
 };
 
diff --git a/src/libYARP_dev/include/yarp/dev/Wrapper.h b/src/libYARP_dev/include/yarp/dev/Wrapper.h
index fec45f8..86a92be 100644
--- a/src/libYARP_dev/include/yarp/dev/Wrapper.h
+++ b/src/libYARP_dev/include/yarp/dev/Wrapper.h
@@ -28,7 +28,7 @@ namespace yarp {
  * you first creates the two objects separately then you can attach one
  * to the other.
  */
-class yarp::dev::IWrapper
+class YARP_dev_API yarp::dev::IWrapper
 {
 public:
     /**
@@ -60,7 +60,7 @@ public:
  * to the other. This class is similar to IWrapper, but allows attaching
  * to more than one object by subsequent calls to attach.
  */
-class yarp::dev::IMultipleWrapper
+class YARP_dev_API yarp::dev::IMultipleWrapper
 {
 public:
     /**
diff --git a/src/libYARP_dev/src/ControlMode2Impl.cpp b/src/libYARP_dev/src/ControlMode2Impl.cpp
index 4a29be0..a3811ac 100644
--- a/src/libYARP_dev/src/ControlMode2Impl.cpp
+++ b/src/libYARP_dev/src/ControlMode2Impl.cpp
@@ -10,6 +10,8 @@
 
 #include <stdio.h>
 using namespace yarp::dev;
+#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define MJOINTIDCHECK if (joints[idx] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 
 ImplementControlMode2::ImplementControlMode2(IControlMode2Raw *r):
 temp_int(NULL),
@@ -62,42 +64,49 @@ bool ImplementControlMode2::uninitialize ()
 
 bool ImplementControlMode2::setPositionMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setPositionModeRaw(k);
 }
 
 bool ImplementControlMode2::setVelocityMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setVelocityModeRaw(k);
 }
 
 bool ImplementControlMode2::setTorqueMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setTorqueModeRaw(k);
 }
 
 bool ImplementControlMode2::setOpenLoopMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setOpenLoopModeRaw(k);
 }
 
 bool ImplementControlMode2::setImpedancePositionMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setImpedancePositionModeRaw(k);
 }
 
 bool ImplementControlMode2::setImpedanceVelocityMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setImpedanceVelocityModeRaw(k);
 }
 
 bool ImplementControlMode2::getControlMode(int j, int *f)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->getControlModeRaw(k, f);
 }
@@ -116,6 +125,7 @@ bool ImplementControlMode2::getControlModes(const int n_joint, const int *joints
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK
         temp_int[idx] = castToMapper(helper)->toHw(joints[idx]);
     }
 
@@ -126,6 +136,7 @@ bool ImplementControlMode2::getControlModes(const int n_joint, const int *joints
 
 bool ImplementControlMode2::setControlMode(const int j, const int mode)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setControlModeRaw(k, mode);
 }
@@ -134,6 +145,7 @@ bool ImplementControlMode2::setControlModes(const int n_joint, const int *joints
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK
         temp_int[idx] = castToMapper(helper)->toHw(joints[idx]);
     }
     return raw->setControlModesRaw(n_joint, temp_int, modes);
diff --git a/src/libYARP_dev/src/ControlModeImpl.cpp b/src/libYARP_dev/src/ControlModeImpl.cpp
index 5b7e713..70fcd02 100644
--- a/src/libYARP_dev/src/ControlModeImpl.cpp
+++ b/src/libYARP_dev/src/ControlModeImpl.cpp
@@ -10,6 +10,8 @@
 
 #include <stdio.h>
 using namespace yarp::dev;
+#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define MJOINTIDCHECK if (joints[idx] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 
 ImplementControlMode::ImplementControlMode(IControlModeRaw *r)
 {
@@ -51,42 +53,49 @@ bool ImplementControlMode::uninitialize ()
 
 bool ImplementControlMode::setPositionMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setPositionModeRaw(k);
 }
 
 bool ImplementControlMode::setVelocityMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setVelocityModeRaw(k);
 }
 
 bool ImplementControlMode::setTorqueMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setTorqueModeRaw(k);
 }
 
 bool ImplementControlMode::setOpenLoopMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setOpenLoopModeRaw(k);
 }
 
 bool ImplementControlMode::setImpedancePositionMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setImpedancePositionModeRaw(k);
 }
 
 bool ImplementControlMode::setImpedanceVelocityMode(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->setImpedanceVelocityModeRaw(k);
 }
 
 bool ImplementControlMode::getControlMode(int j, int *f)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return raw->getControlModeRaw(k, f);
 }
diff --git a/src/libYARP_dev/src/IEncodersTimedImpl.cpp b/src/libYARP_dev/src/IEncodersTimedImpl.cpp
index 26bcc64..ee8641a 100644
--- a/src/libYARP_dev/src/IEncodersTimedImpl.cpp
+++ b/src/libYARP_dev/src/IEncodersTimedImpl.cpp
@@ -10,6 +10,8 @@
 
 #include <stdio.h>
 using namespace yarp::dev;
+#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define MJOINTIDCHECK if (joints[idx] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 
 ////////////////////////
 // Encoder Interface Timed Implementation
@@ -66,6 +68,7 @@ bool ImplementEncodersTimed::getAxes(int *ax)
 
 bool ImplementEncodersTimed::resetEncoder(int j)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
 
@@ -79,6 +82,7 @@ bool ImplementEncodersTimed::resetEncoders()
 
 bool ImplementEncodersTimed::setEncoder(int j, double val)
 {
+    JOINTIDCHECK
     int k;
     double enc;
 
@@ -96,6 +100,7 @@ bool ImplementEncodersTimed::setEncoders(const double *val)
 
 bool ImplementEncodersTimed::getEncoder(int j, double *v)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     bool ret;
@@ -123,6 +128,7 @@ bool ImplementEncodersTimed::getEncoders(double *v)
 
 bool ImplementEncodersTimed::getEncoderSpeed(int j, double *v)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     bool ret;
@@ -148,6 +154,7 @@ bool ImplementEncodersTimed::getEncoderSpeeds(double *v)
 
 bool ImplementEncodersTimed::getEncoderAcceleration(int j, double *v)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     bool ret;
@@ -173,6 +180,7 @@ bool ImplementEncodersTimed::getEncoderAccelerations(double *v)
 
 bool ImplementEncodersTimed::getEncoderTimed(int j, double *v, double *t)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     bool ret;
diff --git a/src/libYARP_dev/src/IInteractionModeImpl.cpp b/src/libYARP_dev/src/IInteractionModeImpl.cpp
index f23ec1e..be30cda 100644
--- a/src/libYARP_dev/src/IInteractionModeImpl.cpp
+++ b/src/libYARP_dev/src/IInteractionModeImpl.cpp
@@ -12,7 +12,8 @@
 #include <yarp/dev/IInteractionModeImpl.h>
 
 using namespace yarp::dev;
-
+#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define MJOINTIDCHECK(i) if (joints[i] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 
 ImplementInteractionMode::ImplementInteractionMode(yarp::dev::IInteractionModeRaw *class_p) :
     iInteraction(class_p),
@@ -81,9 +82,11 @@ bool ImplementInteractionMode::getInteractionMode(int axis, yarp::dev::Interacti
 
 bool ImplementInteractionMode::getInteractionModes(int n_joints, int *joints, yarp::dev::InteractionModeEnum* modes)
 {
-    for(int i=0; i<n_joints; i++)
-        temp_int[i] = castToMapper(helper)->toHw(joints[i]);
-
+    for (int i = 0; i < n_joints; i++)
+    {
+         MJOINTIDCHECK(i)
+         temp_int[i] = castToMapper(helper)->toHw(joints[i]);
+    }
     return iInteraction->getInteractionModesRaw(n_joints, temp_int, modes);
 }
 
@@ -110,6 +113,7 @@ bool ImplementInteractionMode::setInteractionModes(int n_joints, int *joints, ya
 {
     for(int idx=0; idx<n_joints; idx++)
     {
+        MJOINTIDCHECK(idx)
         temp_int[idx] = castToMapper(helper)->toHw(joints[idx]);
     }
     return iInteraction->setInteractionModesRaw(n_joints, temp_int, modes);
diff --git a/src/libYARP_dev/src/IMotorEncodersImpl.cpp b/src/libYARP_dev/src/IMotorEncodersImpl.cpp
index 296e2b3..e71185e 100644
--- a/src/libYARP_dev/src/IMotorEncodersImpl.cpp
+++ b/src/libYARP_dev/src/IMotorEncodersImpl.cpp
@@ -10,7 +10,8 @@
 
 #include <stdio.h>
 using namespace yarp::dev;
-
+#define JOINTIDCHECK if (m >= castToMapper(helper)->axes()){yError("motor id out of bound"); return false;}
+#define MJOINTIDCHECK(i) if (joints[i] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 ////////////////////////
 // Encoder Interface Timed Implementation
 ImplementMotorEncoders::ImplementMotorEncoders(IMotorEncodersRaw *y)
@@ -66,6 +67,7 @@ bool ImplementMotorEncoders::getNumberOfMotorEncoders(int *num)
 
 bool ImplementMotorEncoders::resetMotorEncoder(int m)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(m);
 
@@ -79,6 +81,7 @@ bool ImplementMotorEncoders::resetMotorEncoders()
 
 bool ImplementMotorEncoders::setMotorEncoder(int m, const double val)
 {
+    JOINTIDCHECK
     int k;
     double enc;
 
@@ -89,6 +92,7 @@ bool ImplementMotorEncoders::setMotorEncoder(int m, const double val)
 
 bool ImplementMotorEncoders::getMotorEncoderCountsPerRevolution(int m, double* cpr)
 {
+    JOINTIDCHECK
     bool ret;
     int k=castToMapper(helper)->toHw(m);
 
@@ -99,6 +103,7 @@ bool ImplementMotorEncoders::getMotorEncoderCountsPerRevolution(int m, double* c
 
 bool ImplementMotorEncoders::setMotorEncoderCountsPerRevolution(int m, double cpr)
 {
+    JOINTIDCHECK
     int k;
 
     k=castToMapper(helper)->toHw(m);
@@ -115,6 +120,7 @@ bool ImplementMotorEncoders::setMotorEncoders(const double *val)
 
 bool ImplementMotorEncoders::getMotorEncoder(int m, double *v)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     bool ret;
@@ -142,6 +148,7 @@ bool ImplementMotorEncoders::getMotorEncoders(double *v)
 
 bool ImplementMotorEncoders::getMotorEncoderSpeed(int m, double *v)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     bool ret;
@@ -167,6 +174,7 @@ bool ImplementMotorEncoders::getMotorEncoderSpeeds(double *v)
 
 bool ImplementMotorEncoders::getMotorEncoderAcceleration(int m, double *v)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     bool ret;
@@ -192,6 +200,7 @@ bool ImplementMotorEncoders::getMotorEncoderAccelerations(double *v)
 
 bool ImplementMotorEncoders::getMotorEncoderTimed(int m, double *v, double *t)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     bool ret;
diff --git a/src/libYARP_dev/src/IMotorImpl.cpp b/src/libYARP_dev/src/IMotorImpl.cpp
index 7045daa..95850d8 100644
--- a/src/libYARP_dev/src/IMotorImpl.cpp
+++ b/src/libYARP_dev/src/IMotorImpl.cpp
@@ -10,6 +10,8 @@
 
 #include <stdio.h>
 using namespace yarp::dev;
+#define JOINTIDCHECK if (m >= castToMapper(helper)->axes()){yError("motor id out of bound"); return false;}
+#define MJOINTIDCHECK(i) if (joints[i] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 
 ////////////////////////
 // Encoder Interface Timed Implementation
@@ -66,6 +68,7 @@ bool ImplementMotor::getNumberOfMotors(int *num)
 
 bool ImplementMotor::getTemperature(int m, double* value)
 {
+    JOINTIDCHECK
     bool ret;
     int k=castToMapper(helper)->toHw(m);
 
@@ -76,6 +79,7 @@ bool ImplementMotor::getTemperature(int m, double* value)
 
 bool ImplementMotor::getTemperatureLimit(int m, double* value)
 {
+    JOINTIDCHECK
     bool ret;
     int k=castToMapper(helper)->toHw(m);
 
@@ -86,6 +90,7 @@ bool ImplementMotor::getTemperatureLimit(int m, double* value)
 
 bool ImplementMotor::setTemperatureLimit(int m, const double value)
 {
+    JOINTIDCHECK
     bool ret;
     int k=castToMapper(helper)->toHw(m);
 
@@ -96,6 +101,7 @@ bool ImplementMotor::setTemperatureLimit(int m, const double value)
 
 bool ImplementMotor::getGearboxRatio(int m, double* value)
 {
+    JOINTIDCHECK
     bool ret;
     int k = castToMapper(helper)->toHw(m);
 
@@ -106,6 +112,7 @@ bool ImplementMotor::getGearboxRatio(int m, double* value)
 
 bool ImplementMotor::setGearboxRatio(int m, const double value)
 {
+    JOINTIDCHECK
     bool ret;
     int k = castToMapper(helper)->toHw(m);
 
diff --git a/src/libYARP_dev/src/IPositionControl2Impl.cpp b/src/libYARP_dev/src/IPositionControl2Impl.cpp
index 521c011..a169aa1 100644
--- a/src/libYARP_dev/src/IPositionControl2Impl.cpp
+++ b/src/libYARP_dev/src/IPositionControl2Impl.cpp
@@ -12,6 +12,9 @@
 #include <yarp/os/Log.h>
 
 using namespace yarp::dev;
+#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define MJOINTIDCHECK(i) if (joints[i] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define PJOINTIDCHECK(j) if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 
 ImplementPositionControl2::ImplementPositionControl2(IPositionControl2Raw *y) :
     iPosition2(y),
@@ -80,6 +83,7 @@ YARP_WARNING_POP
 
 bool ImplementPositionControl2::positionMove(int j, double ang)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     castToMapper(helper)->posA2E(ang, j, enc, k);
@@ -90,6 +94,7 @@ bool ImplementPositionControl2::positionMove(const int n_joint, const int *joint
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         castToMapper(helper)->posA2E(refs[idx], joints[idx], temp_double[idx], temp_int[idx]);
     }
     return iPosition2->positionMoveRaw(n_joint, temp_int, temp_double);
@@ -104,6 +109,7 @@ bool ImplementPositionControl2::positionMove(const double *refs)
 
 bool ImplementPositionControl2::relativeMove(int j, double delta)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     castToMapper(helper)->velA2E(delta, j, enc, k);
@@ -115,6 +121,7 @@ bool ImplementPositionControl2::relativeMove(const int n_joint, const int *joint
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         castToMapper(helper)->velA2E(deltas[idx], joints[idx], temp_double[idx], temp_int[idx]);
     }
     return iPosition2->relativeMoveRaw(n_joint, temp_int, temp_double);
@@ -128,6 +135,7 @@ bool ImplementPositionControl2::relativeMove(const double *deltas)
 
 bool ImplementPositionControl2::checkMotionDone(int j, bool *flag)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
 
     return iPosition2->checkMotionDoneRaw(k,flag);
@@ -137,6 +145,7 @@ bool ImplementPositionControl2::checkMotionDone(const int n_joint, const int *jo
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         temp_int[idx] = castToMapper(helper)->toHw(joints[idx]);
     }
 
@@ -150,6 +159,7 @@ bool ImplementPositionControl2::checkMotionDone(bool *flag)
 
 bool ImplementPositionControl2::setRefSpeed(int j, double sp)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     castToMapper(helper)->velA2E_abs(sp, j, enc, k);
@@ -160,6 +170,7 @@ bool ImplementPositionControl2::setRefSpeeds(const int n_joint, const int *joint
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         castToMapper(helper)->velA2E_abs(spds[idx], joints[idx], temp_double[idx], temp_int[idx]);
     }
 
@@ -175,6 +186,7 @@ bool ImplementPositionControl2::setRefSpeeds(const double *spds)
 
 bool ImplementPositionControl2::setRefAcceleration(int j, double acc)
 {
+    JOINTIDCHECK
     int k;
     double enc;
 
@@ -186,6 +198,7 @@ bool ImplementPositionControl2::setRefAccelerations(const int n_joint, const int
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         castToMapper(helper)->accA2E_abs(accs[idx], joints[idx], temp_double[idx], temp_int[idx]);
     }
 
@@ -201,6 +214,7 @@ bool ImplementPositionControl2::setRefAccelerations(const double *accs)
 
 bool ImplementPositionControl2::getRefSpeed(int j, double *ref)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     k=castToMapper(helper)->toHw(j);
@@ -216,6 +230,7 @@ bool ImplementPositionControl2::getRefSpeeds(const int n_joint, const int *joint
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         temp_int[idx]=castToMapper(helper)->toHw(joints[idx]);
     }
 
@@ -246,6 +261,7 @@ bool ImplementPositionControl2::getRefAccelerations(const int n_joint, const int
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         temp_int[idx]=castToMapper(helper)->toHw(joints[idx]);
     }
 
@@ -260,6 +276,7 @@ bool ImplementPositionControl2::getRefAccelerations(const int n_joint, const int
 
 bool ImplementPositionControl2::getRefAcceleration(int j, double *acc)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     k=castToMapper(helper)->toHw(j);
@@ -272,6 +289,7 @@ bool ImplementPositionControl2::getRefAcceleration(int j, double *acc)
 
 bool ImplementPositionControl2::stop(int j)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
 
@@ -282,6 +300,7 @@ bool ImplementPositionControl2::stop(const int n_joint, const int *joints)
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         temp_int[idx] = castToMapper(helper)->toHw(joints[idx]);
     }
 
@@ -303,6 +322,7 @@ bool ImplementPositionControl2::getAxes(int *axis)
 
 bool ImplementPositionControl2::getTargetPosition(const int joint, double* ref)
 {
+    PJOINTIDCHECK(joint)
     int k;
     double enc;
     k=castToMapper(helper)->toHw(joint);
@@ -324,6 +344,7 @@ bool ImplementPositionControl2::getTargetPositions(const int n_joint, const int*
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         temp_int[idx]=castToMapper(helper)->toHw(joints[idx]);
     }
 
diff --git a/src/libYARP_dev/src/IPositionDirectImpl.cpp b/src/libYARP_dev/src/IPositionDirectImpl.cpp
index 14ec9ee..220271b 100644
--- a/src/libYARP_dev/src/IPositionDirectImpl.cpp
+++ b/src/libYARP_dev/src/IPositionDirectImpl.cpp
@@ -12,6 +12,9 @@
 #include <yarp/os/Log.h>
 
 using namespace yarp::dev;
+#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define MJOINTIDCHECK(i) if (joints[i] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define PJOINTIDCHECK(j) if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 
 ImplementPositionDirect::ImplementPositionDirect(IPositionDirectRaw *y) :
     iPDirect(y),
@@ -74,6 +77,7 @@ YARP_WARNING_POP
 
 bool ImplementPositionDirect::setPosition(int j, double ref)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     castToMapper(helper)->posA2E(ref, j, enc, k);
@@ -84,7 +88,8 @@ bool ImplementPositionDirect::setPositions(const int n_joint, const int *joints,
 {
     for(int idx=0; idx<n_joint; idx++)
     {
-      castToMapper(helper)->posA2E(refs[idx], joints[idx], temp_double[idx], temp_int[idx]);
+        MJOINTIDCHECK(idx)
+        castToMapper(helper)->posA2E(refs[idx], joints[idx], temp_double[idx], temp_int[idx]);
     }
     return iPDirect->setPositionsRaw(n_joint, temp_int, temp_double);
 }
@@ -98,6 +103,7 @@ bool ImplementPositionDirect::setPositions(const double *refs)
 
 bool ImplementPositionDirect::getRefPosition(const int j, double* ref)
 {
+    JOINTIDCHECK
     int k;
     double tmp;
     k=castToMapper(helper)->toHw(j);
@@ -112,6 +118,7 @@ bool ImplementPositionDirect::getRefPositions(const int n_joint, const int* join
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         temp_int[idx]=castToMapper(helper)->toHw(joints[idx]);
     }
 
diff --git a/src/libYARP_dev/src/IVelocityControl2Impl.cpp b/src/libYARP_dev/src/IVelocityControl2Impl.cpp
index cd749b9..34d35ca 100644
--- a/src/libYARP_dev/src/IVelocityControl2Impl.cpp
+++ b/src/libYARP_dev/src/IVelocityControl2Impl.cpp
@@ -11,6 +11,9 @@
 #include <yarp/dev/ControlBoardHelper.h>
 
 using namespace yarp::dev;
+#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define MJOINTIDCHECK(i) if (joints[i] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define PJOINTIDCHECK(j) if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 
 ImplementVelocityControl2::ImplementVelocityControl2(IVelocityControl2Raw *y) :
     iVelocity2(y),
@@ -77,6 +80,7 @@ YARP_WARNING_POP
 
 bool ImplementVelocityControl2::velocityMove(int j, double sp)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     castToMapper(helper)->velA2E(sp, j, enc, k);
@@ -87,6 +91,7 @@ bool ImplementVelocityControl2::velocityMove(const int n_joint, const int *joint
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         castToMapper(helper)->velA2E(spds[idx], joints[idx], temp_double[idx], temp_int[idx]);
     }
     return iVelocity2->velocityMoveRaw(n_joint, temp_int, temp_double);
@@ -100,6 +105,7 @@ bool ImplementVelocityControl2::velocityMove(const double *sp)
 
 bool ImplementVelocityControl2::getRefVelocity(const int j, double* vel)
 {
+    JOINTIDCHECK
     int k;
     double tmp;
     k=castToMapper(helper)->toHw(j);
@@ -119,6 +125,7 @@ bool ImplementVelocityControl2::getRefVelocities(const int n_joint, const int *j
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         temp_int[idx]=castToMapper(helper)->toHw(joints[idx]);
     }
 
@@ -133,6 +140,7 @@ bool ImplementVelocityControl2::getRefVelocities(const int n_joint, const int *j
 
 bool ImplementVelocityControl2::setRefAcceleration(int j, double acc)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     castToMapper(helper)->accA2E_abs(acc, j, enc, k);
@@ -143,6 +151,7 @@ bool ImplementVelocityControl2::setRefAccelerations(const int n_joint, const int
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         castToMapper(helper)->accA2E_abs(accs[idx], joints[idx], temp_double[idx], temp_int[idx]);
     }
     return iVelocity2->setRefAccelerationsRaw(n_joint, temp_int, temp_double);
@@ -156,6 +165,7 @@ bool ImplementVelocityControl2::setRefAccelerations(const double *accs)
 
 bool ImplementVelocityControl2::getRefAcceleration(int j, double *acc)
 {
+    JOINTIDCHECK
     int k;
     double enc;
     k=castToMapper(helper)->toHw(j);
@@ -168,6 +178,7 @@ bool ImplementVelocityControl2::getRefAccelerations(const int n_joint, const int
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         temp_int[idx]=castToMapper(helper)->toHw(joints[idx]);
     }
 
@@ -191,6 +202,7 @@ bool ImplementVelocityControl2::getRefAccelerations(double *accs)
 
 bool ImplementVelocityControl2::stop(int j)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
     return iVelocity2->stopRaw(k);
@@ -201,6 +213,7 @@ bool ImplementVelocityControl2::stop(const int n_joint, const int *joints)
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         temp_int[idx] = castToMapper(helper)->toHw(joints[idx]);
     }
     return iVelocity2->stopRaw(n_joint, temp_int);
@@ -215,6 +228,7 @@ bool ImplementVelocityControl2::stop()
 
 bool ImplementVelocityControl2::setVelPid(int j, const Pid &pid)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return iVelocity2->setVelPidRaw(k,pid);
 }
@@ -237,6 +251,7 @@ bool ImplementVelocityControl2::setVelPids(const Pid *pids)
 
 bool ImplementVelocityControl2::getVelPid(int j, Pid *pid)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
 
diff --git a/src/libYARP_dev/src/ImpedanceControlImpl.cpp b/src/libYARP_dev/src/ImpedanceControlImpl.cpp
index f59df39..7346bed 100644
--- a/src/libYARP_dev/src/ImpedanceControlImpl.cpp
+++ b/src/libYARP_dev/src/ImpedanceControlImpl.cpp
@@ -11,6 +11,8 @@
 #include <yarp/dev/ControlBoardHelper.h>
 
 using namespace yarp::dev;
+#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define MJOINTIDCHECK(i) if (joints[i] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 
 /////////////// implement ImplementImpedanceControl
 ImplementImpedanceControl::ImplementImpedanceControl(IImpedanceControlRaw *r)
@@ -53,6 +55,7 @@ bool ImplementImpedanceControl::getAxes(int *axes)
 
 bool ImplementImpedanceControl::setImpedance(int j, double stiffness, double damping)
 {
+    JOINTIDCHECK
     int k;
     double stiff;
     double damp;
@@ -63,6 +66,7 @@ bool ImplementImpedanceControl::setImpedance(int j, double stiffness, double dam
 
 bool ImplementImpedanceControl::getImpedance(int j, double *stiffness, double *damping)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
     bool ret=iImpedanceRaw->getImpedanceRaw(k, stiffness, damping);
@@ -76,6 +80,7 @@ bool ImplementImpedanceControl::getImpedance(int j, double *stiffness, double *d
 
 bool ImplementImpedanceControl::setImpedanceOffset(int j, double offset)
 {
+    JOINTIDCHECK
     int k;
     double off;
     castToMapper(helper)->trqN2S(offset,j,off,k);
@@ -84,6 +89,7 @@ bool ImplementImpedanceControl::setImpedanceOffset(int j, double offset)
 
 bool ImplementImpedanceControl::getImpedanceOffset(int j, double *offset)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
     bool ret = iImpedanceRaw->getImpedanceOffsetRaw(k, offset);
@@ -93,6 +99,7 @@ bool ImplementImpedanceControl::getImpedanceOffset(int j, double *offset)
 
 bool ImplementImpedanceControl::getCurrentImpedanceLimit(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
     return iImpedanceRaw->getCurrentImpedanceLimitRaw(k, min_stiff, max_stiff, min_damp, max_damp);
diff --git a/src/libYARP_dev/src/OpenLoopControlImpl.cpp b/src/libYARP_dev/src/OpenLoopControlImpl.cpp
index 8f6c733..5524a00 100644
--- a/src/libYARP_dev/src/OpenLoopControlImpl.cpp
+++ b/src/libYARP_dev/src/OpenLoopControlImpl.cpp
@@ -10,6 +10,9 @@
 #include <iostream>
 
 using namespace yarp::dev;
+#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define MJOINTIDCHECK(i) if (joints[i] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define PJOINTIDCHECK(j) if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 
 /////////////// implement ImplementOpenLoopControl
 ImplementOpenLoopControl::ImplementOpenLoopControl(IOpenLoopControlRaw *r)
@@ -52,6 +55,7 @@ bool ImplementOpenLoopControl::uninitialize ()
 
 bool ImplementOpenLoopControl::setRefOutput(int j, double v)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
 
     return raw->setRefOutputRaw(k, v);
@@ -66,6 +70,7 @@ bool ImplementOpenLoopControl::setRefOutputs(const double *v)
 
 bool ImplementOpenLoopControl::getRefOutput(int j, double *v)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
 
     bool ret = raw->getRefOutputRaw(k, v);
@@ -82,6 +87,7 @@ bool ImplementOpenLoopControl::getRefOutputs(double *v)
 
 bool ImplementOpenLoopControl::getOutput(int j, double *v)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
 
     bool ret = raw->getOutputRaw(k, v);
diff --git a/src/libYARP_dev/src/PolyDriver.cpp b/src/libYARP_dev/src/PolyDriver.cpp
index aabb16c..5e20935 100644
--- a/src/libYARP_dev/src/PolyDriver.cpp
+++ b/src/libYARP_dev/src/PolyDriver.cpp
@@ -278,6 +278,7 @@ bool PolyDriver::coreOpen(yarp::os::Searchable& prop) {
                 } else {
                     yError("Device \"%s\" is deprecated. Pass the \"allow-deprecated-devices\" option in the configuration if you want to open it anyway.", str.c_str());
                     driver->close();
+                    delete driver;
                     return false;
                 }
             }
diff --git a/src/libYARP_dev/src/TorqueControlImpl.cpp b/src/libYARP_dev/src/TorqueControlImpl.cpp
index 9c2043b..fd65a05 100644
--- a/src/libYARP_dev/src/TorqueControlImpl.cpp
+++ b/src/libYARP_dev/src/TorqueControlImpl.cpp
@@ -10,6 +10,9 @@
 
 #include <stdio.h>
 using namespace yarp::dev;
+#define JOINTIDCHECK if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define MJOINTIDCHECK(i) if (joints[i] >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
+#define PJOINTIDCHECK(j) if (j >= castToMapper(helper)->axes()){yError("joint id out of bound"); return false;}
 
 ImplementTorqueControl::ImplementTorqueControl(ITorqueControlRaw *tq)
 {
@@ -54,6 +57,7 @@ bool ImplementTorqueControl::uninitialize ()
     }
     checkAndDestroy(temp);
     checkAndDestroy(temp2);
+    checkAndDestroy(temp_int);
     checkAndDestroy(tmpPids);
 
     return true;
@@ -76,6 +80,7 @@ YARP_WARNING_POP
 
 bool ImplementTorqueControl::getRefTorque(int j, double *r)
 {
+    JOINTIDCHECK
     int k;
     bool ret;
     double torque;
@@ -87,6 +92,7 @@ bool ImplementTorqueControl::getRefTorque(int j, double *r)
 
 bool ImplementTorqueControl::getBemfParam(int j, double *bemf)
 {
+    JOINTIDCHECK
     int k;
     bool ret;
     k=castToMapper(helper)->toHw(j);
@@ -96,6 +102,7 @@ bool ImplementTorqueControl::getBemfParam(int j, double *bemf)
 
 bool ImplementTorqueControl::setBemfParam(int j, double bemf)
 {
+    JOINTIDCHECK
     int k;
     bool ret;
     k=castToMapper(helper)->toHw(j);
@@ -105,6 +112,7 @@ bool ImplementTorqueControl::setBemfParam(int j, double bemf)
 
 bool ImplementTorqueControl::setMotorTorqueParams(int j,  const yarp::dev::MotorTorqueParameters params)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
     return iTorqueRaw->setMotorTorqueParamsRaw(k, params);
@@ -112,6 +120,7 @@ bool ImplementTorqueControl::setMotorTorqueParams(int j,  const yarp::dev::Motor
 
 bool ImplementTorqueControl::getMotorTorqueParams(int j,  yarp::dev::MotorTorqueParameters *params)
 {
+    JOINTIDCHECK
   int k=castToMapper(helper)->toHw(j);
   return iTorqueRaw->getMotorTorqueParamsRaw(k, params);
 }
@@ -132,6 +141,7 @@ bool ImplementTorqueControl::setRefTorques(const double *t)
 
 bool ImplementTorqueControl::setRefTorque(int j, double t)
 {
+    JOINTIDCHECK
     int k;
     double sens;
     castToMapper(helper)->trqN2S(t,j,sens,k);
@@ -149,6 +159,7 @@ bool ImplementTorqueControl::setRefTorques(const int n_joint, const int *joints,
 {
     for(int idx=0; idx<n_joint; idx++)
     {
+        MJOINTIDCHECK(idx)
         castToMapper(helper)->trqN2S(t[idx], joints[idx], temp[idx], temp_int[idx]);
     }
     return iTorqueRaw->setRefTorquesRaw(n_joint, temp_int, temp);
@@ -156,6 +167,7 @@ bool ImplementTorqueControl::setRefTorques(const int n_joint, const int *joints,
 
 bool ImplementTorqueControl::getTorque(int j, double *t)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
     return iTorqueRaw->getTorqueRaw(k, t);
@@ -171,6 +183,7 @@ bool ImplementTorqueControl::getTorqueRanges(double *min, double *max)
 
 bool ImplementTorqueControl::getTorqueRange(int j, double *min, double *max)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
     return iTorqueRaw->getTorqueRangeRaw(k, min, max);
@@ -178,6 +191,7 @@ bool ImplementTorqueControl::getTorqueRange(int j, double *min, double *max)
 
 bool ImplementTorqueControl::setTorquePid(int j, const Pid &pid)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
     return iTorqueRaw->setTorquePidRaw(k, pid);
@@ -199,6 +213,7 @@ bool ImplementTorqueControl::setTorquePids(const Pid *pids)
 
 bool ImplementTorqueControl::setTorqueErrorLimit(int j, double limit)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
     return iTorqueRaw->setTorqueErrorLimitRaw(k, limit);
@@ -206,6 +221,7 @@ bool ImplementTorqueControl::setTorqueErrorLimit(int j, double limit)
 
 bool ImplementTorqueControl::getTorqueErrorLimit(int j, double *limit)
 {
+    JOINTIDCHECK
     int k;
     k=castToMapper(helper)->toHw(j);
     return iTorqueRaw->getTorqueErrorLimitRaw(k, limit);
@@ -219,6 +235,7 @@ bool ImplementTorqueControl::setTorqueErrorLimits(const double *limits)
 
 bool ImplementTorqueControl::getTorqueError(int j, double *err)
 {
+    JOINTIDCHECK
     int k;
     bool ret;
     double temp;
@@ -238,6 +255,7 @@ bool ImplementTorqueControl::getTorqueErrors(double *errs)
 
 bool ImplementTorqueControl::getTorquePidOutput(int j, double *out)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return iTorqueRaw->getTorquePidOutputRaw(k, out);
 }
@@ -251,6 +269,7 @@ bool ImplementTorqueControl::getTorquePidOutputs(double *outs)
 
 bool ImplementTorqueControl::getTorquePid(int j, Pid *pid)
 {
+    JOINTIDCHECK
   int k=castToMapper(helper)->toHw(j);
   return iTorqueRaw->getTorquePidRaw(k, pid);
 }
@@ -280,23 +299,27 @@ bool ImplementTorqueControl::getTorqueErrorLimits(double *limits)
 
 bool ImplementTorqueControl::resetTorquePid(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return iTorqueRaw->resetTorquePidRaw(k);
 }
 
 bool ImplementTorqueControl::disableTorquePid(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return iTorqueRaw->disableTorquePidRaw(k);
 }
 
 bool ImplementTorqueControl::enableTorquePid(int j)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return iTorqueRaw->enableTorquePidRaw(k);
 }
 bool ImplementTorqueControl::setTorqueOffset(int j, double v)
 {
+    JOINTIDCHECK
     int k=castToMapper(helper)->toHw(j);
     return iTorqueRaw->setTorqueOffsetRaw(k, v);
 }
diff --git a/src/libYARP_dev/src/modules/AnalogWrapper/AnalogWrapper.cpp b/src/libYARP_dev/src/modules/AnalogWrapper/AnalogWrapper.cpp
index ec43c0f..6f758d2 100644
--- a/src/libYARP_dev/src/modules/AnalogWrapper/AnalogWrapper.cpp
+++ b/src/libYARP_dev/src/modules/AnalogWrapper/AnalogWrapper.cpp
@@ -484,7 +484,7 @@ bool AnalogWrapper::open(yarp::os::Searchable &config)
 
     if (config.check("deviceId"))
     {
-        yError() << "lAnalogWrapper: the parameter 'deviceId' has been deprecated, please use parameter 'name' instead. \n"
+        yError() << "AnalogServer: the parameter 'deviceId' has been removed, please use parameter 'name' instead. \n"
             << "e.g. In the FT wrapper configuration files of your robot, replace '<param name=""deviceId""> left_arm </param>' \n"
             << "with '/icub/left_arm/analog:o' ";
         return false;
diff --git a/src/libYARP_dev/src/modules/AnalogWrapper/AnalogWrapper.h b/src/libYARP_dev/src/modules/AnalogWrapper/AnalogWrapper.h
index 1a0c91b..776e9a5 100644
--- a/src/libYARP_dev/src/modules/AnalogWrapper/AnalogWrapper.h
+++ b/src/libYARP_dev/src/modules/AnalogWrapper/AnalogWrapper.h
@@ -59,6 +59,8 @@ namespace yarp{
 /**
  *  @ingroup dev_impl_wrapper
  *
+ * \brief Device that expose an AnalogSensor (using the IAnalogSensor interface) on the YARP or ROS network.
+ * 
  * \section analogWrapper_parameter Description of input parameters
  *
  *  It reads the data from an analog sensor and sends them on one or more ports.
diff --git a/src/libYARP_dev/src/modules/BatteryClient/BatteryClient.cpp b/src/libYARP_dev/src/modules/BatteryClient/BatteryClient.cpp
index b5246ff..cac20c4 100644
--- a/src/libYARP_dev/src/modules/BatteryClient/BatteryClient.cpp
+++ b/src/libYARP_dev/src/modules/BatteryClient/BatteryClient.cpp
@@ -203,28 +203,28 @@ bool yarp::dev::BatteryClient::open(yarp::os::Searchable &config)
 
     if (!inputPort.open(local.c_str()))
     {
-        yError("BatteryClient::open() error could not open port %s, check network\n",local.c_str());
+        yError("BatteryClient::open() error could not open port %s, check network",local.c_str());
         return false;
     }
     inputPort.useCallback();
 
     if (!rpcPort.open(local_rpc.c_str()))
     {
-        yError("BatteryClient::open() error could not open rpc port %s, check network\n", local_rpc.c_str());
+        yError("BatteryClient::open() error could not open rpc port %s, check network", local_rpc.c_str());
         return false;
     }
 
     bool ok=Network::connect(remote.c_str(), local.c_str(), "udp");
     if (!ok)
     {
-        yError("BatteryClient::open() error could not connect to %s\n", remote.c_str());
+        yError("BatteryClient::open() error could not connect to %s", remote.c_str());
         return false;
     }
 
     ok=Network::connect(local_rpc.c_str(), remote_rpc.c_str());
     if (!ok)
     {
-        fprintf(stderr,"BatteryClient::open() error could not connect to %s\n", remote_rpc.c_str());
+       yError("BatteryClient::open() error could not connect to %s", remote_rpc.c_str());
        return false;
     }
 
@@ -264,7 +264,7 @@ bool yarp::dev::BatteryClient::getBatteryStatus(int &status)
 
 bool yarp::dev::BatteryClient::getBatteryTemperature(double &temperature)
 {
-    temperature = inputPort.getStatus();
+    temperature = inputPort.getTemperature();
     return true;
 }
 
diff --git a/src/libYARP_dev/src/modules/ControlBoardWrapper/ControlBoardWrapper.cpp b/src/libYARP_dev/src/modules/ControlBoardWrapper/ControlBoardWrapper.cpp
index efbeb94..151e0b9 100644
--- a/src/libYARP_dev/src/modules/ControlBoardWrapper/ControlBoardWrapper.cpp
+++ b/src/libYARP_dev/src/modules/ControlBoardWrapper/ControlBoardWrapper.cpp
@@ -409,7 +409,7 @@ bool ControlBoardWrapper::open(Searchable& config)
     // check FIRST for deprecated parameter
     if(prop.check("threadrate"))
     {
-        yError() << " *** ControlBoardWrapper2 is using DEPRECATED parameter 'threadrate', use 'period' instead ***";
+        yError() << " *** ControlBoardWrapper2 is using removed parameter 'threadrate', use 'period' instead ***";
         return false;
     }
 
@@ -939,7 +939,7 @@ void ControlBoardWrapper::run()
 //
 bool ControlBoardWrapper::setPid(int j, const Pid &p)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *s=device.getSubdevice(subIndex);
@@ -978,7 +978,7 @@ bool ControlBoardWrapper::setPids(const Pid *ps)
 
 bool ControlBoardWrapper::setReference(int j, double ref)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1017,7 +1017,7 @@ bool ControlBoardWrapper::setReferences(const double *refs)
 
 bool ControlBoardWrapper::setErrorLimit(int j, double limit)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1065,7 +1065,7 @@ bool ControlBoardWrapper::setErrorLimits(const double *limits)
 */
 bool ControlBoardWrapper::getError(int j, double *err)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1114,7 +1114,7 @@ bool ControlBoardWrapper::getErrors(double *errs)
 */
 bool ControlBoardWrapper::getOutput(int j, double *out)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1157,7 +1157,7 @@ bool ControlBoardWrapper::getOutputs(double *outs)
 
 bool ControlBoardWrapper::setOffset(int j, double v)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1179,7 +1179,7 @@ bool ControlBoardWrapper::setOffset(int j, double v)
 bool ControlBoardWrapper::getPid(int j, Pid *p)
 {
 //#warning "check for max number of joints!?!?!"
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *s=device.getSubdevice(subIndex);
@@ -1226,7 +1226,7 @@ bool ControlBoardWrapper::getPids(Pid *pids)
 * @return reference value
 */
 bool ControlBoardWrapper::getReference(int j, double *ref) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1270,7 +1270,7 @@ bool ControlBoardWrapper::getReferences(double *refs) {
 * @return success/failure
 */
 bool ControlBoardWrapper::getErrorLimit(int j, double *limit) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1317,7 +1317,7 @@ bool ControlBoardWrapper::getErrorLimits(double *limits) {
 * @return true on success, false on failure.
 */
 bool ControlBoardWrapper::resetPid(int j) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1337,7 +1337,7 @@ bool ControlBoardWrapper::resetPid(int j) {
 * @return true if successful, false on failure
 **/
 bool ControlBoardWrapper::disablePid(int j) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1361,7 +1361,7 @@ bool ControlBoardWrapper::disablePid(int j) {
 * @return true/false on success/failure
 */
 bool ControlBoardWrapper::enablePid(int j) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1477,7 +1477,7 @@ YARP_WARNING_POP
 * @return true/false on success/failure
 */
 bool ControlBoardWrapper::positionMove(int j, double ref) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1602,7 +1602,7 @@ bool ControlBoardWrapper::positionMove(const int n_joints, const int *joints, co
 
 bool ControlBoardWrapper::getTargetPosition(const int j, double* ref)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1708,7 +1708,7 @@ bool ControlBoardWrapper::getTargetPositions(const int n_joints, const int *join
 * @return true/false on success/failure
 */
 bool ControlBoardWrapper::relativeMove(int j, double delta) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1807,7 +1807,7 @@ bool ControlBoardWrapper::relativeMove(const int n_joints, const int *joints, co
 * @return false on failure
 */
 bool ControlBoardWrapper::checkMotionDone(int j, bool *flag) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -1915,7 +1915,7 @@ bool ControlBoardWrapper::checkMotionDone(const int n_joints, const int *joints,
 * @return true/false upon success/failure
 */
 bool ControlBoardWrapper::setRefSpeed(int j, double sp) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -2045,7 +2045,7 @@ bool ControlBoardWrapper::setRefSpeeds(const int n_joints, const int *joints, co
 * @return true/false upon success/failure
 */
 bool ControlBoardWrapper::setRefAcceleration(int j, double acc) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -2177,7 +2177,7 @@ bool ControlBoardWrapper::setRefAccelerations(const int n_joints, const int *joi
  * @return true/false on success or failure
  */
 bool ControlBoardWrapper::getRefSpeed(int j, double *ref) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -2303,7 +2303,7 @@ bool ControlBoardWrapper::getRefSpeeds(const int n_joints, const int *joints, do
 * @return true/false on success/failure
 */
 bool ControlBoardWrapper::getRefAcceleration(int j, double *acc) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -2427,7 +2427,7 @@ bool ControlBoardWrapper::getRefAccelerations(const int n_joints, const int *joi
 * @return true/false on success/failure
 */
 bool ControlBoardWrapper::stop(int j) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -2522,7 +2522,7 @@ bool ControlBoardWrapper::stop(const int n_joints, const int *joints)
 /* IVelocityControl */
 
 bool ControlBoardWrapper::velocityMove(int j, double v) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -2625,7 +2625,7 @@ YARP_WARNING_POP
 /* IEncoders */
 
 bool ControlBoardWrapper::resetEncoder(int j) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -2662,7 +2662,7 @@ bool ControlBoardWrapper::resetEncoders() {
 }
 
 bool ControlBoardWrapper::setEncoder(int j, double val) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -2699,7 +2699,7 @@ bool ControlBoardWrapper::setEncoders(const double *vals) {
 }
 
 bool ControlBoardWrapper::getEncoder(int j, double *v) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -2759,7 +2759,7 @@ bool ControlBoardWrapper::getEncodersTimed(double *encs, double *t) {
 }
 
 bool ControlBoardWrapper::getEncoderTimed(int j, double *v, double *t) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -2775,7 +2775,7 @@ bool ControlBoardWrapper::getEncoderTimed(int j, double *v, double *t) {
 }
 
 bool ControlBoardWrapper::getEncoderSpeed(int j, double *sp) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -2813,7 +2813,7 @@ bool ControlBoardWrapper::getEncoderSpeeds(double *spds) {
 }
 
 bool ControlBoardWrapper::getEncoderAcceleration(int j, double *acc) {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3277,7 +3277,7 @@ bool ControlBoardWrapper::getNumberOfMotorEncoders(int *num) {
 
 bool ControlBoardWrapper::enableAmp(int j)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3293,7 +3293,7 @@ bool ControlBoardWrapper::enableAmp(int j)
 
 bool ControlBoardWrapper::disableAmp(int j)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3337,7 +3337,7 @@ bool ControlBoardWrapper::getAmpStatus(int *st)
 
 bool ControlBoardWrapper::getAmpStatus(int j, int *v)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3374,7 +3374,7 @@ bool ControlBoardWrapper::getCurrents(double *vals)
 
 bool ControlBoardWrapper::getCurrent(int j, double *val)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3391,7 +3391,7 @@ bool ControlBoardWrapper::getCurrent(int j, double *val)
 
 bool ControlBoardWrapper::setMaxCurrent(int j, double v)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3407,7 +3407,7 @@ bool ControlBoardWrapper::setMaxCurrent(int j, double v)
 
 bool ControlBoardWrapper::getMaxCurrent(int j, double* v)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3563,7 +3563,7 @@ bool ControlBoardWrapper::getPowerSupplyVoltage(int m, double* val)
 
 bool ControlBoardWrapper::setLimits(int j, double min, double max)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3579,7 +3579,7 @@ bool ControlBoardWrapper::setLimits(int j, double min, double max)
 
 bool ControlBoardWrapper::getLimits(int j, double *min, double *max)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3601,7 +3601,7 @@ bool ControlBoardWrapper::getLimits(int j, double *min, double *max)
 
 bool ControlBoardWrapper::setVelLimits(int j, double min, double max)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3617,7 +3617,7 @@ bool ControlBoardWrapper::setVelLimits(int j, double min, double max)
 
 bool ControlBoardWrapper::getVelLimits(int j, double *min, double *max)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     *min=0.0;
@@ -3725,7 +3725,7 @@ bool ControlBoardWrapper::quitPark()
 
 bool ControlBoardWrapper::calibrate(int j, double p)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *s=device.getSubdevice(subIndex);
@@ -3741,7 +3741,7 @@ bool ControlBoardWrapper::calibrate(int j, double p)
 
 bool ControlBoardWrapper::calibrate2(int j, unsigned int ui, double v1, double v2, double v3)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p = device.getSubdevice(subIndex);
@@ -3767,7 +3767,7 @@ bool ControlBoardWrapper::setCalibrationParameters(int j, const CalibrationParam
 
 bool ControlBoardWrapper::done(int j)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3797,7 +3797,7 @@ bool ControlBoardWrapper::abortCalibration()
 
 bool ControlBoardWrapper::getAxisName(int j, yarp::os::ConstString& name)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3886,7 +3886,7 @@ bool ControlBoardWrapper::getRefTorques(double *refs)
 bool ControlBoardWrapper::getRefTorque(int j, double *t)
 {
 
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3925,7 +3925,7 @@ bool ControlBoardWrapper::setRefTorques(const double *t)
 
 bool ControlBoardWrapper::setRefTorque(int j, double t)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -3989,7 +3989,7 @@ bool ControlBoardWrapper::setRefTorques(const int n_joints, const int *joints, c
 bool ControlBoardWrapper::getBemfParam(int j, double *t)
 {
 
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4005,7 +4005,7 @@ bool ControlBoardWrapper::getBemfParam(int j, double *t)
 
 bool ControlBoardWrapper::setBemfParam(int j, double t)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4021,7 +4021,7 @@ bool ControlBoardWrapper::setBemfParam(int j, double t)
 
 bool ControlBoardWrapper::getMotorTorqueParams(int j,  yarp::dev::MotorTorqueParameters *params)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4037,7 +4037,7 @@ bool ControlBoardWrapper::getMotorTorqueParams(int j,  yarp::dev::MotorTorquePar
 
 bool ControlBoardWrapper::setMotorTorqueParams(int j,  const yarp::dev::MotorTorqueParameters params)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4053,7 +4053,7 @@ bool ControlBoardWrapper::setMotorTorqueParams(int j,  const yarp::dev::MotorTor
 
 bool ControlBoardWrapper::setTorquePid(int j, const Pid &pid)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4070,7 +4070,7 @@ bool ControlBoardWrapper::setTorquePid(int j, const Pid &pid)
 
 bool ControlBoardWrapper::setImpedance(int j, double stiff, double damp)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4087,7 +4087,7 @@ bool ControlBoardWrapper::setImpedance(int j, double stiff, double damp)
 
 bool ControlBoardWrapper::setImpedanceOffset(int j, double offset)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4104,7 +4104,7 @@ bool ControlBoardWrapper::setImpedanceOffset(int j, double offset)
 
 bool ControlBoardWrapper::getTorque(int j, double *t)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4144,7 +4144,7 @@ bool ControlBoardWrapper::getTorques(double *t)
 
 bool ControlBoardWrapper::getTorqueRange(int j, double *min, double *max)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4206,7 +4206,7 @@ bool ControlBoardWrapper::setTorquePids(const Pid *pids)
 
 bool ControlBoardWrapper::setTorqueErrorLimit(int j, double limit)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4246,7 +4246,7 @@ bool ControlBoardWrapper::setTorqueErrorLimits(const double *limits)
 
 bool ControlBoardWrapper::getTorqueError(int j, double *err)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4286,7 +4286,7 @@ bool ControlBoardWrapper::getTorqueErrors(double *errs)
 
 bool ControlBoardWrapper::getTorquePidOutput(int j, double *out)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4326,7 +4326,7 @@ bool ControlBoardWrapper::getTorquePidOutputs(double *outs)
 
 bool ControlBoardWrapper::getTorquePid(int j, Pid *pid)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4343,7 +4343,7 @@ bool ControlBoardWrapper::getTorquePid(int j, Pid *pid)
 
 bool ControlBoardWrapper::getImpedance(int j, double* stiff, double* damp)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4360,7 +4360,7 @@ bool ControlBoardWrapper::getImpedance(int j, double* stiff, double* damp)
 
 bool ControlBoardWrapper::getImpedanceOffset(int j, double* offset)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4377,7 +4377,7 @@ bool ControlBoardWrapper::getImpedanceOffset(int j, double* offset)
 
 bool ControlBoardWrapper::getCurrentImpedanceLimit(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4417,7 +4417,7 @@ bool ControlBoardWrapper::getTorquePids(Pid *pids)
 
 bool ControlBoardWrapper::getTorqueErrorLimit(int j, double *limit)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4457,7 +4457,7 @@ bool ControlBoardWrapper::getTorqueErrorLimits(double *limits)
 
 bool ControlBoardWrapper::resetTorquePid(int j)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4474,7 +4474,7 @@ bool ControlBoardWrapper::resetTorquePid(int j)
 
 bool ControlBoardWrapper::disableTorquePid(int j)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4491,7 +4491,7 @@ bool ControlBoardWrapper::disableTorquePid(int j)
 
 bool ControlBoardWrapper::enableTorquePid(int j)
 {
-     int off=device.lut[j].offset;
+     int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4508,7 +4508,7 @@ bool ControlBoardWrapper::enableTorquePid(int j)
 
 bool ControlBoardWrapper::setTorqueOffset(int j, double v)
 {
-     int off=device.lut[j].offset;
+     int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4525,7 +4525,7 @@ bool ControlBoardWrapper::setTorqueOffset(int j, double v)
 
 bool ControlBoardWrapper::setPositionMode(int j)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4547,7 +4547,7 @@ bool ControlBoardWrapper::setPositionMode(int j)
 
 bool ControlBoardWrapper::setTorqueMode(int j)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4569,7 +4569,7 @@ bool ControlBoardWrapper::setTorqueMode(int j)
 
 bool ControlBoardWrapper::setImpedancePositionMode(int j)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4587,7 +4587,7 @@ bool ControlBoardWrapper::setImpedancePositionMode(int j)
 
 bool ControlBoardWrapper::setImpedanceVelocityMode(int j)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4604,7 +4604,7 @@ bool ControlBoardWrapper::setImpedanceVelocityMode(int j)
 
 bool ControlBoardWrapper::setVelocityMode(int j)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4626,7 +4626,7 @@ bool ControlBoardWrapper::setVelocityMode(int j)
 
 bool ControlBoardWrapper::setOpenLoopMode(int j)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4648,7 +4648,7 @@ bool ControlBoardWrapper::setOpenLoopMode(int j)
 
 bool ControlBoardWrapper::getControlMode(int j, int *mode)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4712,7 +4712,7 @@ bool ControlBoardWrapper::getControlModes(const int n_joint, const int *joints,
 bool ControlBoardWrapper::legacySetControlMode(const int j, const int mode)
 {
     bool ret = true;
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4784,7 +4784,7 @@ bool ControlBoardWrapper::legacySetControlMode(const int j, const int mode)
 bool ControlBoardWrapper::setControlMode(const int j, const int mode)
 {
     bool ret = true;
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4899,7 +4899,7 @@ bool ControlBoardWrapper::setControlModes(int *modes)
 
 bool ControlBoardWrapper::setRefOutput(int j, double v)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -4937,7 +4937,7 @@ bool ControlBoardWrapper::setRefOutputs(const double *outs) {
 
 bool ControlBoardWrapper::setPosition(int j, double ref)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -5047,7 +5047,7 @@ yarp::os::Stamp ControlBoardWrapper::getLastInputStamp() {
 
 bool ControlBoardWrapper::getRefPosition(const int j, double* ref)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -5195,7 +5195,7 @@ bool ControlBoardWrapper::getRefVelocity(const int j, double* vel)
     if(verbose())
         yTrace();
 
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -5298,7 +5298,7 @@ bool ControlBoardWrapper::getRefVelocities(const int n_joints, const int* joints
 
 bool ControlBoardWrapper::setVelPid(int j, const Pid &pid)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *s=device.getSubdevice(subIndex);
@@ -5338,7 +5338,7 @@ bool ControlBoardWrapper::setVelPids(const Pid *pids)
 bool ControlBoardWrapper::getVelPid(int j, Pid *pid)
 {
     //#warning "check for max number of joints!?!?!"
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *s=device.getSubdevice(subIndex);
@@ -5377,7 +5377,7 @@ bool ControlBoardWrapper::getVelPids(Pid *pids)
 
 bool ControlBoardWrapper::getInteractionMode(int j, yarp::dev::InteractionModeEnum* mode)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *s=device.getSubdevice(subIndex);
@@ -5453,7 +5453,7 @@ bool ControlBoardWrapper::getInteractionModes(yarp::dev::InteractionModeEnum* mo
 
     for(int j=0; j<controlledJoints; j++)
     {
-        int off=device.lut[j].offset;
+        int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
         int subIndex=device.lut[j].deviceEntry;
 
         yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -5472,7 +5472,7 @@ bool ControlBoardWrapper::getInteractionModes(yarp::dev::InteractionModeEnum* mo
 
 bool ControlBoardWrapper::setInteractionMode(int j, yarp::dev::InteractionModeEnum mode)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *s=device.getSubdevice(subIndex);
@@ -5527,7 +5527,7 @@ bool ControlBoardWrapper::setInteractionModes(yarp::dev::InteractionModeEnum* mo
 
     for(int j=0; j<controlledJoints; j++)
     {
-        int off=device.lut[j].offset;
+        int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
         int subIndex=device.lut[j].deviceEntry;
 
         yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
@@ -5546,7 +5546,7 @@ bool ControlBoardWrapper::setInteractionModes(yarp::dev::InteractionModeEnum* mo
 
 bool ControlBoardWrapper::getRefOutput(int j, double *out)
 {
-    int off=device.lut[j].offset;
+    int off; try{off = device.lut.at(j).offset;} catch(...){yError() << "joint number " << j <<  " out of bound [0-"<< controlledJoints << "] for part " << partName; return false; }
     int subIndex=device.lut[j].deviceEntry;
 
     yarp::dev::impl::SubDevice *p=device.getSubdevice(subIndex);
diff --git a/src/libYARP_dev/src/modules/Rangefinder2DWrapper/Rangefinder2DWrapper.cpp b/src/libYARP_dev/src/modules/Rangefinder2DWrapper/Rangefinder2DWrapper.cpp
index ee32f7e..5bfac55 100644
--- a/src/libYARP_dev/src/modules/Rangefinder2DWrapper/Rangefinder2DWrapper.cpp
+++ b/src/libYARP_dev/src/modules/Rangefinder2DWrapper/Rangefinder2DWrapper.cpp
@@ -41,10 +41,11 @@ Rangefinder2DWrapper::Rangefinder2DWrapper() : RateThread(DEFAULT_THREAD_PERIOD)
     rosNode = NULL;
     rosMsgCounter = 0;
     useROS      = ROS_disabled;
-    minAngle    = DEFAULT_DUMMY_MIN_ANGLE_DEG;
-    maxAngle    = DEFAULT_DUMMY_MAX_ANGLE_DEG;
-    minDistance = DEFAULT_DUMMY_MIN_DISTANCE;
-    maxDistance = DEFAULT_DUMMY_MAX_DISTANCE;
+    minAngle    = 0;
+    maxAngle    = 0;
+    minDistance = 0;
+    maxDistance = 0;
+    resolution = 0;
 }
 
 Rangefinder2DWrapper::~Rangefinder2DWrapper()
@@ -214,14 +215,20 @@ bool Rangefinder2DWrapper::attachAll(const PolyDriverList &device2attach)
 
     if(!sens_p->getDistanceRange(minDistance, maxDistance))
     {
-        yWarning() << "Laser device does not provide min & max angle scan range. Using dummy values of " << DEFAULT_DUMMY_MIN_DISTANCE \
-        << " and " << DEFAULT_DUMMY_MAX_DISTANCE << " for ROS messages.";
+        yError() << "Laser device does not provide min & max distance range.";
+        return false;
     }
 
     if(!sens_p->getScanLimits(minAngle, maxAngle))
     {
-        yWarning() << "Laser device does not provide min & max distance range. Using dummy values of " << DEFAULT_DUMMY_MIN_ANGLE_DEG \
-        << " and " << DEFAULT_DUMMY_MAX_ANGLE_DEG << " for ROS messages.";
+        yError() << "Laser device does not provide min & max angle scan range.";
+        return false;
+    }
+
+    if (!sens_p->getHorizontalResolution(resolution))
+    {
+        yError() << "Laser device does not provide horizontal resolution ";
+        return false;
     }
 
     RateThread::setRate(_rate);
@@ -554,7 +561,7 @@ void Rangefinder2DWrapper::run()
 
                 rosData.angle_min = minAngle * 3.14 / 180.0;
                 rosData.angle_max = maxAngle * 3.14 / 180.0;
-                rosData.angle_increment = 1 * 3.14 / 180.0;
+                rosData.angle_increment = resolution * 3.14 / 180.0;
                 rosData.time_increment = 0;             // all points in a single scan are considered took at the very same time
                 rosData.scan_time = 1/getRate();        // time elapsed between two successive readings
                 rosData.range_min = minDistance;
diff --git a/src/libYARP_dev/src/modules/Rangefinder2DWrapper/Rangefinder2DWrapper.h b/src/libYARP_dev/src/modules/Rangefinder2DWrapper/Rangefinder2DWrapper.h
index 5edd696..2187cd1 100644
--- a/src/libYARP_dev/src/modules/Rangefinder2DWrapper/Rangefinder2DWrapper.h
+++ b/src/libYARP_dev/src/modules/Rangefinder2DWrapper/Rangefinder2DWrapper.h
@@ -38,12 +38,6 @@
 #include <yarp/os/Publisher.h>
 #include <sensor_msgs_LaserScan.h>
 
-#define DEFAULT_DUMMY_MIN_DISTANCE      0.0             // [m]
-#define DEFAULT_DUMMY_MAX_DISTANCE      100.0           // [m]
-
-#define DEFAULT_DUMMY_MIN_ANGLE_DEG     0.0             // angular min scan range in degrees
-#define DEFAULT_DUMMY_MAX_ANGLE_DEG     360.0           // angular max scan range in degrees
-
 namespace yarp{
     namespace dev{
         class Rangefinder2DWrapper;
@@ -94,6 +88,7 @@ private:
     std::string sensorId;
     double minAngle, maxAngle;
     double minDistance, maxDistance;
+    double resolution;
 
     bool checkROSParams(yarp::os::Searchable &config);
     bool initialize_ROS();
diff --git a/src/libYARP_dev/src/modules/RemoteControlBoard/RemoteControlBoard.cpp b/src/libYARP_dev/src/modules/RemoteControlBoard/RemoteControlBoard.cpp
index 7f82eec..9728b69 100644
--- a/src/libYARP_dev/src/modules/RemoteControlBoard/RemoteControlBoard.cpp
+++ b/src/libYARP_dev/src/modules/RemoteControlBoard/RemoteControlBoard.cpp
@@ -4272,11 +4272,18 @@ public:
     }
 
 #ifndef YARP_NO_DEPRECATED // since YARP 2.3.65
+#if !defined(_MSC_VER)
+YARP_WARNING_PUSH
+YARP_DISABLE_DEPRECATED_WARNING
+#endif
     YARP_DEPRECATED virtual bool setPositionMode() { return set1V(VOCAB_POSITION_MODE); }
     YARP_DEPRECATED virtual bool setVelocityMode() { return set1V(VOCAB_VELOCITY_MODE); }
     YARP_DEPRECATED virtual bool setTorqueMode() { return set1V(VOCAB_TORQUE_MODE); }
     YARP_DEPRECATED virtual bool setOpenLoopMode() { return set1V(VOCAB_OPENLOOP_MODE); }
     YARP_DEPRECATED virtual bool setPositionDirectMode() { return set1V(VOCAB_POSITION_DIRECT); }
+#if !defined(_MSC_VER)
+YARP_WARNING_PUSH
+#endif
 #endif // YARP_NO_DEPRECATED
 
 };
diff --git a/src/libYARP_manager/src/manager.cpp b/src/libYARP_manager/src/manager.cpp
index 8e357e1..3e89516 100644
--- a/src/libYARP_manager/src/manager.cpp
+++ b/src/libYARP_manager/src/manager.cpp
@@ -571,7 +571,7 @@ bool Manager::checkDependency(void)
 {
     /**
      * checking for port resources availability
-     * TODO:later it should change to use proper broker for resource cheking.
+     * TODO:later it should change to use proper broker for resource checking.
      *      up to now, we use only yraprun for checking port resources
      */
     bool ret = true;
diff --git a/src/libYARP_manager/src/yarpbroker.cpp b/src/libYARP_manager/src/yarpbroker.cpp
index 7382eb7..88801c9 100644
--- a/src/libYARP_manager/src/yarpbroker.cpp
+++ b/src/libYARP_manager/src/yarpbroker.cpp
@@ -147,7 +147,7 @@ bool YarpBroker::init(const char* szcmd, const char* szparam,
         if(((*itr) == ' ') || ((*itr) == '/') )
             (*itr) = ':';
 
-   __trace_message = "(init) cheking yarp network";
+   __trace_message = "(init) checking yarp network";
     if(!NetworkBase::checkNetwork(5.0))
     {
         strError = "Yarp network server is not up.";
diff --git a/src/libYARP_serversql/src/NameServiceOnTriples.cpp b/src/libYARP_serversql/src/NameServiceOnTriples.cpp
index 393dc90..ba76f01 100644
--- a/src/libYARP_serversql/src/NameServiceOnTriples.cpp
+++ b/src/libYARP_serversql/src/NameServiceOnTriples.cpp
@@ -582,6 +582,7 @@ bool NameServiceOnTriples::apply(yarp::os::Bottle& cmd,
     ConstString key = cmd.get(0).toString();
     ConstString prefix = " * ";
 
+    access.wait();
     if (key=="register") {
         lastRegister = cmd.get(1).asString().c_str();
     } else if (key=="set") {
@@ -596,6 +597,7 @@ bool NameServiceOnTriples::apply(yarp::os::Bottle& cmd,
                prefix.c_str(),
                cmd.toString().c_str());
     }
+    access.post();
 
     TripleSource& mem = *db;
     //mem.begin();
diff --git a/src/libYARP_serversql/src/NameServiceOnTriples.h b/src/libYARP_serversql/src/NameServiceOnTriples.h
index 70211a6..53a3433 100644
--- a/src/libYARP_serversql/src/NameServiceOnTriples.h
+++ b/src/libYARP_serversql/src/NameServiceOnTriples.h
@@ -20,7 +20,8 @@
  * State information for a single name server operation on a database.
  *
  */
-class NameTripleState {
+class NameTripleState
+{
 public:
     yarp::os::Bottle& cmd;
     yarp::os::Bottle& reply;
@@ -30,18 +31,19 @@ public:
     bool bottleMode;
     bool nestedMode;
 
-    NameTripleState(yarp::os::Bottle& cmd, 
-                    yarp::os::Bottle& reply, 
-                    yarp::os::Bottle& event, 
+    NameTripleState(yarp::os::Bottle& cmd,
+                    yarp::os::Bottle& reply,
+                    yarp::os::Bottle& event,
                     const yarp::os::Contact& remote,
-                    TripleSource& mem) : cmd(cmd), 
-                                         reply(reply), 
-                                         event(event), 
-                                         remote(remote),
-                                         mem(mem)
+                    TripleSource& mem) :
+            cmd(cmd),
+            reply(reply),
+            event(event),
+            remote(remote),
+            mem(mem),
+            bottleMode(false),
+            nestedMode(false)
     {
-        bottleMode = false;
-        nestedMode = false;
     }
 };
 
@@ -50,7 +52,8 @@ public:
  * An implementation of name service operators on a triple store.
  *
  */
-class NameServiceOnTriples : public yarp::name::NameService {
+class NameServiceOnTriples : public yarp::name::NameService
+{
 private:
     TripleSource *db;
     Allocator *alloc;
@@ -58,37 +61,44 @@ private:
     std::string lastRegister;
     yarp::os::Contact serverContact;
     yarp::os::Semaphore mutex;
+    yarp::os::Semaphore access;
     bool gonePublic;
     bool silent;
     yarp::os::NameSpace *delegate;
 public:
-    NameServiceOnTriples() : mutex(1) {
-        db = 0 /*NULL*/;
-        alloc = 0 /*NULL*/;
-        lastRegister = "";
-        subscriber = NULL;
-        gonePublic = false;
-        silent = false;
-        delegate = 0 /*NULL*/;
+    NameServiceOnTriples() :
+            db(NULL),
+            alloc(NULL),
+            subscriber(NULL),
+            lastRegister(""),
+            mutex(1),
+            access(1),
+            gonePublic(false),
+            silent(false),
+            delegate(NULL)
+    {
     }
 
     void open(TripleSource *db,
               Allocator *alloc,
-              const yarp::os::Contact& serverContact) {
+              const yarp::os::Contact& serverContact)
+    {
         this->db = db;
         this->alloc = alloc;
         this->serverContact = serverContact;
     }
 
-    void setSubscriber(Subscriber *subscriber) {
+    void setSubscriber(Subscriber *subscriber)
+    {
         this->subscriber = subscriber;
     }
 
-    void setSilent(bool flag) {
+    void setSilent(bool flag)
+    {
         this->silent = flag;
     }
 
-    yarp::os::Contact query(const yarp::os::ConstString& portName, 
+    yarp::os::Contact query(const yarp::os::ConstString& portName,
                             NameTripleState& act,
                             const yarp::os::ConstString& prefix,
                             bool nested = false);
@@ -117,12 +127,13 @@ public:
 
     bool cmdHelp(NameTripleState& act);
 
-    virtual bool apply(yarp::os::Bottle& cmd, 
-                       yarp::os::Bottle& reply, 
+    virtual bool apply(yarp::os::Bottle& cmd,
+                       yarp::os::Bottle& reply,
                        yarp::os::Bottle& event,
                        const yarp::os::Contact& remote);
 
-    virtual void goPublic() {
+    virtual void goPublic()
+    {
         gonePublic = true;
     }
 
@@ -130,11 +141,13 @@ public:
 
     void unlock();
 
-    void setDelegate(yarp::os::NameSpace *delegate) {
+    void setDelegate(yarp::os::NameSpace *delegate)
+    {
         this->delegate = delegate;
     }
 
-    yarp::os::NameSpace *getDelegate() {
+    yarp::os::NameSpace *getDelegate()
+    {
         return delegate;
     }
 };
diff --git a/src/libYARP_serversql/src/yarpserver3.cpp b/src/libYARP_serversql/src/yarpserver3.cpp
index 6e015d2..7286f40 100644
--- a/src/libYARP_serversql/src/yarpserver3.cpp
+++ b/src/libYARP_serversql/src/yarpserver3.cpp
@@ -192,11 +192,12 @@ yarpserversql_API int yarpserver3_main(int argc, char *argv[]) {
         ::exit(1);
     }
 
-    printf("__   __ _    ____  ____  \n\
-\\ \\ / // \\  |  _ \\|  _ \\ \n\
- \\ V // _ \\ | |_) | |_) |\n\
-  | |/ ___ \\|  _ <|  __/ \n\
-  |_/_/   \\_\\_| \\_\\_|    \n\n");
+    printf("    __  __ ___  ____   ____\n\
+    \\ \\/ //   ||  _ \\ |  _ \\\n\
+     \\  // /| || |/ / | |/ /\n\
+     / // ___ ||  _ \\ |  _/\n\
+    /_//_/  |_||_| \\_\\|_|\n\
+    ========================\n\n");
 
     Property options;
     options.fromCommand(argc,argv);
diff --git a/src/libyarpc/CMakeLists.txt b/src/libyarpc/CMakeLists.txt
index b44d32f..b8ea6e5 100644
--- a/src/libyarpc/CMakeLists.txt
+++ b/src/libyarpc/CMakeLists.txt
@@ -2,17 +2,25 @@
 # Author: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-option(CREATE_YARPC "Compile experimental stable C library" FALSE)
+
+include(CMakeDependentOption)
+cmake_dependent_option(CREATE_YARPC "Compile experimental stable C library" FALSE
+                       YARP_COMPILE_UNMAINTAINED FALSE)
 mark_as_advanced(CREATE_YARPC)
 
-if(CREATE_YARPC)
-  option(CREATE_YARPC_STANDALONE "Make yarpc be fully standalone" TRUE)
+cmake_dependent_option(CREATE_YARPC_STANDALONE "Make yarpc library fully standalone" TRUE
+                       CREATE_YARPC FALSE)
+mark_as_advanced(CREATE_YARPC_STANDALONE)
 
-  project(yarpc)
+if(CREATE_YARPC)
   set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
 
-  set(YARP_COPY_SRC)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS})
+
+  unset(YARP_COPY_SRC)
   if(CREATE_YARPC_STANDALONE)
+    include_directories(SYSTEM ${ACE_INCLUDE_DIRS})
     # in some cases, want to be fully stand-alone to not depend on C++ ABI.
     foreach(_comp OS sig dev init)
       get_property(${_comp}_src TARGET YARP_${_comp} PROPERTY SOURCES)
@@ -25,10 +33,6 @@ if(CREATE_YARPC)
     endforeach()
   endif(CREATE_YARPC_STANDALONE)
 
-  if(CREATE_YARPC_STANDALONE)
-      include_directories(SYSTEM ${ACE_INCLUDE_DIRS})
-  endif()
-
   set(yarpc_HDRS yarp.h
                  yarpimpl.h)
 
@@ -53,9 +57,11 @@ if(CREATE_YARPC)
                     ${yarpc_SRCS}
                     ${YARP_COPY_SRC})
 
-  target_link_libraries(yarpc ${ACE_LIBRARIES})
+  target_link_libraries(yarpc LINK_PRIVATE ${ACE_LIBRARIES})
 
   if(NOT CREATE_YARPC_STANDALONE)
+    target_link_libraries(yarpc LINK_PRIVATE YARP_OS
+                                             YARP_init)
     if(YARP_LINK_PLUGINS)
       if(CREATE_OPTIONAL_CARRIERS)
         set_property(SOURCE ${init_src}
@@ -74,11 +80,11 @@ if(CREATE_YARPC)
 
   else()
     if(LINUX)
-      target_link_libraries(yarpc pthread m dl rt)
+      target_link_libraries(yarpc LINK_PRIVATE pthread m dl rt)
     endif()
     if(MINGW)
-      target_link_libraries(yarpc stdc++)
-      target_link_libraries(yarpc m ws2_32 mswsock netapi32 winmm)
+      target_link_libraries(yarpc LINK_PRIVATE stdc++)
+      target_link_libraries(yarpc LINK_PRIVATE m ws2_32 mswsock netapi32 winmm)
       set_target_properties(yarpc PROPERTIES LINK_FLAGS "-Wl,--output-def,${LIBRARY_OUTPUT_PATH}/libyarpc.def")
     endif()
   endif(NOT CREATE_YARPC_STANDALONE)
diff --git a/src/libyarpcxx/CMakeLists.txt b/src/libyarpcxx/CMakeLists.txt
index 09c128e..61a6c96 100644
--- a/src/libyarpcxx/CMakeLists.txt
+++ b/src/libyarpcxx/CMakeLists.txt
@@ -2,41 +2,41 @@
 # Authors: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-if(CREATE_YARPC)
 
-  option(CREATE_YARPCXX "Compile experimental stable C++ library" FALSE)
+include(CMakeDependentOption)
+cmake_dependent_option(CREATE_YARPCXX "Compile experimental stable C++ library" FALSE
+                       "YARP_COMPILE_UNMAINTAINED;CREATE_YARPC" FALSE)
+mark_as_advanced(CREATE_YARPCXX)
 
-  if(CREATE_YARPCXX)
+if(CREATE_YARPCXX)
 
-    project(yarpcxx)
+  project(yarpcxx)
 
-    # TODO install headers
+  # TODO install headers
 
-    if(YARP_COMPILE_TESTS)
+  if(YARP_COMPILE_TESTS)
 
-      # pick up yarp.h
-      include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../libyarpc)
+    # pick up yarp.h
+    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../libyarpc)
 
-      # pick up experimental C++ headers
-      include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
+    # pick up experimental C++ headers
+    include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
-      add_executable(yarpcxx_test1 yarpcxx_test1.cpp)
-      target_link_libraries(yarpcxx_test1 yarpc)
+    add_executable(yarpcxx_test1 yarpcxx_test1.cpp)
+    target_link_libraries(yarpcxx_test1 yarpc)
 
-      add_executable(yarpcxx_test2 yarpcxx_test2.cpp)
-      target_link_libraries(yarpcxx_test2 yarpc)
+    add_executable(yarpcxx_test2 yarpcxx_test2.cpp)
+    target_link_libraries(yarpcxx_test2 yarpc)
 
-      set(EXAMPLE_DIR ${CMAKE_SOURCE_DIR}/example)
-      add_executable(yarpcxx_test_threads ${EXAMPLE_DIR}/os/threads.cpp)
-      target_link_libraries(yarpcxx_test_threads yarpc)
+    set(EXAMPLE_DIR ${CMAKE_SOURCE_DIR}/example)
+    add_executable(yarpcxx_test_threads ${EXAMPLE_DIR}/os/threads.cpp)
+    target_link_libraries(yarpcxx_test_threads yarpc)
 
-      add_executable(yarpcxx_test_simple_sender ${EXAMPLE_DIR}/os/simple_sender.cpp)
-      target_link_libraries(yarpcxx_test_simple_sender yarpc)
+    add_executable(yarpcxx_test_simple_sender ${EXAMPLE_DIR}/os/simple_sender.cpp)
+    target_link_libraries(yarpcxx_test_simple_sender yarpc)
 
-      add_executable(yarpcxx_test_simple_receiver ${EXAMPLE_DIR}/os/simple_receiver.cpp)
-      target_link_libraries(yarpcxx_test_simple_receiver yarpc)
-
-    endif()
+    add_executable(yarpcxx_test_simple_receiver ${EXAMPLE_DIR}/os/simple_receiver.cpp)
+    target_link_libraries(yarpcxx_test_simple_receiver yarpc)
 
   endif()
 
diff --git a/src/modules/CMakeLists.txt b/src/modules/CMakeLists.txt
index ba8d7ba..38c0b1c 100644
--- a/src/modules/CMakeLists.txt
+++ b/src/modules/CMakeLists.txt
@@ -6,89 +6,90 @@
 option(CREATE_DEVICE_LIBRARY_MODULES "Compile device modules" FALSE)
 if (CREATE_DEVICE_LIBRARY_MODULES)
 
-project(YarpModules)
+  include(YarpPlugin)
 
-include(YarpPlugin)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS})
 
-# Prepare a plugin library called "yarpmod".
-YARP_BEGIN_PLUGIN_LIBRARY(yarpmod)
-  add_subdirectory(cuda)
-  add_subdirectory(fakebot)
-  add_subdirectory(fakeMotionControl)
-  add_subdirectory(fakeIMU)
-  add_subdirectory(nvidia)
-  add_subdirectory(stage)
-  add_subdirectory(vfw)
-  add_subdirectory(wxsdl)
-  add_subdirectory(SerialServoBoard)
-  add_subdirectory(ffmpeg)
-  add_subdirectory(opencv)
-  add_subdirectory(microphone)
-  add_subdirectory(serial)
-  add_subdirectory(portaudio)
-  add_subdirectory(imuBosch_BNO055)
-  add_subdirectory(jrkerr)
-  add_subdirectory(urbtc)
-  add_subdirectory(DynamixelAX12Ftdi)
-  add_subdirectory(fakeLaser)
-  add_subdirectory(rpLidar)
-  add_subdirectory(laserHokuyo)
-  add_subdirectory(kinect)
-  add_subdirectory(openni2)
-  add_subdirectory(ovrheadset)
-  add_subdirectory(PumaCalibrator)
+  # Prepare a plugin library called "yarpmod".
+  YARP_BEGIN_PLUGIN_LIBRARY(yarpmod)
+    add_subdirectory(cuda)
+    add_subdirectory(fakebot)
+    add_subdirectory(fakeMotionControl)
+    add_subdirectory(fakeIMU)
+    add_subdirectory(nvidia)
+    add_subdirectory(stage)
+    add_subdirectory(vfw)
+    add_subdirectory(wxsdl)
+    add_subdirectory(SerialServoBoard)
+    add_subdirectory(ffmpeg)
+    add_subdirectory(opencv)
+    add_subdirectory(microphone)
+    add_subdirectory(serial)
+    add_subdirectory(portaudio)
+    add_subdirectory(imuBosch_BNO055)
+    add_subdirectory(jrkerr)
+    add_subdirectory(urbtc)
+    add_subdirectory(DynamixelAX12Ftdi)
+    add_subdirectory(fakeLaser)
+    add_subdirectory(rpLidar)
+    add_subdirectory(laserHokuyo)
+    add_subdirectory(kinect)
+    add_subdirectory(openni2)
+    add_subdirectory(ovrheadset)
+    add_subdirectory(PumaCalibrator)
 
-  # The dimax_u2c/blob is not exported in the tarball, therefore we
-  # disable the build if the folder does not exist
-  if(EXISTS ${CMAKE_CURRENT_DIRECTORY}/dimax_u2c/blob)
+    # The dimax_u2c/blob is not exported in the tarball, therefore we
+    # disable the build if the folder does not exist
+    if(EXISTS ${CMAKE_CURRENT_DIRECTORY}/dimax_u2c/blob)
       add_subdirectory(dimax_u2c)
-  endif()
+    endif()
 
-  # We can include remote directories as well - we specify a
-  # local directory for producing binaries so there is no interference
-  # with other possible builds.
-  # Actually, we don't do this anymore, but if we did, here's an
-  # example of how to do it:
-  # add_subdirectory(${YARP_DIR}/src/libYARP_dev/src/dimax_u2c
-  #                  ${CMAKE_CURRENT_BINARY_DIR}/dimax_u2c)
+    # We can include remote directories as well - we specify a
+    # local directory for producing binaries so there is no interference
+    # with other possible builds.
+    # Actually, we don't do this anymore, but if we did, here's an
+    # example of how to do it:
+    # add_subdirectory(${YARP_DIR}/src/libYARP_dev/src/dimax_u2c
+    #                  ${CMAKE_CURRENT_BINARY_DIR}/dimax_u2c)
 
-  # We can also suck in other device libraries built the same way.
-  # We seek an ExternalModules.cmake file either in the conf directory
-  # or in our build directory
-  set(EXTFILES "${YARP_MODULE_DIR}/ExternalModules.cmake"
-    "${CMAKE_BINARY_DIR}/ExternalModules.cmake")
-  foreach(EXTFILE ${EXTFILES})
-    if (EXISTS ${EXTFILE})
-      include(${EXTFILE})
-      foreach(EXTDIR ${EXTERNAL_MODULES})
-        if (NOT ${EXTDIR}_DIR)
-          set(${EXTDIR}_DIR ${${EXTDIR}_PATH})
-        endif (NOT ${EXTDIR}_DIR)
-        if (NOT ${EXTDIR}_DIR)
+    # We can also suck in other device libraries built the same way.
+    # We seek an ExternalModules.cmake file either in the conf directory
+    # or in our build directory
+    set(EXTFILES "${YARP_MODULE_DIR}/ExternalModules.cmake"
+                 "${CMAKE_BINARY_DIR}/ExternalModules.cmake")
+    foreach(EXTFILE ${EXTFILES})
+      if(EXISTS ${EXTFILE})
+        include(${EXTFILE})
+        foreach(EXTDIR ${EXTERNAL_MODULES})
+          if(NOT ${EXTDIR}_DIR)
+            set(${EXTDIR}_DIR ${${EXTDIR}_PATH})
+          endif()
+          if(NOT ${EXTDIR}_DIR)
             message(FATAL_ERROR "Need ${EXTDIR}_DIR in ${EXTFILE}")
-        endif (NOT ${EXTDIR}_DIR)
-        # make sure path is usable - could have environment variable parts
-        file(TO_CMAKE_PATH ${${EXTDIR}_DIR} safe_path)
-        if (NOT EXISTS "${safe_path}/CMakeLists.txt")
+          endif()
+          # make sure path is usable - could have environment variable parts
+          file(TO_CMAKE_PATH ${${EXTDIR}_DIR} safe_path)
+          if(NOT EXISTS "${safe_path}/CMakeLists.txt")
             message(FATAL_ERROR "${EXTDIR}_DIR=${${EXTDIR}_DIR} from ${EXTFILE} does not contain a CMakeLists.txt")
-        endif (NOT EXISTS "${safe_path}/CMakeLists.txt")
+          endif()
         add_subdirectory(${safe_path}
                          ${CMAKE_CURRENT_BINARY_DIR}/externals/${EXTDIR})
       endforeach(EXTDIR ${EXTERNAL_MODULES})
-    endif (EXISTS ${EXTFILE})
+    endif(EXISTS ${EXTFILE})
   endforeach(EXTFILE)
 
-YARP_END_PLUGIN_LIBRARY(yarpmod)
+  YARP_END_PLUGIN_LIBRARY(yarpmod)
 
-install(TARGETS yarpmod
-        EXPORT YARP
-        COMPONENT runtime
-        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
-        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+  install(TARGETS yarpmod
+          EXPORT YARP
+          COMPONENT runtime
+          RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+          LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+          ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
 
-if (YARP_LINK_PLUGINS)
-  set_property(GLOBAL APPEND PROPERTY YARP_LIBS yarpmod ${yarpmod_LIBRARIES})
-endif()
+  if (YARP_LINK_PLUGINS)
+    set_property(GLOBAL APPEND PROPERTY YARP_LIBS yarpmod ${yarpmod_LIBRARIES})
+  endif()
 
-endif (CREATE_DEVICE_LIBRARY_MODULES)
+endif()
diff --git a/src/modules/DynamixelAX12Ftdi/CMakeLists.txt b/src/modules/DynamixelAX12Ftdi/CMakeLists.txt
index 423ea48..fad3027 100644
--- a/src/modules/DynamixelAX12Ftdi/CMakeLists.txt
+++ b/src/modules/DynamixelAX12Ftdi/CMakeLists.txt
@@ -2,25 +2,32 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(dynamixelAX12Ftdi TYPE yarp::dev::DynamixelAX12FtdiDriver INCLUDE "DynamixelAX12FtdiDriver.h" WRAPPER controlboard)
+  yarp_prepare_device(dynamixelAX12Ftdi
+                      TYPE yarp::dev::DynamixelAX12FtdiDriver
+                      INCLUDE "DynamixelAX12FtdiDriver.h"
+                      WRAPPER controlboard)
   yarp_install(FILES dynamixelAX12Ftdi.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-endif(COMPILE_DEVICE_LIBRARY)
+endif()
 
 if(NOT SKIP_dynamixelAX12Ftdi)
-  find_package(YARP REQUIRED)
-  find_package(FTDI REQUIRED)
-  include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-  include_directories(${FTDI_INCLUDE_DIR})
-  include_directories(${YARP_INCLUDE_DIRS})
-  yarp_add_plugin(dynamixelAX12FtdiDriver DynamixelAX12FtdiDriver.cpp DynamixelAX12FtdiDriver.h)
-  target_link_libraries(dynamixelAX12FtdiDriver ${YARP_LIBRARIES} ${FTDI_LIBRARY})
-  yarp_install(TARGETS dynamixelAX12FtdiDriver
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+  include_directories(SYSTEM ${FTDI_INCLUDE_DIR})
+  yarp_add_plugin(yarp_dynamixelAX12Ftdi DynamixelAX12FtdiDriver.cpp
+                                         DynamixelAX12FtdiDriver.h)
+  target_link_libraries(yarp_dynamixelAX12Ftdi YARP_OS
+                                               YARP_dev
+                                               ${FTDI_LIBRARY})
+  yarp_install(TARGETS yarp_dynamixelAX12Ftdi
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-endif(NOT SKIP_dynamixelAX12Ftdi)
+endif()
 
 
diff --git a/src/modules/DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.cpp b/src/modules/DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.cpp
index 5d0a1da..5d62ed0 100644
--- a/src/modules/DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.cpp
+++ b/src/modules/DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.cpp
@@ -7,6 +7,9 @@
 #include "DynamixelAX12FtdiDriver.h"
 
 #include <yarp/os/Value.h>
+#include <yarp/os/Log.h>
+
+#include <cstdio>
 
 using namespace yarp::os;
 using namespace yarp::dev;
@@ -14,7 +17,7 @@ using namespace yarp::dev;
 #define BOOL_EXIT_FAILURE false
 
 bool NOT_YET_IMPLEMENTED(const char *txt) {
-    ACE_OS::fprintf(stderr, "%s not yet implemented for DynamixelAX12FtdiDriver\n", txt);
+    fprintf(stderr, "%s not yet implemented for DynamixelAX12FtdiDriver\n", txt);
     return false;
 }
 
@@ -72,8 +75,8 @@ bool DynamixelAX12FtdiDriver::open(yarp::os::Searchable& config) {
     ftdiSetting.write_chunksize = 3;
     ftdiSetting.read_chunksize = 256;
 
-    ACE_TRACE("DynamixelAx12Driver::initialize");
-    ACE_OS::printf("Opening DynamixelAx12 Device\n");
+    yTrace("DynamixelAx12Driver::initialize");
+    printf("Opening DynamixelAx12 Device\n");
 
     int retCode;
 
@@ -84,19 +87,19 @@ bool DynamixelAX12FtdiDriver::open(yarp::os::Searchable& config) {
     retCode = ftdi_usb_find_all(&ftdic, &devlist, ftdiSetting.vendor, ftdiSetting.product);
     switch (retCode) {
         case -1:
-            ACE_OS::fprintf(stderr, "usb_find_busses() failed\n");
+            fprintf(stderr, "usb_find_busses() failed\n");
             return BOOL_EXIT_FAILURE;
         case -2:
-            ACE_OS::fprintf(stderr, "usb_find_devices() failed\n");
+            fprintf(stderr, "usb_find_devices() failed\n");
             return BOOL_EXIT_FAILURE;
         case -3:
-            ACE_OS::fprintf(stderr, "out of memory\n");
+            fprintf(stderr, "out of memory\n");
             return BOOL_EXIT_FAILURE;
         case 0:
-            ACE_OS::fprintf(stderr, "No device is found. Check connection.\n");
+            fprintf(stderr, "No device is found. Check connection.\n");
             return BOOL_EXIT_FAILURE;
         default:
-            ACE_OS::printf("%d devices have been found.\n", retCode);
+            printf("%d devices have been found.\n", retCode);
             break;
     }
 
@@ -104,12 +107,12 @@ bool DynamixelAX12FtdiDriver::open(yarp::os::Searchable& config) {
     int i = 0;
 
     for (curdev = devlist; curdev != NULL; i++) {
-        ACE_OS::printf("Checking device: %d\n", i);
+        printf("Checking device: %d\n", i);
 
         if ((retCode = ftdi_usb_get_strings(&ftdic, curdev->dev, manufacturer, 128, description, 128, serial, 128)) < 0) {
-            ACE_OS::fprintf(stderr, "ftdi_usb_get_strings failed: %d (%s)\n", ret, ftdi_get_error_string(&ftdic));
+            fprintf(stderr, "ftdi_usb_get_strings failed: %d (%s)\n", ret, ftdi_get_error_string(&ftdic));
         }
-        ACE_OS::printf("Manufacturer: %s, Description: %s, Serial %s\n\n", manufacturer, description, serial);
+        printf("Manufacturer: %s, Description: %s, Serial %s\n\n", manufacturer, description, serial);
 
         // check if the current device is the right one
         if (strcmp(serial, ftdiSetting.serial) == 0) {
@@ -119,13 +122,13 @@ bool DynamixelAX12FtdiDriver::open(yarp::os::Searchable& config) {
     }
 
     if (curdev == NULL) {
-        ACE_OS::fprintf(stderr, "No Dynamixel device is found. Check connection.\n");
+        fprintf(stderr, "No Dynamixel device is found. Check connection.\n");
         return BOOL_EXIT_FAILURE;
     }
 
     // open and reset everything in case we messed everything up with a control-c..
     if ((retCode = ftdi_usb_open_dev(&ftdic, curdev->dev)) < 0) {
-        ACE_OS::fprintf(stderr, "unable to open ftdi device: %d (%s)\n", retCode, ftdi_get_error_string(&ftdic));
+        fprintf(stderr, "unable to open ftdi device: %d (%s)\n", retCode, ftdi_get_error_string(&ftdic));
         return BOOL_EXIT_FAILURE;
     }
     deviceOpen = true; // Only set to be able to do close()
@@ -134,7 +137,7 @@ bool DynamixelAX12FtdiDriver::open(yarp::os::Searchable& config) {
 
     // Now open again
     if ((retCode = ftdi_usb_open_dev(&ftdic, curdev->dev)) < 0) {
-        ACE_OS::fprintf(stderr, "unable to open ftdi device: %d (%s)\n", retCode, ftdi_get_error_string(&ftdic));
+        fprintf(stderr, "unable to open ftdi device: %d (%s)\n", retCode, ftdi_get_error_string(&ftdic));
         return BOOL_EXIT_FAILURE;
     }
 
@@ -142,9 +145,9 @@ bool DynamixelAX12FtdiDriver::open(yarp::os::Searchable& config) {
     if (ftdic.type == TYPE_R) {
         unsigned int chipid;
         if (ftdi_read_chipid(&ftdic, &chipid) == 0) {
-            ACE_OS::printf("FTDI Device open. FTDI chipid: %X\n", chipid);
+            printf("FTDI Device open. FTDI chipid: %X\n", chipid);
         } else {
-            ACE_OS::fprintf(stderr, "Unable to access FTDI device!\n");
+            fprintf(stderr, "Unable to access FTDI device!\n");
             return BOOL_EXIT_FAILURE;
         }
     }
@@ -153,11 +156,11 @@ bool DynamixelAX12FtdiDriver::open(yarp::os::Searchable& config) {
     // We have an open device and it is accessible, so set parameters
 
     if ((retCode = ftdi_set_baudrate(&ftdic, ftdiSetting.baudrate)) != 0)
-        ACE_OS::fprintf(stderr, "Error setting baudrate, ret=%d\n", retCode);
+        fprintf(stderr, "Error setting baudrate, ret=%d\n", retCode);
     if (ftdi_set_line_property(&ftdic, BITS_8, STOP_BIT_1, NONE) == -1)
-        ACE_OS::fprintf(stderr, "Error setting connection properties");
+        fprintf(stderr, "Error setting connection properties");
     if (ftdi_setflowctrl(&ftdic, SIO_DISABLE_FLOW_CTRL) == -1)
-        ACE_OS::fprintf(stderr, "Error setting flow control");
+        fprintf(stderr, "Error setting flow control");
 
     // Set chunk sizes for in and out
     ftdi_write_data_set_chunksize(&ftdic, ftdiSetting.write_chunksize);
@@ -181,7 +184,7 @@ bool DynamixelAX12FtdiDriver::close() {
         ftdi_usb_close(&ftdic);
     } else {
         // We don't seem to have a device open at this time
-        ACE_OS::fprintf(stderr, "close():No device open to be be closed!\n");
+        fprintf(stderr, "close():No device open to be be closed!\n");
         return false;
     }
     return true;
@@ -259,10 +262,10 @@ int DynamixelAX12FtdiDriver::sendCommand(unsigned char id, unsigned char inst[],
         while (retCode == 0); // not needed. as it will hang if no device is connected
 
         if (retCode < 0) {
-            ACE_OS::fprintf(stderr, "Error while reading header of status packet! From usb_bulk_read() (%d)\n", retCode);
+            fprintf(stderr, "Error while reading header of status packet! From usb_bulk_read() (%d)\n", retCode);
             return 0;
         } else if (retCode < 4) {
-            ACE_OS::fprintf(stderr, "Error while reading header of status packet! (%d)\n", retCode);
+            fprintf(stderr, "Error while reading header of status packet! (%d)\n", retCode);
             return 0;
         } else {
             retCode = 0;
@@ -555,13 +558,13 @@ bool DynamixelAX12FtdiDriver::getRefTorques(double *t) {
     for (int k = 0; k < numOfAxes; k++) {
         t[k] = torques[k];
     }
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is just the MAX tourque set for the ax12 servo.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is just the MAX tourque set for the ax12 servo.\n");
     return true;
 }
 
 bool DynamixelAX12FtdiDriver::getRefTorque(int j, double *t) {
     *t = torques[j];
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is just the MAX tourque set for the ax12 servo.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is just the MAX tourque set for the ax12 servo.\n");
     return true;
 }
 
@@ -580,10 +583,10 @@ bool DynamixelAX12FtdiDriver::setTorques(const double *t) {
  */
 bool DynamixelAX12FtdiDriver::setTorque(int j, double t) {
     if (t < 0) {
-        ACE_OS::fprintf(stderr, "torque (%d) should in range [0 1023] or [0 0x3FF]. t is set to 0 here\n", (int)t);
+        fprintf(stderr, "torque (%d) should in range [0 1023] or [0 0x3FF]. t is set to 0 here\n", (int)t);
         t = 0;
     } else if (t > 1023) {
-        ACE_OS::fprintf(stderr, "torque (%d) should in range [0 1023] or [0 0x3FF]. t is set to 1023 here\n", (int)t);
+        fprintf(stderr, "torque (%d) should in range [0 1023] or [0 0x3FF]. t is set to 1023 here\n", (int)t);
         t = 1023;
     }
 
@@ -597,7 +600,7 @@ bool DynamixelAX12FtdiDriver::setTorque(int j, double t) {
 }
 
 bool DynamixelAX12FtdiDriver::setTorquePid(int j, const Pid &pid) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("setTorquePid");
 }
 
@@ -620,7 +623,7 @@ bool DynamixelAX12FtdiDriver::getTorque(int j, double *t) {
         load *= (((blankReturn[2] >> 2)&0X01) ? -1 : 1);
         *t = load;
     } else {
-        ACE_OS::fprintf(stderr, "%s\n", message);
+        fprintf(stderr, "%s\n", message);
         return false;
     }
     return ret;
@@ -637,87 +640,87 @@ bool DynamixelAX12FtdiDriver::getTorques(double *t) {
 }
 
 bool DynamixelAX12FtdiDriver::setTorquePids(const Pid *pids) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("setTorquePids");
 }
 
 bool DynamixelAX12FtdiDriver::setTorqueErrorLimit(int j, double limit) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("setTorqueErrorLimit");
 }
 
 bool DynamixelAX12FtdiDriver::setTorqueErrorLimits(const double *limits) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("setTorqueErrorLimits");
 }
 
 bool DynamixelAX12FtdiDriver::getTorqueError(int j, double *err) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("getTorqueError");
 }
 
 bool DynamixelAX12FtdiDriver::getTorqueErrors(double *errs) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("getTorqueErrors");
 }
 
 bool DynamixelAX12FtdiDriver::getTorquePidOutput(int j, double *out) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("getTorquePidOutput");
 }
 
 bool DynamixelAX12FtdiDriver::getTorquePidOutputs(double *outs) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("getTorquePidOutputs");
 }
 
 bool DynamixelAX12FtdiDriver::getTorquePid(int j, Pid *pid) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("getTorquePid");
 }
 
 bool DynamixelAX12FtdiDriver::getTorquePids(Pid *pids) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("getTorquePids");
 }
 
 bool DynamixelAX12FtdiDriver::getTorqueErrorLimit(int j, double *limit) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("getTorqueErrorLimit");
 }
 
 bool DynamixelAX12FtdiDriver::getTorqueErrorLimits(double *limits) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("getTorqueErrorLimits");
 }
 
 bool DynamixelAX12FtdiDriver::resetTorquePid(int j) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("resetTorquePid");
 }
 
 bool DynamixelAX12FtdiDriver::disableTorquePid(int j) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("disableTorquePid");
 }
 
 bool DynamixelAX12FtdiDriver::enableTorquePid(int j) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("enableTorquePid");
 }
 
 bool DynamixelAX12FtdiDriver::setTorqueOffset(int j, double v) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("setTorqueOffset");
 }
 
 bool DynamixelAX12FtdiDriver::getBemfParam(int j, double *bemf) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("getBemfParam");
 }
 
 bool DynamixelAX12FtdiDriver::setBemfParam(int j, double bemf) {
-    ACE_OS::fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
+    fprintf(stderr, "Note: AX12 does not support torque control mode. This is only used to get torque feedback.\n");
     return NOT_YET_IMPLEMENTED("setBemfParam");
 }
 
@@ -773,7 +776,7 @@ bool DynamixelAX12FtdiDriver::getEncoder(int j, double *v) {
             *v = ((double) pos)*300.0 / 1024.0;
             return true;
         } else {
-            ACE_OS::fprintf(stderr, "%s\n", message);
+            fprintf(stderr, "%s\n", message);
             return false;
         }
 
@@ -815,7 +818,7 @@ bool DynamixelAX12FtdiDriver::getEncoderSpeed(int j, double *sp) {
 
         *sp = speed * 113 / 1024 + 1; /// TODO should be changed. not very accurate, though close
     } else {
-        ACE_OS::fprintf(stderr, "%s\n", message);
+        fprintf(stderr, "%s\n", message);
         return false;
     }
     return ret;
@@ -842,7 +845,7 @@ bool DynamixelAX12FtdiDriver::getEncoderAccelerations(double *accs) {
 bool DynamixelAX12FtdiDriver::initMotorIndex(yarp::os::Bottle *sensorIndex) {
     int s = sensorIndex->size() - 1;
     if (s != sensorIndex->get(0).asInt()) {
-        ACE_OS::fprintf(stderr, "sensor number does not match the real number in configuration file\n");
+        fprintf(stderr, "sensor number does not match the real number in configuration file\n");
         return false;
     }
     numOfAxes = s;
diff --git a/src/modules/DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.h b/src/modules/DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.h
index fa4af50..b05aa06 100644
--- a/src/modules/DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.h
+++ b/src/modules/DynamixelAX12Ftdi/DynamixelAX12FtdiDriver.h
@@ -209,7 +209,7 @@ public:
       
         @param id The id of the device to be contacted
         @param param encodes address in control table and size of parameter (2 Bytes => address + 100, 1 byte => address)
-        @return value if read successfull or -1
+        @return value if read successful or -1
      */
     virtual int readParameter(unsigned char id, unsigned char param);
 
diff --git a/src/modules/DynamixelAX12Ftdi/dynamixelAX12Ftdi.ini b/src/modules/DynamixelAX12Ftdi/dynamixelAX12Ftdi.ini
index 7118b86..3e59c4d 100644
--- a/src/modules/DynamixelAX12Ftdi/dynamixelAX12Ftdi.ini
+++ b/src/modules/DynamixelAX12Ftdi/dynamixelAX12Ftdi.ini
@@ -1,5 +1,5 @@
 [plugin dynamixelAX12Ftdi]
 type device
 name dynamixelAX12Ftdi
-library dynamixelAX12FtdiDriver
+library yarp_dynamixelAX12Ftdi
 part dynamixelAX12Ftdi
diff --git a/src/modules/PumaCalibrator/CMakeLists.txt b/src/modules/PumaCalibrator/CMakeLists.txt
index 8f87009..1d5f87c 100644
--- a/src/modules/PumaCalibrator/CMakeLists.txt
+++ b/src/modules/PumaCalibrator/CMakeLists.txt
@@ -3,7 +3,9 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(pumacalibrator TYPE yarp::dev::PumaCalibrator INCLUDE PumaCalibrator.h )
+  yarp_prepare_device(pumacalibrator
+                      TYPE yarp::dev::PumaCalibrator
+                      INCLUDE PumaCalibrator.h)
 endif(COMPILE_DEVICE_LIBRARY)
 
 if(NOT SKIP_pumacalibrator)
@@ -13,7 +15,8 @@ if(NOT SKIP_pumacalibrator)
   include_directories(${YARP_OS_INCLUDE_DIRS}
                       ${YARP_dev_INCLUDE_DIRS})
 
-  yarp_add_plugin(pumacalibrator PumaCalibrator.cpp  PumaCalibrator.h )
+  yarp_add_plugin(pumacalibrator PumaCalibrator.cpp
+                                 PumaCalibrator.h)
   yarp_install(TARGETS pumacalibrator
                EXPORT YARP
                COMPONENT runtime
diff --git a/src/modules/SerialServoBoard/CMakeLists.txt b/src/modules/SerialServoBoard/CMakeLists.txt
index a1152df..e1f122a 100644
--- a/src/modules/SerialServoBoard/CMakeLists.txt
+++ b/src/modules/SerialServoBoard/CMakeLists.txt
@@ -1,25 +1,29 @@
 # Copyright: (C) 2009 RobotCub Consortium
 # Authors: Giacomo Spigler, Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
- 
-IF (COMPILE_DEVICE_LIBRARY)
-  YARP_PREPARE_DEVICE(SerialServoBoard TYPE SerialServoBoard INCLUDE "SerialServoBoard.h")
-ENDIF (COMPILE_DEVICE_LIBRARY)
 
-IF (NOT SKIP_SerialServoBoard)
-
-
-  FIND_PACKAGE(YARP REQUIRED)
+if(COMPILE_DEVICE_LIBRARY)
+  yarp_prepare_device(SerialServoBoard
+                      TYPE SerialServoBoard
+                      INCLUDE "SerialServoBoard.h")
+  yarp_install(FILES SerialServoBoard.ini
+               COMPONENT runtime
+               DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
+endif()
 
-  INCLUDE_DIRECTORIES(${YARP_INCLUDE_DIRS})
-  yarp_add_plugin(ySerialServoBoard SerialServoBoard.cpp SerialServoBoard.h)
-  TARGET_LINK_LIBRARIES(ySerialServoBoard ${YARP_LIBRARIES})
-  yarp_install(TARGETS ySerialServoBoard
+if(NOT SKIP_SerialServoBoard)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+  yarp_add_plugin(yarp_SerialServoBoard SerialServoBoard.cpp
+                                        SerialServoBoard.h)
+  target_link_libraries(yarp_SerialServoBoard YARP_OS
+                                          YARP_dev)
+  yarp_install(TARGETS yarp_SerialServoBoard
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-
-ENDIF (NOT SKIP_SerialServoBoard)
+endif()
 
diff --git a/src/modules/SerialServoBoard/SerialServoBoard.ini b/src/modules/SerialServoBoard/SerialServoBoard.ini
new file mode 100644
index 0000000..a6976a8
--- /dev/null
+++ b/src/modules/SerialServoBoard/SerialServoBoard.ini
@@ -0,0 +1,5 @@
+[plugin SerialServoBoard]
+type device
+name SerialServoBoard
+library yarp_SerialServoBoard
+part SerialServoBoard
diff --git a/src/modules/cuda/CMakeLists.txt b/src/modules/cuda/CMakeLists.txt
index 59a4c73..79d55ab 100644
--- a/src/modules/cuda/CMakeLists.txt
+++ b/src/modules/cuda/CMakeLists.txt
@@ -3,38 +3,39 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(cuda TYPE CUDAGPU INCLUDE "CUDADeviceDriver.h")
+  yarp_prepare_device(cuda
+                      TYPE CUDAGPU
+                      INCLUDE "CUDADeviceDriver.h")
   yarp_install(FILES cuda.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-endif(COMPILE_DEVICE_LIBRARY)
+endif()
 
 if(NOT SKIP_cuda)
-#  set(CUDA_NUMTHREADS "64" CACHE STRING "lemieux" FORCE)
   set(CUDA_NUMTHREADS 64 CACHE STRING "")
   set(CUDA_NUMTHREADBLOCKS 256 CACHE STRING "")
 
-  find_package(YARP REQUIRED)
-
-  find_library(lib_cudart cudart)
-  find_library(lib_cuda cuda)
-  find_library(lib_cutil cutil)
-  find_library(lib_GL GL)
-
-  if(lib_cudart AND lib_cuda AND lib_cutil AND lib_GL)
-
-    add_definitions(-DCUDA_NUMTHREADS=${CUDA_NUMTHREADS} -DCUDA_NUMTHREADBLOCKS=${CUDA_NUMTHREADBLOCKS})
-    yarp_add_plugin(ycuda CUDADeviceDriver.cpp CUDADeviceDriver.h FunctionClass.h)
-    target_link_libraries(ycuda ${lib_cudart} ${lib_cuda} ${lib_GL} ${lib_cutil})
-    yarp_install(TARGETS ycuda
-                 EXPORT YARP
-                 COMPONENT runtime
-                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
-                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-  else()
-    message(FATAL_ERROR "could not find all libraries needed by cuda driver")
-  endif()
-
+  add_definitions(-DCUDA_NUMTHREADS=${CUDA_NUMTHREADS}
+                  -DCUDA_NUMTHREADBLOCKS=${CUDA_NUMTHREADBLOCKS})
+
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+
+  yarp_add_plugin(yarp_cuda CUDADeviceDriver.cpp
+                            CUDADeviceDriver.h
+                            FunctionClass.h)
+  target_link_libraries(yarp_cuda YARP_OS
+                                  YARP_sig
+                                  YARP_dev
+                                  ${CUDA_LIBRARIES})
+  yarp_install(TARGETS yarp_cuda
+               EXPORT YARP
+               COMPONENT runtime
+               LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+               ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
 endif()
 
diff --git a/src/modules/cuda/cuda.ini b/src/modules/cuda/cuda.ini
index f5e986b..5d555a9 100644
--- a/src/modules/cuda/cuda.ini
+++ b/src/modules/cuda/cuda.ini
@@ -1,5 +1,5 @@
 [plugin cuda]
 type device
 name cuda
-library ycuda
+library yarp_cuda
 part cuda
diff --git a/src/modules/dimax_u2c/CMakeLists.txt b/src/modules/dimax_u2c/CMakeLists.txt
index 9d5e9df..19774ef 100644
--- a/src/modules/dimax_u2c/CMakeLists.txt
+++ b/src/modules/dimax_u2c/CMakeLists.txt
@@ -2,33 +2,43 @@
 # Author: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-if(COMPILE_DEVICE_LIBRARY)
-    yarp_prepare_device(dimax_u2c TYPE yarp::dev::DimaxU2C INCLUDE DimaxU2C.h WRAPPER controlboard)
-endif(COMPILE_DEVICE_LIBRARY)
-
-if(NOT SKIP_dimax_u2c)
-
-find_package(YARP REQUIRED)
-
 if(WIN32)
 
-    include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
+  if(COMPILE_DEVICE_LIBRARY)
+    yarp_prepare_device(dimax_u2c
+                        TYPE yarp::dev::DimaxU2C
+                        INCLUDE DimaxU2C.h
+                        WRAPPER controlboard)
+  endif()
+
+  if(NOT SKIP_dimax_u2c)
+    set(CMAKE_INCLUDE_CURRENT_DIR ON)
+    get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+    get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+    get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+    include_directories(${YARP_OS_INCLUDE_DIRS}
+                        ${YARP_sig_INCLUDE_DIRS}
+                        ${YARP_dev_INCLUDE_DIRS})
     link_directories(${CMAKE_CURRENT_SOURCE_DIR}/blob)
-    link_libraries(U2CCommon I2cBrdg)
-    yarp_add_plugin(yarp_dimax_u2c DimaxU2C.cpp I2c.cpp Servo.cpp DimaxU2C.h Servo.h i2cbridge.h I2c.h u2c_common_func.h)
+    yarp_add_plugin(yarp_dimax_u2c DimaxU2C.cpp
+                                   I2c.cpp
+                                   Servo.cpp
+                                   DimaxU2C.h
+                                   Servo.h
+                                   i2cbridge.h
+                                   I2c.h
+                                   u2c_common_func.h)
+    target_link_libraries(yarp_dimax_u2c YARP_OS
+                                         YARP_sig
+                                         YARP_dev
+                                         U2CCommon
+                                         I2cBrdg)
     yarp_install(TARGETS yarp_dimax_u2c
                  EXPORT YARP
                  COMPONENT runtime
                  LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                  ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-
-else(WIN32)
-
-    message(FATAL_ERROR "not a system we know how to build dimax on yet")
+  endif(NOT SKIP_dimax_u2c)
 
 endif(WIN32)
 
-endif(NOT SKIP_dimax_u2c)
-
diff --git a/src/modules/dimax_u2c/i2cbridge.h b/src/modules/dimax_u2c/i2cbridge.h
index 89f8c0e..caa98e3 100644
--- a/src/modules/dimax_u2c/i2cbridge.h
+++ b/src/modules/dimax_u2c/i2cbridge.h
@@ -76,7 +76,7 @@ typedef void *HANDLE;
 
 typedef enum
 {
-	U2C_SUCCESS = 0,                            /*!< API Function was successfull */  
+	U2C_SUCCESS = 0,                            /*!< API Function was successful */
 	U2C_BAD_PARAMETER = 1,                      /*!< API Function got bad input parameter */
 	U2C_HARDWARE_NOT_FOUND = 2,                 /*!< U2C Device not found */
 	U2C_SLAVE_DEVICE_NOT_FOUND = 3,             /*!< I2C Slave device not found */
diff --git a/src/modules/fakeIMU/CMakeLists.txt b/src/modules/fakeIMU/CMakeLists.txt
index b56cf7c..871de37 100644
--- a/src/modules/fakeIMU/CMakeLists.txt
+++ b/src/modules/fakeIMU/CMakeLists.txt
@@ -4,25 +4,33 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(fakeIMU TYPE yarp::dev::fakeIMU INCLUDE fakeIMU.h WRAPPER inertial)
+if(COMPILE_DEVICE_LIBRARY)
+  yarp_prepare_device(fakeIMU
+                      TYPE yarp::dev::fakeIMU
+                      INCLUDE fakeIMU.h
+                      WRAPPER inertial)
   yarp_install(FILES fakeIMU.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-ENDIF (COMPILE_DEVICE_LIBRARY)
+endif()
 
-IF (NOT SKIP_fakeIMU)
-
-  FIND_PACKAGE(YARP REQUIRED)
-  INCLUDE_DIRECTORIES(${YARP_INCLUDE_DIRS})
-  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-  yarp_add_plugin(yarp_fakeIMU fakeIMU.cpp fakeIMU.h)
-  TARGET_LINK_LIBRARIES(yarp_fakeIMU ${YARP_LIBRARIES})
+if(NOT SKIP_fakeIMU)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+  yarp_add_plugin(yarp_fakeIMU fakeIMU.cpp
+                               fakeIMU.h)
+  target_link_libraries(yarp_fakeIMU YARP_OS
+                                     YARP_sig
+                                     YARP_dev)
   yarp_install(TARGETS yarp_fakeIMU
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-ENDIF (NOT SKIP_fakeIMU)
+endif()
 
diff --git a/src/modules/fakeLaser/CMakeLists.txt b/src/modules/fakeLaser/CMakeLists.txt
index e5f776b..32850af 100644
--- a/src/modules/fakeLaser/CMakeLists.txt
+++ b/src/modules/fakeLaser/CMakeLists.txt
@@ -1,20 +1,29 @@
 # Copyright (C) 2015 Marco Randazzo
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(fakeLaser TYPE FakeLaser INCLUDE fakeLaser.h)
+if(COMPILE_DEVICE_LIBRARY)
+  yarp_prepare_device(fakeLaser
+                      TYPE FakeLaser
+                      INCLUDE fakeLaser.h)
   yarp_install(FILES fakeLaser.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-ENDIF (COMPILE_DEVICE_LIBRARY)
+endif()
 
 if (NOT SKIP_fakeLaser)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
 
-  include_directories(${CMAKE_CURRENT_SOURCE_DIR}
-                      ${YARP_INCLUDE_DIRS})
-
-  yarp_add_plugin(fakeLaser fakeLaser.h fakeLaser.cpp)
-  target_link_libraries(fakeLaser ${YARP_LIBRARIES})
+  yarp_add_plugin(fakeLaser fakeLaser.h
+                            fakeLaser.cpp)
+  target_link_libraries(fakeLaser YARP_OS
+                                  YARP_sig
+                                  YARP_dev)
   yarp_install(TARGETS fakeLaser
                EXPORT YARP
                COMPONENT runtime
diff --git a/src/modules/fakeMotionControl/CMakeLists.txt b/src/modules/fakeMotionControl/CMakeLists.txt
index 08c1c4c..d29f546 100644
--- a/src/modules/fakeMotionControl/CMakeLists.txt
+++ b/src/modules/fakeMotionControl/CMakeLists.txt
@@ -2,25 +2,32 @@
 # Author: Alberto Cardellino
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(fakeMotionControl TYPE yarp::dev::FakeMotionControl INCLUDE fakeMotionControl.h)
+if(COMPILE_DEVICE_LIBRARY)
+  yarp_prepare_device(fakeMotionControl
+                      TYPE yarp::dev::FakeMotionControl
+                      INCLUDE fakeMotionControl.h)
   yarp_install(FILES fakeMotionControl.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-ENDIF (COMPILE_DEVICE_LIBRARY)
+endif()
 
-IF (NOT SKIP_fakeMotionControl)
-
-  FIND_PACKAGE(YARP REQUIRED)
-  INCLUDE_DIRECTORIES(${YARP_INCLUDE_DIRS})
-  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-  yarp_add_plugin(yarp_fakeMotionControl fakeMotionControl.cpp fakeMotionControl.h)
-  TARGET_LINK_LIBRARIES(yarp_fakeMotionControl ${YARP_LIBRARIES})
+if(NOT SKIP_fakeMotionControl)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+  yarp_add_plugin(yarp_fakeMotionControl fakeMotionControl.cpp
+                                         fakeMotionControl.h)
+  target_link_libraries(yarp_fakeMotionControl YARP_OS
+                                               YARP_sig
+                                               YARP_dev)
   yarp_install(TARGETS yarp_fakeMotionControl
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-ENDIF (NOT SKIP_fakeMotionControl)
+endif()
 
diff --git a/src/modules/fakeMotionControl/fakeMotionControl.cpp b/src/modules/fakeMotionControl/fakeMotionControl.cpp
index 2579c11..233fe47 100644
--- a/src/modules/fakeMotionControl/fakeMotionControl.cpp
+++ b/src/modules/fakeMotionControl/fakeMotionControl.cpp
@@ -194,6 +194,7 @@ bool FakeMotionControl::dealloc()
     checkAndDestroy(_axisType);
     checkAndDestroy(_rotorlimits_max);
     checkAndDestroy(_rotorlimits_min);
+    checkAndDestroy(_last_position_move_time);
 
     return true;
 }
@@ -436,7 +437,7 @@ bool FakeMotionControl::open(yarp::os::Searchable &config)
     {
         if(verbosewhenok)
         {
-            yDebug() << "FakeMotionControl::init() has succesfully initted board ";
+            yDebug() << "FakeMotionControl::init() has successfully initted board ";
         }
     }
 
diff --git a/src/modules/fakebot/CMakeLists.txt b/src/modules/fakebot/CMakeLists.txt
index 6a218cf..0896079 100644
--- a/src/modules/fakebot/CMakeLists.txt
+++ b/src/modules/fakebot/CMakeLists.txt
@@ -2,25 +2,32 @@
 # Author: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(fakebot TYPE yarp::dev::FakeBot INCLUDE FakeBot.h)
+if(COMPILE_DEVICE_LIBRARY)
+  yarp_prepare_device(fakebot
+                      TYPE yarp::dev::FakeBot
+                      INCLUDE FakeBot.h)
   yarp_install(FILES fakebot.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-ENDIF (COMPILE_DEVICE_LIBRARY)
+endif()
 
-IF (NOT SKIP_fakebot)
-
-  FIND_PACKAGE(YARP REQUIRED)
-  INCLUDE_DIRECTORIES(${YARP_INCLUDE_DIRS})
-  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-  yarp_add_plugin(yarp_fakebot FakeBot.cpp FakeBot.h)
-  TARGET_LINK_LIBRARIES(yarp_fakebot ${YARP_LIBRARIES})
+if(NOT SKIP_fakebot)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+  yarp_add_plugin(yarp_fakebot FakeBot.cpp
+                               FakeBot.h)
+  target_link_libraries(yarp_fakebot YARP_OS
+                                     YARP_sig
+                                     YARP_dev)
   yarp_install(TARGETS yarp_fakebot
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-ENDIF (NOT SKIP_fakebot)
+endif()
 
diff --git a/src/modules/ffmpeg/CMakeLists.txt b/src/modules/ffmpeg/CMakeLists.txt
index 4bf86d0..99c70d4 100644
--- a/src/modules/ffmpeg/CMakeLists.txt
+++ b/src/modules/ffmpeg/CMakeLists.txt
@@ -3,35 +3,43 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(ffmpeg_grabber TYPE yarp::dev::FfmpegGrabber INCLUDE FfmpegGrabber.h WRAPPER grabber)
-  yarp_prepare_device(ffmpeg_writer TYPE yarp::dev::FfmpegWriter INCLUDE FfmpegWriter.h)
+  yarp_prepare_device(ffmpeg_grabber
+                      TYPE yarp::dev::FfmpegGrabber
+                      INCLUDE FfmpegGrabber.h
+                      WRAPPER grabber)
+  yarp_prepare_device(ffmpeg_writer
+                      TYPE yarp::dev::FfmpegWriter
+                      INCLUDE FfmpegWriter.h)
   yarp_install(FILES ffmpeg.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
 endif()
 
-if(SKIP_ffmpeg_grabber AND SKIP_ffmpeg_writer)
-  set(SKIP_ffmpeg TRUE)
-endif()
-
-if(NOT SKIP_ffmpeg)
-  find_package(YARP REQUIRED)
-  find_package(FFMPEG REQUIRED)
-  if(FFMPEG_FOUND)
-    include_directories(${CMAKE_CURRENT_SOURCE_DIR}
-                        ${YARP_INCLUDE_DIRS})
-    include_directories(SYSTEM ${FFMPEG_INCLUDE_DIR})
-    yarp_add_plugin(yarp_ffmpeg FfmpegGrabber.cpp FfmpegWriter.cpp FfmpegGrabber.h FfmpegWriter.h ffmpeg_api.h ffmpeg_api.cpp)
-    target_link_libraries(yarp_ffmpeg ${YARP_LIBRARIES} ${FFMPEG_LIBRARIES})
-    if(MINGW)
-      target_link_libraries(yarp_ffmpeg ws2_32)
-    endif()
-    yarp_install(TARGETS yarp_ffmpeg
-                 EXPORT YARP
-                 COMPONENT runtime
-                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
-                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-  else()
-    message(SEND_ERROR "ffmpeg not found")
+if(NOT SKIP_ffmpeg_grabber OR NOT SKIP_ffmpeg_writer)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+  include_directories(SYSTEM ${FFMPEG_INCLUDE_DIR})
+  yarp_add_plugin(yarp_ffmpeg FfmpegGrabber.cpp
+                              FfmpegWriter.cpp
+                              FfmpegGrabber.h
+                              FfmpegWriter.h
+                              ffmpeg_api.h
+                              ffmpeg_api.cpp)
+  target_link_libraries(yarp_ffmpeg YARP_OS
+                                    YARP_sig
+                                    YARP_dev
+                                    ${FFMPEG_LIBRARIES})
+  if(MINGW)
+    target_link_libraries(yarp_ffmpeg ws2_32)
   endif()
+  yarp_install(TARGETS yarp_ffmpeg
+               EXPORT YARP
+               COMPONENT runtime
+               LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+               ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
 endif()
diff --git a/src/modules/imuBosch_BNO055/CMakeLists.txt b/src/modules/imuBosch_BNO055/CMakeLists.txt
index 3008c1d..fcbf97f 100644
--- a/src/modules/imuBosch_BNO055/CMakeLists.txt
+++ b/src/modules/imuBosch_BNO055/CMakeLists.txt
@@ -2,24 +2,36 @@
 # Authors: Alberto Cardellino
 # CopyPolicy: Released under the terms of the GNU GPL v2.0.
 
-yarp_prepare_device(imuBosch_BNO055 TYPE yarp::dev::BoschIMU INCLUDE imuBosch_BNO055.h)
+if(NOT WIN32 AND CREATE_LIB_MATH)
+  if(COMPILE_DEVICE_LIBRARY)
+    yarp_prepare_device(imuBosch_BNO055
+                        TYPE yarp::dev::BoschIMU
+                        INCLUDE imuBosch_BNO055.h)
+    yarp_install(FILES imuBosch_BNO055.ini
+                 COMPONENT runtime
+                 DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
+  endif()
 
- if (ENABLE_imuBosch_BNO055)
-
-    if(WIN32)
-        message("The device IMU BOSCH is not available on WINDOWS now, please un select it")
-    else()
-        include_directories(${YARP_INCLUDE_DIRS} ${ACE_INCLUDE_DIRS})
-        include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
-        yarp_add_plugin(imuBosch_BNO055 imuBosch_BNO055.cpp imuBosch_BNO055.h)
-        target_link_libraries(imuBosch_BNO055  ${YARP_LIBRARIES} )
-        yarp_install( TARGETS imuBosch_BNO055
-                        COMPONENT Runtime
-                        LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR})
-
-        yarp_install( FILES imuBosch_BNO055.ini
-                        DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-    endif()
-endif (ENABLE_imuBosch_BNO055)
+  if(ENABLE_imuBosch_BNO055)
+    set(CMAKE_INCLUDE_CURRENT_DIR ON)
+    get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+    get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+    get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+    get_property(YARP_math_INCLUDE_DIRS TARGET YARP_math PROPERTY INCLUDE_DIRS)
+    include_directories(${YARP_OS_INCLUDE_DIRS}
+                        ${YARP_sig_INCLUDE_DIRS}
+                        ${YARP_dev_INCLUDE_DIRS}
+                        ${YARP_math_INCLUDE_DIRS})
+    yarp_add_plugin(imuBosch_BNO055 imuBosch_BNO055.cpp
+                                    imuBosch_BNO055.h)
+    target_link_libraries(imuBosch_BNO055 YARP_OS
+                                          YARP_sig
+                                          YARP_dev
+                                          YARP_math)
+    yarp_install(TARGETS imuBosch_BNO055
+                 COMPONENT Runtime
+                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
+  endif()
+endif()
 
diff --git a/src/modules/imuBosch_BNO055/imuBosch_BNO055.cpp b/src/modules/imuBosch_BNO055/imuBosch_BNO055.cpp
index e0c1858..8d00b1b 100644
--- a/src/modules/imuBosch_BNO055/imuBosch_BNO055.cpp
+++ b/src/modules/imuBosch_BNO055/imuBosch_BNO055.cpp
@@ -34,6 +34,10 @@ BoschIMU::BoschIMU():   RateThread(20), mutex(1),
     totMessagesRead = 0;
     quaternion.resize(4);
     nChannels = 12;
+    errs.acceError = 0;
+    errs.gyroError = 0;
+    errs.magnError = 0;
+    errs.quatError = 0;
 }
 
 BoschIMU::~BoschIMU() { }
@@ -42,7 +46,7 @@ BoschIMU::~BoschIMU() { }
 bool BoschIMU::open(yarp::os::Searchable& config)
 {
     //debug
-    yInfo("\nParameters are:\n\t%s\n", config.toString().c_str());
+    yTrace("Parameters are:\n\t%s", config.toString().c_str());
 
     if(!config.check("comport"))
     {
@@ -55,10 +59,9 @@ bool BoschIMU::open(yarp::os::Searchable& config)
 
     nChannels = config.check("channels", Value(12)).asInt();
 
-     printf("\n\nSerial opening %s\n\n\n", config.find("comport").toString().c_str());
     fd_ser = ::open(config.find("comport").toString().c_str(), O_RDWR | O_NOCTTY );
     if (fd_ser < 0) {
-        printf("can't open %s, %s\n", config.find("comport").toString().c_str(), strerror(errno));
+        yError("can't open %s, %s", config.find("comport").toString().c_str(), strerror(errno));
         return false;
     }
 
@@ -88,7 +91,7 @@ bool BoschIMU::open(yarp::os::Searchable& config)
     options.c_oflag = 0; // raw output
     options.c_lflag = 0; // raw input
 
-    printf("\n*** NOT BLOCKING READ!! ***\n");
+    // SET NOT BLOCKING READ
     options.c_cc[VMIN]  = 0;   // block reading until RX x characters. If x = 0, it is non-blocking.
     options.c_cc[VTIME] = 2;   // Inter-Character Timer -- i.e. timeout= x*.1 s
 
@@ -100,7 +103,7 @@ bool BoschIMU::open(yarp::os::Searchable& config)
     //Set the new options for the port...
     if ( tcsetattr(fd_ser, TCSANOW, &options) != 0)
     {
-        printf("Configuring comport failed\n");
+        yError("Configuring comport failed");
         return false;
     }
 
@@ -118,14 +121,14 @@ bool BoschIMU::close()
     return true;
 }
 
-bool BoschIMU::checkReadResponse(char* response)
+bool BoschIMU::checkReadResponse(unsigned char* response)
 {
-    if(response[0] == (char) REPLY_HEAD)
+    if(response[0] == (unsigned char) REPLY_HEAD)
     {
         return true;
     }
 
-    if(response[0] == (char) ERROR_HEAD)
+    if(response[0] == (unsigned char) ERROR_HEAD)
     {
         if(response[1] != REGISTER_NOT_READY)   // if error is 0x07, do not print error messages
             yError("Bosch BNO055 IMU - Received error response (0x%02X) - code 0x%02X", response[0], response[1]);
@@ -141,11 +144,11 @@ bool BoschIMU::checkReadResponse(char* response)
     return false;
 }
 
-bool BoschIMU::checkWriteResponse(char* response)
+bool BoschIMU::checkWriteResponse(unsigned char* response)
 {
-    if(response[0] == (char) ERROR_HEAD)
+    if(response[0] == (unsigned char) ERROR_HEAD)
     {
-        if(response[1] == (char) WRITE_SUCC)
+        if(response[1] == (unsigned char) WRITE_SUCC)
         {
             return true;
         }
@@ -162,7 +165,7 @@ bool BoschIMU::checkWriteResponse(char* response)
     return false;
 }
 
-bool BoschIMU::sendReadCommand(char register_add, int len, char* buf, std::string comment)
+bool BoschIMU::sendReadCommand(unsigned char register_add, int len, unsigned char* buf, std::string comment)
 {
     int command_len;
     int nbytes_w;
@@ -194,8 +197,13 @@ bool BoschIMU::sendReadCommand(char register_add, int len, char* buf, std::strin
         }
         // Read the write reply
         memset(buf, 0x00, 20);
-        readBytes(buf, 2);
-        if(!checkReadResponse(buf))
+        int readbytes = readBytes(buf, RESP_HEADER_SIZE);
+        if(readbytes != RESP_HEADER_SIZE)
+        {
+            yError("Expected %d bytes, read %d instead\n", RESP_HEADER_SIZE, readbytes);
+            success = false;
+        }
+        else if(!checkReadResponse(buf))
         {
             success = false;
             yarp::os::Time::delay(0.002);
@@ -212,12 +220,12 @@ bool BoschIMU::sendReadCommand(char register_add, int len, char* buf, std::strin
 //             printf("***************\n");
         }
     }
-    if(!success)
-        yError("> FAILED reading %s!\n", comment.c_str());
+//     if(!success)
+//         yError("> FAILED reading %s!\n", comment.c_str());
     return success;
 }
 
-bool BoschIMU::sendWriteCommand(char register_add, int len, char* cmd, std::string comment)
+bool BoschIMU::sendWriteCommand(unsigned char register_add, int len, unsigned char* cmd, std::string comment)
 {
     int command_len = 4+len;
     int nbytes_w;
@@ -225,7 +233,7 @@ bool BoschIMU::sendWriteCommand(char register_add, int len, char* cmd, std::stri
     command[0]= START_BYTE;     // start byte
     command[1]= WRITE_CMD;      // read operation
     command[2]= register_add;   // operation mode register
-    command[3]= (char) len;     // length 1 byte
+    command[3]= (unsigned char) len;     // length 1 byte
     for(int i=0; i<len; i++)
         command[4+i] = cmd[i];  // data
 
@@ -257,7 +265,7 @@ bool BoschIMU::sendWriteCommand(char register_add, int len, char* cmd, std::stri
     return true;
 }
 
-int BoschIMU::readBytes(char* buffer, int bytes)
+int BoschIMU::readBytes(unsigned char* buffer, int bytes)
 {
     int r = 0;
     int bytesRead = 0;
@@ -268,8 +276,6 @@ int BoschIMU::readBytes(char* buffer, int bytes)
             bytesRead += r;
     }
     while(r!=0 && bytesRead < bytes);
-    if(bytesRead != bytes)
-        yError("Expected %d bytes, read %d instead\n", bytes, bytesRead);
 
     return bytesRead;
 }
@@ -284,7 +290,7 @@ void BoschIMU::dropGarbage()
     return;
 }
 
-void BoschIMU::printBuffer(char* buffer, int length)
+void BoschIMU::printBuffer(unsigned char* buffer, int length)
 {
     for(int i=0; i< length; i++)
         printf("\t0x%02X ", buffer[i]);
@@ -312,43 +318,48 @@ void BoschIMU::readSysError()
     return;
 }
 
-bool BoschIMU::threadInit()
+bool BoschIMU::sendAndVerifyCommand(unsigned char register_add, int len, unsigned char* cmd, std::string comment)
 {
-    char msg;
-
-    msg = 0x00;
-    if(!sendWriteCommand(REG_PAGE_ID, 1, &msg, "PAGE_ID") )
+    uint8_t attempts=0;
+    bool ret;
+    do
     {
-        yError()  << "@ line " << __LINE__;
-    }
+      ret=sendWriteCommand(register_add, len, cmd, comment);
+      attempts++;
+    }while((attempts<= ATTEMPTS_NUM_OF_SEND_CONFIG_CMD) && (ret==false));
 
-    yarp::os::Time::delay(SWITCHING_TIME);
+    return(ret);
+}
+
+bool BoschIMU::threadInit()
+{
+    unsigned char msg;
+    timeLastReport = yarp::os::Time::now();
 
-    ///////////////////////////////////////
-    //
-    //      Set power mode
-    //
-    ///////////////////////////////////////
     msg = 0x00;
-    if(!sendWriteCommand(REG_POWER_MODE, 1, &msg, "Set power mode") )
+    if(!sendAndVerifyCommand(REG_PAGE_ID, 1, &msg, "PAGE_ID") )
     {
-        yError()  << "@ line " << __LINE__;
+        yError()  << "BoschIMU: set page id 0 failed";
+        return(false);
     }
 
     yarp::os::Time::delay(SWITCHING_TIME);
 
+//Removed because useless
     ///////////////////////////////////////
     //
-    //      Read power mode
+    //      Set power mode
     //
     ///////////////////////////////////////
+//     msg = 0x00;
+//     if(!sendAndVerifyCommand(REG_POWER_MODE, 1, &msg, "Set power mode") )
+//     {
+//          yError()  << "BoschIMU: set power mode failed";
+//          return(false);
+//     }
+//
+//     yarp::os::Time::delay(SWITCHING_TIME);
 
-    if(!sendReadCommand(REG_POWER_MODE, 1, response, "Read power mode register") )
-    {
-        yError()  << "@ line " << __LINE__;
-    }
-
-    yarp::os::Time::delay(SWITCHING_TIME);
 
     ///////////////////////////////////////
     //
@@ -357,23 +368,14 @@ bool BoschIMU::threadInit()
     ///////////////////////////////////////
 
     msg = CONFIG_MODE;
-    if(!sendWriteCommand(REG_OP_MODE, 1, &msg, "Set config mode") )
+    if(!sendAndVerifyCommand(REG_OP_MODE, 1, &msg, "Set config mode") )
     {
-        yError()  << "@ line " << __LINE__;
+        yError()  << "BoschIMU: set config mode failed";
+        return(false);
     }
 
     yarp::os::Time::delay(SWITCHING_TIME);
 
-    ///////////////////////////////////////
-    //
-    // Read back the config and verify
-    //
-    ///////////////////////////////////////
-
-    if(!sendReadCommand(REG_OP_MODE, 1, response, "Read config register") )
-    {
-        yError()  << "@ line " << __LINE__;
-    }
 
     ///////////////////////////////////////
     //
@@ -382,9 +384,10 @@ bool BoschIMU::threadInit()
     ///////////////////////////////////////
 
     msg = TRIG_EXT_CLK_SEL;
-    if(!sendWriteCommand(REG_SYS_TRIGGER, 1, &msg, "Set external clock") )
+    if(!sendAndVerifyCommand(REG_SYS_TRIGGER, 1, &msg, "Set external clock") )
     {
-        yError()  << "@ line " << __LINE__;
+        yError()  << "BoschIMU: set external clock failed";
+        return(false);
     }
     yarp::os::Time::delay(SWITCHING_TIME);
 
@@ -405,26 +408,13 @@ bool BoschIMU::threadInit()
     ///////////////////////////////////////
 
     msg = NDOF_MODE;
-    if(!sendWriteCommand(REG_OP_MODE, 1, &msg, "Set config NDOF_MODE") )
+    if(!sendAndVerifyCommand(REG_OP_MODE, 1, &msg, "Set config NDOF_MODE") )
     {
-        yError()  << "@ line " << __LINE__;
+        yError()  << "BoschIMU: set config NDOF_MODE failed";
     }
 
     yarp::os::Time::delay(SWITCHING_TIME);
 
-    //
-    // TODO: read back the config and verify
-    //
-    if(!sendReadCommand(REG_OP_MODE, 1, response, "Read config register") )
-    {
-        yError()  << "@ line " << __LINE__;
-    }
-    if(response[2] != msg)
-    {
-        yError("Config mode set was 0x%02X but read 0X%02X instead", msg, response[2]);
-        return false;
-    }
-    yarp::os::Time::delay(SWITCHING_TIME);
     return true;
 }
 
@@ -440,29 +430,7 @@ void BoschIMU::run()
 
     mutex.wait();
 
-    ///////////////////////////////////////
-    //
-    //      Read calibration status
-    //
-    ///////////////////////////////////////
-
-    if(!sendReadCommand(REG_CALIB_STATUS, 1, response, "Read calib status") )
-    {
-        yError()  << "@ line " << __LINE__;
-    }
-
-
     data.zero();
-    ///////////////////////////////////////////
-    //
-    // Read ID
-    //
-    ///////////////////////////////////////////
-
-    if(!sendReadCommand(REG_CHIP_ID, 1, response, "Read CHIP ID register") )
-    {
-        yError()  << "@ line " << __LINE__;
-    }
 
     ///////////////////////////////////////////
     //
@@ -487,19 +455,18 @@ void BoschIMU::run()
     //
     ///////////////////////////////////////////
 
-    if(!sendReadCommand(REG_ACC_DATA, 6, response, "Read accelerations ... ") )
+    if(sendReadCommand(REG_ACC_DATA, 6, response, "Read accelerations") )
     {
-        yError()  << "@ line " << __LINE__;
+        // Manually compose the data to safely handling endianess
+        raw_data[0] = response[3] << 8 | response[2];
+        raw_data[1] = response[5] << 8 | response[4];
+        raw_data[2] = response[7] << 8 | response[6];
+        data[3] = (double) raw_data[0]/100.0;
+        data[4] = (double) raw_data[1]/100.0;
+        data[5] = (double) raw_data[2]/100.0;
     }
-
-    // Manually compose the data to safely handling endianess
-    raw_data[0] = response[3] << 8 | response[2];
-    raw_data[1] = response[5] << 8 | response[4];
-    raw_data[2] = response[7] << 8 | response[6];
-    data[3] = (double) raw_data[0]/100.0;
-    data[4] = (double) raw_data[1]/100.0;
-    data[5] = (double) raw_data[2]/100.0;
-//     yDebug() << "Accel x: " << data[3] << "y: " << data[4] << "z: " << data[5];
+    else
+        errs.acceError++;
 
     ///////////////////////////////////////////
     //
@@ -507,19 +474,19 @@ void BoschIMU::run()
     //
     ///////////////////////////////////////////
 
-    if(!sendReadCommand(REG_GYRO_DATA, 6, response, "Read Gyros ... ") )
+    if(sendReadCommand(REG_GYRO_DATA, 6, response, "Read Gyros") )
     {
-        yError()  << "@ line " << __LINE__;
+        // Manually compose the data to handle endianess safely
+        raw_data[0] = response[3] << 8 | response[2];
+        raw_data[1] = response[5] << 8 | response[4];
+        raw_data[2] = response[7] << 8 | response[6];
+        data[6] = (double) raw_data[0]/16.0;
+        data[7] = (double) raw_data[1]/16.0;
+        data[8] = (double) raw_data[2]/16.0;
+        //     yDebug() << "Gyro x: " << data[6] << "y: " << data[7] << "z: " << data[8];
     }
-
-    // Manually compose the data to safely handling endianess
-    raw_data[0] = response[3] << 8 | response[2];
-    raw_data[1] = response[5] << 8 | response[4];
-    raw_data[2] = response[7] << 8 | response[6];
-    data[6] = (double) raw_data[0]/16.0;
-    data[7] = (double) raw_data[1]/16.0;
-    data[8] = (double) raw_data[2]/16.0;
-//     yDebug() << "Gyro x: " << data[6] << "y: " << data[7] << "z: " << data[8];
+    else
+        errs.gyroError++;
 
     ///////////////////////////////////////////
     //
@@ -527,19 +494,19 @@ void BoschIMU::run()
     //
     ///////////////////////////////////////////
 
-    if(!sendReadCommand(REG_MAGN_DATA, 6, response, "Read Magnetometer ... ") )
+    if(sendReadCommand(REG_MAGN_DATA, 6, response, "Read Magnetometer") )
     {
-        yError()  << "@ line " << __LINE__;
+        // Manually compose the data to safely handling endianess
+        raw_data[0] = response[3] << 8 | response[2];
+        raw_data[1] = response[5] << 8 | response[4];
+        raw_data[2] = response[7] << 8 | response[6];
+        data[ 9] = (double) raw_data[0]/16.0;
+        data[10] = (double) raw_data[1]/16.0;
+        data[11] = (double) raw_data[2]/16.0;
+    //     yDebug() << "Magn x: " << data[9] << "y: " << data[10] << "z: " << data[11];
     }
-
-    // Manually compose the data to safely handling endianess
-    raw_data[0] = response[3] << 8 | response[2];
-    raw_data[1] = response[5] << 8 | response[4];
-    raw_data[2] = response[7] << 8 | response[6];
-    data[ 9] = (double) raw_data[0]/16.0;
-    data[10] = (double) raw_data[1]/16.0;
-    data[11] = (double) raw_data[2]/16.0;
-//     yDebug() << "Magn x: " << data[9] << "y: " << data[10] << "z: " << data[11];
+    else
+        errs.magnError++;
 
     ///////////////////////////////////////////
     //
@@ -547,28 +514,28 @@ void BoschIMU::run()
     //
     ///////////////////////////////////////////
 
-    if(!sendReadCommand(REG_QUATERN_DATA, 8, response, "Read quaternion ... ") )
+    if(sendReadCommand(REG_QUATERN_DATA, 8, response, "Read quaternion") )
     {
-        yError()  << "@ line " << __LINE__;
+        quaternion.zero();
+        // Manually compose the data to safely handling endianess
+        raw_data[0] = response[3] << 8 | response[2];
+        raw_data[1] = response[5] << 8 | response[4];
+        raw_data[2] = response[7] << 8 | response[6];
+        raw_data[3] = response[9] << 8 | response[8];
+
+        quaternion[0] = ((double) raw_data[1])/(2<<13);
+        quaternion[1] = ((double) raw_data[2])/(2<<13);
+        quaternion[2] = ((double) raw_data[3])/(2<<13);
+        quaternion[3] = ((double) raw_data[0])/(2<<13);
+
+        RPY_angle.resize(3);
+        RPY_angle = yarp::math::dcm2rpy(yarp::math::quat2dcm(quaternion));
+        data[0] = RPY_angle[0] * 180/M_PI;
+        data[1] = RPY_angle[1] * 180/M_PI;
+        data[2] = RPY_angle[2] * 180/M_PI;
     }
-
-    quaternion.zero();
-    // Manually compose the data to safely handling endianess
-    raw_data[0] = response[3] << 8 | response[2];
-    raw_data[1] = response[5] << 8 | response[4];
-    raw_data[2] = response[7] << 8 | response[6];
-    raw_data[3] = response[9] << 8 | response[8];
-
-    quaternion[0] = ((double) raw_data[1])/(2<<13);
-    quaternion[1] = ((double) raw_data[2])/(2<<13);
-    quaternion[2] = ((double) raw_data[3])/(2<<13);
-    quaternion[3] = ((double) raw_data[0])/(2<<13);
-
-    RPY_angle.resize(3);
-    RPY_angle = yarp::math::dcm2rpy(yarp::math::quat2dcm(quaternion));
-    data[0] = RPY_angle[0] * 180/M_PI;
-    data[1] = RPY_angle[1] * 180/M_PI;
-    data[2] = RPY_angle[2] * 180/M_PI;
+    else
+        errs.quatError++;
 
     // If 100ms have passed since the last received message
     if (timeStamp+0.1 < yarp::os::Time::now())
@@ -576,11 +543,29 @@ void BoschIMU::run()
 //         status=TIMEOUT;
     }
     mutex.post();
+
+    if(timeStamp > timeLastReport + TIME_REPORT_INTERVAL)
+    {
+        // if almost 1 errors occourred in last interval, then print report
+        if(errs.acceError + errs.gyroError + errs.magnError + errs.quatError != 0)
+        {
+            yDebug(" IMUBOSCH periodic error report of last %d sec:", TIME_REPORT_INTERVAL);
+            yDebug("\t errors while reading acceleration: %d", errs.acceError);
+            yDebug("\t errors while reading gyroscope   : %d", errs.gyroError);
+            yDebug("\t errors while reading magnetometer: %d", errs.magnError);
+            yDebug("\t errors while reading angles      : %d", errs.quatError);
+        }
+
+        errs.acceError = 0;
+        errs.gyroError = 0;
+        errs.magnError = 0;
+        errs.quatError = 0;
+        timeLastReport=timeStamp;
+    }
 }
 
 bool BoschIMU::read(yarp::sig::Vector &out)
 {
-//     yTrace();
     mutex.wait();
     out.resize(nChannels);
     out.zero();
@@ -616,9 +601,10 @@ bool BoschIMU::calibrate(int ch, double v)
 void BoschIMU::threadRelease()
 {
     yTrace("BoschIMU Thread released\n");
-    for(unsigned int i=0; i<errorCounter.size(); i++)
-        printf("Error type %d, counter is %d\n", i, (int)errorCounter[i]);
-    printf("On overall read operations of %ld\n", totMessagesRead);
+    //TBD write more meaningful report
+//    for(unsigned int i=0; i<errorCounter.size(); i++)
+//        printf("Error type %d, counter is %d\n", i, (int)errorCounter[i]);
+//    printf("On overall read operations of %ld\n", totMessagesRead);
     ::close(fd_ser);
 }
 
diff --git a/src/modules/imuBosch_BNO055/imuBosch_BNO055.h b/src/modules/imuBosch_BNO055/imuBosch_BNO055.h
index 9f44a77..d7aa187 100644
--- a/src/modules/imuBosch_BNO055/imuBosch_BNO055.h
+++ b/src/modules/imuBosch_BNO055/imuBosch_BNO055.h
@@ -102,8 +102,14 @@ namespace yarp {
 #define TRIG_RESET_SYSTEM   0x20    // reset system
 #define TRIG_SELF_TEST      0x01    // Start self test
 
+#define RESP_HEADER_SIZE                 2
 // Time to wait while switching to and from config_mode & any operation_mode
-#define SWITCHING_TIME   0.020  //   20ms
+#define SWITCHING_TIME                   0.020  //   20ms
+#define TIME_REPORT_INTERVAL             30
+//number of attempts of sending config command
+#define ATTEMPTS_NUM_OF_SEND_CONFIG_CMD  3
+
+
 
 /**
 *  @ingroup dev_impl_wrapper
@@ -134,29 +140,42 @@ protected:
     yarp::sig::Vector           quaternion;
     yarp::sig::Vector           RPY_angle;
     double                      timeStamp;
+    double                      timeLastReport;
 
     bool                        checkError;
 
     int                         fd_ser;
     yarp::os::ResourceFinder    rf;
 
-    char command[MAX_MSG_LENGTH];
-    char response[MAX_MSG_LENGTH];
+    unsigned char command[MAX_MSG_LENGTH];
+    unsigned char response[MAX_MSG_LENGTH];
 
-    bool checkWriteResponse(char *response);
-    bool checkReadResponse(char *response);
+    bool checkWriteResponse(unsigned char *response);
+    bool checkReadResponse(unsigned char *response);
 
-    void printBuffer(char *buffer, int length);
-    int  readBytes(char *buffer, int bytes);
+    void printBuffer(unsigned char *buffer, int length);
+    int  readBytes(unsigned char *buffer, int bytes);
     void dropGarbage();
 
     long int           totMessagesRead;
     yarp::sig::Vector  errorCounter;
+    yarp::sig::Vector  errorReading;
 
     void readSysError();
 
-    bool sendReadCommand( char register_add, int len, char* buf, std::string comment = "");
-    bool sendWriteCommand(char register_add, int len, char* cmd, std::string comment = "");
+    bool sendReadCommand(unsigned char register_add, int len, unsigned char* buf, std::string comment = "");
+    bool sendWriteCommand(unsigned char register_add, int len, unsigned char* cmd, std::string comment = "");
+    bool sendAndVerifyCommand(unsigned char register_add, int len, unsigned char* cmd, std::string comment);
+
+    struct errCounter
+    {
+        int acceError;
+        int gyroError;
+        int magnError;
+        int quatError;
+    };
+
+    errCounter errs;
 
 public:
     BoschIMU();
diff --git a/src/modules/jrkerr/CMakeLists.txt b/src/modules/jrkerr/CMakeLists.txt
index 152cc7d..6d4dc72 100644
--- a/src/modules/jrkerr/CMakeLists.txt
+++ b/src/modules/jrkerr/CMakeLists.txt
@@ -1,35 +1,38 @@
 # Copyright: (C) 2009 RobotCub Consortium
 # Author: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
- 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(jrkerr TYPE yarp::dev::JrkerrMotionControl INCLUDE JrkerrMotionControl.h WRAPPER controlboard)
-  yarp_install(FILES jrkerr.ini
-               COMPONENT runtime
-               DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-ENDIF (COMPILE_DEVICE_LIBRARY)
-
-IF (NOT SKIP_jrkerr)
-
-FIND_PACKAGE(YARP REQUIRED)
-
-IF (WIN32)
-
-  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${YARP_INCLUDE_DIRS})
-
-  YARP_ADD_PLUGIN(yarp_jrkerr JrkerrMotionControl.cpp nmccom.cpp picservo.cpp sio_util.cpp JrkerrMotionControl.h nmccom.h picservo.h sio_util.h)
-  TARGET_LINK_LIBRARIES(yarp_jrkerr ${YARP_LIBRARIES})
-  yarp_install(TARGETS yarp_jrkerr
-               EXPORT YARP
-               COMPONENT runtime
-               LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
-               ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-ELSE (WIN32)
-
-  MESSAGE(SEND_ERROR "not a system we know how to build jrkerr on yet, minor fixes needed")
-
-ENDIF (WIN32)
-
-ENDIF (NOT SKIP_jrkerr)
 
+if(WIN32)
+  if(COMPILE_DEVICE_LIBRARY)
+    yarp_prepare_device(jrkerr
+                        TYPE yarp::dev::JrkerrMotionControl
+                        INCLUDE JrkerrMotionControl.h
+                        WRAPPER controlboard)
+    yarp_install(FILES jrkerr.ini
+                 COMPONENT runtime
+                 DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
+  endif()
+
+  if(NOT SKIP_jrkerr)
+    set(CMAKE_INCLUDE_CURRENT_DIR ON)
+    get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+    get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+    include_directories(${YARP_OS_INCLUDE_DIRS}
+                        ${YARP_dev_INCLUDE_DIRS})
+    yarp_add_plugin(yarp_jrkerr JrkerrMotionControl.cpp
+                                nmccom.cpp
+                                picservo.cpp
+                                sio_util.cpp
+                                JrkerrMotionControl.h
+                                nmccom.h
+                                picservo.h
+                                sio_util.h)
+    target_link_libraries(yarp_jrkerr YARP_OS
+                                      YARP_dev)
+    yarp_install(TARGETS yarp_jrkerr
+                 EXPORT YARP
+                 COMPONENT runtime
+                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
+  endif()
+endif()
diff --git a/src/modules/kinect/OpenNI/CMakeLists.txt b/src/modules/kinect/OpenNI/CMakeLists.txt
index 580326b..f61fb1a 100644
--- a/src/modules/kinect/OpenNI/CMakeLists.txt
+++ b/src/modules/kinect/OpenNI/CMakeLists.txt
@@ -3,19 +3,23 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(KinectDeviceLocal TYPE yarp::dev::KinectDeviceDriverServer INCLUDE KinectYarpDeviceServerLib/KinectDeviceDriverServer.h)
+  yarp_prepare_device(KinectDeviceLocal
+                      TYPE yarp::dev::KinectDeviceDriverServer
+                      INCLUDE KinectYarpDeviceServerLib/KinectDeviceDriverServer.h)
   yarp_install(FILES kinect.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-endif(COMPILE_DEVICE_LIBRARY)
+endif()
 
 if(ENABLE_KinectDeviceLocal)
   add_subdirectory(KinectYarpDeviceServerLib)
 endif()
 
 if(COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(KinectDeviceClient TYPE yarp::dev::KinectDeviceDriverClient INCLUDE KinectYarpDeviceClientLib/KinectDeviceDriverClient.h)
-endif(COMPILE_DEVICE_LIBRARY)
+  yarp_prepare_device(KinectDeviceClient
+                      TYPE yarp::dev::KinectDeviceDriverClient
+                      INCLUDE KinectYarpDeviceClientLib/KinectDeviceDriverClient.h)
+endif()
 
 if(ENABLE_KinectDeviceClient)
   add_subdirectory(KinectYarpDeviceClientLib)
diff --git a/src/modules/kinect/OpenNI/KinectYarpDeviceClientLib/CMakeLists.txt b/src/modules/kinect/OpenNI/KinectYarpDeviceClientLib/CMakeLists.txt
index ff626d0..f823773 100644
--- a/src/modules/kinect/OpenNI/KinectYarpDeviceClientLib/CMakeLists.txt
+++ b/src/modules/kinect/OpenNI/KinectYarpDeviceClientLib/CMakeLists.txt
@@ -2,8 +2,12 @@
 # Author: Duarte Aragao
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-find_package(YARP REQUIRED)
-include_directories(${YARP_INCLUDE_DIRS})
+get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+include_directories(${YARP_OS_INCLUDE_DIRS}
+                    ${YARP_sig_INCLUDE_DIRS}
+                    ${YARP_dev_INCLUDE_DIRS})
 
 # Search for source code.
 file(GLOB folder_source *.cpp *.cc *.c)
@@ -17,7 +21,9 @@ foreach(header_file ${folder_header})
 endforeach(header_file ${folder_header})
 
 yarp_add_plugin(KinectYarpDeviceClientLib ${folder_source} ${folder_header})
-target_link_libraries(KinectYarpDeviceClientLib ${YARP_LIBRARIES})
+target_link_libraries(KinectYarpDeviceClientLib YARP_OS
+                                                YARP_sig
+                                                YARP_dev)
 install(TARGETS KinectYarpDeviceClientLib
         COMPONENT runtime
         RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
diff --git a/src/modules/kinect/OpenNI/KinectYarpDeviceServerLib/CMakeLists.txt b/src/modules/kinect/OpenNI/KinectYarpDeviceServerLib/CMakeLists.txt
index d0ce125..f7e5ecb 100644
--- a/src/modules/kinect/OpenNI/KinectYarpDeviceServerLib/CMakeLists.txt
+++ b/src/modules/kinect/OpenNI/KinectYarpDeviceServerLib/CMakeLists.txt
@@ -2,8 +2,12 @@
 # Author: Duarte Aragao
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-find_package(YARP REQUIRED)
-include_directories(${YARP_INCLUDE_DIRS})
+get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+include_directories(${YARP_OS_INCLUDE_DIRS}
+                    ${YARP_sig_INCLUDE_DIRS}
+                    ${YARP_dev_INCLUDE_DIRS})
 
 #OPENNI Lib
 # message("$ENV{OPEN_NI_INCLUDE}")
@@ -12,9 +16,7 @@ find_path(OPEN_NI_INCLUDE_LOCAL NAMES XnOpenNI XnOpenNI.h
                                 HINTS $ENV{OPEN_NI_INCLUDE} /usr/include/openni /usr/include/ni)
 find_library(OPEN_NI_LIBRARY NAMES OpenNI libOpenNI libOpenNI.so
                              HINTS $ENV{OPEN_NI_LIB} "/usr/lib")
-link_directories($ENV{OPEN_NI_LIB})
-include_directories(${OPEN_NI_INCLUDE_LOCAL})
-link_libraries(${OPEN_NI_LIBRARY})
+include_directories(SYSTEM ${OPEN_NI_INCLUDE_LOCAL})
 #message("OpenNI\nlib:${OPEN_NI_LIBRARY_DIR} ${OPEN_NI_LIBRARY}\ninc:${OPEN_NI_INCLUDE_LOCAL}\n")
 
 
@@ -24,9 +26,7 @@ find_path(XN_NITE_INCLUDE NAMES "XnVNite" "XnVNite.h"
                           HINTS "$ENV{XN_NITE_INSTALL_PATH}Include" "/usr/include/nite")
 find_library(XN_NITE_LIBRARY NAMES XnVNITE libXnVNite  libXnVNite_1_3_1  libXnVNite_1_3_1.so libXnVNite.so
                              HINTS $ENV{XN_NITE_INSTALL_PATH} Lib "/usr/lib")
-link_directories($ENV{XN_NITE_INSTALL_PATH})
-include_directories(${XN_NITE_INCLUDE})
-link_libraries(${XN_NITE_LIBRARY})
+include_directories(SYSTEM ${XN_NITE_INCLUDE})
 #message("\nNite\nlib:${XN_NITE_LIBRARY_DIR} ${XN_NITE_LIBRARY}\ninc:${XN_NITE_INCLUDE}")
 
 # Search for source code.
@@ -42,7 +42,11 @@ foreach(header_file ${folder_header})
 endforeach(header_file ${folder_header})
 
 yarp_add_plugin(KinectYarpDeviceServerLib ${folder_source} ${folder_header})
-target_link_libraries(KinectYarpDeviceServerLib ${YARP_LIBRARIES} ${LINK_LIBRARIES})
+target_link_libraries(KinectYarpDeviceServerLib YARP_OS
+                                                YARP_sig
+                                                YARP_dev
+                                                ${OPEN_NI_LIBRARY}
+                                                ${XN_NITE_LIBRARY})
 install(TARGETS KinectYarpDeviceServerLib
         COMPONENT runtime
         RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
diff --git a/src/modules/kinect/freenect/CMakeLists.txt b/src/modules/kinect/freenect/CMakeLists.txt
index c3ea3d5..0c66520 100644
--- a/src/modules/kinect/freenect/CMakeLists.txt
+++ b/src/modules/kinect/freenect/CMakeLists.txt
@@ -2,41 +2,56 @@
 # CopyPolicy: Released under the terms of the GNU GPL v2.0.
 
 if(COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(primesensecamera TYPE yarp::dev::ServerKinect INCLUDE "ServerKinect.h" WRAPPER primesensecamera)
-  yarp_prepare_device(kinect TYPE yarp::dev::KinectDeviceDriver INCLUDE "KinectDeviceDriver.h" WRAPPER primesensecamera)
+  yarp_prepare_device(primesensecamera
+                      TYPE yarp::dev::ServerKinect
+                      INCLUDE "ServerKinect.h"
+                      WRAPPER primesensecamera)
+  yarp_prepare_device(kinect
+                      TYPE yarp::dev::KinectDeviceDriver
+                      INCLUDE "KinectDeviceDriver.h"
+                      WRAPPER primesensecamera)
 endif()
 
-if(SKIP_primesensecamera AND SKIP_kinect)
-  set(SKIP_all_primesensecamera TRUE)
-endif()
-
-if(NOT SKIP_all_primesensecamera)
-  find_package(YARP REQUIRED)
-  include_directories(${YARP_INCLUDE_DIRS})
-  link_libraries(${YARP_LIBRARIES})
+if(NOT SKIP_primesensecamera OR NOT SKIP_kinect)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
 
   # Include libfreenect library from openkinect repository at https://github.com/OpenKinect/openkinect
   find_path(LIBFREENECT_INCLUDE libfreenect.h)
   find_library(LIBFREENECT_LIBRARIES freenect ${LIBFREENECT_INCLUDE}/../lib ${LIBFREENECT_INCLUDE}/../build/lib)
   set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LIBFREENECT_INCLUDE}/../cmake_modules)
 
-  find_package(Libusb1 REQUIRED)
-
   # Tell cmake about the include directories
   include_directories(${CMAKE_SOURCE_DIR} ${LIBFREENECT_INCLUDE} ${Libusb1_INCLUDE_DIRS})
-  link_libraries(${LIBFREENECT_LIBRARIES} ${USB_LIBRARIES})
 
   #add_definitions(-DDEBUG -g)
-  yarp_add_plugin(kinect KinectDeviceDriver.cpp KinectDeviceDriver.h)
+  yarp_add_plugin(yarp_kinect KinectDeviceDriver.cpp
+                              KinectDeviceDriver.h)
+  target_link_libraries(yarp_kinect YARP_OS
+                               YARP_sig
+                               YARP_dev
+                               ${LIBFREENECT_LIBRARIES}
+                               ${USB_LIBRARIES})
   yarp_install(TARGETS kinect
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
 
-  if(NOT COMPILE_DEVICE_LIBRARY)
-    link_libraries(kinect)
-    add_executable(example KinectExample.cpp)
+  if(YARP_COMPILE_TESTS)
+    add_executable(test_kinect KinectExample.cpp
+                               KinectDeviceDriver.cpp
+                               KinectDeviceDriver.h)
+    target_link_libraries(test_kinect YARP_OS
+                                      YARP_init
+                                      YARP_sig
+                                      YARP_dev
+                                      ${LIBFREENECT_LIBRARIES}
+                                      ${USB_LIBRARIES})
   endif()
 
 endif()
diff --git a/src/modules/laserHokuyo/CMakeLists.txt b/src/modules/laserHokuyo/CMakeLists.txt
index 4fe1c18..7b9c850 100644
--- a/src/modules/laserHokuyo/CMakeLists.txt
+++ b/src/modules/laserHokuyo/CMakeLists.txt
@@ -1,24 +1,32 @@
 # Copyright (C) 2010 Marco Randazzo
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(laserHokuyo TYPE laserHokuyo INCLUDE laserHokuyo.h)
+if(COMPILE_DEVICE_LIBRARY)
+  yarp_prepare_device(laserHokuyo
+                      TYPE laserHokuyo
+                      INCLUDE laserHokuyo.h)
   yarp_install(FILES laserHokuyo.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-ENDIF (COMPILE_DEVICE_LIBRARY)
+endif()
 
-if (NOT SKIP_laserHokuyo)
+if(NOT SKIP_laserHokuyo)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
 
-  include_directories(${CMAKE_CURRENT_SOURCE_DIR}
-                      ${YARP_INCLUDE_DIRS})
-
-  yarp_add_plugin(laserHokuyo laserHokuyo.h laserHokuyo.cpp)
-  target_link_libraries(laserHokuyo ${YARP_LIBRARIES})
+  yarp_add_plugin(laserHokuyo laserHokuyo.h
+                              laserHokuyo.cpp)
+  target_link_libraries(laserHokuyo YARP_OS
+                                    YARP_sig
+                                    YARP_dev)
   yarp_install(TARGETS laserHokuyo
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-endif (NOT SKIP_laserHokuyo)
+endif()
diff --git a/src/modules/laserHokuyo/laserHokuyo.cpp b/src/modules/laserHokuyo/laserHokuyo.cpp
index 19d0036..76bac1c 100644
--- a/src/modules/laserHokuyo/laserHokuyo.cpp
+++ b/src/modules/laserHokuyo/laserHokuyo.cpp
@@ -42,8 +42,15 @@ bool laserHokuyo::open(yarp::os::Searchable& config)
     //list of mandatory options
     //TODO change comments
     period = general_config.check("Period", Value(50), "Period of the sampling thread").asInt();
+
+    if (general_config.check("max_angle") == false) { yError() << "Missing max_angle param"; return false; }
+    if (general_config.check("min_angle") == false) { yError() << "Missing min_angle param"; return false; }
+    max_angle = general_config.find("max_angle").asDouble();
+    min_angle = general_config.find("min_angle").asDouble();
+
     start_position = general_config.check("Start_Position", Value(0), "Start position").asInt();
     end_position = general_config.check("End_Position", Value(1080), "End Position").asInt();
+
     error_codes = general_config.check("Convert_Error_Codes", Value(0), "Substitute error codes with legal measurments").asInt();
     yarp::os::ConstString s = general_config.check("Laser_Mode", Value("GD"), "Laser Mode (GD/MD").asString();
 
@@ -54,7 +61,7 @@ bool laserHokuyo::open(yarp::os::Searchable& config)
 
     if (error_codes==1)
     {
-        yInfo("'error_codes' option enabled. Invalid samples will be substituded with out-of-range measurements.");
+        yInfo("'error_codes' option enabled. Invalid samples will be substituted with out-of-range measurements.");
     }
     if (s=="GD")
     {
@@ -281,8 +288,8 @@ bool laserHokuyo::setDistanceRange(double min, double max)
 bool laserHokuyo::getScanLimits(double& min, double& max)
 {
     //degrees
-    min = 0;
-    max = 270;
+    min = min_angle;
+    max = max_angle;
     return true;
 }
 
diff --git a/src/modules/laserHokuyo/laserHokuyo.h b/src/modules/laserHokuyo/laserHokuyo.h
index 0c649c1..e3da0fb 100644
--- a/src/modules/laserHokuyo/laserHokuyo.h
+++ b/src/modules/laserHokuyo/laserHokuyo.h
@@ -38,6 +38,8 @@ protected:
     int sensorsNum;
     int start_position;
     int end_position;
+    double min_angle;
+    double max_angle;
     int error_codes;
     int internal_status;
     std::string info;
diff --git a/src/modules/meiMotionControl/CMakeLists.txt b/src/modules/meiMotionControl/CMakeLists.txt
index 36cc1e8..e5ebadd 100644
--- a/src/modules/meiMotionControl/CMakeLists.txt
+++ b/src/modules/meiMotionControl/CMakeLists.txt
@@ -1,23 +1,27 @@
 # Copyright: (C) 2009 RobotCub Consortium
 # Author:  Giorgio Metta, Lorenzo Natale
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
- 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(meiMotionControl TYPE yarp::dev::MEIMotionControl INCLUDE MEIMotionControl.h WRAPPER controlboard)
-ENDIF (COMPILE_DEVICE_LIBRARY)
 
-IF (NOT SKIP_meiMotionControl)
+if(COMPILE_DEVICE_LIBRARY)
+  yarp_prepare_device(meiMotionControl
+                      TYPE yarp::dev::MEIMotionControl
+                      INCLUDE MEIMotionControl.h
+                      WRAPPER controlboard)
+endif()
 
-  FIND_PACKAGE(YARP REQUIRED)
-	SET(YARP_DEPENDENCIES "medvc60f.lib")
-  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-
-  yarp_add_plugin(meiMotionControl MEIMotionControl.cpp  MEIMotionControl.h )
-  yarp_install(TARGETS meiMotionControl
+if(NOT SKIP_meiMotionControl)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+  yarp_add_plugin(yarp_meiMotionControl MEIMotionControl.cpp
+                                        MEIMotionControl.h)
+  target_link_libraries(yarp_meiMotionControl YARP_OS
+                                              YARP_dev)
+  yarp_install(TARGETS yarp_meiMotionControl
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-ENDIF (NOT SKIP_meiMotionControl)
-
+endif(NOT SKIP_meiMotionControl)
diff --git a/src/modules/microphone/CMakeLists.txt b/src/modules/microphone/CMakeLists.txt
index 55297f6..0d87e2f 100644
--- a/src/modules/microphone/CMakeLists.txt
+++ b/src/modules/microphone/CMakeLists.txt
@@ -1,41 +1,42 @@
 # Copyright: (C) 2009 RobotCub Consortium
 # Author: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
- 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(microphone TYPE yarp::dev::MicrophoneDeviceDriver INCLUDE MicrophoneDeviceDriver.h WRAPPER grabber)
-  yarp_install(FILES microphone.ini
-               COMPONENT runtime
-               DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-ENDIF (COMPILE_DEVICE_LIBRARY)
 
-IF (NOT SKIP_microphone)
-
-FIND_PACKAGE(YARP REQUIRED)
-
-IF (UNIX OR WIN32)
-
-  IF (WIN32)
-    SET(SYS Windows)
-  ELSE (WIN32)
-    SET(SYS Linux)
-  ENDIF (WIN32)
-
-  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-  INCLUDE_DIRECTORIES(${YARP_INCLUDE_DIRS})
-  LINK_LIBRARIES(${YARP_LIBRARIES})
-
-  YARP_ADD_PLUGIN(yarp_microphone ${SYS}MicrophoneDeviceDriver.cpp MicrophoneDeviceDriver.h)
-  yarp_install(TARGETS yarp_microphone
-               EXPORT YARP
-               COMPONENT runtime
-               LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
-               ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-ELSE (UNIX OR WIN32)
-
-  MESSAGE(SEND_ERROR "not a system we know how to build a microphone driver on")
-
-ENDIF (UNIX OR WIN32)
-
-ENDIF (NOT SKIP_microphone)
+if(UNIX OR WIN32)
+  if(COMPILE_DEVICE_LIBRARY)
+    yarp_prepare_device(microphone
+                        TYPE yarp::dev::MicrophoneDeviceDriver
+                        INCLUDE MicrophoneDeviceDriver.h
+                        WRAPPER grabber)
+    yarp_install(FILES microphone.ini
+                 COMPONENT runtime
+                 DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
+  endif()
+
+  if(NOT SKIP_microphone)
+    set(CMAKE_INCLUDE_CURRENT_DIR ON)
+    get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+    get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+    get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+    include_directories(${YARP_OS_INCLUDE_DIRS}
+                        ${YARP_sig_INCLUDE_DIRS}
+                        ${YARP_dev_INCLUDE_DIRS})
+
+    if(WIN32)
+      set(_SYS Windows)
+    else()
+      set(_SYS Linux)
+    endif()
+
+    yarp_add_plugin(yarp_microphone ${_SYS}MicrophoneDeviceDriver.cpp
+                                    MicrophoneDeviceDriver.h)
+    target_link_libraries(yarp_microphone YARP_OS
+                                          YARP_sig
+                                          YARP_dev)
+    yarp_install(TARGETS yarp_microphone
+                 EXPORT YARP
+                 COMPONENT runtime
+                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
+  endif()
+endif()
diff --git a/src/modules/nvidia/CMakeLists.txt b/src/modules/nvidia/CMakeLists.txt
index e0902bc..3a9a58f 100644
--- a/src/modules/nvidia/CMakeLists.txt
+++ b/src/modules/nvidia/CMakeLists.txt
@@ -2,56 +2,40 @@
 # Author: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(nvidia TYPE NVIDIAGPU INCLUDE "NVIDIADeviceDriver.h")
+if(COMPILE_DEVICE_LIBRARY)
+  yarp_prepare_device(nvidia
+                      TYPE NVIDIAGPU
+                      INCLUDE "NVIDIADeviceDriver.h")
   yarp_install(FILES nvidia.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-ENDIF (COMPILE_DEVICE_LIBRARY)
-
-IF (NOT SKIP_nvidia)
-
- FIND_PACKAGE(YARP REQUIRED)
-
- FIND_LIBRARY(lib_CgGL CgGL)
- FIND_LIBRARY(lib_pthread pthread)
- FIND_LIBRARY(lib_GL GL)
- FIND_LIBRARY(lib_glut glut)
-
- SET (OK FALSE)
-
- IF(lib_CgGL AND lib_pthread AND lib_GL AND lib_glut)
-  SET (OK TRUE)
- ENDIF(lib_CgGL AND lib_pthread AND lib_GL AND lib_glut)
-
- IF (NOT WINDOWS)
-  FIND_LIBRARY(lib_GLEW GLEW)
-  IF (NOT lib_GLEW)
-    SET (OK FALSE)
-  ENDIF (NOT lib_GLEW)
- ENDIF (NOT WINDOWS)
-
-
- IF (OK)
-
-  ADD_DEFINITIONS(-DGL_GLEXT_PROTOTYPES -DGLX_GLXEXT_PROTOTYPES)
-
-  LINK_LIBRARIES(pthread GL glut CgGL)
-  IF (NOT WINDOWS)
-    LINK_LIBRARIES(GLEW)
-  ENDIF (NOT WINDOWS)	
-
-  YARP_ADD_PLUGIN(yarp_nvidia NVIDIADeviceDriver.cpp NVIDIADeviceDriver.h FBO_Filter.h)
+endif()
+
+if(NOT SKIP_nvidia)
+  add_definitions(-DGL_GLEXT_PROTOTYPES
+                  -DGLX_GLXEXT_PROTOTYPES)
+
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+
+  include_directories(SYSTEM ${NVIDIACg_INCLUDE_DIRS})
+
+  yarp_add_plugin(yarp_nvidia NVIDIADeviceDriver.cpp
+                              NVIDIADeviceDriver.h
+                              FBO_Filter.h)
+
+  target_link_libraries(yarp_nvidia YARP_OS
+                                    YARP_sig
+                                    YARP_dev
+                                    ${NVIDIACg_LIBRARIES})
   yarp_install(TARGETS yarp_nvidia
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
- ELSE (OK)
-
-  MESSAGE(FATAL_ERROR "could not find all libraries needed by nvidia driver")
-
- ENDIF (OK)
-
-ENDIF (NOT SKIP_nvidia)
+endif()
diff --git a/src/modules/opencv/CMakeLists.txt b/src/modules/opencv/CMakeLists.txt
index 2a476b7..9aba3a4 100644
--- a/src/modules/opencv/CMakeLists.txt
+++ b/src/modules/opencv/CMakeLists.txt
@@ -3,7 +3,10 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_DEVICE_LIBRARY)
-    yarp_prepare_device(opencv_grabber TYPE yarp::dev::OpenCVGrabber INCLUDE OpenCVGrabber.h WRAPPER grabber)
+  yarp_prepare_device(opencv_grabber
+                      TYPE yarp::dev::OpenCVGrabber
+                      INCLUDE OpenCVGrabber.h
+                      WRAPPER grabber)
   yarp_install(FILES opencv.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
@@ -11,11 +14,21 @@ endif(COMPILE_DEVICE_LIBRARY)
 
 if(NOT SKIP_opencv_grabber)
 
-    include_directories(${YARP_INCLUDE_DIRS})
-    include_directories(${OpenCV_INCLUDE_DIRS})
-    yarp_add_plugin(yarp_opencv OpenCVGrabber.cpp OpenCVGrabber.h)
-    target_link_libraries(yarp_opencv ${YARP_LIBRARIES})
-    target_link_libraries(yarp_opencv ${OpenCV_LIBRARIES})
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+
+  include_directories(SYSTEM ${OpenCV_INCLUDE_DIRS})
+
+  yarp_add_plugin(yarp_opencv OpenCVGrabber.cpp
+                              OpenCVGrabber.h)
+  target_link_libraries(yarp_opencv YARP_OS
+                                    YARP_sig
+                                    YARP_dev
+                                    ${OpenCV_LIBRARIES})
     yarp_install(TARGETS yarp_opencv
                  EXPORT YARP
                  COMPONENT runtime
diff --git a/src/modules/openni2/CMakeLists.txt b/src/modules/openni2/CMakeLists.txt
index f421040..b8bd8ed 100644
--- a/src/modules/openni2/CMakeLists.txt
+++ b/src/modules/openni2/CMakeLists.txt
@@ -3,66 +3,68 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if (COMPILE_DEVICE_LIBRARY)
-    yarp_prepare_device(OpenNI2DeviceServer TYPE yarp::dev::OpenNI2DeviceDriverServer INCLUDE OpenNI2DeviceDriverServer.h)
-    yarp_prepare_device(OpenNI2DeviceClient TYPE yarp::dev::OpenNI2DeviceDriverClient INCLUDE OpenNI2DeviceDriverClient.h)
+    yarp_prepare_device(OpenNI2DeviceServer
+                        TYPE yarp::dev::OpenNI2DeviceDriverServer
+                        INCLUDE OpenNI2DeviceDriverServer.h)
+    yarp_prepare_device(OpenNI2DeviceClient
+                        TYPE yarp::dev::OpenNI2DeviceDriverClient
+                        INCLUDE OpenNI2DeviceDriverClient.h)
     yarp_install(FILES openni2.ini
                  COMPONENT runtime
                  DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
 endif()
 
-if (SKIP_OpenNI2DeviceServer AND SKIP_OpenNI2DeviceClient)
-    set(SKIP_OpenNI2Device TRUE)
+if (NOT SKIP_OpenNI2DeviceServer OR NOT SKIP_OpenNI2DeviceClient)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+
+  find_path(OPENNI2_INCLUDE_LOCAL NAMES OpenNI.h HINTS $ENV{OPENNI2_INCLUDE} /usr/include/openni2)
+  find_library(OPENNI2_LIBRARY NAMES OpenNI2 libOpenNI2.dylib libOpenNI2 HINTS $ENV{OPENNI2_REDIST})
+  find_path(NITE2_INCLUDE_LOCAL NAMES NiTE.h HINTS $ENV{NITE2_INCLUDE})
+  find_library(NITE2_LIBRARY NAMES NiTE2 HINTS $ENV{NITE2_REDIST64})
+  if(NITE2_INCLUDE_LOCAL)
+    set(NITE2_FOUND TRUE)
+  else()
+    set(NITE2_FOUND FALSE)
+  endif()
+
+  if(NOT NITE2_FOUND)
+    message(STATUS "OpenNI2Device: NITE2 library was not found, skeleton extraction feature will be skipped by driver. "
+                   "If you need this feature please install NITE2 library.")
+  else()
+    add_definitions(-DOPENNI2_DRIVER_USES_NITE2)
+  endif()
+
+  include_directories(SYSTEM ${OPENNI2_INCLUDE_LOCAL})
+  if(NITE2_FOUND)
+    include_directories(SYSTEM ${NITE2_INCLUDE_LOCAL})
+  endif()
+
+  yarp_add_plugin(yarp_OpenNI2Device OpenNI2DeviceDriverClient.cpp
+                                     OpenNI2DeviceDriverClient.h
+                                     OpenNI2DeviceDriverServer.cpp
+                                     OpenNI2DeviceDriverServer.h
+                                     OpenNI2SkeletonData.cpp
+                                     OpenNI2SkeletonData.h
+                                     OpenNI2SkeletonTracker.cpp
+                                     OpenNI2SkeletonTracker.h)
+  target_link_libraries(yarp_OpenNI2Device YARP_OS
+                                           YARP_sig
+                                           YARP_dev
+                                           ${OPENNI2_LIBRARY})
+
+  if(NITE2_FOUND)
+    target_link_libraries(yarp_OpenNI2Device ${NITE2_LIBRARY})
+  endif()
+
+  yarp_install(TARGETS yarp_OpenNI2Device
+               EXPORT YARP
+               COMPONENT runtime
+               LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+               ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
 endif()
-
-if (NOT SKIP_OpenNI2Device)
-
-    find_package(YARP REQUIRED)
-
-    find_path(OPENNI2_INCLUDE_LOCAL NAMES OpenNI.h HINTS $ENV{OPENNI2_INCLUDE} /usr/include/openni2)
-    find_library(OPENNI2_LIBRARY NAMES OpenNI2 libOpenNI2.dylib libOpenNI2 HINTS $ENV{OPENNI2_REDIST})
-    find_path(NITE2_INCLUDE_LOCAL NAMES NiTE.h HINTS $ENV{NITE2_INCLUDE})
-    find_library(NITE2_LIBRARY NAMES NiTE2 HINTS $ENV{NITE2_REDIST64})
-    if(NITE2_INCLUDE_LOCAL)
-        set(NITE2_FOUND TRUE)
-    else()
-        set(NITE2_FOUND FALSE)
-    endif()
-
-    if(NOT NITE2_FOUND)
-        message(STATUS "OpenNI2Device: NITE2 library was not found, skeleton extraction feature will be skipped by driver. "
-         "If you need this feature please install NITE2 library.")
-    else()
-        add_definitions(-DOPENNI2_DRIVER_USES_NITE2)
-    endif()
-
-    include_directories(${YARP_INCLUDE_DIRS})
-    include_directories(SYSTEM ${OPENNI2_INCLUDE_LOCAL})
-    if(NITE2_FOUND)
-        include_directories(SYSTEM ${NITE2_INCLUDE_LOCAL})
-    endif()
-
-    # Search for source code.
-    file(GLOB folder_source *.cpp *.cc *.c)
-    file(GLOB folder_header *.h)
-
-    source_group("Source Files" FILES ${folder_source})
-    source_group("Header Files" FILES ${folder_header})
-
-    yarp_add_plugin(yarp_OpenNI2Device ${folder_source} ${folder_header})
-    target_link_libraries(yarp_OpenNI2Device ${OPENNI2_LIBRARY} ${YARP_LIBRARIES})
-
-    if(NITE2_FOUND)
-        target_link_libraries(yarp_OpenNI2Device ${NITE2_LIBRARY})
-    endif()
-
-    yarp_install(TARGETS yarp_OpenNI2Device
-                 EXPORT YARP
-                 COMPONENT runtime
-                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
-                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-endif()
-
-
-
-
diff --git a/src/modules/ovrheadset/CMakeLists.txt b/src/modules/ovrheadset/CMakeLists.txt
index 68a30a0..65f00db 100644
--- a/src/modules/ovrheadset/CMakeLists.txt
+++ b/src/modules/ovrheadset/CMakeLists.txt
@@ -1,5 +1,7 @@
 if(COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(ovrheadset TYPE yarp::dev::OVRHeadset INCLUDE OVRHeadset.h)
+  yarp_prepare_device(ovrheadset
+                      TYPE yarp::dev::OVRHeadset
+                      INCLUDE OVRHeadset.h)
   yarp_install(FILES ovrheadset.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
diff --git a/src/modules/ovrheadset/OVRHeadset.h b/src/modules/ovrheadset/OVRHeadset.h
index 9327847..3aa77d0 100644
--- a/src/modules/ovrheadset/OVRHeadset.h
+++ b/src/modules/ovrheadset/OVRHeadset.h
@@ -34,8 +34,8 @@ namespace dev {
 
 
 class OVRHeadset : public yarp::dev::DeviceDriver,
-                  public yarp::os::RateThread,
-                  public yarp::dev::IService
+                   public yarp::os::RateThread,
+                   public yarp::dev::IService
 {
 public:
     explicit OVRHeadset();
diff --git a/src/modules/portaudio/CMakeLists.txt b/src/modules/portaudio/CMakeLists.txt
index d40c7a3..b3baa3a 100644
--- a/src/modules/portaudio/CMakeLists.txt
+++ b/src/modules/portaudio/CMakeLists.txt
@@ -3,34 +3,34 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(portaudio TYPE yarp::dev::PortAudioDeviceDriver INCLUDE PortAudioDeviceDriver.h WRAPPER grabber)
+  yarp_prepare_device(portaudio
+                      TYPE yarp::dev::PortAudioDeviceDriver
+                      INCLUDE PortAudioDeviceDriver.h
+                      WRAPPER grabber)
   yarp_install(FILES portaudio.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-endif(COMPILE_DEVICE_LIBRARY)
+endif()
 
 if(NOT SKIP_portaudio)
-  find_package(YARP REQUIRED)
-  include_directories(${YARP_INCLUDE_DIRS})
-  link_libraries(${YARP_LIBRARIES})
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+  include_directories(SYSTEM ${PortAudio_INCLUDE_DIR})
 
-  find_package(PortAudio)
-
-  if(PortAudio_FOUND)
-    include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${PortAudio_INCLUDE_DIR})
-    link_libraries(${PortAudio_LIBRARIES})
-    yarp_add_plugin(yarp_portaudio PortAudioBuffer.cpp PortAudioBuffer.h PortAudioDeviceDriver.cpp PortAudioDeviceDriver.h)
-    yarp_install(TARGETS yarp_portaudio
-                 EXPORT YARP
-                 COMPONENT runtime
-                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
-                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-  else(PortAudio_FOUND)
-    message(SEND_ERROR "portaudio not found")
-  endif(PortAudio_FOUND)
-    
+  yarp_add_plugin(yarp_portaudio PortAudioBuffer.cpp PortAudioBuffer.h PortAudioDeviceDriver.cpp PortAudioDeviceDriver.h)
+  target_link_libraries(yarp_portaudio YARP_OS
+                                       YARP_sig
+                                       YARP_dev
+                                       ${PortAudio_LIBRARIES})
+  yarp_install(TARGETS yarp_portaudio
+               EXPORT YARP
+               COMPONENT runtime
+               LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+               ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
   yarp_install(FILES portaudio.xml DESTINATION ${YARP_MODULES_INSTALL_DIR})
-
-endif(NOT SKIP_portaudio)
-
-
+endif()
diff --git a/src/modules/portaudio/PortAudioDeviceDriver.cpp b/src/modules/portaudio/PortAudioDeviceDriver.cpp
index 3e4d9a0..7d14217 100644
--- a/src/modules/portaudio/PortAudioDeviceDriver.cpp
+++ b/src/modules/portaudio/PortAudioDeviceDriver.cpp
@@ -144,7 +144,7 @@ PortAudioDeviceDriver::~PortAudioDeviceDriver()
 bool PortAudioDeviceDriver::open(yarp::os::Searchable& config)
 {
     driverConfig.rate = config.check("rate",Value(0),"audio sample rate (0=automatic)").asInt();
-    driverConfig.samples = config.check("samples",Value(0),"number of samples per network packet (0=automatic)").asInt();
+    driverConfig.samples = config.check("samples",Value(0),"number of samples per network packet (0=automatic). For chunks of 1 second of recording set samples=rate. Channels number is handled internally.").asInt();
     driverConfig.channels = config.check("channels",Value(0),"number of audio channels (0=automatic, max is 2)").asInt();
     driverConfig.wantRead = (bool)config.check("read","if present, just deal with reading audio (microphone)");
     driverConfig.wantWrite = (bool)config.check("write","if present, just deal with writing audio (speaker)");
@@ -181,15 +181,19 @@ bool PortAudioDeviceDriver::open(PortAudioDeviceDriverSettings& config)
     bool wantRead = config.wantRead;
     bool wantWrite = config.wantWrite;
     int deviceNumber = config.deviceNumber;
-    if (samples==0) samples = 30 * DEFAULT_SAMPLE_RATE * DEFAULT_NUM_CHANNELS; //30seconds
-    numSamples = samples;
+
     if (channels==0) channels = DEFAULT_NUM_CHANNELS;
     numChannels = channels;
     if (rate==0) rate = DEFAULT_SAMPLE_RATE;
     frequency = rate;
 
+    if (samples==0)
+        numSamples = frequency; //  by default let's stream chunks of 1 second
+    else
+        numSamples = samples;
+
     //buffer.allocate(num_samples*num_channels*sizeof(SAMPLE));
-    numBytes = numSamples * sizeof(SAMPLE);
+    numBytes = numSamples * sizeof(SAMPLE) * numChannels;
     int twiceTheBuffer = numBytes * 2;
     dataBuffers.numChannels=numChannels;
     if (dataBuffers.playData==0)
diff --git a/src/modules/rpLidar/CMakeLists.txt b/src/modules/rpLidar/CMakeLists.txt
index 5b7b455..4ff8012 100644
--- a/src/modules/rpLidar/CMakeLists.txt
+++ b/src/modules/rpLidar/CMakeLists.txt
@@ -1,24 +1,32 @@
 # Copyright (C) 2015 Marco Randazzo
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(rpLidar TYPE RpLidar INCLUDE rpLidar.h)
+if(COMPILE_DEVICE_LIBRARY)
+  yarp_prepare_device(rpLidar
+                      TYPE RpLidar
+                      INCLUDE rpLidar.h)
   yarp_install(FILES rpLidar.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-ENDIF (COMPILE_DEVICE_LIBRARY)
+endif()
 
-if (NOT SKIP_rpLidar)
+if(NOT SKIP_rpLidar)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
 
-  include_directories(${CMAKE_CURRENT_SOURCE_DIR}
-                      ${YARP_INCLUDE_DIRS})
-
-  yarp_add_plugin(rpLidar rpLidar.h rpLidar.cpp)
-  target_link_libraries(rpLidar ${YARP_LIBRARIES})
+  yarp_add_plugin(rpLidar rpLidar.h
+                          rpLidar.cpp)
+  target_link_libraries(rpLidar YARP_OS
+                                YARP_sig
+                                YARP_dev)
   yarp_install(TARGETS rpLidar
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-endif (NOT SKIP_rpLidar)
+endif()
diff --git a/src/modules/serial/CMakeLists.txt b/src/modules/serial/CMakeLists.txt
index f72e7e4..e1634b2 100644
--- a/src/modules/serial/CMakeLists.txt
+++ b/src/modules/serial/CMakeLists.txt
@@ -3,38 +3,36 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(serial TYPE yarp::dev::ServerSerial INCLUDE yarp/dev/ServerSerial.h WRAPPER serial)
-  yarp_prepare_device(serialport TYPE yarp::dev::SerialDeviceDriver INCLUDE SerialDeviceDriver.h WRAPPER serial)
+  yarp_prepare_device(serial
+                      TYPE yarp::dev::ServerSerial
+                      INCLUDE yarp/dev/ServerSerial.h
+                      WRAPPER serial)
+  yarp_prepare_device(serialport
+                      TYPE yarp::dev::SerialDeviceDriver
+                      INCLUDE SerialDeviceDriver.h
+                      WRAPPER serial)
   yarp_install(FILES serial.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
 endif()
 
-if(SKIP_serial AND SKIP_serialport)
-  set(SKIP_all_serial TRUE)
-endif()
-
-
-if(NOT SKIP_all_serial)
-  find_package(YARP REQUIRED)
-  find_package(ACE)
 
-  if(ACE_FOUND)
-    include_directories(${CMAKE_CURRENT_SOURCE_DIR}
-                        ${YARP_INCLUDE_DIRS})
-    include_directories(SYSTEM ${ACE_INCLUDE_DIRS})
-    add_definitions(${YARP_DEFINITIONS})
+if(NOT SKIP_serial OR NOT SKIP_serialport)
+  set(CMAKE_INCLUDE_CURRENT_DIR ON)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+  include_directories(SYSTEM ${ACE_INCLUDE_DIRS})
 
-    yarp_add_plugin(yarp_serial SerialDeviceDriver.cpp SerialDeviceDriver.h)
-    target_link_libraries(yarp_serial YARP_OS YARP_dev)
-    target_link_libraries(yarp_serial ${ACE_LIBRARIES})
-    yarp_install(TARGETS yarp_serial
-                 EXPORT YARP
-                 COMPONENT runtime
-                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
-                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-  else()
-    message(SEND_ERROR "ACE not found; needed by serial driver")
-  endif()
+  yarp_add_plugin(yarp_serial SerialDeviceDriver.cpp
+                              SerialDeviceDriver.h)
+  target_link_libraries(yarp_serial YARP_OS
+                                    YARP_dev
+                                    ${ACE_LIBRARIES})
+  yarp_install(TARGETS yarp_serial
+               EXPORT YARP
+               COMPONENT runtime
+               LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+               ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
 endif()
diff --git a/src/modules/stage/CMakeLists.txt b/src/modules/stage/CMakeLists.txt
index 6a80cd4..836f39f 100644
--- a/src/modules/stage/CMakeLists.txt
+++ b/src/modules/stage/CMakeLists.txt
@@ -3,27 +3,29 @@
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
 if(COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(stage TYPE yarp::dev::StageControl INCLUDE StageControl.h)
+  yarp_prepare_device(stage
+                      TYPE yarp::dev::StageControl
+                      INCLUDE StageControl.h)
   yarp_install(FILES stage.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
 endif()
 
 if(NOT SKIP_stage)
-  find_package(YARP REQUIRED)
-  find_package(Stage)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
 
-  if(Stage_FOUND)
-    include_directories(${STAGE_INCLUDE_DIR})
-    yarp_add_plugin(yarp_stage StageControl.cpp StageControl.h)
-    target_link_libraries(yarp_stage ${STAGE_LIBRARY})
-    yarp_install(TARGETS yarp_stage
-                 EXPORT YARP
-                 COMPONENT runtime
-                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
-                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-  else()
-    message(STATUS "Could not find everything needed for stage device")
-  endif()
+  include_directories(${Stage_INCLUDE_DIRS})
+  yarp_add_plugin(yarp_stage StageControl.cpp
+                             StageControl.h)
+  target_link_libraries(yarp_stage YARP_OS
+                                   YARP_dev
+                                   ${Stage_LIBRARIES})
+  yarp_install(TARGETS yarp_stage
+               EXPORT YARP
+               COMPONENT runtime
+               LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+               ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
 endif()
diff --git a/src/modules/urbtc/CMakeLists.txt b/src/modules/urbtc/CMakeLists.txt
index 11fae3f..6679dae 100644
--- a/src/modules/urbtc/CMakeLists.txt
+++ b/src/modules/urbtc/CMakeLists.txt
@@ -1,30 +1,28 @@
 # Copyright: (C) 2009 RobotCub Consortium
 # Author: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
- 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(urbtc TYPE yarp::dev::UrbtcControl INCLUDE UrbtcControl.h WRAPPER controlboard)
-ENDIF (COMPILE_DEVICE_LIBRARY)
-
-IF (NOT SKIP_urbtc)
-
-FIND_PACKAGE(YARP REQUIRED)
-
-IF (UNIX)
-  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-
-  yarp_add_plugin(urbtc UrbtcControl.cpp UrbtcControl.h)
-  yarp_install(TARGETS urbtc
-               EXPORT YARP
-               COMPONENT runtime
-               LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
-               ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-ELSE (UNIX)
-
-  MESSAGE(SEND_ERROR "urbtc is for unix")
-
-ENDIF (UNIX)
-
-ENDIF (NOT SKIP_urbtc)
 
+if(UNIX)
+  if(COMPILE_DEVICE_LIBRARY)
+    yarp_prepare_device(urbtc
+                        TYPE yarp::dev::UrbtcControl
+                        INCLUDE UrbtcControl.h
+                        WRAPPER controlboard)
+  endif()
+
+  if(NOT SKIP_urbtc)
+    set(CMAKE_INCLUDE_CURRENT_DIR ON)
+    get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+    get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+    include_directories(${YARP_OS_INCLUDE_DIRS}
+                        ${YARP_dev_INCLUDE_DIRS})
+
+    yarp_add_plugin(urbtc UrbtcControl.cpp
+                          UrbtcControl.h)
+    yarp_install(TARGETS urbtc
+                 EXPORT YARP
+                 COMPONENT runtime
+                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
+  endif()
+endif()
diff --git a/src/modules/urbtc/UrbtcControl.cpp b/src/modules/urbtc/UrbtcControl.cpp
index c0828da..be610af 100644
--- a/src/modules/urbtc/UrbtcControl.cpp
+++ b/src/modules/urbtc/UrbtcControl.cpp
@@ -26,7 +26,7 @@ yarp::dev::UrbtcControl::UrbtcControl() : ImplementPositionControl<UrbtcControl,
 	// *** default values ***
 	// without any gear
 	// 965 tics per radian
-	// 200'000 is _approximatly_ 180 degrees with a gear of 1:66
+    // 200'000 is _approximately_ 180 degrees with a gear of 1:66
     _dblFactDeg2Raw = 200000.0/180.0;
 	_intLimitDefault = 32000;
 
diff --git a/src/modules/vfw/CMakeLists.txt b/src/modules/vfw/CMakeLists.txt
index b664cb9..a6577dc 100644
--- a/src/modules/vfw/CMakeLists.txt
+++ b/src/modules/vfw/CMakeLists.txt
@@ -2,54 +2,54 @@
 # Author: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-# If being compiled as part of a library, create a "factory" for each
-# of our devices - just one in this case, "vfw_grabber", created by
-# making an instance of VfwGrabber (declared in VfwGrabber.h).
-# Our devices can optionally be declared to have a network wrapper.
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(vfw_grabber TYPE yarp::dev::VfwGrabber INCLUDE VfwGrabber.h WRAPPER grabber)
-  yarp_install(FILES vfw.ini
-               COMPONENT runtime
-               DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-ENDIF (COMPILE_DEVICE_LIBRARY)
-
-IF (NOT SKIP_vfw_grabber)
-
-  # Try to find all the packages/libraries we need
-  FIND_PACKAGE(YARP REQUIRED)
-  FIND_LIBRARY(vfw_library vfw32)
-
-  IF (vfw_library)
-
-    # Set up any paths, link any libraries we need
-    INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-    LINK_LIBRARIES(${vfw_library})
-
-    # Set up any compiler definitions needed
-    IF (MINGW)
-      # Need a small fix on MinGW, some missing declarations.
-      ADD_DEFINITIONS(-D__MINGW__)
-    ENDIF (MINGW)
-
-    # Create a library of our device code.
-    YARP_ADD_PLUGIN(vfw_grabber VfwGrabber.cpp VfwGrabber.h)
-    yarp_install(TARGETS vfw_grabber
-                 EXPORT YARP
-                 COMPONENT runtime
-                 LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
-                 ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
-
-    # If not being compiled as part of a library, try making a test program.
-    IF (NOT COMPILE_DEVICE_LIBRARY)
-      LINK_LIBRARIES(vfw_grabber)
-      ADD_EXECUTABLE(vfw_test vfw_test.cpp)
-    ENDIF (NOT COMPILE_DEVICE_LIBRARY)
-
-  ELSE (vfw_library)
-
-    MESSAGE(FATAL_ERROR "cannot find video for windows")
-    
-  ENDIF (vfw_library)
-  
-ENDIF (NOT SKIP_vfw_grabber)
-
+if(WIN32)
+  if(COMPILE_DEVICE_LIBRARY)
+    yarp_prepare_device(vfw_grabber
+                        TYPE yarp::dev::VfwGrabber
+                        INCLUDE VfwGrabber.h
+                        WRAPPER grabber)
+    yarp_install(FILES vfw.ini
+                COMPONENT runtime
+                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
+  endif()
+
+  if(NOT SKIP_vfw_grabber)
+    find_library(vfw_library vfw32)
+    if(vfw_library)
+
+      set(CMAKE_INCLUDE_CURRENT_DIR ON)
+      get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+      get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+      get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+      include_directories(${YARP_OS_INCLUDE_DIRS}
+                          ${YARP_sig_INCLUDE_DIRS}
+                          ${YARP_dev_INCLUDE_DIRS})
+      yarp_add_plugin(vfw_grabber VfwGrabber.cpp
+                                  VfwGrabber.h)
+      target_link_libraries(vfw_grabber YARP_OS
+                                        YARP_sig
+                                        YARP_dev
+                                        ${vfw_library})
+      yarp_install(TARGETS vfw_grabber
+                  EXPORT YARP
+                  COMPONENT runtime
+                  LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
+                  ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
+
+      if(YARP_COMPILE_TESTS)
+        add_executable(vfw_test vfw_test.cpp
+                                VfwGrabber.cpp
+                                VfwGrabber.h)
+        target_link_libraries(vfw_test YARP_OS
+                                      YARP_init
+                                      YARP_sig
+                                      YARP_dev
+                                      ${vfw_library})
+      endif()
+
+    else()
+      message(FATAL_ERROR "cannot find video for windows")
+    endif()
+
+  endif()
+endif()
diff --git a/src/modules/wxsdl/CMakeLists.txt b/src/modules/wxsdl/CMakeLists.txt
index cf2c587..f9897a3 100644
--- a/src/modules/wxsdl/CMakeLists.txt
+++ b/src/modules/wxsdl/CMakeLists.txt
@@ -1,45 +1,54 @@
 # Copyright: (C) 2009 RobotCub Consortium
 # Author: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
- 
-IF (COMPILE_DEVICE_LIBRARY)
-  yarp_prepare_device(wxsdl TYPE yarp::dev::WxsdlWriter INCLUDE WxsdlWriter.h)
+
+if(COMPILE_DEVICE_LIBRARY)
+  yarp_prepare_device(wxsdl
+                      TYPE yarp::dev::WxsdlWriter
+                      INCLUDE WxsdlWriter.h)
   yarp_install(FILES wxsdl.ini
                COMPONENT runtime
                DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
-ENDIF (COMPILE_DEVICE_LIBRARY)
-
-IF (NOT SKIP_wxsdl)
-
-  # make a stand-alone test executable
+endif()
 
-  FIND_PACKAGE(YARP REQUIRED)
-  FIND_PACKAGE(wxWidgets REQUIRED)
-  FIND_PACKAGE(SDL REQUIRED)
- 
-  INCLUDE_DIRECTORIES(${YARP_INCLUDE_DIRS})
-  INCLUDE_DIRECTORIES(${wxWidgets_INCLUDE_DIRS})
-  MESSAGE(STATUS ">>> ${wxWidgets_DEFINITIONS}")
-  # ADD_DEFINITIONS(${wxWidgets_DEFINITIONS})
-  LINK_LIBRARIES(${wxWidgets_LIBRARIES})
+if(NOT SKIP_wxsdl)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  get_property(YARP_sig_INCLUDE_DIRS TARGET YARP_sig PROPERTY INCLUDE_DIRS)
+  get_property(YARP_dev_INCLUDE_DIRS TARGET YARP_dev PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS}
+                      ${YARP_sig_INCLUDE_DIRS}
+                      ${YARP_dev_INCLUDE_DIRS})
+  include_directories(SYSTEM ${wxWidgets_INCLUDE_DIRS}
+                             ${SDL_INCLUDE_DIR})
 
-  INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
-  LINK_LIBRARIES(${SDL_LIBRARY})
-  IF (WIN32)
-     LINK_LIBRARIES(winmm)
-  ENDIF (WIN32)
-
-  YARP_ADD_PLUGIN(yarp_wxsdl WxsdlWriter.cpp  WxsdlWriter.h)
-  SET_TARGET_PROPERTIES(yarp_wxsdl PROPERTIES COMPILE_DEFINITIONS "${wxWidgets_DEFINITIONS}")
+  yarp_add_plugin(yarp_wxsdl WxsdlWriter.cpp
+                             WxsdlWriter.h)
+  target_link_libraries(yarp_wxsdl YARP_OS
+                                   YARP_sig
+                                   YARP_dev
+                                   ${wxWidgets_LIBRARIES}
+                                   ${SDL_LIBRARY})
+  if(WIN32)
+     target_link_libraries(winmm)
+  endif()
+  set_target_properties(yarp_wxsdl PROPERTIES COMPILE_DEFINITIONS "${wxWidgets_DEFINITIONS}")
   yarp_install(TARGETS yarp_wxsdl
                EXPORT YARP
                COMPONENT runtime
                LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
                ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR})
 
-  IF (NOT COMPILE_DEVICE_LIBRARY)
-    ADD_DEFINITIONS(-DWXSDL_MAIN)
-    ADD_EXECUTABLE(wxsdl_test  WxsdlWriter.cpp  WxsdlWriter.h)
-  ENDIF (NOT COMPILE_DEVICE_LIBRARY)
 
-ENDIF(NOT SKIP_wxsdl)
+  if(YARP_COMPILE_TESTS)
+    add_executable(wxsdl_test WxsdlWriter.cpp
+                              WxsdlWriter.h)
+    target_link_libraries(wxsdl_test YARP_OS
+                                     YARP_init
+                                     YARP_sig
+                                     YARP_dev
+                                     ${wxWidgets_LIBRARIES}
+                                     ${SDL_LIBRARY})
+    set_target_properties(wxsdl_test PROPERTIES COMPILE_DEFINITIONS "${wxWidgets_DEFINITIONS} -DWXSDL_MAIN")
+  endif()
+
+endif()
diff --git a/src/yarpdatadumper/CMakeLists.txt b/src/yarpdatadumper/CMakeLists.txt
index e6c9e04..3983aac 100644
--- a/src/yarpdatadumper/CMakeLists.txt
+++ b/src/yarpdatadumper/CMakeLists.txt
@@ -34,11 +34,41 @@ if(CREATE_YARPDATADUMPER)
 
   install(TARGETS yarpdatadumper
           COMPONENT utilities
-          DESTINATION ${CMAKE_INSTALL_BINDIR})
+          DESTINATION "${CMAKE_INSTALL_BINDIR}")
 
-   # install the yarpdatadumperAppGenerator.py helper script
-   yarp_install(PROGRAMS yarpdatadumperAppGenerator.py
-                COMPONENT utilities
-                DESTINATION ${CMAKE_INSTALL_BINDIR})
+  if(WIN32)
+    # install the yarpdatadumperAppGenerator.py helper script
+    yarp_install(PROGRAMS yarpdatadumperAppGenerator.py
+                 COMPONENT utilities
+                 DESTINATION "${CMAKE_INSTALL_BINDIR}")
+  else()
+    yarp_install(PROGRAMS yarpdatadumperAppGenerator.py
+                 COMPONENT utilities
+                 DESTINATION "${YARP_DATA_INSTALL_DIR}/scripts/")
+    file(RELATIVE_PATH _relpath "/${CMAKE_INSTALL_BINDIR}" "/${YARP_DATA_INSTALL_DIR}/scripts/yarpdatadumperAppGenerator.py")
+    if (NOT EXISTS "${CMAKE_INSTALL_BINDIR}")
+      execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_INSTALL_BINDIR}")
+    endif()
+    execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${_relpath}" "${CMAKE_INSTALL_BINDIR}/yarpdatadumperAppGenerator")
+    install(CODE
+ "message(STATUS \"Symbolic link: \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/yarpdatadumperAppGenerator to ${_relpath}\")
+  if (NOT EXISTS \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/\")
+    execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/\")
+  endif()
+  execute_process(COMMAND \${CMAKE_COMMAND} -E create_symlink \"${_relpath}\"
+                                                               \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/yarpdatadumperAppGenerator\")"
+            COMPONENT utilities)
 
+    # Remove deprecated files (since YARP 2.3.66.1)
+    if(EXISTS "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/yarpdatadumperAppGenerator.py")
+      message(STATUS "Deleted: \"${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/yarpdatadumperAppGenerator.py\"")
+      file(REMOVE "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/yarpdatadumperAppGenerator.py")
+    endif()
+    install(CODE
+ "if(EXISTS \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/yarpdatadumperAppGenerator.py\")
+    message(STATUS \"Deleted: \$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/yarpdatadumperAppGenerator.py\")
+    file(REMOVE \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_BINDIR}/yarpdatadumperAppGenerator.py\")
+  endif()")
+
+  endif()
 endif()
diff --git a/src/yarpdatadumper/yarpdatadumperAppGenerator.py b/src/yarpdatadumper/yarpdatadumperAppGenerator.py
index 08830a6..68452d1 100644
--- a/src/yarpdatadumper/yarpdatadumperAppGenerator.py
+++ b/src/yarpdatadumper/yarpdatadumperAppGenerator.py
@@ -1,5 +1,9 @@
 #!/usr/bin/python
 
+# Copyright (C) 2016 iCub Facility, Istituto Italiano di Tecnologia
+# Authors: Silvio Traversaro <silvio.traversaro at iit.it>
+# CopyPolicy: LGPLv2 or later
+
 import argparse
 
 def printPortTags(out_file, ports, port_type, host, additional_flags):
diff --git a/src/yarpdataplayer-qt/include/UI/mainwindow.ui b/src/yarpdataplayer-qt/include/UI/mainwindow.ui
index 53cba63..33f962d 100644
--- a/src/yarpdataplayer-qt/include/UI/mainwindow.ui
+++ b/src/yarpdataplayer-qt/include/UI/mainwindow.ui
@@ -65,11 +65,17 @@
         <string>Port Name</string>
        </property>
       </column>
+       <column>
+       <property name="text">
+       <string>Time Taken</string>
+       </property>
+       </column>
       <column>
        <property name="text">
-        <string>Status</string>
+       <string>Status</string>
        </property>
       </column>
+
      </widget>
     </item>
     <item>
diff --git a/src/yarpdataplayer-qt/include/mainwindow.h b/src/yarpdataplayer-qt/include/mainwindow.h
index 2ead274..777630f 100644
--- a/src/yarpdataplayer-qt/include/mainwindow.h
+++ b/src/yarpdataplayer-qt/include/mainwindow.h
@@ -63,6 +63,10 @@ public:
      */
     bool setFrameRate(const char* szName, int frameRate);
     /**
+     * function that sets the time taken
+     */
+    bool setTimeTaken(const char* szName, double time);
+    /**
      * function that sets the play progress bar
      */
     void setPlayProgress(int percentage);
diff --git a/src/yarpdataplayer-qt/include/utils.h b/src/yarpdataplayer-qt/include/utils.h
index 4373c5a..3851d81 100644
--- a/src/yarpdataplayer-qt/include/utils.h
+++ b/src/yarpdataplayer-qt/include/utils.h
@@ -66,7 +66,6 @@ protected:
     std::string                     moduleName;     //string containing module name
     bool                            add_prefix;     //true if /<moduleName> must be added to every port opened
     yarp::sig::Vector               allTimeStamps;  //save all timestamps
-    double                          maxTimeStamp;   //get the max Time stamp
 
 public:
     Utilities(std::string name, bool _add_prefix=false, QObject *parent = NULL);
@@ -83,10 +82,13 @@ public:
     int                 recursiveIterations;
 
     MasterThread        *masterThread;
-    QMainWindow          *wnd;
+    QMainWindow         *wnd;
 
     bool                withExtraColumn;
     int                 column;
+    double              maxTimeStamp;   //get the max Time stamp
+    double              minTimeStamp;
+
 
     /**
     * function that returns the current path string
@@ -130,6 +132,10 @@ public:
     */
     void getMaxTimeStamp();
     /**
+     * function that gets the minimun timestamp of all parts
+     */
+    void getMinTimeStamp();
+    /**
     * function that amends the first frame of all parts
     */
     int amendPartFrames(partsData &part);
diff --git a/src/yarpdataplayer-qt/include/worker.h b/src/yarpdataplayer-qt/include/worker.h
index b81e656..c2caaf1 100644
--- a/src/yarpdataplayer-qt/include/worker.h
+++ b/src/yarpdataplayer-qt/include/worker.h
@@ -52,6 +52,7 @@ protected:
     bool isActive;
     double frameRate, initTime, virtualTime;
     yarp::os::Semaphore semIndex;
+    double startTime;
 
 public:
     /**
@@ -71,6 +72,10 @@ public:
     */
     double getFrameRate();
     /**
+     * Function that returns the time taken
+     */
+    double getTimeTaken();
+    /**
     * Function that pepares and "steps" the sending of the data
     */
     void sendData(int id, bool shouldSend, double virtualTime);
diff --git a/src/yarpdataplayer-qt/src/main.cpp b/src/yarpdataplayer-qt/src/main.cpp
index a3f5b64..4d07019 100644
--- a/src/yarpdataplayer-qt/src/main.cpp
+++ b/src/yarpdataplayer-qt/src/main.cpp
@@ -24,6 +24,7 @@ using namespace yarp::os;
 
 int main(int argc, char *argv[])
 {
+    qputenv("QT_DEVICE_PIXEL_RATIO", QByteArray("auto"));
     QApplication a(argc, argv);
 
     Network yarp;
diff --git a/src/yarpdataplayer-qt/src/mainwindow.cpp b/src/yarpdataplayer-qt/src/mainwindow.cpp
index a3e6707..a862751 100644
--- a/src/yarpdataplayer-qt/src/mainwindow.cpp
+++ b/src/yarpdataplayer-qt/src/mainwindow.cpp
@@ -24,7 +24,9 @@
 #define FRAMES      3
 #define SAMPLERATE  4
 #define PORT        5
-#define PERCENT     6
+#define TIMETAKEN   6
+#define PERCENT     7
+
 
 #ifndef APP_NAME
  #define APP_NAME "yarpdataplayer"
@@ -808,6 +810,7 @@ void MainWindow::onMenuPlayBackStop()
         for (int i=0; i < subDirCnt; i++){
             setFrameRate(utilities->partDetails[i].name.c_str(), 0);
             setPartProgress( utilities->partDetails[i].name.c_str(), 0 );
+            setFrameRate(utilities->partDetails[i].name.c_str(), 0);
         }
         setPlayProgress(0);
     }
@@ -871,15 +874,6 @@ void MainWindow::onMenuSpeedNormal()
 }
 
 /**********************************************************/
-//void MainWindow::onPlayButtonTogle()
-//{
-//    if(m_playButton.get_stock_id() == Glib::ustring(Gtk::Stock::MEDIA_PLAY.id))
-//        onMenuPlayBackPlay();
-//    else
-//        onMenuPlayBackPause();
-//}
-
-/**********************************************************/
 void MainWindow::onSpeedValueChanged(int val)
 {
     double value = (double)val/10;
@@ -895,12 +889,6 @@ void MainWindow::onSpeedValueChanged(int val)
 }
 
 /**********************************************************/
-//void MainWindow::onPlayPositionSlided(Gtk::ScrollType scroll)
-//{
-//    LOG( "slided ...\n");
-//}
-
-/**********************************************************/
 void MainWindow::onSliderPressed()
 {
     pressed = true;
@@ -942,6 +930,19 @@ bool MainWindow::setFrameRate(const char* szName, int frameRate)
 }
 
 /**********************************************************/
+bool MainWindow::setTimeTaken(const char* szName, double time)
+{
+    QTreeWidgetItem *row = NULL;
+    row = getRowByPart(QString("%1").arg(szName));
+    if(row){
+        row->setText(TIMETAKEN,QString("%1 s").arg(time, 0, 'f', 3));
+        return true;
+    }
+    
+    return false;
+}
+
+/**********************************************************/
 void MainWindow::setPlayProgress(int percentage)
 {
     if(pressed){
@@ -964,6 +965,13 @@ void MainWindow::onUpdateGuiRateThread()
                 if (utilities->partDetails[i].currFrame <= utilities->partDetails[i].maxFrame){
                     int rate = (int)utilities->partDetails[i].worker->getFrameRate();
                     setFrameRate(utilities->partDetails[i].name.c_str(),rate);
+                    
+                    double time = utilities->partDetails[i].worker->getTimeTaken();
+
+                    if (time > 700000){ //value of a time stamp...
+                        setTimeTaken(utilities->partDetails[i].name.c_str(),0.0);
+                    }else
+                        setTimeTaken(utilities->partDetails[i].name.c_str(),time);
                 }
             }
             //percentage = 0;
@@ -1040,10 +1048,26 @@ void InitThread::run()
     if (subDirCnt > 0){
         utilities->getMaxTimeStamp();
     }
+    
+    if (subDirCnt > 0){
+        utilities->getMinTimeStamp();
+    }
 
     //set initial frames for all parts depending on first timestamps
     for (int x=0; x < subDirCnt; x++){
-        utilities->initialFrame.push_back( utilities->partDetails[x].currFrame) ;
+        utilities->initialFrame.push_back( utilities->partDetails[x].currFrame);
+        
+        double totalTime = 0.0;
+        double final = utilities->partDetails[x].timestamp[utilities->partDetails[x].timestamp.length()-1];
+        double initial = utilities->partDetails[x].timestamp[utilities->partDetails[x].currFrame];
+        
+        //LOG("initial timestamp is = %lf\n", initial);
+        //LOG("final timestamp is  = %lf\n", final);
+        
+        totalTime = final - initial;
+        
+        LOG("The part %s, should last for: %lf with %d frames\n", utilities->partDetails[x].name.c_str(), totalTime, utilities->partDetails[x].maxFrame);
+        
     }
 
     utilities->masterThread = new MasterThread(utilities, subDirCnt, mainWindow);
diff --git a/src/yarpdataplayer-qt/src/utils.cpp b/src/yarpdataplayer-qt/src/utils.cpp
index 415052c..caf11d7 100644
--- a/src/yarpdataplayer-qt/src/utils.cpp
+++ b/src/yarpdataplayer-qt/src/utils.cpp
@@ -219,7 +219,7 @@ bool Utilities::checkLogValidity(const char *filename)
 {
     bool check = false;
     fstream str;
-    str.open (filename);//, ios::binary);
+    str.open (filename, ios_base::in);//, ios::binary);
 
     if (str.is_open()){
         string line;
@@ -248,7 +248,7 @@ bool Utilities::setupDataFromParts(partsData &part)
     // info part
     LOG("opening file %s\n", part.infoFile.c_str() );
 
-    str.open (part.infoFile.c_str());//, ios::binary);
+    str.open (part.infoFile.c_str(), ios_base::in);//, ios::binary);
     if (str.is_open()){
         string line;
         int itr = 0;
@@ -271,7 +271,7 @@ bool Utilities::setupDataFromParts(partsData &part)
 
     // data part
     LOG("opening file %s\n", part.logFile.c_str() );
-    str.open (part.logFile.c_str());//, ios::binary);
+    str.open (part.logFile.c_str(), ios_base::in);//, ios::binary);
 
     //read throughout
     if (str.is_open()){
@@ -312,6 +312,22 @@ void Utilities::getMaxTimeStamp()
     }
     LOG("the biggest timestamp is: index %d with value %lf\n",index, allTimeStamps[index] );
 }
+
+/**********************************************************/
+void Utilities::getMinTimeStamp()
+{
+    minTimeStamp = allTimeStamps[0];
+    int index = 0;
+    for (int i=0; i< (int)allTimeStamps.size(); i++ ){
+        LOG("%lf\n",allTimeStamps[i]);
+        if ( minTimeStamp > allTimeStamps[i] ){
+            minTimeStamp = allTimeStamps[i];
+            index = i;
+        }
+    }
+    LOG("the smallest timestamp is: index %d with value %lf\n",index, allTimeStamps[index] );
+}
+
 /**********************************************************/
 int Utilities::amendPartFrames(partsData &part)
 {
@@ -394,7 +410,7 @@ void Utilities::stopAtEnd()
     for (int i=0; i < totalThreads; i++){
         partDetails[i].currFrame = (int)initialFrame[i];
     }
-
+    
     //TODO SIGNAL
     //masterThread->wnd->resetButtonOnStop();
     pause();
diff --git a/src/yarpdataplayer-qt/src/worker.cpp b/src/yarpdataplayer-qt/src/worker.cpp
index 258b297..927c682 100644
--- a/src/yarpdataplayer-qt/src/worker.cpp
+++ b/src/yarpdataplayer-qt/src/worker.cpp
@@ -43,6 +43,7 @@ WorkerClass::WorkerClass(int part, int numThreads)
     initTime = 0.0;
     frameRate = 0.0;
     isActive = true;
+    startTime = 0.0;
 }
 
 /**********************************************************/
@@ -90,11 +91,15 @@ void WorkerClass::run()
     int frame = currFrame;
     if (initTime == 0 ){
         initTime = Time::now();
+        startTime = yarp::os::Time::now();
     } else {
         double t = Time::now();
         frameRate = t-initTime;
+        
+        //LOG("initTime %lf t= %lf frameRate %lf\n", initTime, t, frameRate);
         initTime = t;
     }
+    
     if (isActive)
     {
         Bottle tmp;
@@ -129,10 +134,18 @@ void WorkerClass::run()
 /**********************************************************/
 double WorkerClass::getFrameRate()
 {
+    //LOG("FRAME RATE %lf\n", frameRate );
     frameRate = frameRate*1000;
     return frameRate;
 }
 
+
+/**********************************************************/
+double WorkerClass::getTimeTaken()
+{
+    return yarp::os::Time::now()-startTime;
+}
+
 /**********************************************************/
 int WorkerClass::sendImages(int part, int frame)
 {
@@ -299,8 +312,9 @@ bool MasterThread::threadInit()
         utilities->partDetails[i].currFrame = 0;
     }
 
-    virtualTime = utilities->partDetails[0].timestamp[ utilities->partDetails[0].currFrame ];
-
+    //virtualTime = utilities->partDetails[0].timestamp[ utilities->partDetails[0].currFrame ];
+    virtualTime = utilities->minTimeStamp;
+    
     return true;
 }
 
@@ -338,6 +352,7 @@ void MasterThread::stepFromCmd()
 /**********************************************************/
 void MasterThread::runNormally()
 {
+    int static tmp = 0;
     for (int i=0; i < numPart; i++){
         bool isActive  = ((MainWindow*)wnd)->getPartActivation(utilities->partDetails[i].name.c_str());
         if ( utilities->partDetails[i].currFrame <= utilities->partDetails[i].maxFrame ){
@@ -376,11 +391,17 @@ void MasterThread::runNormally()
             }
         }
     }
+    
     this->setRate( (int) (2 / utilities->speed) );
+    for (int i=0; i < numPart; i++){
+       // virtualTime += utilities->partDetails[i].worker->getFrameRate()/4.16;//0.0024;
+    }
+    
+    virtualTime += 0.0024;//utilities->partDetails[i].worker->getFrameRate()/4.16;//0.0024;
     
-    virtualTime += 0.002; // increase by two millisecond
-
     initTime++;
+    
+    tmp++;
 }
 
 /**********************************************************/
@@ -416,7 +437,7 @@ void MasterThread::forward(int steps)
                 virtualTime = utilities->partDetails[i].timestamp[utilities->partDetails[i].currFrame];
             }
         } else {
-            LOG( "cannot go any forward, out of range..\n");
+            LOG( "cannot go any forward, out of range\n");
         }
     }
 }
diff --git a/src/yarpfs/CMakeLists.txt b/src/yarpfs/CMakeLists.txt
index a0f3f3d..dc89bf2 100644
--- a/src/yarpfs/CMakeLists.txt
+++ b/src/yarpfs/CMakeLists.txt
@@ -2,32 +2,31 @@
 # Author: Paul Fitzpatrick
 # CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
 
-cmake_minimum_required(VERSION 2.8.9)
-project(yarpfs)
 
-list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
+include(CMakeDependentOption)
+cmake_dependent_option(CREATE_YARPFS "Compile yarpfs executable" FALSE
+                       YARP_COMPILE_UNMAINTAINED FALSE)
+mark_as_advanced(CREATE_YARPFS)
 
-# Find YARP
-find_package(YARP REQUIRED)
-include_directories(${YARP_INCLUDE_DIRS})
-list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH})
+if(CREATE_YARPFS)
+  get_property(YARP_OS_INCLUDE_DIRS TARGET YARP_OS PROPERTY INCLUDE_DIRS)
+  include_directories(${YARP_OS_INCLUDE_DIRS})
 
-find_package(ACE REQUIRED)
-add_definitions(${ACE_DEFINITIONS})
-include_directories(${ACE_INCLUDE_DIRS})
+  include_directories(${ACE_INCLUDE_DIRS})
 
-# Find Fuse
-find_package(Fuse REQUIRED)
-add_definitions(${Fuse_DEFINITIONS})
-include_directories(${Fuse_INCLUDE_DIRS})
+  # Find Fuse
+  find_package(Fuse REQUIRED)
+  add_definitions(${Fuse_DEFINITIONS})
+  include_directories(${Fuse_INCLUDE_DIRS})
 
-set(yarpfs_SRCS yarpfs.cpp
-                link.cpp)
-set(yarpfs_HDRS yarpfns.h
-                yarputils.h)
+  set(yarpfs_SRCS yarpfs.cpp
+                  link.cpp)
+  set(yarpfs_HDRS yarpfns.h
+                  yarputils.h)
 
-add_executable(yarpfs ${yarpfs_SRCS} ${yarpfs_HDRS})
-target_link_libraries(yarpfs YARP::YARP_OS
-                             YARP::YARP_init
-                             ${ACE_LIBRARIES}
-                             ${Fuse_LIBRARIES})
+  add_executable(yarpfs ${yarpfs_SRCS} ${yarpfs_HDRS})
+  target_link_libraries(yarpfs YARP_OS
+                               YARP_init
+                               ${ACE_LIBRARIES}
+                               ${Fuse_LIBRARIES})
+endif()
diff --git a/src/yarplaserscannergui/main.cpp b/src/yarplaserscannergui/main.cpp
index 8ba92be..b64b83d 100644
--- a/src/yarplaserscannergui/main.cpp
+++ b/src/yarplaserscannergui/main.cpp
@@ -16,47 +16,6 @@
  * Public License for more details
 */
 
-/** 
-\defgroup laserScannerGui laserScannerGui
- 
-A simple GUI to display the distance measurements of a 2D laser scanner.
- 
-Copyright (C) 2010 RobotCub Consortium
- 
-Author: Marco Randazzo
-
-CopyPolicy: Released under the terms of the GNU GPL v2.0.
-
-\section intro_sec Description
-A simple GUI to display the distance measurements of a 2D laser scanner.
- 
-\section lib_sec Libraries 
-- YARP libraries. 
-- OpenCV libraries.
-
-\section parameters_sec Parameters
-None.
-
-\section portsa_sec Ports Accessed
-None. 
- 
-\section portsc_sec Ports Created 
-The module creates the port /laserScannerGui:i used to receive the laser data.
-
-\section in_files_sec Input Data Files
-None.
-
-\section out_data_sec Output Data Files 
-None. 
- 
-\section conf_file_sec Configuration Files
-None.
- 
-\section tested_os_sec Tested OS
-Windows, Linux
-
-\author Marco Randazzo
-*/ 
 
 #include <iostream>
 #include <iomanip>
diff --git a/src/yarplogger-qt/images/all_ico_b.png b/src/yarplogger-qt/images/all_ico_b.png
index 64db37a..7c89b4e 100644
Binary files a/src/yarplogger-qt/images/all_ico_b.png and b/src/yarplogger-qt/images/all_ico_b.png differ
diff --git a/src/yarplogger-qt/images/debug_ico_b.png b/src/yarplogger-qt/images/debug_ico_b.png
index b4834d5..579d528 100644
Binary files a/src/yarplogger-qt/images/debug_ico_b.png and b/src/yarplogger-qt/images/debug_ico_b.png differ
diff --git a/src/yarplogger-qt/images/error_ico_b.png b/src/yarplogger-qt/images/error_ico_b.png
index d2828f6..5347451 100644
Binary files a/src/yarplogger-qt/images/error_ico_b.png and b/src/yarplogger-qt/images/error_ico_b.png differ
diff --git a/src/yarplogger-qt/images/info_ico_b.png b/src/yarplogger-qt/images/info_ico_b.png
index 173718b..c77bea7 100644
Binary files a/src/yarplogger-qt/images/info_ico_b.png and b/src/yarplogger-qt/images/info_ico_b.png differ
diff --git a/src/yarplogger-qt/images/trace_ico_b.png b/src/yarplogger-qt/images/trace_ico_b.png
index 35d6209..3ac8881 100644
Binary files a/src/yarplogger-qt/images/trace_ico_b.png and b/src/yarplogger-qt/images/trace_ico_b.png differ
diff --git a/src/yarplogger-qt/images/warning_ico_b.png b/src/yarplogger-qt/images/warning_ico_b.png
index d5e2e4a..c44eedb 100644
Binary files a/src/yarplogger-qt/images/warning_ico_b.png and b/src/yarplogger-qt/images/warning_ico_b.png differ
diff --git a/src/yarplogger-qt/logtab.cpp b/src/yarplogger-qt/logtab.cpp
index 8857ab6..b3c2c02 100644
--- a/src/yarplogger-qt/logtab.cpp
+++ b/src/yarplogger-qt/logtab.cpp
@@ -19,9 +19,12 @@
 #include "logtab.h"
 #include "ui_logtab.h"
 
+#include <QFontDatabase>
+
 LogTab::LogTab(yarp::yarpLogger::LoggerEngine*  _theLogger, MessageWidget* _system_message, std::string _portName, QWidget *parent, int refreshRate) :
     QFrame(parent),
-    ui(new Ui::LogTab)
+    ui(new Ui::LogTab),
+    toggleLineExpansion(false)
 {
     system_message = _system_message;
     theLogger= _theLogger;
@@ -63,24 +66,40 @@ LogTab::LogTab(yarp::yarpLogger::LoggerEngine*  _theLogger, MessageWidget* _syst
     ui->listView->horizontalHeader()->setSectionResizeMode(3,QHeaderView::Stretch);
     ui->listView->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
     ui->listView->verticalHeader()->setDefaultSectionSize(20);
+
+    const QFont fixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
+    ui->listView->setFont(fixedFont);
     
     clipboard=QApplication::clipboard();
     connect(ui->listView, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(ctxMenu(const QPoint &)));
+    connect(ui->listView, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(expandLines()));
 
     updateLog(true);
 }
 
+
+void LogTab::expandLines() {
+    toggleLineExpansion = !toggleLineExpansion;
+    if ( toggleLineExpansion )
+        ui->listView->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
+    else {
+        ui->listView->verticalHeader()->setSectionResizeMode(QHeaderView::Fixed);
+        ui->listView->verticalHeader()->setDefaultSectionSize(20);
+    }
+}
+
 void LogTab::ctxMenu(const QPoint &pos)
 {
     QMenu *menu = new QMenu;
     menu->addAction(tr("Copy to clipboard"), this, SLOT(on_copy_to_clipboard_action()));
+    menu->addAction(tr("Toggle line expansion"), this, SLOT(expandLines()));
     menu->exec(ui->listView->mapToGlobal(pos));
 }
 
 void LogTab::on_copy_to_clipboard_action()
 {
     QString selected_test;
-    QString separator("\t\t");
+    QString separator("\t");
     foreach(const QModelIndex &index, ui->listView->selectionModel()->selectedRows())
     {
         QStringList list;
@@ -101,6 +120,7 @@ void LogTab::on_copy_to_clipboard_action()
         if (displayErrorLevel_enabled)       list.append(model_logs->item(prox_index.row(),2)->text());
         list.append(model_logs->item(prox_index.row(),3)->text());
         selected_test += list.join(separator);
+        selected_test += '\n';
     }
     clipboard->setText(selected_test);
 }
@@ -155,8 +175,10 @@ void LogTab::updateLog(bool from_beginning)
         else if (it->level==yarp::yarpLogger::LOGLEVEL_FATAL)     { rowbgcolor = QColor(Qt::black);  rowfgcolor = QColor(Qt::white);  error_level=FATAL_STRING;}
         else                                                      { rowbgcolor = QColor(Qt::white);  error_level="";     }
 
+        std::string textWithoutNewLines = it->text;
+        textWithoutNewLines.erase(textWithoutNewLines.find_last_not_of(" \n\r\t")+1);
         //using numbers seems not to work. Hence I'm using strings.
-        rowItem << new QStandardItem(it->yarprun_timestamp.c_str()) << new QStandardItem(it->local_timestamp.c_str()) << new QStandardItem(error_level.c_str()) << new QStandardItem(it->text.c_str());
+        rowItem << new QStandardItem(it->yarprun_timestamp.c_str()) << new QStandardItem(it->local_timestamp.c_str()) << new QStandardItem(error_level.c_str()) << new QStandardItem(textWithoutNewLines.c_str());
 
         if (displayColors_enabled)
         {
diff --git a/src/yarplogger-qt/logtab.h b/src/yarplogger-qt/logtab.h
index c853c0c..2a7d90b 100644
--- a/src/yarplogger-qt/logtab.h
+++ b/src/yarplogger-qt/logtab.h
@@ -59,10 +59,12 @@ private:
     bool                                   displayErrorLevel_enabled;
     bool                                   displayColors_enabled;
     bool                                   displayGrid_enabled;
+    bool                                   toggleLineExpansion;
 
 private slots:
     void updateLog(bool from_beginning=false);
     void ctxMenu(const QPoint &pos);
+    void expandLines();
     void on_copy_to_clipboard_action();
 
 public:
diff --git a/src/yarplogger-qt/mainwindow.cpp b/src/yarplogger-qt/mainwindow.cpp
index 09c0596..a7fb398 100644
--- a/src/yarplogger-qt/mainwindow.cpp
+++ b/src/yarplogger-qt/mainwindow.cpp
@@ -37,12 +37,6 @@
 void MainWindow::updateMain()
 {
     //model_yarprunports->clear();
-    model_yarprunports->setHorizontalHeaderItem(0,new QStandardItem("ip"));
-    model_yarprunports->setHorizontalHeaderItem(1,new QStandardItem("process"));
-    model_yarprunports->setHorizontalHeaderItem(2,new QStandardItem("last heard"));
-    model_yarprunports->setHorizontalHeaderItem(3,new QStandardItem("log size"));
-    model_yarprunports->setHorizontalHeaderItem(4,new QStandardItem("errors"));
-    model_yarprunports->setHorizontalHeaderItem(5,new QStandardItem("warnings"));
     std::list<yarp::yarpLogger::LogEntryInfo> infos;
     this->theLogger->get_infos (infos);
     std::list<yarp::yarpLogger::LogEntryInfo>::iterator it;
@@ -55,7 +49,7 @@ void MainWindow::updateMain()
         if (it->last_update!=-1)
         {
             std::tm* tm = localtime(&it->last_update);
-            sprintf ( time_text,"%02d:%02d:%02d",tm->tm_hour,tm->tm_min, tm->tm_sec);
+            sprintf(time_text, "%02d:%02d:%02d %02d/%02d/%02d", tm->tm_hour, tm->tm_min, tm->tm_sec, tm->tm_mday, tm->tm_mon, tm->tm_year+1900);
         }
         else
            sprintf ( time_text, "no data received yet");
@@ -172,12 +166,6 @@ void MainWindow::updateMain()
         }*/
 #endif
     }
-    ui->yarprunTreeView->setColumnWidth(0,80);
-    ui->yarprunTreeView->setColumnWidth(1,230);
-    ui->yarprunTreeView->setColumnWidth(2,80);
-    ui->yarprunTreeView->setColumnWidth(3,50);
-    ui->yarprunTreeView->setColumnWidth(4,60);
-    ui->yarprunTreeView->setColumnWidth(5,60);
 }
 
 void MainWindow::on_enableLogTab(int model_row)
@@ -247,7 +235,7 @@ void MainWindow::on_clearLogTab_action()
 void MainWindow::on_resetCountersLogTab(int model_row)
 {
     std::string logname = model_yarprunports->item(model_row,1)->text().toStdString();
-    system_message->addMessage(QString("Counters resetted for log ") + QString(logname.c_str()));
+    system_message->addMessage(QString("Counters reset for log ") + QString(logname.c_str()));
 }
 
 void MainWindow::on_saveLogTab(int model_row)
@@ -324,6 +312,13 @@ MainWindow::MainWindow(yarp::os::ResourceFinder rf, QWidget *parent) :
     system_message->addMessage("Application Started");
 
     model_yarprunports = new QStandardItemModel(this);
+    model_yarprunports->setHorizontalHeaderItem(0, new QStandardItem("ip"));
+    model_yarprunports->setHorizontalHeaderItem(1, new QStandardItem("process"));
+    model_yarprunports->setHorizontalHeaderItem(2, new QStandardItem("last heard"));
+    model_yarprunports->setHorizontalHeaderItem(3, new QStandardItem("log size"));
+    model_yarprunports->setHorizontalHeaderItem(4, new QStandardItem("errors"));
+    model_yarprunports->setHorizontalHeaderItem(5, new QStandardItem("warnings"));
+
     proxyModel = new YarprunPortsSortFilterProxyModel(this);
     proxyModel->setSourceModel(model_yarprunports);
 
@@ -360,6 +355,14 @@ MainWindow::MainWindow(yarp::os::ResourceFinder rf, QWidget *parent) :
         system_message->addMessage("start option found");
         on_actionStart_Logger_triggered();
     }
+
+    //default colum size
+    ui->yarprunTreeView->setColumnWidth(0, 100);
+    ui->yarprunTreeView->setColumnWidth(1, 200);
+    ui->yarprunTreeView->setColumnWidth(2, 150);
+    ui->yarprunTreeView->setColumnWidth(3, 80);
+    ui->yarprunTreeView->setColumnWidth(4, 60);
+    ui->yarprunTreeView->setColumnWidth(5, 60);
 }
 
 MainWindow::~MainWindow()
@@ -533,7 +536,7 @@ void MainWindow::on_actionShow_LocalTimestamps_toggled(bool arg1)
 
 void MainWindow::on_actionAbout_QtYarpLogger_triggered()
 {
-    QDesktopServices::openUrl(QUrl("http://wiki.icub.org/yarpdoc/qtyarplogger.html"));
+    QDesktopServices::openUrl(QUrl("http://www.yarp.it/qtyarplogger.html"));
 }
 
 void MainWindow::on_actionSave_Log_triggered(bool checked)
diff --git a/src/yarplogger-qt/yarprunPortSorting.cpp b/src/yarplogger-qt/yarprunPortSorting.cpp
index 9075dbf..8d282b0 100644
--- a/src/yarplogger-qt/yarprunPortSorting.cpp
+++ b/src/yarplogger-qt/yarprunPortSorting.cpp
@@ -19,6 +19,7 @@
 #include <QString>
 #include <string>
 #include <cstdio>
+#include <ctime>
 #include "yarprunPortSorting.h"
 
 YarprunPortsSortFilterProxyModel::YarprunPortsSortFilterProxyModel( QObject *parent ) : QSortFilterProxyModel( parent )
@@ -44,16 +45,21 @@ bool YarprunPortsSortFilterProxyModel::lessThan( const QModelIndex &left, const
       int rval = (r1 * 16777216) + (r2 * 65536) + (r3 * 256) + (r4);
       return lval < rval;
   }
-  /*else if (left.column()==2)
+  else if (left.column()==2)
   {
       QString leftStr     = this->sourceModel()->data( left ).toString();
       QString rightStr    = this->sourceModel()->data( right ).toString();
-      if (leftStr.at(0) < '0'  || leftStr.at(0) > '9')  
-          return false;
-      if (rightStr.at(0) < '0' || rightStr.at(0) > '9')
-          return true;
-      return QSortFilterProxyModel::lessThan(left,right);
-  }*/
+      struct tm left_time;
+      struct tm right_time;
+      memset(&left_time, 0, sizeof(struct tm));
+      memset(&right_time, 0, sizeof(struct tm));
+      sscanf(leftStr.toStdString().c_str(), "%d:%d:%d %d/%d/%d", &left_time.tm_hour, &left_time.tm_min, &left_time.tm_sec, &left_time.tm_mday, &left_time.tm_mon, &left_time.tm_year);
+      sscanf(rightStr.toStdString().c_str(), "%d:%d:%d %d/%d/%d", &right_time.tm_hour, &right_time.tm_min, &right_time.tm_sec, &right_time.tm_mday, &right_time.tm_mon, &right_time.tm_year);
+      left_time.tm_year-=1900;
+      right_time.tm_year-=1900;
+      double diff = difftime(mktime(&left_time), mktime(&right_time));
+      return diff > 0;
+  }
   else if (left.column()==3 || left.column()==4 || left.column()==5)
   {
       //sorting by log size
diff --git a/src/yarpmanager++/CMakeLists.txt b/src/yarpmanager++/CMakeLists.txt
index c26e757..4d687e7 100644
--- a/src/yarpmanager++/CMakeLists.txt
+++ b/src/yarpmanager++/CMakeLists.txt
@@ -14,11 +14,6 @@ if(CREATE_YARPMANAGER_PP AND YARP_HAS_QT5)
                         ./src-builder
                         ./src-manager)
 
-    #find_package(Qt5Widgets)
-    #find_package(Qt5Declarative)
-    #list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH})
-    #include(YarpUseQt5)
-
     set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
 
     #manager files
@@ -58,7 +53,7 @@ if(CREATE_YARPMANAGER_PP AND YARP_HAS_QT5)
 
     set(manager_QRC_FILES src-manager/res_manager.qrc)
     if(WIN32)
-	   set(yarpmanager_qt_RC_FILES yarpmanager.rc)
+      set(yarpmanager_qt_RC_FILES yarpmanager.rc)
     endif()
 
     set(manager_UI_FILES
diff --git a/src/yarpmanager++/src-manager/mainwindow.cpp b/src/yarpmanager++/src-manager/mainwindow.cpp
index ffcfe0d..215bf29 100644
--- a/src/yarpmanager++/src-manager/mainwindow.cpp
+++ b/src/yarpmanager++/src-manager/mainwindow.cpp
@@ -1079,7 +1079,7 @@ void MainWindow::onAbout()
 
 void MainWindow::onHelp()
 {
-    QDesktopServices::openUrl(QUrl("http://wiki.icub.org/yarpdoc/yarpmanager.html"));
+    QDesktopServices::openUrl(QUrl("http://www.yarp.it/yarpmanager.html"));
 }
 
 void MainWindow::onRemoveApplication(QString appName)
diff --git a/src/yarpmanager-gtk/main_window.cpp b/src/yarpmanager-gtk/main_window.cpp
index 1fb2804..11fdd0d 100644
--- a/src/yarpmanager-gtk/main_window.cpp
+++ b/src/yarpmanager-gtk/main_window.cpp
@@ -1313,17 +1313,17 @@ void MainWindow::onMenuHelpOnlineHelp()
  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION >= 16)
     GError *error = NULL;
     gtk_show_uri(gdk_screen_get_default(),
-                 "http://wiki.icub.org/yarpdoc/yarpmanager.html",
+                 "http://www.yarp.it/yarpmanager.html",
                  gtk_get_current_event_time(), &error);
     if(error)
     {
         Gtk::MessageDialog dialog("Cannot open online help!", false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE);
-        dialog.set_secondary_text("http://wiki.icub.org/yarpdoc/yarpmanager.html");
+        dialog.set_secondary_text("http://www.yarp.it/yarpmanager.html");
         dialog.run();
     }
 #else
     Gtk::MessageDialog dialog("Please visit the following link.", false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_CLOSE);
-    dialog.set_secondary_text("http://wiki.icub.org/yarpdoc/yarpmanager.html");
+    dialog.set_secondary_text("http://www.yarp.it/yarpmanager.html");
     dialog.run();
 
 #endif
diff --git a/src/yarpmanager-qt/mainwindow.cpp b/src/yarpmanager-qt/mainwindow.cpp
index 00c18bb..80eb305 100644
--- a/src/yarpmanager-qt/mainwindow.cpp
+++ b/src/yarpmanager-qt/mainwindow.cpp
@@ -848,7 +848,7 @@ void MainWindow::onAbout()
 
 void MainWindow::onHelp()
 {
-    QDesktopServices::openUrl(QUrl("http://wiki.icub.org/yarpdoc/yarpmanager.html"));
+    QDesktopServices::openUrl(QUrl("http://www.yarp.it/yarpmanager.html"));
 }
 
 void MainWindow::onRemoveApplication(QString appName)
diff --git a/src/yarpmotorgui-qt/jointitem.cpp b/src/yarpmotorgui-qt/jointitem.cpp
index 148368b..b1ee267 100644
--- a/src/yarpmotorgui-qt/jointitem.cpp
+++ b/src/yarpmotorgui-qt/jointitem.cpp
@@ -1099,6 +1099,9 @@ void JointItem::setOpenLoop(double openLoopValue)
     }
     if(ui->stackedWidget->currentIndex() == OPENLOOP){
         updateSliderOpenloop(openLoopValue);
+        QString sVal;
+        sVal = QString("%L1").arg(openLoopValue, 0, 'f', 3);
+        ui->editOpenLoopOutput->setText(sVal);
     }
 }
 
diff --git a/src/yarpmotorgui-qt/jointitem.ui b/src/yarpmotorgui-qt/jointitem.ui
index ad2636c..1cee6f7 100644
--- a/src/yarpmotorgui-qt/jointitem.ui
+++ b/src/yarpmotorgui-qt/jointitem.ui
@@ -2,24 +2,27 @@
 <ui version="4.0">
  <class>JointItem</class>
  <widget class="QWidget" name="JointItem">
+  <property name="enabled">
+   <bool>true</bool>
+  </property>
   <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>290</width>
-    <height>218</height>
+    <width>329</width>
+    <height>240</height>
    </rect>
   </property>
   <property name="minimumSize">
    <size>
     <width>290</width>
-    <height>218</height>
+    <height>240</height>
    </size>
   </property>
   <property name="maximumSize">
    <size>
     <width>329</width>
-    <height>218</height>
+    <height>240</height>
    </size>
   </property>
   <property name="windowTitle">
@@ -253,7 +256,7 @@ QSlider::groove:horizontal:disabled {
  }</string>
         </property>
         <property name="currentIndex">
-         <number>0</number>
+         <number>6</number>
         </property>
         <widget class="QWidget" name="pageIdle">
          <layout class="QVBoxLayout" name="verticalLayout_3">
@@ -1603,72 +1606,6 @@ QSlider::groove:horizontal:disabled {
            </widget>
           </item>
           <item>
-           <widget class="QGroupBox" name="groupBox_10">
-            <property name="title">
-             <string>Position</string>
-            </property>
-            <layout class="QVBoxLayout" name="verticalLayout_15">
-             <property name="leftMargin">
-              <number>2</number>
-             </property>
-             <property name="topMargin">
-              <number>0</number>
-             </property>
-             <property name="rightMargin">
-              <number>2</number>
-             </property>
-             <property name="bottomMargin">
-              <number>0</number>
-             </property>
-             <item>
-              <widget class="QWidget" name="widget_21" native="true">
-               <layout class="QHBoxLayout" name="horizontalLayout_13">
-                <property name="spacing">
-                 <number>2</number>
-                </property>
-                <property name="leftMargin">
-                 <number>0</number>
-                </property>
-                <property name="topMargin">
-                 <number>0</number>
-                </property>
-                <property name="rightMargin">
-                 <number>0</number>
-                </property>
-                <property name="bottomMargin">
-                 <number>0</number>
-                </property>
-                <item>
-                 <widget class="QLabel" name="label_21">
-                  <property name="text">
-                   <string>Encoder:</string>
-                  </property>
-                 </widget>
-                </item>
-                <item>
-                 <widget class="QLineEdit" name="editOpenLoopCurrentPos">
-                  <property name="styleSheet">
-                   <string notr="true">background-color: rgb(255, 255, 255);</string>
-                  </property>
-                  <property name="readOnly">
-                   <bool>true</bool>
-                  </property>
-                 </widget>
-                </item>
-                <item>
-                 <widget class="QLabel" name="label_posUnits_7">
-                  <property name="text">
-                   <string>deg</string>
-                  </property>
-                 </widget>
-                </item>
-               </layout>
-              </widget>
-             </item>
-            </layout>
-           </widget>
-          </item>
-          <item>
            <widget class="QWidget" name="widget_22" native="true">
             <layout class="QGridLayout" name="gridLayout_6">
              <property name="leftMargin">
@@ -1677,14 +1614,37 @@ QSlider::groove:horizontal:disabled {
              <property name="rightMargin">
               <number>2</number>
              </property>
-             <item row="0" column="0">
+             <item row="3" column="2">
+              <widget class="QLabel" name="label_velUnits_7">
+               <property name="text">
+                <string>deg/s</string>
+               </property>
+              </widget>
+             </item>
+             <item row="3" column="1">
+              <widget class="QLineEdit" name="editOpenLoopSpeed">
+               <property name="maximumSize">
+                <size>
+                 <width>16777215</width>
+                 <height>16777215</height>
+                </size>
+               </property>
+               <property name="styleSheet">
+                <string notr="true">background-color: rgb(255, 255, 255);</string>
+               </property>
+               <property name="readOnly">
+                <bool>true</bool>
+               </property>
+              </widget>
+             </item>
+             <item row="2" column="0">
               <widget class="QLabel" name="label_trqTitle_7">
                <property name="text">
                 <string>Torque:</string>
                </property>
               </widget>
              </item>
-             <item row="0" column="1">
+             <item row="2" column="1">
               <widget class="QLineEdit" name="editOpenLoopTorque">
                <property name="maximumSize">
                 <size>
@@ -1700,28 +1660,29 @@ QSlider::groove:horizontal:disabled {
                </property>
               </widget>
              </item>
-             <item row="0" column="2">
+             <item row="2" column="2">
               <widget class="QLabel" name="label_trqUnits_7">
                <property name="text">
                 <string>Nm</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="0">
+             <item row="3" column="0">
               <widget class="QLabel" name="labelSpeed10">
                <property name="text">
                 <string>Speed:</string>
                </property>
               </widget>
              </item>
-             <item row="1" column="1">
-              <widget class="QLineEdit" name="editOpenLoopSpeed">
-               <property name="maximumSize">
-                <size>
-                 <width>16777215</width>
-                 <height>16777215</height>
-                </size>
+             <item row="1" column="0">
+              <widget class="QLabel" name="label_21">
+               <property name="text">
+                <string>Encoder:</string>
                </property>
+              </widget>
+             </item>
+             <item row="1" column="1">
+              <widget class="QLineEdit" name="editOpenLoopCurrentPos">
                <property name="styleSheet">
                 <string notr="true">background-color: rgb(255, 255, 255);</string>
                </property>
@@ -1731,9 +1692,26 @@ QSlider::groove:horizontal:disabled {
               </widget>
              </item>
              <item row="1" column="2">
-              <widget class="QLabel" name="label_velUnits_7">
+              <widget class="QLabel" name="label_posUnits_7">
                <property name="text">
-                <string>deg/s</string>
+                <string>deg</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="0">
+              <widget class="QLabel" name="label">
+               <property name="text">
+                <string>Output:</string>
+               </property>
+              </widget>
+             </item>
+             <item row="0" column="1">
+              <widget class="QLineEdit" name="editOpenLoopOutput"/>
+             </item>
+             <item row="0" column="2">
+              <widget class="QLabel" name="label_2">
+               <property name="text">
+                <string>Units</string>
                </property>
               </widget>
              </item>
diff --git a/src/yarpmotorgui-qt/main.cpp b/src/yarpmotorgui-qt/main.cpp
index e83539d..055c4ce 100644
--- a/src/yarpmotorgui-qt/main.cpp
+++ b/src/yarpmotorgui-qt/main.cpp
@@ -53,6 +53,7 @@ static void sighandler(int sig) {
 
 int main(int argc, char *argv[])
 {
+    qputenv("QT_DEVICE_PIXEL_RATIO", QByteArray("auto"));
     QApplication a(argc, argv);
 
     //YARP_REGISTER_DEVICES(icubmod)
@@ -113,7 +114,7 @@ int main(int argc, char *argv[])
     }
 
     NUMBER_OF_AVAILABLE_PARTS=pParts->size();
-    if (NUMBER_OF_AVAILABLE_PARTS > MAX_NUMBER_ACTIVATED){
+    if (NUMBER_OF_AVAILABLE_PARTS > MAX_NUMBER_OF_PARTS){
         LOG_ERROR("The number of parts exceeds the maximum! \n");
         return 1;
     }
@@ -122,7 +123,7 @@ int main(int argc, char *argv[])
         return 1;
     }
 
-    for(int n=0; n < MAX_NUMBER_ACTIVATED; n++){
+    for(int n=0; n < MAX_NUMBER_OF_PARTS; n++){
         //ENA = 0: part available
         //ENA = -1: part unavailable
         //ENA = 1: part used
diff --git a/src/yarpmotorgui-qt/partitem.cpp b/src/yarpmotorgui-qt/partitem.cpp
index 5701768..d2f4f28 100644
--- a/src/yarpmotorgui-qt/partitem.cpp
+++ b/src/yarpmotorgui-qt/partitem.cpp
@@ -44,6 +44,17 @@ PartItem::PartItem(QString robotName, int id, QString partName, ResourceFinder *
     positionDirectEnabled = false;
     openloopEnabled = false;
 
+    controlModes = 0;
+    refTrajectorySpeeds = 0;
+    refTrajectoryPositions = 0;
+    refTorques = 0;
+    refVelocitySpeeds = 0;
+    torques = 0;
+    positions = 0;
+    speeds = 0;
+    done = 0;
+    interactionModes = 0;
+
     //PolyDriver *cartesiandd[MAX_NUMBER_ACTIVATED];
 
     QString robotPartPort = QString("/%1/%2").arg(robotName).arg(partName);
@@ -145,31 +156,40 @@ PartItem::PartItem(QString robotName, int id, QString partName, ResourceFinder *
         //     TIMING[j] = -0.1;
         // }
 
-        double positions[MAX_NUMBER_OF_JOINTS];
+        yarp::os::ConstString jointname;
+        //char buffer[40] = {'i', 'n', 'i', 't'};
 
-        bool ret=false;
+        int number_of_joints;
+        iPos->getAxes(&number_of_joints);
+
+        controlModes = new int[number_of_joints];
+        refTrajectorySpeeds = new double[number_of_joints];
+        refTrajectoryPositions = new double[number_of_joints];
+        refTorques = new double[number_of_joints];
+        refVelocitySpeeds = new double[number_of_joints];
+        torques = new double[number_of_joints];
+        positions = new double[number_of_joints];
+        speeds = new double[number_of_joints];
+        done = new bool[number_of_joints];
+        interactionModes = new yarp::dev::InteractionModeEnum[number_of_joints];
+
+        bool ret = false;
         Time::delay(0.050);
         do {
-            ret=iencs->getEncoders(positions);
+            ret = iencs->getEncoders(positions);
             if (!ret) {
                 yError("%s iencs->getEncoders() failed, retrying...\n", partName.toLatin1().data());
                 Time::delay(0.050);
             }
-        }
-        while (!ret);
+        } while (!ret);
 
         yInfo("%s iencs->getEncoders() ok!\n", partName.toLatin1().data());
+
         double min_pos = 0;
         double max_pos = 100;
         double min_vel = 0;
         double max_vel = 100;
-        yarp::os::ConstString jointname;
-        //char buffer[40] = {'i', 'n', 'i', 't'};
-
-        int NUMBER_OF_JOINTS;
-        iPos->getAxes(&NUMBER_OF_JOINTS);
-
-        for (int k = 0; k<NUMBER_OF_JOINTS; k++)
+        for (int k = 0; k<number_of_joints; k++)
         {
             // //init stored
             // for(j = 0; j < NUMBER_OF_STORED; j++){
@@ -302,6 +322,16 @@ PartItem::~PartItem()
     if(partsdd){
         partsdd->close();
     }
+
+    if (controlModes) { delete[] controlModes; controlModes = 0; }
+    if (refTrajectorySpeeds) { delete[] refTrajectorySpeeds; refTrajectorySpeeds = 0; }
+    if (refTrajectoryPositions) { delete[] refTrajectoryPositions; refTrajectoryPositions = 0; }
+    if (refTorques) { delete[] refTorques; refTorques = 0; }
+    if (refVelocitySpeeds) { delete[] refVelocitySpeeds; refVelocitySpeeds = 0; }
+    if (torques) { delete[] torques; torques = 0; }
+    if (positions) { delete[] positions; positions = 0; }
+    if (speeds) { delete[] speeds; speeds = 0; }
+    if (done) { delete[] done; done = 0; }
 }
 
 bool PartItem::openPolyDrivers()
@@ -1732,10 +1762,6 @@ void PartItem::onGo(SequenceItem sequenceItem)
         return;
     }
 
-    if(sequenceItem.getTiming() < 0){
-        return;
-    }
-
     int NUMBER_OF_JOINTS;
     iPos->getAxes(&NUMBER_OF_JOINTS);
 
@@ -1775,7 +1801,7 @@ void PartItem::onSequenceWindowDoubleClicked(int sequenceNum)
     QList<double>speeds;
     for(int i=0;i<layout->count();i++){
         JointItem *joint = (JointItem*)layout->itemAt(i)->widget();
-        values.append(joint->getTrajectoryPositionValue());
+        values.append(this->positions[i]);
         speeds.append(joint->getTrajectoryVelocityValue());
     }
 
@@ -1986,17 +2012,6 @@ void PartItem::updateControlMode()
 
 bool PartItem::updatePart()
 {
-    static double refTrajectorySpeeds[MAX_NUMBER_OF_JOINTS];
-    static double refTrajectoryPositions[MAX_NUMBER_OF_JOINTS];
-    static double refTorques[MAX_NUMBER_OF_JOINTS];
-    static double refVelocitySpeeds[MAX_NUMBER_OF_JOINTS];
-    static double torques[MAX_NUMBER_OF_JOINTS];
-    static double positions[MAX_NUMBER_OF_JOINTS];
-    static double speeds[MAX_NUMBER_OF_JOINTS];
-    static bool   done[MAX_NUMBER_OF_JOINTS];
-    //static int controlModes[MAX_NUMBER_OF_JOINTS];
-    static yarp::dev::InteractionModeEnum interactionModes[MAX_NUMBER_OF_JOINTS];
-
     bool ret = false;
     int number_of_joints=0;
     iPos->getAxes(&number_of_joints);
diff --git a/src/yarpmotorgui-qt/partitem.h b/src/yarpmotorgui-qt/partitem.h
index 263fd7f..98a3b8a 100644
--- a/src/yarpmotorgui-qt/partitem.h
+++ b/src/yarpmotorgui-qt/partitem.h
@@ -108,7 +108,16 @@ private:
     QList<SequenceItem> runTimeValues;
     QList<SequenceItem> cycleValues;
     QList<SequenceItem> cycleTimeValues;
-    int controlModes[MAX_NUMBER_OF_JOINTS];
+    int*    controlModes;
+    double* refTrajectorySpeeds;
+    double* refTrajectoryPositions;
+    double* refTorques;
+    double* refVelocitySpeeds;
+    double* torques;
+    double* positions;
+    double* speeds;
+    bool*   done;
+    yarp::dev::InteractionModeEnum* interactionModes;
 
     ResourceFinder *finder;
 
diff --git a/src/yarpmotorgui-qt/sequencewindow.cpp b/src/yarpmotorgui-qt/sequencewindow.cpp
index c78a481..f9ba957 100644
--- a/src/yarpmotorgui-qt/sequencewindow.cpp
+++ b/src/yarpmotorgui-qt/sequencewindow.cpp
@@ -12,6 +12,7 @@
 #include "ui_sequencewindow.h"
 #include <QMenu>
 #include <QDebug>
+#include <QClipboard>
 
 
 SequenceWindow::SequenceWindow(QString partName, int count,QWidget *parent) :
@@ -89,9 +90,6 @@ SequenceWindow::SequenceWindow(QString partName, int count,QWidget *parent) :
 
     QTreeWidgetItem *itemSpeed = new QTreeWidgetItem(ss1);
     ui->treeSpeed->addTopLevelItem(itemSpeed);
-
-
-
 }
 
 SequenceWindow::~SequenceWindow()
@@ -571,6 +569,7 @@ void SequenceTreeWidget::onContextMenuRequested(QPoint point)
     QAction *copyAction = menu.addAction("Copy row");
     QAction *pasteAction = menu.addAction("Paste row");
     QAction *deleteAction = menu.addAction("Delete Row");
+    QAction *clipboardAction = menu.addAction("Copy to clipboard");
 
     if(copyValues.isEmpty()){
         pasteAction->setEnabled(false);
@@ -579,7 +578,23 @@ void SequenceTreeWidget::onContextMenuRequested(QPoint point)
     p.setY(point.y() + header()->height());
     QAction *ret = menu.exec(mapToGlobal(p));
 
-    if(ret == copyAction){
+    if (ret == clipboardAction)
+    {
+        QClipboard  *clipboard = QApplication::clipboard();
+       
+        QString selected_test;
+
+        for (int i = 2; i<columnCount(); i++)
+        {
+            selected_test = selected_test + item->text(i);
+            selected_test = selected_test + QString("\t");
+        }
+        clipboard->setText(selected_test);
+    }
+
+    if(ret == copyAction)
+    {
+        copyValues.clear();
         for(int i=1; i<columnCount(); i++){
             copyValues.append(item->text(i));
         }
diff --git a/src/yarpmotorgui-qt/sliderWithTarget.h b/src/yarpmotorgui-qt/sliderWithTarget.h
index ff548e2..bbc10d9 100644
--- a/src/yarpmotorgui-qt/sliderWithTarget.h
+++ b/src/yarpmotorgui-qt/sliderWithTarget.h
@@ -39,7 +39,7 @@ protected:
     double sliderStep;
     bool hasTargetOption;
     void paintEvent(QPaintEvent *ev) Q_DECL_OVERRIDE;
-    void mousePressEvent(QMouseEvent * event);
+    void mousePressEvent(QMouseEvent * event) Q_DECL_OVERRIDE;
 };
 
 
diff --git a/src/yarpmotorgui-qt/yarpmotorgui.h b/src/yarpmotorgui-qt/yarpmotorgui.h
index 25d5b98..3a1ebfd 100644
--- a/src/yarpmotorgui-qt/yarpmotorgui.h
+++ b/src/yarpmotorgui-qt/yarpmotorgui.h
@@ -14,9 +14,8 @@
 
 #include <yarp/os/ResourceFinder.h>
 
-const int   MAX_NUMBER_ACTIVATED = 16;
-const int   MAX_NUMBER_OF_JOINTS = 16;
-const int   	NUMBER_OF_STORED = 30;
+const int       MAX_NUMBER_OF_PARTS = 16;
+const int       NUMBER_OF_STORED = 30;
 
 //extern GtkWidget *robotNameBox;
 extern int PART;
diff --git a/src/yarprobotinterface/cmake/modules/FindTinyXML.cmake b/src/yarprobotinterface/cmake/modules/FindTinyXML.cmake
deleted file mode 100644
index f21c4cb..0000000
--- a/src/yarprobotinterface/cmake/modules/FindTinyXML.cmake
+++ /dev/null
@@ -1,40 +0,0 @@
-# Try to find the TinyXML library
-# TinyXML_FOUND - system has TinyXML
-# TinyXML_INCLUDE_DIRS - TinyXML include directory
-# TinyXML_LIBRARY_DIRS - TinyXML library directory
-# TinyXML_LIBRARIES - TinyXML libraries
-
-# Copyright (C) 2012  iCub Facility, Istituto Italiano di Tecnologia
-# Author: Daniele E. Domenichelli <daniele.domenichelli at iit.it>
-#
-# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
-
-
-if(NOT WIN32)
-    find_package(PkgConfig)
-    if(PKG_CONFIG_FOUND)
-        if(TinyXML_FIND_VERSION)
-            if(TinyXML_FIND_VERSION_EXACT)
-                pkg_check_modules(PC_TINYXML QUIET tinyxml=${TinyXML_FIND_VERSION})
-            else(TinyXML_FIND_VERSION_EXACT)
-                pkg_check_modules(PC_TINYXML QUIET tinyxml>=${TinyXML_FIND_VERSION})
-            endif(TinyXML_FIND_VERSION_EXACT)
-        else(TinyXML_FIND_VERSION)
-            pkg_check_modules(PC_TINYXML QUIET tinyxml)
-        endif(TinyXML_FIND_VERSION)
-    endif(PKG_CONFIG_FOUND)
-endif(NOT WIN32)
-
-set(TinyXML_INCLUDE_DIRS ${PC_TINYXML_INCLUDE_DIRS} CACHE PATH "TinyXML include directory" FORCE)
-set(TinyXML_LIBRARY_DIRS ${PC_TINYXML_LIBRARY_DIRS} CACHE PATH "TinyXML library directory" FORCE)
-set(TinyXML_LIBRARIES ${PC_TINYXML_LIBRARIES} CACHE STRING "TinyXML libraries" FORCE)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(TinyXML
-                                  DEFAULT_MSG
-                                  TinyXML_LIBRARIES
-)
-
-set(TinyXML_FOUND ${TINYXML_FOUND})
-
-mark_as_advanced(TinyXML_INCLUDE_DIRS TinyXML_LIBRARY_DIRS TinyXML_LIBRARIES)
diff --git a/src/yarprobotinterface/tests/test_grabber/yarprobotInterface.ini b/src/yarprobotinterface/tests/test_grabber/yarprobotinterface.ini
similarity index 100%
rename from src/yarprobotinterface/tests/test_grabber/yarprobotInterface.ini
rename to src/yarprobotinterface/tests/test_grabber/yarprobotinterface.ini
diff --git a/src/yarpscope-gtk/src/PortReader.cpp b/src/yarpscope-gtk/src/PortReader.cpp
index 3b5bd46..5bae78e 100644
--- a/src/yarpscope-gtk/src/PortReader.cpp
+++ b/src/yarpscope-gtk/src/PortReader.cpp
@@ -113,10 +113,10 @@ public:
             // Connect local port to remote port
             if (!yarp::os::Network::connect(remotePortName.c_str(), realLocalPortName.c_str(), style)) {
                 warning() << "Connection from port" << realLocalPortName <<  "to port" << remotePortName
-                          << "was NOT successfull. Waiting from explicit connection from user.";
+                          << "was NOT successful. Waiting from explicit connection from user.";
             } else {
                 debug() << "Listening to port" << remotePortName << "from port" << realLocalPortName;
-                // Connection was successfull. Save the ContactStyle in order to reuse it for disconnecting;
+                // Connection was successful. Save the ContactStyle in order to reuse it for disconnecting;
                 this->style = style;
             }
 
diff --git a/src/yarpscope-qt/CMakeLists.txt b/src/yarpscope-qt/CMakeLists.txt
index af3453e..da66ddd 100644
--- a/src/yarpscope-qt/CMakeLists.txt
+++ b/src/yarpscope-qt/CMakeLists.txt
@@ -6,6 +6,8 @@ if(CREATE_YARPSCOPE AND YARP_HAS_QT5)
 
   include(YarpUseQt5)
 
+  set(QtYARPScopePlugin_QMLDIR "robotology/yarp/scope")
+
   add_subdirectory(plugin)
   add_subdirectory(src)
 
diff --git a/src/yarpscope-qt/plugin/CMakeLists.txt b/src/yarpscope-qt/plugin/CMakeLists.txt
index 3096d24..47a721e 100644
--- a/src/yarpscope-qt/plugin/CMakeLists.txt
+++ b/src/yarpscope-qt/plugin/CMakeLists.txt
@@ -36,8 +36,6 @@ source_group("Resources Files" FILES ${QtYARPScopePlugin_QRC_FILES})
 source_group("QML Files" FILES ${QtYARPScopePlugin_QML_FILES})
 source_group("Generated Files" FILES ${QtYARPScopePlugin_QRC_GEN_SRCS})
 
-set(QtYARPScopePlugin_QMLDIR "robotology/yarp/scope")
-
 add_library(QtYARPScopePlugin MODULE ${QtYARPScopePlugin_SRCS}
                                      ${QtYARPScopePlugin_HDRS}
                                      ${QtYARPScopePlugin_QRC_GEN_SRCS})
diff --git a/src/yarpscope-qt/plugin/plotter.cpp b/src/yarpscope-qt/plugin/plotter.cpp
index e312529..55a2bf8 100644
--- a/src/yarpscope-qt/plugin/plotter.cpp
+++ b/src/yarpscope-qt/plugin/plotter.cpp
@@ -421,10 +421,10 @@ void Connection::connect(const yarp::os::ContactStyle &style) {
     // Connect local port to remote port
     if (!yarp::os::Network::connect(remotePortName.toLatin1().data(), realLocalPortName.toLatin1().data(), style)) {
         qWarning() << "Connection from port" << realLocalPortName.toLatin1().data() <<  "to port" << remotePortName.toLatin1().data()
-                   << "was NOT successfull. Waiting from explicit connection from user.";
+                   << "was NOT successful. Waiting from explicit connection from user.";
     } else {
         qDebug("Listening to port %s from port %s",remotePortName.toLatin1().data(),realLocalPortName.toLatin1().data());
-        // Connection was successfull. Save the ContactStyle in order to reuse it for disconnecting;
+        // Connection was successful. Save the ContactStyle in order to reuse it for disconnecting;
         this->style = style;
     }
 
diff --git a/src/yarpscope-qt/plugin/xmlloader.cpp b/src/yarpscope-qt/plugin/xmlloader.cpp
index 88be3bb..f49261b 100644
--- a/src/yarpscope-qt/plugin/xmlloader.cpp
+++ b/src/yarpscope-qt/plugin/xmlloader.cpp
@@ -85,10 +85,10 @@ XmlLoader::XmlLoader(QString fileName, PlotManager *plotManager,QObject *parent)
                     plot_vspan = plotAttributes.value("vspan").toInt();
                 }
                 if(plotAttributes.hasAttribute("minval")) {
-                    plot_minval = plotAttributes.value("minval").toInt();
+                    plot_minval = plotAttributes.value("minval").toFloat();
                 }
                 if(plotAttributes.hasAttribute("maxval")) {
-                    plot_maxval = plotAttributes.value("maxval").toInt();
+                    plot_maxval = plotAttributes.value("maxval").toFloat();
                 }
                 if(plotAttributes.hasAttribute("size")) {
                     plot_size = plotAttributes.value("size").toInt();
diff --git a/src/yarpscope-qt/src/CMakeLists.txt b/src/yarpscope-qt/src/CMakeLists.txt
index 354657e..502fa35 100644
--- a/src/yarpscope-qt/src/CMakeLists.txt
+++ b/src/yarpscope-qt/src/CMakeLists.txt
@@ -48,6 +48,14 @@ yarp_osx_duplicate_and_add_bundle(TARGET_ORIG yarpscope-qt
                                   TARGET_DEST yarpscope-qt.app
                                   INSTALL_COMPONENT utilities
                                   INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
-                                  
+
+if(APPLE)
+  add_dependencies(yarpscope-qt.app QtYARPScopePlugin)
+  add_custom_command(TARGET yarpscope-qt.app POST_BUILD
+                   COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:QtYARPScopePlugin>"
+                                                    "$<TARGET_FILE_DIR:yarpscope-qt.app>/../lib/qt5/qml/${QtYARPScopePlugin_QMLDIR}/$<TARGET_FILE_NAME:QtYARPScopePlugin>"
+                   COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE_DIR:QtYARPScopePlugin>/qmldir"
+                                                    "$<TARGET_FILE_DIR:yarpscope-qt.app>/../lib/qt5/qml/${QtYARPScopePlugin_QMLDIR}/qmldir")
+endif()
 yarp_install(FILES yarpscope.xml DESTINATION ${YARP_MODULES_INSTALL_DIR})
-                                  
+
diff --git a/src/yarpview-qt/CMakeLists.txt b/src/yarpview-qt/CMakeLists.txt
index 47818b3..4e5a11b 100644
--- a/src/yarpview-qt/CMakeLists.txt
+++ b/src/yarpview-qt/CMakeLists.txt
@@ -6,6 +6,8 @@ if(CREATE_YARPVIEW AND YARP_HAS_QT5)
 
   include(YarpUseQt5)
 
+  set(QtYARPViewPlugin_QMLDIR "robotology/yarp/view")
+
   add_subdirectory(plugin)
   add_subdirectory(src)
 
diff --git a/src/yarpview-qt/plugin/CMakeLists.txt b/src/yarpview-qt/plugin/CMakeLists.txt
index 4570564..c64c667 100644
--- a/src/yarpview-qt/plugin/CMakeLists.txt
+++ b/src/yarpview-qt/plugin/CMakeLists.txt
@@ -33,8 +33,6 @@ source_group("Resources Files" FILES ${QtYARPViewPlugin_QRC_FILES})
 source_group("QML Files" FILES ${QtYARPViewPlugin_QML_FILES})
 source_group("Generated Files" FILES ${QtYARPViewPlugin_QRC_GEN_SRCS})
 
-set(QtYARPViewPlugin_QMLDIR "robotology/yarp/view")
-
 add_library(QtYARPViewPlugin MODULE ${QtYARPViewPlugin_SRCS}
                                     ${QtYARPViewPlugin_HDRS}
                                     ${QtYARPViewPlugin_QRC_GEN_SRCS} )
diff --git a/src/yarpview-qt/src/CMakeLists.txt b/src/yarpview-qt/src/CMakeLists.txt
index b71559a..c85f449 100644
--- a/src/yarpview-qt/src/CMakeLists.txt
+++ b/src/yarpview-qt/src/CMakeLists.txt
@@ -50,8 +50,16 @@ yarp_osx_duplicate_and_add_bundle(TARGET_ORIG yarpview-qt
                                   APP_ICON icons/AppIcon.icns
                                   INSTALL_COMPONENT utilities
                                   INSTALL_DESTINATION "${CMAKE_INSTALL_BINDIR}")
-                                  
-                                  
+
+if(APPLE)
+  add_dependencies(yarpview-qt.app QtYARPViewPlugin)
+  add_custom_command(TARGET yarpview-qt.app POST_BUILD
+                     COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:QtYARPViewPlugin>"
+                                                      "$<TARGET_FILE_DIR:yarpview-qt.app>/../lib/qt5/qml/${QtYARPViewPlugin_QMLDIR}/$<TARGET_FILE_NAME:QtYARPViewPlugin>"
+                     COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE_DIR:QtYARPViewPlugin>/qmldir"
+                                                      "$<TARGET_FILE_DIR:yarpview-qt.app>/../lib/qt5/qml/${QtYARPViewPlugin_QMLDIR}/qmldir")
+endif()
+
 yarp_install(FILES yarpview.xml
                DESTINATION ${YARP_MODULES_INSTALL_DIR})
-               
+
diff --git a/src/yarpview-qt/src/main.cpp b/src/yarpview-qt/src/main.cpp
index 9b530a7..519c0fe 100644
--- a/src/yarpview-qt/src/main.cpp
+++ b/src/yarpview-qt/src/main.cpp
@@ -51,6 +51,7 @@ int main(int argc, char *argv[])
         }
     }
 
+    qputenv("QT_DEVICE_PIXEL_RATIO", QByteArray("auto"));
     QApplication app(argc, argv);
     QVariant retVal;
 
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index e1c6a5f..1dea4a4 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -61,6 +61,10 @@ if(YARP_COMPILE_TESTS)
                 endif()
             endforeach()
         endforeach()
+        if(YARP_GDB_TESTS)
+            add_test(NAME "${test_family}::${XN}::gdb"
+                     COMMAND ${GDB_COMMAND} ${_cmd})
+        endif()
     endforeach()
 
     if(UNIX)
@@ -91,6 +95,11 @@ if(YARP_COMPILE_TESTS)
                              WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/libYARP_dev/harness)
                 endif()
             endforeach()
+            if(YARP_GDB_TESTS)
+                add_test(NAME "device::${XN}::gdb"
+                         COMMAND ${GDB_COMMAND} ${_cmd}
+                         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/libYARP_dev/harness)
+            endif()
         endforeach(X ${inis})
     endif()
 
diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt
index d08b92c..84ebc79 100644
--- a/tests/integration/CMakeLists.txt
+++ b/tests/integration/CMakeLists.txt
@@ -39,6 +39,7 @@ endforeach()
 # Add a "runtime" test for using plugins against yarp with static/shared linking
 add_test("integration::runtime" ${CMAKE_CURRENT_SOURCE_DIR}/check-runtime.sh)
 set_property(TEST "integration::runtime" PROPERTY WORKING_DIRECTORY ${YARP_BINARY_DIR})
+set_property(TEST "integration::runtime" PROPERTY TIMEOUT 2000)
 
 set(SIMPLE_TESTS
   http  # Sanity check for YARP http support against curl
diff --git a/tests/libYARP_OS/LogTest.cpp b/tests/libYARP_OS/LogTest.cpp
index f07f40a..47edb23 100644
--- a/tests/libYARP_OS/LogTest.cpp
+++ b/tests/libYARP_OS/LogTest.cpp
@@ -32,6 +32,15 @@ public:
 
         yError("This is an error");
         yError("This is %s (%d)", "an error", i);
+
+        yInfo("This is a very long long sentence. The purpose is to check if the logger is able to handle and display nicely very long messages, eventually displaying them on multiple lines or using other mechanisms (e.g. pop-up, user hints etc)");
+
+        yInfo("This is a sentence that spawn on multiple lines:\n.This is line 2.\nThis is line 3.\nThis is the last line.");
+
+        yInfo("\nThis is text contains an end of line at the beginning of the sentence");
+
+        yInfo("This is text contains an end of line at the end of the sentence\n");
+
     }
 
     virtual void runTests() {
diff --git a/tests/libYARP_OS/NetworkTest.cpp b/tests/libYARP_OS/NetworkTest.cpp
index ebc6c93..a35f418 100644
--- a/tests/libYARP_OS/NetworkTest.cpp
+++ b/tests/libYARP_OS/NetworkTest.cpp
@@ -66,7 +66,7 @@ public:
         p.open(name);
     }
 
-    void run() {
+    virtual void run() {
         Bottle b1,b2;
         while (!isStopping()) {
             p.read(b1,true);
@@ -78,6 +78,11 @@ public:
             p.reply(b2);
         }
     }
+
+    virtual void onStop() {
+        p.interrupt();
+        p.close();
+    }
 };
 
 class NetworkTest : public UnitTest {
diff --git a/tests/libYARP_dev/PolyDriverTest.cpp b/tests/libYARP_dev/PolyDriverTest.cpp
index 3ba6de4..e382749 100644
--- a/tests/libYARP_dev/PolyDriverTest.cpp
+++ b/tests/libYARP_dev/PolyDriverTest.cpp
@@ -10,6 +10,7 @@
 #include <yarp/dev/PolyDriver.h>
 #include <yarp/dev/FrameGrabberInterfaces.h>
 #include <yarp/dev/ControlBoardInterfaces.h>
+#include <yarp/dev/Wrapper.h>
 
 #include "TestList.h"
 
@@ -206,6 +207,12 @@ name /mymotor\n\
         result = dd.open(p);
         checkTrue(result,"controlboardwrapper open reported successful");
 
+        // Check if IMultipleWrapper interface is correctly found
+        yarp::dev::IMultipleWrapper * i_mwrapper=0;
+        result = dd.view(i_mwrapper);
+        checkTrue(result,"IMultipleWrapper view reported successful");
+        checkTrue(i_mwrapper!=0,"IMultipleWrapper pointer not null");
+
         PolyDriver dd2;
         Property p2;
         p2.put("device","remote_controlboard");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/yarp.git



More information about the debian-science-commits mailing list