diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c1b0d39ebb64f9c36e767bd6cff520c4f967157..3c328c28af19ba9e54136515ed2d252ce51607a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,7 +53,10 @@ else()
   add_definitions(-DCLP_FOUND)
 endif()
 
-INCLUDE_DIRECTORIES(${qpOASES_INCLUDE_DIRS})
+IF(CLP_FOUND)
+    ADD_DEFINITIONS(-DCLP_FOUND)
+    INCLUDE_DIRECTORIES(SYSTEM "${CLP_INCLUDE_DIR}")
+ENDIF()
 
 
 ADD_SUBDIRECTORY (include/${CUSTOM_HEADER_DIR})
diff --git a/include/hpp/centroidal-dynamics/Stdafx.hh b/include/hpp/centroidal-dynamics/Stdafx.hh
index 8e7b109b8e1346c59dd69a2a7bc3f3d14afbfb7d..f9716e9a69379befe68769f0dab345bc066890de 100644
--- a/include/hpp/centroidal-dynamics/Stdafx.hh
+++ b/include/hpp/centroidal-dynamics/Stdafx.hh
@@ -1,3 +1,6 @@
+#ifndef HPP_CENTROIDAL_DYNAMICS_STDAFX_HH
+#define HPP_CENTROIDAL_DYNAMICS_STDAFX_HH
+
 /*
 Copyright (c) 2010-2013 Tommaso Urli
 
@@ -30,3 +33,5 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <map>
 #include <ctime>
 #include <sstream>
+
+#endif
diff --git a/include/hpp/centroidal-dynamics/centroidal_dynamics.hh b/include/hpp/centroidal-dynamics/centroidal_dynamics.hh
index cf6badcfc17bff5552ac5c2a2bf9c78c03bbc127..ce95c148c13ac0a5745c9263d0cf24abe93d648b 100644
--- a/include/hpp/centroidal-dynamics/centroidal_dynamics.hh
+++ b/include/hpp/centroidal-dynamics/centroidal_dynamics.hh
@@ -3,8 +3,8 @@
  * Author: Andrea Del Prete
  */
 
-#ifndef CENTROIDAL_DYNAMICS_LIB_STATIC_EQUILIBRIUM_H
-#define CENTROIDAL_DYNAMICS_LIB_STATIC_EQUILIBRIUM_H
+#ifndef HPP_CENTROIDAL_DYNAMICS_CENTROIDAL_DYNAMICS_HH
+#define HPP_CENTROIDAL_DYNAMICS_CENTROIDAL_DYNAMICS_HH
 
 #include <Eigen/Dense>
 #include <hpp/centroidal-dynamics/local_config.hh>
diff --git a/include/hpp/centroidal-dynamics/local_config.hh b/include/hpp/centroidal-dynamics/local_config.hh
index 8d60cbe7113ff543facacccf458d7b649b7d281d..0c6eee38350bccec19ef557dfc9bdabc3b933e7c 100644
--- a/include/hpp/centroidal-dynamics/local_config.hh
+++ b/include/hpp/centroidal-dynamics/local_config.hh
@@ -3,8 +3,8 @@
  * Author: Andrea Del Prete
  */
 
-#ifndef _CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
-#define _CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
+#ifndef HPP_CENTROIDAL_DYNAMICS_LOCAL_CONFIG_HH
+#define HPP_CENTROIDAL_DYNAMICS_LOCAL_CONFIG_HH
 
 // Package version (header).
 # define CENTROIDAL_DYNAMICS_VERSION "UNKNOWN"
@@ -54,4 +54,4 @@
 #  define CENTROIDAL_DYNAMICS_LOCAL CENTROIDAL_DYNAMICS_DLLLOCAL
 # endif // CENTROIDAL_DYNAMICS_STATIC
 
-#endif //_CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
+#endif  // HPP_CENTROIDAL_DYNAMICS_LOCAL_CONFIG_HH
diff --git a/include/hpp/centroidal-dynamics/logger.hh b/include/hpp/centroidal-dynamics/logger.hh
index 8f861dcca28e3dd6e18de5952a00173246d27b34..548409a4b708bb83dc7d22463eb643189dde486c 100644
--- a/include/hpp/centroidal-dynamics/logger.hh
+++ b/include/hpp/centroidal-dynamics/logger.hh
@@ -3,8 +3,8 @@
  * Author: Andrea Del Prete
  */
 
-#ifndef __centroidal_dynamics_lib_logger_H__
-#define __centroidal_dynamics_lib_logger_H__
+#ifndef HPP_CENTROIDAL_DYNAMICS_LOGGER_HH
+#define HPP_CENTROIDAL_DYNAMICS_LOGGER_HH
 
 /* --------------------------------------------------------------------- */
 /* --- INCLUDE --------------------------------------------------------- */
@@ -185,4 +185,4 @@ namespace centroidal_dynamics
 
 } // namespace centroidal_dynamics
 
-#endif // #ifndef __sot_torque_control_trajectory_generators_H__
+#endif  // HPP_CENTROIDAL_DYNAMICS_LOGGER_HH
diff --git a/include/hpp/centroidal-dynamics/solver_LP_abstract.hh b/include/hpp/centroidal-dynamics/solver_LP_abstract.hh
index 501ffdfc411222e3d3d08dcdae4fb3bdfcc3093d..73c85919cd5d6413639fedd90a71d50d7bac7b98 100644
--- a/include/hpp/centroidal-dynamics/solver_LP_abstract.hh
+++ b/include/hpp/centroidal-dynamics/solver_LP_abstract.hh
@@ -3,8 +3,8 @@
  * Author: Andrea Del Prete
  */
 
-#ifndef CENTROIDAL_DYNAMICS_LIB_SOLVER_LP_ABSTRACT_HH
-#define CENTROIDAL_DYNAMICS_LIB_SOLVER_LP_ABSTRACT_HH
+#ifndef HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_ABSTRACT_HH
+#define HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_ABSTRACT_HH
 
 #include <Eigen/Dense>
 #include <hpp/centroidal-dynamics/local_config.hh>
@@ -149,4 +149,4 @@ public:
 
 } // end namespace centroidal_dynamics
 
-#endif //CENTROIDAL_DYNAMICS_LIB_SOLVER_LP_ABSTRACT_HH
+#endif  // HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_ABSTRACT_HH
diff --git a/include/hpp/centroidal-dynamics/solver_LP_qpoases.hh b/include/hpp/centroidal-dynamics/solver_LP_qpoases.hh
index e8c42c9284c46de31429c519e808c1fe91e84d04..c9f0bf6bb665ea831641b3a9afcdb4c27de2cb6b 100644
--- a/include/hpp/centroidal-dynamics/solver_LP_qpoases.hh
+++ b/include/hpp/centroidal-dynamics/solver_LP_qpoases.hh
@@ -3,8 +3,8 @@
  * Author: Andrea Del Prete
  */
 
-#ifndef CENTROIDAL_DYNAMICS_LIB_SOLVER_QPOASES_HH
-#define CENTROIDAL_DYNAMICS_LIB_SOLVER_QPOASES_HH
+#ifndef HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_QPOASES_HH
+#define HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_QPOASES_HH
 
 #include <hpp/centroidal-dynamics/local_config.hh>
 #include <hpp/centroidal-dynamics/util.hh>
@@ -49,4 +49,4 @@ public:
 
 } // end namespace centroidal_dynamics
 
-#endif //CENTROIDAL_DYNAMICS_LIB_SOLVER_QPOASES_HH
+#endif  // HPP_CENTROIDAL_DYNAMICS_SOLVER_LP_QPOASES_HH
diff --git a/include/hpp/centroidal-dynamics/stop-watch.hh b/include/hpp/centroidal-dynamics/stop-watch.hh
index ceed018d795e876506e733e4ebcf1b7d74fd1d76..aea3d4c0ad6f2f5eac43c7e2a20ebb6b89eaf9a8 100644
--- a/include/hpp/centroidal-dynamics/stop-watch.hh
+++ b/include/hpp/centroidal-dynamics/stop-watch.hh
@@ -24,9 +24,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 */
 
-
-#ifndef WBR_STOPWATCH_H
-#define WBR_STOPWATCH_H
+#ifndef HPP_CENTROIDAL_DYNAMICS_STOP_WATCH_HH
+#define HPP_CENTROIDAL_DYNAMICS_STOP_WATCH_HH
 
 #include "hpp/centroidal-dynamics/Stdafx.hh"
 
diff --git a/include/hpp/centroidal-dynamics/util.hh b/include/hpp/centroidal-dynamics/util.hh
index a560a9724f973b4a63c943b739a582e383937d9b..7dabfaef21bdcae15166746125186fcf4ef9382a 100644
--- a/include/hpp/centroidal-dynamics/util.hh
+++ b/include/hpp/centroidal-dynamics/util.hh
@@ -2,8 +2,8 @@
  * Copyright 2015, LAAS-CNRS
  * Author: Andrea Del Prete
  */
-#ifndef _CENTROIDAL_DYNAMICS_LIB_UTIL_HH
-#define _CENTROIDAL_DYNAMICS_LIB_UTIL_HH
+#ifndef HPP_CENTROIDAL_DYNAMICS_UTIL_HH
+#define HPP_CENTROIDAL_DYNAMICS_UTIL_HH
 
 #include <iostream>
 #include <fstream>
@@ -174,25 +174,20 @@ namespace centroidal_dynamics
  * @return nchoosek by k long matrix where each row is a unique k-size
  * the first one, with all zeros.
  */
-  template < typename DerivedV, typename DerivedU>
-  void nchoosek(
-    const Eigen::MatrixBase<DerivedV> & V,
-    const int k,
-    Eigen::PlainObjectBase<DerivedU> & U)
-    {
-        using namespace Eigen;
-        if(V.size() == 0)
-        {
-            U.resize(0,k);
-            return;
-        }
-        assert((V.cols() == 1 || V.rows() == 1) && "V must be a vector");
-        U.resize(nchoosek((int)(V.size()),k),k);
-        int running_i  = 0;
-        int running_j = 0;
-        Matrix<typename DerivedU::Scalar,1,Dynamic> running(1,k);
-        doCombs(running, running_i, running_j, U, V,0,k);
-    }
-} //namespace centroidal_dynamics
-
-#endif //_CENTROIDAL_DYNAMICS_LIB_UTIL_HH
+template <typename DerivedV, typename DerivedU>
+void nchoosek(const Eigen::MatrixBase<DerivedV>& V, const int k, Eigen::PlainObjectBase<DerivedU>& U) {
+  using namespace Eigen;
+  if (V.size() == 0) {
+    U.resize(0, k);
+    return;
+  }
+  assert((V.cols() == 1 || V.rows() == 1) && "V must be a vector");
+  U.resize(nchoosek((int)(V.size()), k), k);
+  int running_i = 0;
+  int running_j = 0;
+  Matrix<typename DerivedU::Scalar, 1, Dynamic> running(1, k);
+  doCombs(running, running_i, running_j, U, V, 0, k);
+}
+}  // namespace centroidal_dynamics
+
+#endif  // HPP_CENTROIDAL_DYNAMICS_UTIL_HH
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c77b697b08db6e727548526a85728a1d2c8fc6d6..71d838c6a5bd3da7c3a4d1acfbb2406c4c5cf5e6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -20,7 +20,7 @@ SET(${LIBRARY_NAME}_SOURCES
 ADD_LIBRARY(${LIBRARY_NAME} SHARED ${${LIBRARY_NAME}_SOURCES})
 
 TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${CDD_LIBRARIES} ${qpOASES_LIBRARY})
-TARGET_INCLUDE_DIRECTORIES(${LIBRARY_NAME} PUBLIC ${CDD_INCLUDE_DIRS})
+TARGET_INCLUDE_DIRECTORIES(${LIBRARY_NAME} SYSTEM PUBLIC ${CDD_INCLUDE_DIRS})
 PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} eigen3)
 
 if(CLP_FOUND)
diff --git a/src/util.cpp b/src/util.cpp
index 942e1c34afaf0ed828cca10f2a18765d77f1736f..d02b2ebc27680901d37429144819c663d4ee32c1 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -3,9 +3,7 @@
  * Author: Andrea Del Prete
  */
 
-#ifndef _CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
-#define _CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
-
+#include <ctime>
 #include <hpp/centroidal-dynamics/util.hh>
 #include <ctime>
 
@@ -208,6 +206,4 @@ value_type nchoosek(const int n, const int k)
     }
 }
 
-} //namespace centroidal_dynamics
-
-#endif //_CENTROIDAL_DYNAMICS_LIB_CONFIG_HH
+}  // namespace centroidal_dynamics