diff --git a/include/spline/bezier_curve.h b/include/spline/bezier_curve.h
index 85b06a74521a48537d2a2a037862a778e05dbc58..afac9bcacb16422bf24e56ef3ad6bee4f3f1462d 100644
--- a/include/spline/bezier_curve.h
+++ b/include/spline/bezier_curve.h
@@ -21,7 +21,7 @@ namespace spline
 /// \class BezierCurve
 /// \brief Represents a curve
 ///
-template<typename Time= double, typename Numeric=Time, int Dim=3, bool Safe=false
+template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
 , typename Point= Eigen::Matrix<Numeric, Dim, 1> >
 struct bezier_curve : public  curve_abc<Time, Numeric, Dim, Safe, Point>
 {
diff --git a/include/spline/cubic_function.h b/include/spline/cubic_function.h
index c5acdf6b50d6038dd0040b0768c1c7b5932519e4..6fdc5902d66031e63c1fd734241709885ae497ca 100644
--- a/include/spline/cubic_function.h
+++ b/include/spline/cubic_function.h
@@ -27,7 +27,7 @@ namespace spline
 /// [tBegin, tEnd]. It follows the equation
 /// x(t) = a + b(t - t_min_) + c(t - t_min_)^2 + d(t - t_min_)^3 
 ///
-template<typename Time= double, typename Numeric=Time, int Dim=3, bool Safe=false
+template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
 , typename Point= Eigen::Matrix<Numeric, Dim, 1> >
 struct cubic_function : public curve_abc<Time, Numeric, Dim, Safe, Point>
 {
diff --git a/include/spline/curve_abc.h b/include/spline/curve_abc.h
index da3874d7c3190731750cee64e5ad9234b06025bc..8aedfec3af32d1d3649672d9e841b05090b47233 100644
--- a/include/spline/curve_abc.h
+++ b/include/spline/curve_abc.h
@@ -21,7 +21,7 @@ namespace spline
 /// \struct curve_abc
 /// \brief Represents a curve of dimension Dim
 /// is Safe is false, no verification is made on the evaluation of the curve.
-template<typename Time= double, typename Numeric=Time, int Dim=3, bool Safe=false
+template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
 , typename Point= Eigen::Matrix<Numeric, Dim, 1> >
 struct  curve_abc : std::unary_function<Time, Point>
 {
diff --git a/include/spline/exact_cubic.h b/include/spline/exact_cubic.h
index 9cba9d43652b9b13a4dac575ead4d75ad92a59f1..8c42502e3ae072f3f825033dc05198bcb4bfb75f 100644
--- a/include/spline/exact_cubic.h
+++ b/include/spline/exact_cubic.h
@@ -34,7 +34,7 @@ namespace spline
 /// \brief Represents a set of cubic splines defining a continuous function 
 /// crossing each of the waypoint given in its initialization
 ///
-template<typename Time= double, typename Numeric=Time, int Dim=3, bool Safe=false
+template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
 , typename Point= Eigen::Matrix<Numeric, Dim, 1> >
 struct exact_cubic : public curve_abc<Time, Numeric, Dim, Safe, Point>
 {
diff --git a/include/spline/optimization/OptimizeSpline.h b/include/spline/optimization/OptimizeSpline.h
index 15f05ab68e2db34cfc5e5c63e295b132f72209fe..a5425b10bc92c6497814c89228fcf58eac38f019 100644
--- a/include/spline/optimization/OptimizeSpline.h
+++ b/include/spline/optimization/OptimizeSpline.h
@@ -24,7 +24,7 @@ namespace spline
 {
 /// \class SplineOptimizer
 /// \brief Mosek connection to produce optimized splines
-template<typename Time= double, typename Numeric=Time, int Dim=3, bool Safe=false
+template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
 , typename Point= Eigen::Matrix<Numeric, Dim, 1> >
 struct SplineOptimizer
 {
@@ -79,7 +79,7 @@ private:
 	typedef std::vector<waypoint_t> T_waypoints_t; 
 };
 
-template<typename Time, typename Numeric, int Dim, bool Safe, typename Point>
+template<typename Time, typename Numeric, std::size_t Dim, bool Safe, typename Point>
 template<typename In>
 inline void SplineOptimizer<Time, Numeric, Dim, Safe, Point>::ComputeHMatrices(In wayPointsBegin, In wayPointsEnd, 
 	MatrixX& h1, MatrixX& h2, MatrixX& h3, MatrixX& h4) const
@@ -116,7 +116,7 @@ inline void SplineOptimizer<Time, Numeric, Dim, Safe, Point>::ComputeHMatrices(I
 	}
 }
 
-template<typename Time, typename Numeric, int Dim, bool Safe, typename Point>
+template<typename Time, typename Numeric, std::size_t Dim, bool Safe, typename Point>
 template<typename In>
 inline exact_cubic<Time, Numeric, Dim, Safe, Point>*
 	SplineOptimizer<Time, Numeric, Dim, Safe, Point>::GenerateOptimizedCurve(In wayPointsBegin, In wayPointsEnd) const
diff --git a/src/tests/spline_test/CMakeLists.txt b/src/tests/spline_test/CMakeLists.txt
index aaf8944cb6fd364c5e7f4a08fc8d7e9829d0b0f5..874c7e363295e096b41304df17f09baa6fb01355 100644
--- a/src/tests/spline_test/CMakeLists.txt
+++ b/src/tests/spline_test/CMakeLists.txt
@@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 2.6)
 
 include_directories("${PROJECT_SOURCE_DIR}/include")
 
+FILE(GLOB_RECURSE HeaderFiles "${PROJECT_SOURCE_DIR}/include/spline/*.h")
+
 add_executable(
-        spline_tests Main.cpp
+				spline_tests ${HeaderFiles} Main.cpp
 )