diff --git a/src/examples/test_constraint_AHP.cpp b/src/examples/test_constraint_AHP.cpp
index 040b9513300d4de366787e53e1406411069a8534..55215e8f3a46acdb72bead395cc8c43040919998 100644
--- a/src/examples/test_constraint_AHP.cpp
+++ b/src/examples/test_constraint_AHP.cpp
@@ -16,8 +16,8 @@ int main()
     char const* tmp = std::getenv( "WOLF_ROOT" );
     if ( tmp == nullptr )
         throw std::runtime_error("WOLF_ROOT environment not loaded.");
-    std::string wolf_path( tmp );
-    std::cout << "Wolf path: " << wolf_path << std::endl;
+    std::string wolf_root( tmp );
+    std::cout << "Wolf root: " << wolf_root << std::endl;
 
     // Wolf problem
     ProblemPtr wolf_problem_ptr_ = Problem::create(FRM_PO_3D);
@@ -35,12 +35,12 @@ int main()
     const Eigen::VectorXs extr = extrinsic_cam;
     /* Do this while there aren't extrinsic parameters on the yaml */
 
-    SensorBasePtr sensor_ptr = wolf_problem_ptr_->installSensor("CAMERA", "PinHole", extr, wolf_path + "/src/examples/camera_params.yaml");
+    SensorBasePtr sensor_ptr = wolf_problem_ptr_->installSensor("CAMERA", "PinHole", extr, wolf_root + "/src/examples/camera_params.yaml");
     std::shared_ptr<SensorCamera> camera_ptr_ = std::static_pointer_cast<SensorCamera>(sensor_ptr);
 
     // PROCESSOR
     // one-liner API
-    wolf_problem_ptr_->installProcessor("IMAGE LANDMARK", "ORB", "PinHole", wolf_path + "/src/examples/processor_image_ORB.yaml");
+    wolf_problem_ptr_->installProcessor("IMAGE LANDMARK", "ORB", "PinHole", wolf_root + "/src/examples/processor_image_ORB.yaml");
 
 
     // create the current frame
diff --git a/src/examples/test_image.cpp b/src/examples/test_image.cpp
index c1cad9a1cd363ced31fae9d616413dc712d4b452..b18c60ff31b6691128ee64501755e26b0d5c67c9 100644
--- a/src/examples/test_image.cpp
+++ b/src/examples/test_image.cpp
@@ -70,8 +70,8 @@ int main(int argc, char** argv)
     if ( tmp == nullptr )
         throw std::runtime_error("WOLF_ROOT environment not loaded.");
 
-    std::string wolf_path( tmp );
-    std::cout << "Wolf path: " << wolf_path << std::endl;
+    std::string wolf_root( tmp );
+    std::cout << "Wolf root: " << wolf_root << std::endl;
 
     ProblemPtr wolf_problem_ = Problem::create(FRM_PO_3D);
 
@@ -134,14 +134,14 @@ int main(int argc, char** argv)
 
     // SENSOR
     // one-liner API
-    SensorBasePtr sensor_ptr = wolf_problem_->installSensor("CAMERA", "PinHole", Eigen::VectorXs::Zero(7), wolf_path + "/src/examples/camera_params.yaml");
+    SensorBasePtr sensor_ptr = wolf_problem_->installSensor("CAMERA", "PinHole", Eigen::VectorXs::Zero(7), wolf_root + "/src/examples/camera_params.yaml");
     shared_ptr<SensorCamera> camera_ptr = static_pointer_cast<SensorCamera>(sensor_ptr);
     camera_ptr->setImgWidth(img_width);
     camera_ptr->setImgHeight(img_height);
 
     // PROCESSOR
     // one-liner API
-    ProcessorImageFeature::Ptr prc_img_ptr = std::static_pointer_cast<ProcessorImageFeature>( wolf_problem_->installProcessor("IMAGE FEATURE", "ORB", "PinHole", wolf_path + "/src/examples/processor_image_ORB.yaml") );
+    ProcessorImageFeature::Ptr prc_img_ptr = std::static_pointer_cast<ProcessorImageFeature>( wolf_problem_->installProcessor("IMAGE FEATURE", "ORB", "PinHole", wolf_root + "/src/examples/processor_image_ORB.yaml") );
     prc_img_ptr->setup(camera_ptr);
     std::cout << "sensor & processor created and added to wolf problem" << std::endl;
     //=====================================================
diff --git a/src/examples/test_processor_image_landmark.cpp b/src/examples/test_processor_image_landmark.cpp
index aae584df20500f02ba5992e14242520665819793..7f4f5829cb3671f00c0b73868f6dbc0b31edd881 100644
--- a/src/examples/test_processor_image_landmark.cpp
+++ b/src/examples/test_processor_image_landmark.cpp
@@ -66,15 +66,15 @@ int main(int argc, char** argv)
     //=====================================================
 
 
-    //=====================================================
-    // Environment variable for configuration files
-    char const* tmp = std::getenv( "WOLF_ROOT" );
-    if ( tmp == nullptr )
-        throw std::runtime_error("WOLF_ROOT environment not loaded.");
-    std::string wolf_path( tmp );
-    std::cout << "Wolf path: " << wolf_path << std::endl;
-    //=====================================================
-
+//    //=====================================================
+//    // Environment variable for configuration files
+//    char const* tmp = std::getenv( "WOLF_ROOT" );
+//    if ( tmp == nullptr )
+//        throw std::runtime_error("WOLF_ROOT environment not loaded.");
+//    std::string wolf_root( tmp );
+//    std::cout << "Wolf root: " << wolf_root << std::endl;
+//    //=====================================================
+    GET_WOLF_ROOT
 
 
     //=====================================================
@@ -82,16 +82,16 @@ int main(int argc, char** argv)
     ProblemPtr wolf_problem_ptr_ = Problem::create(FRM_PO_3D);
 
     // CAMERA SENSOR
-    SensorBasePtr sensor_ptr = wolf_problem_ptr_->installSensor("CAMERA", "PinHole", (Vector7s()<<0,0,0,0,0,0,1).finished(), wolf_path + "/src/examples/camera_params.yaml");
+    SensorBasePtr sensor_ptr = wolf_problem_ptr_->installSensor("CAMERA", "PinHole", (Vector7s()<<0,0,0,0,0,0,1).finished(), wolf_root + "/src/examples/camera_params.yaml");
     SensorCamera::Ptr camera_ptr = std::static_pointer_cast<SensorCamera>(sensor_ptr);
     camera_ptr->setImgWidth(img_width);
     camera_ptr->setImgHeight(img_height);
 
     // IMAGE PROCESSOR
-    wolf_problem_ptr_->installProcessor("IMAGE LANDMARK", "ORB", "PinHole", wolf_path + "/src/examples/processor_image_ORB.yaml");
+    wolf_problem_ptr_->installProcessor("IMAGE LANDMARK", "ORB", "PinHole", wolf_root + "/src/examples/processor_image_ORB.yaml");
 
     // ODOM SENSOR AND PROCESSOR
-    SensorBasePtr sen_ptr = wolf_problem_ptr_->installSensor("ODOM 3D", "odom", (Vector7s()<<0,0,0,0,0,0,1).finished(), wolf_path + "/src/examples/odom_3D.yaml");
+    SensorBasePtr sen_ptr = wolf_problem_ptr_->installSensor("ODOM 3D", "odom", (Vector7s()<<0,0,0,0,0,0,1).finished(), wolf_root + "/src/examples/odom_3D.yaml");
     ProcessorBasePtr prc_ptr = wolf_problem_ptr_->installProcessor("ODOM 3D", "odometry integrator", "odom");
     SensorOdom3D::Ptr sen_odo_ptr = std::static_pointer_cast<SensorOdom3D>(sen_ptr);
     //=====================================================
diff --git a/src/examples/test_processor_odom_3D.cpp b/src/examples/test_processor_odom_3D.cpp
index 464760f2aaa83609cc7da8ffba318bba0af2126b..89646f3b588fa5b8b2555813ce1f408744fb3587 100644
--- a/src/examples/test_processor_odom_3D.cpp
+++ b/src/examples/test_processor_odom_3D.cpp
@@ -31,14 +31,15 @@ int main (int argc, char** argv)
 {
     cout << "\n========= Test ProcessorOdom3D ===========" << endl;
 
-    //=====================================================
-    // Environment variable for configuration files
-    char const* tmp = std::getenv( "WOLF_ROOT" );
-    if ( tmp == nullptr )
-        throw std::runtime_error("WOLF_ROOT environment not loaded.");
-    std::string wolf_path( tmp );
-    std::cout << "Wolf path: " << wolf_path << std::endl;
-    //=====================================================
+//    //=====================================================
+//    // Environment variable for configuration files
+//    char const* tmp = std::getenv( "WOLF_ROOT" );
+//    if ( tmp == nullptr )
+//        throw std::runtime_error("WOLF_ROOT environment not loaded.");
+//    std::string wolf_root( tmp );
+//    std::cout << "Wolf root: " << wolf_root << std::endl;
+//    //=====================================================
+    GET_WOLF_ROOT
 
 
     TimeStamp tf;
@@ -54,7 +55,7 @@ int main (int argc, char** argv)
     ProblemPtr problem = Problem::create(FRM_PO_3D);
     CeresManager ceres_manager(problem);
 
-    SensorBasePtr sen = problem->installSensor("ODOM 3D", "odom", (Vector7s()<<0,0,0,0,0,0,1).finished(), wolf_path + "/src/examples/odom_3D.yaml");
+    SensorBasePtr sen = problem->installSensor("ODOM 3D", "odom", (Vector7s()<<0,0,0,0,0,0,1).finished(), wolf_root + "/src/examples/odom_3D.yaml");
     problem->installProcessor("ODOM 3D", "odometry integrator", "odom");
     problem->getProcessorMotionPtr()->setOrigin((Vector7s()<<0,0,0,0,0,0,1).finished(), TimeStamp(0));
 
diff --git a/src/wolf.h b/src/wolf.h
index 510ea843e171f3697821b384524b1403a9d256f2..7d1bfd7edc1a13631c0ea9ef95b8e51e213a7c62 100644
--- a/src/wolf.h
+++ b/src/wolf.h
@@ -415,6 +415,20 @@ inline const Eigen::Vector3s gravity(void) {
     return Eigen::Vector3s(0,0,-9.8);
 }
 
+//===================================================
+// Some macros
+
+//=====================================================
+// Environment variable for configuration files
+// this sets the local variable wolf_root from the environment variable WOLF_ROOT
+#define GET_WOLF_ROOT \
+char const* tmp = std::getenv( "WOLF_ROOT" ); \
+if ( tmp == nullptr ) \
+    throw std::runtime_error("WOLF_ROOT environment not loaded."); \
+std::string wolf_root( tmp ); \
+std::cout << "Wolf root: " << wolf_root << " set at variable 'wolf_root'." << std::endl;
+//=====================================================
+
 
 } // namespace wolf