commit ea068cf1895f60473f109326def6bff27dd7e4e3
Author: sschulz <sschulz@techfak.uni-bielefeld.de>
Date:   Mon Feb 22 11:04:00 2016 +0100

    cleaning up and naming convention

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8c2481f..71013ba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,15 @@ set(ROS_BUILD_TYPE Debug)
 
 ################################################################
 # check for ROS support:
-find_package(catkin REQUIRED COMPONENTS roscpp std_msgs sensor_msgs message_generation genmsg)
+find_package(catkin REQUIRED COMPONENTS
+    roscpp
+    std_msgs
+    sensor_msgs
+    message_generation
+    genmsg
+    dynamic_reconfigure
+)
+
 IF (NOT catkin_FOUND)
   MESSAGE(FATAL_ERROR "Error: could not find ROS middleware!")
 ENDIF (NOT catkin_FOUND)
@@ -57,6 +65,10 @@ generate_messages(
         humotion
 )
 
+# add dynamic reconfigure api
+generate_dynamic_reconfigure_options(
+  cfg/humotion.cfg
+)
 
 #
 ###################################
@@ -93,7 +105,7 @@ include_directories(${catkin_INCLUDE_DIRS})
 #link_directories (${Boost_LIBRARY_DIRS} ${REFLEXXES_LIBRARY_DIRS} ${catkin_LIBRARY_DIRS})
 
 ## Declare a cpp library
-add_library(humotion
+add_library(${PROJECT_NAME}
     src/mouth_state.cpp
     src/gaze_state.cpp
 
@@ -123,16 +135,16 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
 
 ## Add cmake target dependencies of the executable/library
 ## as an example, message headers may need to be generated before nodes
-add_dependencies(humotion ${catkin_EXPORTED_TARGETS} humotion_gencpp)
+add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_gencpp ${PROJECT_NAME}_gencfg)
 
 ## Specify libraries to link a library or executable target against
-target_link_libraries(humotion
+target_link_libraries(${PROJECT_NAME}
     ${Boost_LIBRARIES}
     ${catkin_LIBRARIES}
     ${REFLEXXES_LIBRARY}
 )
 
-set_property(TARGET humotion PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
+set_property(TARGET ${PROJECT_NAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
 
 #############
 ## Install ##
@@ -149,7 +161,7 @@ set_property(TARGET humotion PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
 # )
 
 ## Mark executables and/or libraries for installation
-install(TARGETS humotion
+install(TARGETS ${PROJECT_NAME}
     ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
     LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
     RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
@@ -197,7 +209,7 @@ CPPLINT_RECURSIVE(cpplint_src
   ${CMAKE_CURRENT_SOURCE_DIR}/src
   ${CMAKE_CURRENT_SOURCE_DIR}/src
   ${CMAKE_CURRENT_BINARY_DIR}/src)
-add_dependencies(humotion cpplint_src cpplint_include)
+add_dependencies(${PROJECT_NAME} cpplint_src cpplint_include)
 
 #workaround for qtcreator ide integration. do not remove!
 file(GLOB_RECURSE NODE_DUMMY_TARGETS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h *.cfg *.yaml *.xml *.launch)
diff --git a/include/humotion/client/client.h b/include/humotion/client/client.h
index aa00377..9adc471 100644
--- a/include/humotion/client/client.h
+++ b/include/humotion/client/client.h
@@ -52,7 +52,7 @@ class Client {
 
 
  private:
-    Middleware *middleware;
+    Middleware *middleware_;
 };
 
 }  // namespace client
diff --git a/include/humotion/client/middleware.h b/include/humotion/client/middleware.h
index 209bb7c..5fdaf5a 100644
--- a/include/humotion/client/middleware.h
+++ b/include/humotion/client/middleware.h
@@ -53,9 +53,9 @@ class Middleware {
     virtual void tick() = 0;
 
  protected:
-    MouthState mouth_state;
-    GazeState gaze_state;
-    std::string base_scope;
+    MouthState mouth_state_;
+    GazeState gaze_state_;
+    std::string base_scope_;
 };
 
 }  // namespace client
diff --git a/include/humotion/client/middleware_ros.h b/include/humotion/client/middleware_ros.h
index 1d6ea5e..30e49a1 100644
--- a/include/humotion/client/middleware_ros.h
+++ b/include/humotion/client/middleware_ros.h
@@ -48,10 +48,10 @@ class MiddlewareROS : public Middleware {
     void tick();
 
  private:
-    bool tick_necessary;
+    bool tick_necessary_;
 
-    ros::Publisher mouth_target_publisher;
-    ros::Publisher gaze_target_publisher;
+    ros::Publisher mouth_target_publisher_;
+    ros::Publisher gaze_target_publisher_;
 };
 
 }  // namespace client
diff --git a/include/humotion/server/controller.h b/include/humotion/server/controller.h
index 729fd86..cca33d3 100644
--- a/include/humotion/server/controller.h
+++ b/include/humotion/server/controller.h
@@ -53,18 +53,20 @@ class Controller {
     void set_activated(void);
 
  private:
-    bool activated;
     void add_motion_generator(MotionGenerator *m);
     GazeState relative_gaze_to_absolute_gaze(GazeState relative);
 
     typedef std::vector<MotionGenerator *> motion_generator_vector_t;
-    motion_generator_vector_t motion_generator_vector;
-    JointInterface *joint_interface;
+    motion_generator_vector_t motion_generator_vector_;
 
-    Timestamp last_known_absolute_timestamp;
-    double last_known_absolute_target_pan;
-    double last_known_absolute_target_tilt;
-    double last_known_absolute_target_roll;
+    JointInterface *joint_interface_;
+
+    bool activated_;
+
+    Timestamp last_known_absolute_timestamp_;
+    double last_known_absolute_target_pan_;
+    double last_known_absolute_target_tilt_;
+    double last_known_absolute_target_roll_;
 };
 
 }  // namespace server
diff --git a/include/humotion/server/eye_motion_generator.h b/include/humotion/server/eye_motion_generator.h
index 155ee1f..b909823 100644
--- a/include/humotion/server/eye_motion_generator.h
+++ b/include/humotion/server/eye_motion_generator.h
@@ -48,9 +48,9 @@ class EyeMotionGenerator : public GazeMotionGenerator {
     void setup_eyemotion(int dof, float target, float current_position,
                          float current_velocity, Timestamp timestamp);
 
-    TimestampedList tsl_gaze_target_pan;
-    TimestampedList tsl_gaze_target_tilt;
-    TimestampedList tsl_gaze_target_vergence;
+    TimestampedList tsl_gaze_target_pan_;
+    TimestampedList tsl_gaze_target_tilt_;
+    TimestampedList tsl_gaze_target_vergence_;
 };
 
 }  // namespace server
diff --git a/include/humotion/server/eyelid_motion_generator.h b/include/humotion/server/eyelid_motion_generator.h
index 373340b..d417117 100644
--- a/include/humotion/server/eyelid_motion_generator.h
+++ b/include/humotion/server/eyelid_motion_generator.h
@@ -47,18 +47,6 @@ class EyelidMotionGenerator : public EyeMotionGenerator {
 
 
  private:
-    bool saccade_blink_active;
-    bool saccade_blink_requested;
-
-    enum SIDE_ID {
-        LEFT = 0,
-        RIGHT,
-        SIDE_ID_SIZE
-    };
-
-    bool eyeblink_active[SIDE_ID_SIZE];
-    bool eyelid_closed[SIDE_ID_SIZE];
-
     void start_external_eyeblinks(int duration_left, int duration_right);
     void process_saccadic_eyeblinks();
     void process_periodic_eyeblinks();
@@ -69,15 +57,27 @@ class EyelidMotionGenerator : public EyeMotionGenerator {
 
     void close_eyelid(int joint_id);
 
+    enum SIDE_ID {
+        LEFT = 0,
+        RIGHT,
+        SIDE_ID_SIZE
+    };
+
+    bool saccade_blink_active_;
+    bool saccade_blink_requested_;
+
+    bool eyeblink_active_[SIDE_ID_SIZE];
+    bool eyelid_closed_[SIDE_ID_SIZE];
+
     static const float SACCADE_SPEED_THRESHOLD;
     static const float EYEBLINK_DURATION_MS;
     static const float EYEBLINK_EYERY_MS_MIN;
     static const float EYEBLINK_EYERY_MS_MAX;
     static const float EYEBLINK_BLOCKING_TIME;
 
-    boost::system_time periodic_blink_start_time;
-    boost::system_time eyeblink_timeout[SIDE_ID_SIZE];
-    boost::system_time eyeblink_blocked_timeout;
+    boost::system_time periodic_blink_start_time_;
+    boost::system_time eyeblink_timeout_[SIDE_ID_SIZE];
+    boost::system_time eyeblink_blocked_timeout_;
 };
 
 }  // namespace server
diff --git a/include/humotion/server/joint_interface.h b/include/humotion/server/joint_interface.h
index bb77199..a39fc51 100644
--- a/include/humotion/server/joint_interface.h
+++ b/include/humotion/server/joint_interface.h
@@ -84,7 +84,7 @@ class JointInterface {
 
     unsigned int get_and_clear_incoming_position_count();
 
-    enum JOINT_ID_ENUM {
+    enum JOINT_ID_ENUM{
         ZERO = 0,
         ID_LIP_LEFT_UPPER,
         ID_LIP_LEFT_LOWER,
@@ -126,14 +126,14 @@ class JointInterface {
     float joint_target_position_[JOINT_ID_ENUM_SIZE];
     float joint_target_velocity_[JOINT_ID_ENUM_SIZE];
 
-    boost::mutex joint_ts_position_map_access_mutex;
-    boost::mutex joint_ts_speed_map_access_mutex;
-    joint_tsl_map_t joint_ts_position_map;
-    joint_tsl_map_t joint_ts_speed_map;
+    boost::mutex joint_ts_position_map_access_mutex_;
+    boost::mutex joint_ts_speed_map_access_mutex_;
+    joint_tsl_map_t joint_ts_position_map_;
+    joint_tsl_map_t joint_ts_speed_map_;
 
-    bool mouth_enabled;
-    bool gaze_enabled;
-    unsigned int incoming_position_count;
+    bool mouth_enabled_;
+    bool gaze_enabled_;
+    unsigned int incoming_position_count_;
 };
 
 }  // namespace server
diff --git a/include/humotion/server/middleware.h b/include/humotion/server/middleware.h
index 340f112..e58d2f6 100644
--- a/include/humotion/server/middleware.h
+++ b/include/humotion/server/middleware.h
@@ -48,8 +48,8 @@ class Middleware {
     virtual void tick() = 0;
 
  protected:
-    Controller *controller;
-    std::string base_scope;
+    Controller *controller_;
+    std::string base_scope_;
 };
 
 }  // namespace server
diff --git a/include/humotion/server/middleware_ros.h b/include/humotion/server/middleware_ros.h
index 89eca3d..559d376 100644
--- a/include/humotion/server/middleware_ros.h
+++ b/include/humotion/server/middleware_ros.h
@@ -29,10 +29,13 @@
 #define INCLUDE_HUMOTION_SERVER_MIDDLEWARE_ROS_H_
 
 #include <boost/shared_ptr.hpp>
+#include <dynamic_reconfigure/server.h>
 #include <ros/ros.h>
+
 #include <string>
 
 #include "humotion/gaze.h"
+#include "humotion/humotionConfig.h"
 #include "humotion/mouth.h"
 #include "humotion/server/middleware.h"
 
@@ -46,13 +49,19 @@ class MiddlewareROS : public Middleware {
     bool ok();
     void tick();
 
+    void dynamic_reconfigure_callback(const humotion::humotionConfig &config, uint32_t level);
+
  private:
-    bool tick_necessary;
     void incoming_mouth_target(const humotion::mouth::ConstPtr& msg);
     void incoming_gaze_target(const humotion::gaze::ConstPtr& msg);
+    void attach_to_reconfiguration_server(ros::NodeHandle priv_nodehandle);
+
+
+    bool tick_necessary_;
 
-    ros::Subscriber mouth_target_subscriber;
-    ros::Subscriber gaze_target_subscriber;
+    ros::Subscriber mouth_target_subscriber_;
+    ros::Subscriber gaze_target_subscriber_;
+    dynamic_reconfigure::Server<humotion::humotionConfig> *reconf_server_;
 };
 
 }  // namespace server
diff --git a/include/humotion/server/motion_generator.h b/include/humotion/server/motion_generator.h
index 7bcc3e9..469e834 100644
--- a/include/humotion/server/motion_generator.h
+++ b/include/humotion/server/motion_generator.h
@@ -53,18 +53,18 @@ class MotionGenerator {
     float get_current_speed(int joint_id);
     humotion::Timestamp get_timestamped_state(int joint_id, float *position, float *velocity);
     float limit_target(int joint_id, float val);
+    bool mouth_target_input_active();
+    bool gaze_target_input_active();
 
-    JointInterface *joint_interface;
+    JointInterface *joint_interface_;
 
     // gaze
-    GazeState  requested_gaze_state;
-    boost::system_time last_gaze_target_update;
-    bool gaze_target_input_active();
+    GazeState  requested_gaze_state_;
+    boost::system_time last_gaze_target_update_;
 
     // mouth
-    MouthState requested_mouth_target;
-    boost::system_time last_mouth_target_update;
-    bool mouth_target_input_active();
+    MouthState requested_mouth_target_;
+    boost::system_time last_mouth_target_update_;
 };
 
 }  // namespace server
diff --git a/include/humotion/server/neck_motion_generator.h b/include/humotion/server/neck_motion_generator.h
index a9381dd..579c930 100644
--- a/include/humotion/server/neck_motion_generator.h
+++ b/include/humotion/server/neck_motion_generator.h
@@ -44,15 +44,15 @@ class NeckMotionGenerator : public GazeMotionGenerator {
  private:
     float get_breath_offset();
 
-    GazeState previous_neck_target;
-    GazeState  requested_neck_state;
-    bool neck_saccade_reached_goal;
-    bool neck_saccade_active;
+    GazeState previous_neck_target_;
+    GazeState  requested_neck_state_;
+    bool neck_saccade_reached_goal_;
+    bool neck_saccade_active_;
+    float breath_time_;
 
     static const float CONST_GUITTON87_A;
     static const float CONST_GUITTON87_B;
 
-    float breath_time;
     static const float CONST_BREATH_PERIOD;
     static const float CONST_BREATH_AMPLITUDE;
 };
diff --git a/include/humotion/server/server.h b/include/humotion/server/server.h
index a661845..3112f2e 100644
--- a/include/humotion/server/server.h
+++ b/include/humotion/server/server.h
@@ -51,11 +51,11 @@ class Server {
  private:
     void start_motion_generation_thread();
     void motion_generation_thread();
-    boost::thread *motion_generation_thread_ptr;
+    boost::thread *motion_generation_thread_ptr_;
 
-    Middleware *middleware;
-    Controller *controller;
-    JointInterface *joint_interface;
+    Middleware *middleware_;
+    Controller *controller_;
+    JointInterface *joint_interface_;
 };
 
 }  // namespace server
diff --git a/include/humotion/timestamped_list.h b/include/humotion/timestamped_list.h
index a78e9c1..0daf71b 100644
--- a/include/humotion/timestamped_list.h
+++ b/include/humotion/timestamped_list.h
@@ -53,9 +53,9 @@ class TimestampedList {
     Timestamp get_first_timestamp();
 
  private:
-    mutable boost::mutex access_mutex;
+    mutable boost::mutex access_mutex_;
     float interpolate(TimestampedFloat a, TimestampedFloat b, Timestamp timestamp);
-    timestamped_float_list_t tsf_list;
+    timestamped_float_list_t tsf_list_;
 };
 
 }  // namespace humotion
diff --git a/src/client/client.cpp b/src/client/client.cpp
index 46b3745..8d08930 100644
--- a/src/client/client.cpp
+++ b/src/client/client.cpp
@@ -46,7 +46,7 @@ Client::Client(std::string scope, std::string mw) {
 
     // start middleware
     if (mw == "ROS") {
-        middleware = new humotion::client::MiddlewareROS(scope);
+        middleware_ = new humotion::client::MiddlewareROS(scope);
     } else {
         printf("> ERROR: invalid mw '%s' given. RSB support was droppd. please use ROS\n\n",
                mw.c_str());
@@ -61,31 +61,31 @@ Client::~Client() {
 //! check if connection is ok
 //! \return true if conn is alive
 bool Client::ok() {
-    return middleware->ok();
+    return middleware_->ok();
 }
 
 //! do a single middleware tick:
 void Client::tick() {
-    middleware->tick();
+    middleware_->tick();
 }
 
 //! set mouth position
 //! \param MouthState m to set
 //! \param send data to server (optional, use manual call to send_*() to trigger update on server)
 void Client::update_mouth_target(MouthState m, bool send) {
-    middleware->update_mouth_target(m, send);
+    middleware_->update_mouth_target(m, send);
 }
 
 //! set gaze direction
 //! \param GazeState m to set
 //! \param send data to server (optional, use manual call to send_*() to trigger update on server)
 void Client::update_gaze_target(GazeState s, bool send) {
-    middleware->update_gaze_target(s, send);
+    middleware_->update_gaze_target(s, send);
 }
 
 
 //! send all targets to server
 void Client::send_all() {
-    middleware->send_all();
+    middleware_->send_all();
 }
 
diff --git a/src/client/middleware.cpp b/src/client/middleware.cpp
index cdbc039..0ad84ec 100644
--- a/src/client/middleware.cpp
+++ b/src/client/middleware.cpp
@@ -37,7 +37,7 @@ using humotion::client::Middleware;
 //! constructor
 //! open a new Middleware instance.
 Middleware::Middleware(std::string scope) {
-    base_scope = scope;
+    base_scope_ = scope;
 }
 
 //! destructor
@@ -49,7 +49,7 @@ Middleware::~Middleware() {
 //! \param MouthState m to set
 //! \param send data to server (optional, use manual call to send_*() to trigger update on server)
 void Middleware::update_mouth_target(MouthState m, bool send) {
-    mouth_state = m;
+    mouth_state_ = m;
     if (send) {
         send_mouth_target();
     }
@@ -59,7 +59,7 @@ void Middleware::update_mouth_target(MouthState m, bool send) {
 //! \param GazeState m to set
 //! \param send data to server (optional, use manual call to send_*() to trigger update on server)
 void Middleware::update_gaze_target(GazeState s, bool send) {
-    gaze_state = s;
+    gaze_state_ = s;
     if (send) {
         send_gaze_target();
     }
diff --git a/src/client/middleware_ros.cpp b/src/client/middleware_ros.cpp
index a23b8e6..9247baa 100644
--- a/src/client/middleware_ros.cpp
+++ b/src/client/middleware_ros.cpp
@@ -42,24 +42,24 @@ using humotion::client::MiddlewareROS;
 MiddlewareROS::MiddlewareROS(std::string scope) : Middleware(scope) {
     // start ros core
     if (!ros::isInitialized()) {
-        tick_necessary = true;
-        std::string node_name = "humotion_client__"+ base_scope;
+        tick_necessary_ = true;
+        std::string node_name = "humotion_client__"+ base_scope_;
         node_name.erase(std::remove(node_name.begin(), node_name.end(), '/'), node_name.end());
 
         ros::M_string no_remapping;
         ros::init(no_remapping, node_name);
     } else {
         // another ros thread already takes care of spinning
-        tick_necessary = false;
+        tick_necessary_ = false;
     }
 
     // create node handle
     ros::NodeHandle n;
 
     // set up publishers
-    mouth_target_publisher = n.advertise<humotion::mouth>(base_scope +
+    mouth_target_publisher_ = n.advertise<humotion::mouth>(base_scope_ +
                                                           "/humotion/mouth/target", 100);
-    gaze_target_publisher  = n.advertise<humotion::gaze>(base_scope +
+    gaze_target_publisher_  = n.advertise<humotion::gaze>(base_scope_ +
                                                          "/humotion/gaze/target", 100);
 }
 
@@ -75,7 +75,7 @@ bool MiddlewareROS::ok() {
 
 //! do a single tick
 void MiddlewareROS::tick() {
-    if (tick_necessary) {
+    if (tick_necessary_) {
         ros::spinOnce();
     }
 }
@@ -89,17 +89,17 @@ void MiddlewareROS::send_mouth_target() {
     // set timestamp
     msg.header.stamp = ros::Time::now();
 
-    msg.position.left   = mouth_state.position_left;
-    msg.position.center = mouth_state.position_center;
-    msg.position.right  = mouth_state.position_right;
+    msg.position.left   = mouth_state_.position_left;
+    msg.position.center = mouth_state_.position_center;
+    msg.position.right  = mouth_state_.position_right;
 
-    msg.opening.left   = mouth_state.opening_left;
-    msg.opening.center = mouth_state.opening_center;
-    msg.opening.right  = mouth_state.opening_right;
+    msg.opening.left   = mouth_state_.opening_left;
+    msg.opening.center = mouth_state_.opening_center;
+    msg.opening.right  = mouth_state_.opening_right;
 
 
     // add position to send queue
-    mouth_target_publisher.publish(msg);
+    mouth_target_publisher_.publish(msg);
 
     // allow ros to handle data
     tick();
@@ -113,34 +113,34 @@ void MiddlewareROS::send_gaze_target() {
     // set timestamp
     msg.header.stamp = ros::Time::now();
 
-    msg.pan   = gaze_state.pan;
-    msg.tilt  = gaze_state.tilt;
-    msg.roll  = gaze_state.roll;
-    msg.vergence = gaze_state.vergence;
+    msg.pan   = gaze_state_.pan;
+    msg.tilt  = gaze_state_.tilt;
+    msg.roll  = gaze_state_.roll;
+    msg.vergence = gaze_state_.vergence;
 
-    msg.pan_offset = gaze_state.pan_offset;
-    msg.tilt_offset = gaze_state.tilt_offset;
-    msg.roll_offset = gaze_state.roll_offset;
+    msg.pan_offset = gaze_state_.pan_offset;
+    msg.tilt_offset = gaze_state_.tilt_offset;
+    msg.roll_offset = gaze_state_.roll_offset;
 
-    msg.eyelid_opening_upper = gaze_state.eyelid_opening_upper;
-    msg.eyelid_opening_lower = gaze_state.eyelid_opening_lower;
+    msg.eyelid_opening_upper = gaze_state_.eyelid_opening_upper;
+    msg.eyelid_opening_lower = gaze_state_.eyelid_opening_lower;
 
-    msg.eyebrow_left = gaze_state.eyebrow_left;
-    msg.eyebrow_right = gaze_state.eyebrow_right;
+    msg.eyebrow_left = gaze_state_.eyebrow_left;
+    msg.eyebrow_right = gaze_state_.eyebrow_right;
 
-    msg.eyeblink_request_left = gaze_state.eyeblink_request_left;
-    msg.eyeblink_request_right = gaze_state.eyeblink_request_right;
+    msg.eyeblink_request_left = gaze_state_.eyeblink_request_left;
+    msg.eyeblink_request_right = gaze_state_.eyeblink_request_right;
 
-    if (gaze_state.gaze_type == GazeState::GAZETYPE_ABSOLUTE) {
+    if (gaze_state_.gaze_type == GazeState::GAZETYPE_ABSOLUTE) {
         msg.gaze_type = humotion::gaze::GAZETYPE_ABSOLUTE;
     } else {
         msg.gaze_type = humotion::gaze::GAZETYPE_RELATIVE;
     }
-    msg.gaze_timestamp.sec = gaze_state.timestamp.sec;
-    msg.gaze_timestamp.nsec = gaze_state.timestamp.nsec;
+    msg.gaze_timestamp.sec = gaze_state_.timestamp.sec;
+    msg.gaze_timestamp.nsec = gaze_state_.timestamp.nsec;
 
     // add position to send queue
-    gaze_target_publisher.publish(msg);
+    gaze_target_publisher_.publish(msg);
 
     // allow ros to handle data
     tick();
diff --git a/src/server/controller.cpp b/src/server/controller.cpp
index 3cb1e23..0638078 100644
--- a/src/server/controller.cpp
+++ b/src/server/controller.cpp
@@ -40,8 +40,9 @@
 using humotion::server::Controller;
 
 //! constructor
-Controller::Controller(JointInterface *j) : activated(false) {
-    joint_interface = j;
+Controller::Controller(JointInterface *j) {
+    activated_ = false;
+    joint_interface_ = j;
 }
 
 //! destructor
@@ -54,30 +55,30 @@ void Controller::init_motion_generators() {
     //       (i.e. the neck generator must be added after the eye generator!)
 
     // eye motion generation:
-    add_motion_generator(new EyeMotionGenerator(joint_interface));
+    add_motion_generator(new EyeMotionGenerator(joint_interface_));
 
     // eyelid motion generator
-    add_motion_generator(new EyelidMotionGenerator(joint_interface));
+    add_motion_generator(new EyelidMotionGenerator(joint_interface_));
 
     // neck motion generator
-    add_motion_generator(new NeckMotionGenerator(joint_interface));
+    add_motion_generator(new NeckMotionGenerator(joint_interface_));
 
     // mouth motion generator
-    add_motion_generator(new MouthMotionGenerator(joint_interface));
+    add_motion_generator(new MouthMotionGenerator(joint_interface_));
 
     // eyebrow motion generator
-    add_motion_generator(new EyebrowMotionGenerator(joint_interface));
+    add_motion_generator(new EyebrowMotionGenerator(joint_interface_));
 }
 
 //! add a single motion genrator
 void Controller::add_motion_generator(MotionGenerator *m) {
-    motion_generator_vector.push_back(m);
+    motion_generator_vector_.push_back(m);
 }
 
 //! calculate target angles for all motion generators:
 void Controller::calculate_targets() {
     Controller::motion_generator_vector_t::iterator it;
-    for (it = motion_generator_vector.begin(); it < motion_generator_vector.end(); it++) {
+    for (it = motion_generator_vector_.begin(); it < motion_generator_vector_.end(); it++) {
         (*it)->calculate_targets();
     }
 }
@@ -86,7 +87,7 @@ void Controller::calculate_targets() {
 //! NOTE: this is done in an extra loop to have a low delay between consequent sets:
 void Controller::publish_targets() {
     Controller::motion_generator_vector_t::iterator it;
-    for (it = motion_generator_vector.begin(); it < motion_generator_vector.end(); it++) {
+    for (it = motion_generator_vector_.begin(); it < motion_generator_vector_.end(); it++) {
         (*it)->publish_targets();
     }
 }
@@ -102,7 +103,7 @@ humotion::GazeState Controller::relative_gaze_to_absolute_gaze(humotion::GazeSta
 
     // check if this timestamp allows a valid conversion:
     Timestamp history_begin =
-            joint_interface->get_ts_position(JointInterface::ID_NECK_PAN).get_first_timestamp();
+            joint_interface_->get_ts_position(JointInterface::ID_NECK_PAN).get_first_timestamp();
     // Timestamp history_end   =
     //       joint_interface->get_ts_position(JointInterface::ID_NECK_PAN).get_last_timestamp();
 
@@ -115,40 +116,40 @@ humotion::GazeState Controller::relative_gaze_to_absolute_gaze(humotion::GazeSta
         // to do any guesswork and try to calculate a valid absolute target
         // therefore we will use the last known targets (see below)
         // in case we did not see this timestamp before, show a warning:
-        if (last_known_absolute_timestamp != relative_target_timestamp) {
+        if (last_known_absolute_timestamp_ != relative_target_timestamp) {
             printf("> WARNING: restored/guessed absolute target for unknown timestamp %f "
                    "[this should not happen]\n", relative_target_timestamp.to_seconds());
-            last_known_absolute_target_pan = 0.0;
-            last_known_absolute_target_tilt = 0.0;
-            last_known_absolute_target_roll = 0.0;
+            last_known_absolute_target_pan_ = 0.0;
+            last_known_absolute_target_tilt_ = 0.0;
+            last_known_absolute_target_roll_ = 0.0;
         }
     } else {
         // all fine, we can reconstruct the absolute target
         // fetch head / camera pose during that timestamp
-        double neck_pan  = joint_interface->get_ts_position(
+        double neck_pan  = joint_interface_->get_ts_position(
                 JointInterface::ID_NECK_PAN).get_interpolated_value(relative_target_timestamp);
-        double eye_l_pan = joint_interface->get_ts_position(
+        double eye_l_pan = joint_interface_->get_ts_position(
                 JointInterface::ID_EYES_LEFT_LR).get_interpolated_value(relative_target_timestamp);
-        double eye_r_pan = joint_interface->get_ts_position(
+        double eye_r_pan = joint_interface_->get_ts_position(
                 JointInterface::ID_EYES_RIGHT_LR).get_interpolated_value(relative_target_timestamp);
-        last_known_absolute_target_pan       = neck_pan + (eye_l_pan + eye_r_pan)/2.0;
+        last_known_absolute_target_pan_       = neck_pan + (eye_l_pan + eye_r_pan)/2.0;
         //
-        double neck_tilt = joint_interface->get_ts_position(
+        double neck_tilt = joint_interface_->get_ts_position(
                 JointInterface::ID_NECK_TILT).get_interpolated_value(relative_target_timestamp);
-        double eye_tilt  = joint_interface->get_ts_position(
+        double eye_tilt  = joint_interface_->get_ts_position(
                 JointInterface::ID_EYES_BOTH_UD).get_interpolated_value(relative_target_timestamp);
-        last_known_absolute_target_tilt      = neck_tilt + eye_tilt;
+        last_known_absolute_target_tilt_      = neck_tilt + eye_tilt;
         //
-        last_known_absolute_target_roll      = joint_interface->get_ts_position(
+        last_known_absolute_target_roll_      = joint_interface_->get_ts_position(
                 JointInterface::ID_NECK_ROLL).get_interpolated_value(relative_target_timestamp);
 
         // safe this timestamp as known:
-        last_known_absolute_timestamp = relative_target_timestamp;
+        last_known_absolute_timestamp_ = relative_target_timestamp;
     }
 
-    pan  = last_known_absolute_target_pan;
-    tilt = last_known_absolute_target_tilt;
-    roll = last_known_absolute_target_roll;
+    pan  = last_known_absolute_target_pan_;
+    tilt = last_known_absolute_target_tilt_;
+    roll = last_known_absolute_target_roll_;
 
     // substract offsets
     pan  -= relative.pan_offset;
@@ -176,13 +177,13 @@ humotion::GazeState Controller::relative_gaze_to_absolute_gaze(humotion::GazeSta
 
 //! activate controller
 void Controller::set_activated(void) {
-    activated = true;
+    activated_ = true;
 }
 
 //! update gaze target:
 //! \param GazeState with target values for the overall gaze
 void Controller::set_gaze_target(humotion::GazeState new_gaze_target) {
-    if (!activated) {
+    if (!activated_) {
         // not yet initialized, ignore incoming targets
         return;
     }
@@ -200,7 +201,7 @@ void Controller::set_gaze_target(humotion::GazeState new_gaze_target) {
     }
 
     Controller::motion_generator_vector_t::iterator it;
-    for (it = motion_generator_vector.begin(); it < motion_generator_vector.end(); it++) {
+    for (it = motion_generator_vector_.begin(); it < motion_generator_vector_.end(); it++) {
         (*it)->set_gaze_target(target_gaze);
     }
 }
@@ -208,13 +209,13 @@ void Controller::set_gaze_target(humotion::GazeState new_gaze_target) {
 //! update mouth state:
 //! \param MouthState with target values for the mouth joints
 void Controller::set_mouth_target(MouthState s) {
-    if (!activated) {
+    if (!activated_) {
         // not yet initialized, ignore incoming targets
         return;
     }
 
     Controller::motion_generator_vector_t::iterator it;
-    for (it = motion_generator_vector.begin(); it < motion_generator_vector.end(); it++) {
+    for (it = motion_generator_vector_.begin(); it < motion_generator_vector_.end(); it++) {
         (*it)->set_mouth_target(s);
     }
 }
diff --git a/src/server/eye_motion_generator.cpp b/src/server/eye_motion_generator.cpp
index 786a0e9..0e3907b 100644
--- a/src/server/eye_motion_generator.cpp
+++ b/src/server/eye_motion_generator.cpp
@@ -75,22 +75,22 @@ void EyeMotionGenerator::setup_eyemotion(int dof, float target,
 //! calculate joint targets
 void EyeMotionGenerator::calculate_targets() {
     // use the target values for a faster response
-    float neck_pan_now  = joint_interface->get_target_position(JointInterface::ID_NECK_PAN);
-    float neck_tilt_now = joint_interface->get_target_position(JointInterface::ID_NECK_TILT);
+    float neck_pan_now  = joint_interface_->get_target_position(JointInterface::ID_NECK_PAN);
+    float neck_tilt_now = joint_interface_->get_target_position(JointInterface::ID_NECK_TILT);
 
     // calculate target angles for the eyes
     // right eye is dominant -> direct output
-    float eye_pan_r_target = (requested_gaze_state.pan + requested_gaze_state.vergence/2.0)
+    float eye_pan_r_target = (requested_gaze_state_.pan + requested_gaze_state_.vergence/2.0)
             - (neck_pan_now);
 
     // left eye is non dominant -> filtered output: TODO: activate low pass filtered output
     // FIXME: USE LOWPASS FILTER HERE --> output_angle[angle_names::EYE_PAN_L]
     //        + 0.1 * (eye_pan_l_target - output_angle[angle_names::EYE_PAN_L]) etc;
-    float eye_pan_l_target = (requested_gaze_state.pan - requested_gaze_state.vergence/2.0)
+    float eye_pan_l_target = (requested_gaze_state_.pan - requested_gaze_state_.vergence/2.0)
             - (neck_pan_now);
 
     // tilt
-    float eye_tilt_target = requested_gaze_state.tilt - (neck_tilt_now);
+    float eye_tilt_target = requested_gaze_state_.tilt - (neck_tilt_now);
 
     if (0) {
         eye_pan_r_target = 0.0;
@@ -133,13 +133,13 @@ void EyeMotionGenerator::calculate_targets() {
     reflexxes_calculate_profile();
 
     // tell the joint about the new values
-    joint_interface->set_target(JointInterface::ID_EYES_LEFT_LR,
+    joint_interface_->set_target(JointInterface::ID_EYES_LEFT_LR,
                                 reflexxes_position_output->NewPositionVector->VecData[0],
                                 reflexxes_position_output->NewVelocityVector->VecData[0]);
-    joint_interface->set_target(JointInterface::ID_EYES_RIGHT_LR,
+    joint_interface_->set_target(JointInterface::ID_EYES_RIGHT_LR,
                                 reflexxes_position_output->NewPositionVector->VecData[1],
                                 reflexxes_position_output->NewVelocityVector->VecData[1]);
-    joint_interface->set_target(JointInterface::ID_EYES_BOTH_UD,
+    joint_interface_->set_target(JointInterface::ID_EYES_BOTH_UD,
                                 reflexxes_position_output->NewPositionVector->VecData[2],
                                 reflexxes_position_output->NewVelocityVector->VecData[2]);
 }
@@ -149,8 +149,8 @@ void EyeMotionGenerator::calculate_targets() {
 void EyeMotionGenerator::publish_targets() {
     // publish values if there is an active gaze input within the last timerange
     if (gaze_target_input_active()) {
-        joint_interface->publish_target(JointInterface::ID_EYES_LEFT_LR);
-        joint_interface->publish_target(JointInterface::ID_EYES_RIGHT_LR);
-        joint_interface->publish_target(JointInterface::ID_EYES_BOTH_UD);
+        joint_interface_->publish_target(JointInterface::ID_EYES_LEFT_LR);
+        joint_interface_->publish_target(JointInterface::ID_EYES_RIGHT_LR);
+        joint_interface_->publish_target(JointInterface::ID_EYES_BOTH_UD);
     }
 }
diff --git a/src/server/eyebrow_motion_generator.cpp b/src/server/eyebrow_motion_generator.cpp
index 1f3ee62..da8a19a 100644
--- a/src/server/eyebrow_motion_generator.cpp
+++ b/src/server/eyebrow_motion_generator.cpp
@@ -46,19 +46,19 @@ EyebrowMotionGenerator::~EyebrowMotionGenerator() {
 //! calculate joint targets
 void EyebrowMotionGenerator::calculate_targets() {
     // printf("> humotion: calculating eyebrow targets\n");
-    float eyebrow_left_target = requested_gaze_state.eyebrow_left;
-    float eyebrow_right_target = requested_gaze_state.eyebrow_right;
+    float eyebrow_left_target = requested_gaze_state_.eyebrow_left;
+    float eyebrow_right_target = requested_gaze_state_.eyebrow_right;
 
     // store targets
-    joint_interface->set_target(JointInterface::ID_EYES_LEFT_BROW, eyebrow_left_target, 0.0);
-    joint_interface->set_target(JointInterface::ID_EYES_RIGHT_BROW, eyebrow_right_target, 0.0);
+    joint_interface_->set_target(JointInterface::ID_EYES_LEFT_BROW, eyebrow_left_target, 0.0);
+    joint_interface_->set_target(JointInterface::ID_EYES_RIGHT_BROW, eyebrow_right_target, 0.0);
 }
 
 //! publish targets to motor boards:
 void EyebrowMotionGenerator::publish_targets() {
     // publish values if there is an active gaze input within the last timerange
     if (gaze_target_input_active()) {
-        joint_interface->publish_target(JointInterface::ID_EYES_LEFT_BROW);
-        joint_interface->publish_target(JointInterface::ID_EYES_RIGHT_BROW);
+        joint_interface_->publish_target(JointInterface::ID_EYES_LEFT_BROW);
+        joint_interface_->publish_target(JointInterface::ID_EYES_RIGHT_BROW);
     }
 }
diff --git a/src/server/eyelid_motion_generator.cpp b/src/server/eyelid_motion_generator.cpp
index bf1deba..6d3c974 100644
--- a/src/server/eyelid_motion_generator.cpp
+++ b/src/server/eyelid_motion_generator.cpp
@@ -47,12 +47,12 @@ const float EyelidMotionGenerator::EYEBLINK_BLOCKING_TIME = 1000.0;  // ms
 
 //! constructor
 EyelidMotionGenerator::EyelidMotionGenerator(JointInterface *j) : EyeMotionGenerator(j) {
-    saccade_blink_active = false;
-    saccade_blink_requested = false;
-    eyelid_closed[LEFT] = false;
-    eyelid_closed[RIGHT] = false;
+    saccade_blink_active_ = false;
+    saccade_blink_requested_ = false;
+    eyelid_closed_[LEFT] = false;
+    eyelid_closed_[RIGHT] = false;
 
-    eyeblink_blocked_timeout = boost::get_system_time();
+    eyeblink_blocked_timeout_ = boost::get_system_time();
 }
 
 //! destructor
@@ -69,12 +69,12 @@ void EyelidMotionGenerator::calculate_targets() {
     float eye_tilt_now  = get_current_position(JointInterface::ID_EYES_BOTH_UD);
 
     // calculate left eyelid targets
-    float eyelid_upper_left_target = eye_tilt_now + requested_gaze_state.eyelid_opening_upper;
-    float eyelid_lower_left_target = eye_tilt_now - requested_gaze_state.eyelid_opening_lower;
+    float eyelid_upper_left_target = eye_tilt_now + requested_gaze_state_.eyelid_opening_upper;
+    float eyelid_lower_left_target = eye_tilt_now - requested_gaze_state_.eyelid_opening_lower;
 
     // calculate right eyelid targets
-    float eyelid_upper_right_target = eye_tilt_now + requested_gaze_state.eyelid_opening_upper;
-    float eyelid_lower_right_target = eye_tilt_now - requested_gaze_state.eyelid_opening_lower;
+    float eyelid_upper_right_target = eye_tilt_now + requested_gaze_state_.eyelid_opening_upper;
+    float eyelid_lower_right_target = eye_tilt_now - requested_gaze_state_.eyelid_opening_lower;
 
     // limit target angles
     eyelid_upper_left_target  = limit_target(JointInterface::ID_EYES_LEFT_LID_UPPER,
@@ -87,21 +87,21 @@ void EyelidMotionGenerator::calculate_targets() {
                                              eyelid_lower_right_target);
 
     // (temporarily) store the target
-    joint_interface->set_target(JointInterface::ID_EYES_LEFT_LID_UPPER,
+    joint_interface_->set_target(JointInterface::ID_EYES_LEFT_LID_UPPER,
                                 eyelid_upper_left_target, 0.0);
-    joint_interface->set_target(JointInterface::ID_EYES_LEFT_LID_LOWER,
+    joint_interface_->set_target(JointInterface::ID_EYES_LEFT_LID_LOWER,
                                 eyelid_lower_left_target, 0.0);
-    joint_interface->set_target(JointInterface::ID_EYES_RIGHT_LID_UPPER,
+    joint_interface_->set_target(JointInterface::ID_EYES_RIGHT_LID_UPPER,
                                 eyelid_upper_right_target, 0.0);
-    joint_interface->set_target(JointInterface::ID_EYES_RIGHT_LID_LOWER,
+    joint_interface_->set_target(JointInterface::ID_EYES_RIGHT_LID_LOWER,
                                 eyelid_lower_right_target, 0.0);
 
     // check for saccade
     check_for_saccade();
 
     // is there a blink request?
-    start_external_eyeblinks(requested_gaze_state.eyeblink_request_left,
-                             requested_gaze_state.eyeblink_request_right);
+    start_external_eyeblinks(requested_gaze_state_.eyeblink_request_left,
+                             requested_gaze_state_.eyeblink_request_right);
 
     // do we have a saccade & do we want to exec an eyeblink?
     process_saccadic_eyeblinks();
@@ -121,7 +121,7 @@ void EyelidMotionGenerator::start_external_eyeblinks(int duration_left, int dura
     // manual eyeblinks will ALWAYs get executed as we use
     // a negative block timeout (=timeout has already passed)
     if ((duration_left != 0) || (duration_right != 0)) {
-        eyeblink_blocked_timeout = boost::get_system_time() - boost::posix_time::seconds(100);
+        eyeblink_blocked_timeout_ = boost::get_system_time() - boost::posix_time::seconds(100);
     }
 
 
@@ -129,29 +129,29 @@ void EyelidMotionGenerator::start_external_eyeblinks(int duration_left, int dura
         // nothing to do
     } else if (duration_left < 0) {
         // infinite sleep -> close
-        eyelid_closed[LEFT] = true;
+        eyelid_closed_[LEFT] = true;
     } else {
         // timeout sleep
         start_eyeblink(LEFT, duration_left);
-        eyelid_closed[LEFT] = false;
+        eyelid_closed_[LEFT] = false;
     }
 
     if (duration_right == 0) {
         // nothing to do
     } else if (duration_right < 0) {
         // infinite sleep -> close
-        eyelid_closed[RIGHT] = true;
+        eyelid_closed_[RIGHT] = true;
     } else {
         // timeout sleep
         start_eyeblink(RIGHT, duration_right);
-        eyelid_closed[RIGHT] = false;
+        eyelid_closed_[RIGHT] = false;
     }
 }
 
 //! process saccadic blink requests
 //! -> when we do a saccade, the chances to blink are much higher
 void EyelidMotionGenerator::process_saccadic_eyeblinks() {
-    if (saccade_blink_requested) {
+    if (saccade_blink_requested_) {
         // every n-th's saccade requests an eyeblink
         // here: use 0.3 even though humans use bigger prob value (but that looks stupid on robot)
         if ((std::rand()%3) == 0) {
@@ -159,22 +159,22 @@ void EyelidMotionGenerator::process_saccadic_eyeblinks() {
             start_eyeblink(LEFT);
             start_eyeblink(RIGHT);
         }
-        saccade_blink_requested = false;
+        saccade_blink_requested_ = false;
     }
 }
 
 //! process periodic blink requests
 //! -> we want to have an eyeblink every n...m seconds
 void EyelidMotionGenerator::process_periodic_eyeblinks() {
-    if (eyeblink_active[LEFT] || eyeblink_active[RIGHT]) {
+    if (eyeblink_active_[LEFT] || eyeblink_active_[RIGHT]) {
         // calculate next timeout for a new periodic eyeblink
         int milliseconds_to_next_blink = EYEBLINK_EYERY_MS_MIN
                 + (std::rand() % static_cast<int>(EYEBLINK_EYERY_MS_MAX-EYEBLINK_EYERY_MS_MIN));
-        periodic_blink_start_time = boost::get_system_time()
+        periodic_blink_start_time_ = boost::get_system_time()
                 + boost::posix_time::milliseconds(milliseconds_to_next_blink);
     }
 
-    if (boost::get_system_time() > periodic_blink_start_time) {
+    if (boost::get_system_time() > periodic_blink_start_time_) {
         // printf("> periodic eyeblink:\n");
         start_eyeblink(LEFT);
         start_eyeblink(RIGHT);
@@ -188,16 +188,16 @@ void EyelidMotionGenerator::handle_eyeblink_timeout() {
 
     // take care of re-opening eye timeout
     for (int i=LEFT; i <= RIGHT; i++) {
-        if (eyeblink_active[i]) {
-            if (now >= eyeblink_timeout[i]) {
-                eyeblink_active[i] = false;
+        if (eyeblink_active_[i]) {
+            if (now >= eyeblink_timeout_[i]) {
+                eyeblink_active_[i] = false;
             }
         }
     }
 
     // take care of blocking time
-    if (eyeblink_active[LEFT] || eyeblink_active[RIGHT]) {
-        eyeblink_blocked_timeout = boost::get_system_time()
+    if (eyeblink_active_[LEFT] || eyeblink_active_[RIGHT]) {
+        eyeblink_blocked_timeout_ = boost::get_system_time()
                 + boost::posix_time::milliseconds(EYEBLINK_BLOCKING_TIME);
     }
 }
@@ -206,11 +206,11 @@ void EyelidMotionGenerator::handle_eyeblink_timeout() {
 //! this will override (=close) the eyelids for all possible eyeblink requests
 void EyelidMotionGenerator::override_lids_for_eyeblink() {
     // close the requested eyelids
-    if (eyeblink_active[LEFT] || eyelid_closed[LEFT]) {
+    if (eyeblink_active_[LEFT] || eyelid_closed_[LEFT]) {
         close_eyelid(JointInterface::ID_EYES_LEFT_LID_UPPER);
         close_eyelid(JointInterface::ID_EYES_LEFT_LID_LOWER);
     }
-    if (eyeblink_active[RIGHT] || eyelid_closed[RIGHT]) {
+    if (eyeblink_active_[RIGHT] || eyelid_closed_[RIGHT]) {
         close_eyelid(JointInterface::ID_EYES_RIGHT_LID_UPPER);
         close_eyelid(JointInterface::ID_EYES_RIGHT_LID_LOWER);
     }
@@ -232,17 +232,17 @@ void EyelidMotionGenerator::close_eyelid(int joint_id) {
     case(JointInterface::ID_EYES_LEFT_LID_UPPER):
     case(JointInterface::ID_EYES_LEFT_LID_LOWER):
         // use the upper value + 10 deg as close state:
-        value = joint_interface->get_joint_min(JointInterface::ID_EYES_LEFT_LID_UPPER) + 10.0;
+        value = joint_interface_->get_joint_min(JointInterface::ID_EYES_LEFT_LID_UPPER) + 10.0;
         // overwrite last target_
-        joint_interface->set_target(joint_id, value, 0.0);
+        joint_interface_->set_target(joint_id, value, 0.0);
         break;
 
     case(JointInterface::ID_EYES_RIGHT_LID_UPPER):
     case(JointInterface::ID_EYES_RIGHT_LID_LOWER):
         // use the upper value + 10 deg as close state:
-        value = joint_interface->get_joint_min(JointInterface::ID_EYES_RIGHT_LID_UPPER) + 10.0;
+        value = joint_interface_->get_joint_min(JointInterface::ID_EYES_RIGHT_LID_UPPER) + 10.0;
         // overwrite last target_
-        joint_interface->set_target(joint_id, value, 0.0);
+        joint_interface_->set_target(joint_id, value, 0.0);
         break;
     }
 }
@@ -252,27 +252,27 @@ void EyelidMotionGenerator::close_eyelid(int joint_id) {
 //! \param int id of side (LEFT or RIGHT)
 void EyelidMotionGenerator::start_eyeblink(int side, int duration) {
     // cout << "BLOCKED UNTIL " << eyeblink_blocked_timeout << "\n";
-    if (boost::get_system_time() < eyeblink_blocked_timeout) {
+    if (boost::get_system_time() < eyeblink_blocked_timeout_) {
         // return if we are still in the block time
         return;
     }
     // request for n ms eyeblink:
-    eyeblink_timeout[side] = boost::get_system_time() + boost::posix_time::milliseconds(duration);
+    eyeblink_timeout_[side] = boost::get_system_time() + boost::posix_time::milliseconds(duration);
 
-    eyeblink_active[side] = true;
+    eyeblink_active_[side] = true;
 }
 
 //! check if there is an ongoing saccade:
 void EyelidMotionGenerator::check_for_saccade() {
     if (get_eye_saccade_active()) {
         // this is a saccade, check if not already in saccade:
-        if (!saccade_blink_active) {
+        if (!saccade_blink_active_) {
             // this is a new saccade! restart blink timer
-            saccade_blink_requested = true;
-            saccade_blink_active = true;
+            saccade_blink_requested_ = true;
+            saccade_blink_active_ = true;
         }
     } else {
-        saccade_blink_active = false;
+        saccade_blink_active_ = false;
     }
 }
 
@@ -281,9 +281,9 @@ void EyelidMotionGenerator::check_for_saccade() {
 void EyelidMotionGenerator::publish_targets() {
     // publish values if there is an active gaze input within the last timerange
     if (gaze_target_input_active()) {
-        joint_interface->publish_target(JointInterface::ID_EYES_LEFT_LID_UPPER);
-        joint_interface->publish_target(JointInterface::ID_EYES_LEFT_LID_LOWER);
-        joint_interface->publish_target(JointInterface::ID_EYES_RIGHT_LID_UPPER);
-        joint_interface->publish_target(JointInterface::ID_EYES_RIGHT_LID_LOWER);
+        joint_interface_->publish_target(JointInterface::ID_EYES_LEFT_LID_UPPER);
+        joint_interface_->publish_target(JointInterface::ID_EYES_LEFT_LID_LOWER);
+        joint_interface_->publish_target(JointInterface::ID_EYES_RIGHT_LID_UPPER);
+        joint_interface_->publish_target(JointInterface::ID_EYES_RIGHT_LID_LOWER);
     }
 }
diff --git a/src/server/gaze_motion_generator.cpp b/src/server/gaze_motion_generator.cpp
index 0dc17c9..677d12e 100644
--- a/src/server/gaze_motion_generator.cpp
+++ b/src/server/gaze_motion_generator.cpp
@@ -53,17 +53,17 @@ GazeMotionGenerator::~GazeMotionGenerator() {
 //! update gaze target:
 //! \param GazeState with target values for the overall gaze
 void GazeMotionGenerator::set_gaze_target(GazeState new_gaze_target) {
-    if (requested_gaze_state.gaze_type == GazeState::GAZETYPE_RELATIVE) {
+    if (requested_gaze_state_.gaze_type == GazeState::GAZETYPE_RELATIVE) {
         printf("> ERROR: gaze targets should be converted to absolute before calling this\n");
         exit(EXIT_FAILURE);
     }
 
     // check magnitude of gaze change to detect eye-neck saccades
-    float dist = fabs(requested_gaze_state.distance_pt_abs(new_gaze_target));
+    float dist = fabs(requested_gaze_state_.distance_pt_abs(new_gaze_target));
 
     // check requested speed
-    float speed = fabs(requested_gaze_state.distance_pt_abs(new_gaze_target))
-            / (new_gaze_target.timestamp.to_seconds()-requested_gaze_state.timestamp.to_seconds());
+    float speed = fabs(requested_gaze_state_.distance_pt_abs(new_gaze_target))
+            / (new_gaze_target.timestamp.to_seconds()-requested_gaze_state_.timestamp.to_seconds());
 
     // check magnitude and speed of gaze change to detect eye-neck saccades
     if (dist > NECK_SACCADE_THRESHOLD) {
@@ -78,23 +78,23 @@ void GazeMotionGenerator::set_gaze_target(GazeState new_gaze_target) {
     // check for eye getting close to ocolomotor range
     // actually it makes more sense to trigger the neck saccade based on
     // the target getting out of the OMR
-    float eye_target_l  = joint_interface->get_target_position(JointInterface::ID_EYES_LEFT_LR);
-    float eye_target_r  = joint_interface->get_target_position(JointInterface::ID_EYES_RIGHT_LR);
-    float eye_target_ud = joint_interface->get_target_position(JointInterface::ID_EYES_BOTH_UD);
+    float eye_target_l  = joint_interface_->get_target_position(JointInterface::ID_EYES_LEFT_LR);
+    float eye_target_r  = joint_interface_->get_target_position(JointInterface::ID_EYES_RIGHT_LR);
+    float eye_target_ud = joint_interface_->get_target_position(JointInterface::ID_EYES_BOTH_UD);
 
     // min/max bounds
     float left_min  = OMR_LIMIT_TRIGGERS_NECK_SACCADE *
-            joint_interface->get_joint_min(JointInterface::ID_EYES_LEFT_LR);
+            joint_interface_->get_joint_min(JointInterface::ID_EYES_LEFT_LR);
     float left_max  = OMR_LIMIT_TRIGGERS_NECK_SACCADE *
-            joint_interface->get_joint_max(JointInterface::ID_EYES_LEFT_LR);
+            joint_interface_->get_joint_max(JointInterface::ID_EYES_LEFT_LR);
     float right_min = OMR_LIMIT_TRIGGERS_NECK_SACCADE *
-            joint_interface->get_joint_min(JointInterface::ID_EYES_RIGHT_LR);
+            joint_interface_->get_joint_min(JointInterface::ID_EYES_RIGHT_LR);
     float right_max = OMR_LIMIT_TRIGGERS_NECK_SACCADE *
-            joint_interface->get_joint_max(JointInterface::ID_EYES_RIGHT_LR);
+            joint_interface_->get_joint_max(JointInterface::ID_EYES_RIGHT_LR);
     float ud_min    = OMR_LIMIT_TRIGGERS_NECK_SACCADE *
-            joint_interface->get_joint_min(JointInterface::ID_EYES_BOTH_UD);
+            joint_interface_->get_joint_min(JointInterface::ID_EYES_BOTH_UD);
     float ud_max    = OMR_LIMIT_TRIGGERS_NECK_SACCADE *
-            joint_interface->get_joint_max(JointInterface::ID_EYES_BOTH_UD);
+            joint_interface_->get_joint_max(JointInterface::ID_EYES_BOTH_UD);
 
     if (
             (eye_target_l < left_min) || (eye_target_l > left_max) ||
@@ -114,11 +114,11 @@ void GazeMotionGenerator::set_gaze_target(GazeState new_gaze_target) {
 bool GazeMotionGenerator::get_eye_saccade_active() {
     bool saccade_active;
 
-    float speed_left  = joint_interface->get_ts_speed(
+    float speed_left  = joint_interface_->get_ts_speed(
                 JointInterface::ID_EYES_LEFT_LR).get_newest_value();
-    float speed_right = joint_interface->get_ts_speed(
+    float speed_right = joint_interface_->get_ts_speed(
                 JointInterface::ID_EYES_RIGHT_LR).get_newest_value();
-    float speed_tilt  = joint_interface->get_ts_speed(
+    float speed_tilt  = joint_interface_->get_ts_speed(
                 JointInterface::ID_EYES_BOTH_UD).get_newest_value();
 
     float speed_total_l = sqrt(speed_left*speed_left + speed_tilt*speed_tilt);
@@ -139,9 +139,9 @@ bool GazeMotionGenerator::get_eye_saccade_active() {
 //! get overall gaze
 humotion::GazeState GazeMotionGenerator::get_current_gaze() {
     // shortcut, makes the following easier to read
-    JointInterface *j = joint_interface;
+    JointInterface *j = joint_interface_;
 
-    GazeState gaze = requested_gaze_state;
+    GazeState gaze = requested_gaze_state_;
 
     gaze.pan = j->get_ts_position(JointInterface::ID_NECK_PAN).get_newest_value() +
             (j->get_ts_position(JointInterface::ID_EYES_LEFT_LR).get_newest_value()
diff --git a/src/server/joint_interface.cpp b/src/server/joint_interface.cpp
index 328295b..f13348b 100644
--- a/src/server/joint_interface.cpp
+++ b/src/server/joint_interface.cpp
@@ -34,8 +34,8 @@ using humotion::server::JointInterface;
 //! constructor
 JointInterface::JointInterface() {
     framerate = 50.0;
-    mouth_enabled = false;
-    gaze_enabled  = false;
+    mouth_enabled_ = false;
+    gaze_enabled_  = false;
 }
 
 //! destructor
@@ -75,21 +75,21 @@ void JointInterface::store_incoming_position(int joint_id, float position, Times
     // lock the tsd_list for this access. by doing this we assure
     // that no other thread accessing this element can diturb the
     // following atomic instructions:
-    mutex::scoped_lock sl(joint_ts_position_map_access_mutex);
+    mutex::scoped_lock sl(joint_ts_position_map_access_mutex_);
 
     // printf("> humotion: incoming joint position for joint id 0x%02X "
     // "= %4.2f (ts=%.2f)\n",joint_id,position,timestamp.to_seconds());
-    joint_ts_position_map[joint_id].insert(timestamp, position);
+    joint_ts_position_map_[joint_id].insert(timestamp, position);
 
-    incoming_position_count++;
+    incoming_position_count_++;
 }
 
 //! return incoming position data count & clear this counter
 //! this can be used as a keep alive status check
 //! \return number of incoming joint positions since the last call
 unsigned int JointInterface::get_and_clear_incoming_position_count() {
-    unsigned int i = incoming_position_count;
-    incoming_position_count = 0;
+    unsigned int i = incoming_position_count_;
+    incoming_position_count_ = 0;
     return i;
 }
 
@@ -101,11 +101,11 @@ void JointInterface::store_incoming_velocity(int joint_id, float velocity, Times
     // lock the tsd_list for this access. by doing this we assure
     // that no other thread accessing this element can disturb the
     // following atomic instructions:
-    mutex::scoped_lock scoped_lock(joint_ts_speed_map_access_mutex);
+    mutex::scoped_lock scoped_lock(joint_ts_speed_map_access_mutex_);
 
     // printf("> humotion: incoming joint velocity for joint id 0x%02X = %4.2f "
     // "(ts=%.2f)\n",joint_id,velocity,timestamp.to_seconds());
-    joint_ts_speed_map[joint_id].insert(timestamp, velocity);
+    joint_ts_speed_map_[joint_id].insert(timestamp, velocity);
 }
 
 //! return the timestamped float for the given joints position
@@ -113,12 +113,12 @@ humotion::TimestampedList JointInterface::get_ts_position(int joint_id) {
     // lock the tsd_list for this access. by doing this we assure
     // that no other thread accessing this element can disturb the
     // following atomic instructions
-    mutex::scoped_lock sl(joint_ts_position_map_access_mutex);
+    mutex::scoped_lock sl(joint_ts_position_map_access_mutex_);
 
     // search map
-    joint_tsl_map_t::iterator it = joint_ts_position_map.find(joint_id);
+    joint_tsl_map_t::iterator it = joint_ts_position_map_.find(joint_id);
 
-    if (it == joint_ts_position_map.end()) {
+    if (it == joint_ts_position_map_.end()) {
         printf("> humotion: no ts_position for joint id 0x%02X found\n", joint_id);
         return TimestampedList();
     }
@@ -132,12 +132,12 @@ humotion::TimestampedList JointInterface::get_ts_speed(int joint_id) {
     // lock the tsd_list for this access. by doing this we assure
     // that no other thread accessing this element can diturb the
     // following atomic instructions
-    mutex::scoped_lock sl(joint_ts_speed_map_access_mutex);
+    mutex::scoped_lock sl(joint_ts_speed_map_access_mutex_);
 
     // search map
-    joint_tsl_map_t::iterator it = joint_ts_speed_map.find(joint_id);
+    joint_tsl_map_t::iterator it = joint_ts_speed_map_.find(joint_id);
 
-    if (it == joint_ts_speed_map.end()) {
+    if (it == joint_ts_speed_map_.end()) {
         printf("> humotion: no ts_speed for joint id 0x%02X found\n", joint_id);
         return humotion::TimestampedList();
     }
@@ -154,7 +154,7 @@ void JointInterface::set_framerate(float f) {
 //! enable all mouth joints
 void JointInterface::enable_mouth_joints() {
     // already enabled? skip this
-    if (mouth_enabled) {
+    if (mouth_enabled_) {
         return;
     }
 
@@ -165,14 +165,14 @@ void JointInterface::enable_mouth_joints() {
     enable_joint(ID_LIP_CENTER_LOWER);
     enable_joint(ID_LIP_RIGHT_UPPER);
     enable_joint(ID_LIP_RIGHT_LOWER);
-    mouth_enabled = true;
+    mouth_enabled_ = true;
 }
 
 
 //! disable all mouth joints
 void JointInterface::disable_mouth_joints() {
     // already disabled? skip this
-    if (!mouth_enabled) {
+    if (!mouth_enabled_) {
         return;
     }
 
@@ -183,13 +183,13 @@ void JointInterface::disable_mouth_joints() {
     disable_joint(ID_LIP_CENTER_LOWER);
     disable_joint(ID_LIP_RIGHT_UPPER);
     disable_joint(ID_LIP_RIGHT_LOWER);
-    mouth_enabled = false;
+    mouth_enabled_ = false;
 }
 
 //! enable all gaze joints
 void JointInterface::enable_gaze_joints() {
     // already enabled? skip this
-    if (gaze_enabled) {
+    if (gaze_enabled_) {
         return;
     }
 
@@ -210,13 +210,13 @@ void JointInterface::enable_gaze_joints() {
     enable_joint(ID_NECK_TILT);
     enable_joint(ID_NECK_ROLL);
 
-    gaze_enabled = true;
+    gaze_enabled_ = true;
 }
 
 //! disable all gaze joints
 void JointInterface::disable_gaze_joints() {
     // already disabled? skip this
-    if (!gaze_enabled) {
+    if (!gaze_enabled_) {
         return;
     }
 
@@ -237,7 +237,7 @@ void JointInterface::disable_gaze_joints() {
     disable_joint(ID_NECK_TILT);
     disable_joint(ID_NECK_ROLL);
 
-    gaze_enabled = false;
+    gaze_enabled_ = false;
 }
 
 //! fetch maximum allowed joint position
@@ -257,7 +257,7 @@ float JointInterface::get_joint_min(int joint_id) {
 //! check if joint position map is empty
 //! \return true if empty
 bool JointInterface::get_joint_position_map_empty() {
-    return (joint_ts_position_map.empty());
+    return (joint_ts_position_map_.empty());
 }
 
 //! call the virtual store function with given position and velocities
diff --git a/src/server/middleware.cpp b/src/server/middleware.cpp
index 701ab2d..7163e2b 100644
--- a/src/server/middleware.cpp
+++ b/src/server/middleware.cpp
@@ -34,8 +34,8 @@ using humotion::server::Middleware;
 //! constructor
 //! open a new Middleware instance.
 Middleware::Middleware(std::string scope, Controller *c) {
-    controller = c;
-    base_scope = scope;
+    controller_ = c;
+    base_scope_ = scope;
 }
 
 //! destructor
diff --git a/src/server/middleware_ros.cpp b/src/server/middleware_ros.cpp
index 0e06295..f085ce1 100644
--- a/src/server/middleware_ros.cpp
+++ b/src/server/middleware_ros.cpp
@@ -42,7 +42,7 @@ MiddlewareROS::MiddlewareROS(std::string scope, Controller *c)
     // start ros core?
     if (ros::isInitialized()) {
         // oh another process is doing ros comm, fine, we do not need to call it
-        tick_necessary = false;
+        tick_necessary_ = false;
     } else {
         // we have to take care of ros
         printf("> no active ros middleware, calling ros::init() "
@@ -52,19 +52,68 @@ MiddlewareROS::MiddlewareROS(std::string scope, Controller *c)
         printf("> registering on ROS as node %s\n", node_name.c_str());
         ros::M_string no_remapping;
         ros::init(no_remapping, node_name);
-        tick_necessary = true;
+        tick_necessary_ = true;
     }
 
     // create node handle
     ros::NodeHandle n;
+    ros::NodeHandle pnh("~");
 
     // set up subscribers
-    mouth_target_subscriber = n.subscribe(scope + "/humotion/mouth/target", 150,
+    mouth_target_subscriber_ = n.subscribe(scope + "/humotion/mouth/target", 150,
                                           &MiddlewareROS::incoming_mouth_target ,
                                           this, ros::TransportHints().unreliable());
-    gaze_target_subscriber  = n.subscribe(scope + "/humotion/gaze/target",  150,
+    gaze_target_subscriber_  = n.subscribe(scope + "/humotion/gaze/target",  150,
                                           &MiddlewareROS::incoming_gaze_target,
                                           this, ros::TransportHints().unreliable());
+
+    // set up dynamic reconfiguration service
+    attach_to_reconfiguration_server(pnh);
+}
+
+//! callback for incoming dynamic reconfigure requests:
+void MiddlewareROS::dynamic_reconfigure_callback(const humotion::humotionConfig &config,
+                                                  uint32_t level) {
+  /*// ignore incoming requests as long cam is not set up properly
+  if (!hasValidHandle()) {
+      return;
+  }
+
+  // use some tricks to iterate through all config entries:
+  std::vector<ximea_camera::xiAPIConfig::AbstractParamDescriptionConstPtr>::const_iterator _i;
+  for (_i = config.__getParamDescriptions__().begin();
+       _i != config.__getParamDescriptions__().end(); ++_i) {
+      boost::any val;
+      boost::shared_ptr<const ximea_camera::xiAPIConfig::AbstractParamDescription>
+              description = *_i;
+
+      // fetch actual value:
+      description->getValue(config, val);
+
+      //  std::cout << description->name << " " << description->type << "\n";
+
+      // copy data to ximea api:
+      if (description->type == "double") {
+          dynamicReconfigureFloat(description->name.c_str(),
+                                    static_cast<float>(boost::any_cast<double>(val)));
+      } else if (description->type == "bool") {
+          dynamicReconfigureInt(description->name.c_str(), (boost::any_cast<bool>(val))?1:0);
+      } else if (description->type == "int") {
+          dynamicReconfigureInt(description->name.c_str(), boost::any_cast<int>(val));
+      } else {
+          std::cerr << "ERROR: unsupported config type " << description->type  << "\n";
+      }
+    }*/
+}
+
+//! attach to dynamic reconfigure server
+void MiddlewareROS::attach_to_reconfiguration_server(ros::NodeHandle priv_nodehandle) {
+    ROS_DEBUG("connecting to dynamic reconfiguration server");
+    ros::NodeHandle reconf_node(priv_nodehandle, "configuration");
+
+    reconf_server_ = new dynamic_reconfigure::Server<humotion::humotionConfig>(reconf_node);
+    reconf_server_->setCallback(boost::bind(
+                                    &MiddlewareROS::dynamic_reconfigure_callback, this, _1, _2));
 }
 
 //! destructor
@@ -79,7 +128,7 @@ bool MiddlewareROS::ok() {
 
 //! do a single tick
 void MiddlewareROS::tick() {
-    if (tick_necessary) {
+    if (tick_necessary_) {
         ros::spinOnce();
     }
 }
@@ -97,7 +146,7 @@ void MiddlewareROS::incoming_mouth_target(const humotion::mouth::ConstPtr& msg)
     mouth_state.opening_center = msg->opening.center;
     mouth_state.opening_right  = msg->opening.right;
 
-    controller->set_mouth_target(mouth_state);
+    controller_->set_mouth_target(mouth_state);
 }
 
 
@@ -134,6 +183,6 @@ void MiddlewareROS::incoming_gaze_target(const humotion::gaze::ConstPtr& msg) {
 
     gaze_state.timestamp.set(msg->gaze_timestamp.sec, msg->gaze_timestamp.nsec);
 
-    controller->set_gaze_target(gaze_state);
+    controller_->set_gaze_target(gaze_state);
 }
 
diff --git a/src/server/motion_generator.cpp b/src/server/motion_generator.cpp
index 595252b..f9402d1 100644
--- a/src/server/motion_generator.cpp
+++ b/src/server/motion_generator.cpp
@@ -32,9 +32,9 @@ using humotion::server::MotionGenerator;
 
 //! constructor
 MotionGenerator::MotionGenerator(JointInterface *j) {
-    joint_interface = j;
-    last_mouth_target_update = boost::posix_time::ptime(boost::posix_time::min_date_time);
-    last_gaze_target_update  = boost::posix_time::ptime(boost::posix_time::min_date_time);
+    joint_interface_ = j;
+    last_mouth_target_update_ = boost::posix_time::ptime(boost::posix_time::min_date_time);
+    last_gaze_target_update_  = boost::posix_time::ptime(boost::posix_time::min_date_time);
 }
 
 
@@ -49,9 +49,9 @@ MotionGenerator::~MotionGenerator() {
 //! \return Timestamp of this dataset
 humotion::Timestamp MotionGenerator::get_timestamped_state(int joint_id,
                                                            float *position, float *velocity) {
-    humotion::Timestamp stamp = joint_interface->get_ts_position(joint_id).get_last_timestamp();
-    *position = joint_interface->get_ts_position(joint_id).get_interpolated_value(stamp);
-    *velocity = joint_interface->get_ts_speed(joint_id).get_interpolated_value(stamp);
+    humotion::Timestamp stamp = joint_interface_->get_ts_position(joint_id).get_last_timestamp();
+    *position = joint_interface_->get_ts_position(joint_id).get_interpolated_value(stamp);
+    *velocity = joint_interface_->get_ts_speed(joint_id).get_interpolated_value(stamp);
     return stamp;
 }
 
@@ -59,7 +59,7 @@ humotion::Timestamp MotionGenerator::get_timestamped_state(int joint_id,
 //! \param joint_id
 //! \return float value of joint speed
 float MotionGenerator::get_current_speed(int joint_id) {
-    return joint_interface->get_ts_speed(joint_id).get_newest_value();
+    return joint_interface_->get_ts_speed(joint_id).get_newest_value();
 }
 
 //! fetch the latest (=current) position of a joint
@@ -71,57 +71,57 @@ float MotionGenerator::get_current_position(int joint_id) {
     Timestamp diff=now-tsl;
     printf("TIME DIFF %fs %fns\n",diff.sec, diff.nsec);*/
 
-    return joint_interface->get_ts_position(joint_id).get_newest_value();
+    return joint_interface_->get_ts_position(joint_id).get_newest_value();
 }
 
 //! update gaze target:
 //! \param GazeState with target values for the overall gaze
 void MotionGenerator::set_gaze_target(GazeState new_gaze_target) {
     // store value for next iteration
-    requested_gaze_state        = new_gaze_target;
+    requested_gaze_state_        = new_gaze_target;
 
     // keep track if the gaze targets are comming in regulary
-    last_gaze_target_update = boost::get_system_time();
+    last_gaze_target_update_ = boost::get_system_time();
 }
 
 //! update mouth state:
 //! \param MouthState with target values for the mouth joints
 void MotionGenerator::set_mouth_target(MouthState s) {
     // store value
-    requested_mouth_target = s;
+    requested_mouth_target_ = s;
 
     // keep track if the mouth targets are comming in regulary
-    last_mouth_target_update = boost::get_system_time();
+    last_mouth_target_update_ = boost::get_system_time();
 }
 
 
 //! was there incoming gaze data the last second?
 //! \return true if there was data incoming in the last second, false otherwise
 bool MotionGenerator::gaze_target_input_active() {
-    if (last_gaze_target_update  + boost::posix_time::milliseconds(1000)
+    if (last_gaze_target_update_  + boost::posix_time::milliseconds(1000)
             > boost::get_system_time() ) {
         // incoming data -> if gaze is disabled, enable it!
-        joint_interface->enable_gaze_joints();
+        joint_interface_->enable_gaze_joints();
         return true;
     }
 
     // else: no incoming data, disable!
-    joint_interface->disable_gaze_joints();
+    joint_interface_->disable_gaze_joints();
     return false;
 }
 
 //! was there incoming mouth data the last second?
 //! \return true if there was data incoming in the last second, false otherwise
 bool MotionGenerator::mouth_target_input_active() {
-    if (last_mouth_target_update + boost::posix_time::milliseconds(1000)
+    if (last_mouth_target_update_ + boost::posix_time::milliseconds(1000)
             > boost::get_system_time() ) {
         // incoming data -> if mouth is disabled, enable it!
-        joint_interface->enable_mouth_joints();
+        joint_interface_->enable_mouth_joints();
         return true;
     }
 
     // else: no incoming data, disable!
-    joint_interface->disable_mouth_joints();
+    joint_interface_->disable_mouth_joints();
     return false;
 }
 
@@ -130,8 +130,8 @@ float MotionGenerator::limit_target(int joint_id, float val) {
     assert(joint_id < JointInterface::JOINT_ID_ENUM_SIZE);
 
     // fetch min/max for joint:
-    float min = joint_interface->get_joint_min(joint_id);
-    float max = joint_interface->get_joint_max(joint_id);
+    float min = joint_interface_->get_joint_min(joint_id);
+    float max = joint_interface_->get_joint_max(joint_id);
 
     if (max < min) {
         printf("> ERROR: how can min (%4.2f) be bigger than max (%4.2f)?? EXITING NOW\n", min, max);
diff --git a/src/server/mouth_motion_generator.cpp b/src/server/mouth_motion_generator.cpp
index 8a65509..3f0d8ee 100644
--- a/src/server/mouth_motion_generator.cpp
+++ b/src/server/mouth_motion_generator.cpp
@@ -53,14 +53,14 @@ void MouthMotionGenerator::calculate_targets() {
 //! \param int lower joint id
 void MouthMotionGenerator::update_mouth_target(int upper_id, int lower_id) {
     // fetch min/max for joints
-    float min_upper = joint_interface->get_joint_min(upper_id);
-    float max_lower = joint_interface->get_joint_max(lower_id);
+    float min_upper = joint_interface_->get_joint_min(upper_id);
+    float max_lower = joint_interface_->get_joint_max(lower_id);
     float min_opening = MOUTH_MIN_OPENING;
 
     // fetch position & opening for joint, parameter is only used to
     // determine LEFT/CENTER/RIGHT. upper/lower plays no role here
-    float position = mouthstate_to_position(requested_mouth_target, upper_id);
-    float opening  = min_opening + mouthstate_to_opening(requested_mouth_target, upper_id);
+    float position = mouthstate_to_position(requested_mouth_target_, upper_id);
+    float opening  = min_opening + mouthstate_to_opening(requested_mouth_target_, upper_id);
 
     // check opening larger than minimum
     if (opening < min_opening) {
@@ -90,8 +90,8 @@ void MouthMotionGenerator::update_mouth_target(int upper_id, int lower_id) {
     }
 
     // tell the joint about the new values
-    joint_interface->set_target(upper_id, unsafe_target_upper, 0.0);
-    joint_interface->set_target(lower_id, unsafe_target_lower, 0.0);
+    joint_interface_->set_target(upper_id, unsafe_target_upper, 0.0);
+    joint_interface_->set_target(lower_id, unsafe_target_lower, 0.0);
 }
 
 
@@ -135,12 +135,12 @@ float MouthMotionGenerator::mouthstate_to_position(MouthState m, int e) {
 void MouthMotionGenerator::publish_targets() {
     // publish values if there is an active gaze input within the last timerange
     if (mouth_target_input_active()) {
-        joint_interface->publish_target(JointInterface::ID_LIP_LEFT_UPPER);
-        joint_interface->publish_target(JointInterface::ID_LIP_LEFT_LOWER);
-        joint_interface->publish_target(JointInterface::ID_LIP_CENTER_UPPER);
-        joint_interface->publish_target(JointInterface::ID_LIP_CENTER_LOWER);
-        joint_interface->publish_target(JointInterface::ID_LIP_RIGHT_UPPER);
-        joint_interface->publish_target(JointInterface::ID_LIP_RIGHT_LOWER);
+        joint_interface_->publish_target(JointInterface::ID_LIP_LEFT_UPPER);
+        joint_interface_->publish_target(JointInterface::ID_LIP_LEFT_LOWER);
+        joint_interface_->publish_target(JointInterface::ID_LIP_CENTER_UPPER);
+        joint_interface_->publish_target(JointInterface::ID_LIP_CENTER_LOWER);
+        joint_interface_->publish_target(JointInterface::ID_LIP_RIGHT_UPPER);
+        joint_interface_->publish_target(JointInterface::ID_LIP_RIGHT_LOWER);
     }
 }
 
diff --git a/src/server/neck_motion_generator.cpp b/src/server/neck_motion_generator.cpp
index 18f4b28..21c4d97 100644
--- a/src/server/neck_motion_generator.cpp
+++ b/src/server/neck_motion_generator.cpp
@@ -48,7 +48,7 @@ const float NeckMotionGenerator::CONST_BREATH_AMPLITUDE = 1.0;  // degrees
 //! constructor
 NeckMotionGenerator::NeckMotionGenerator(JointInterface *j) :
     GazeMotionGenerator(j, 3, 1.0/Server::MOTION_UPDATERATE) {
-    breath_time = 0.0;
+    breath_time_ = 0.0;
 }
 
 
@@ -63,7 +63,7 @@ float NeckMotionGenerator::get_breath_offset() {
     // -> triangular wave as speeds -> (x<0.5)? 2*x*x:  1- 2*(1-x)**2 = 4x - 2x**2 - 1
     float breath_offset = 0.0;
     // 0...1 -> move up, 1..2 -> return, 2..3 -> still
-    float breath_time_normalized = (breath_time * 3)/CONST_BREATH_PERIOD;
+    float breath_time_normalized = (breath_time_ * 3)/CONST_BREATH_PERIOD;
 
     if (breath_time_normalized <= 0.5) {
         // accelerated motion
@@ -82,9 +82,9 @@ float NeckMotionGenerator::get_breath_offset() {
     }
 
     // fetch next time
-    breath_time += 1000.0/Server::MOTION_UPDATERATE;
-    if (breath_time >= CONST_BREATH_PERIOD) {
-        breath_time -= CONST_BREATH_PERIOD;
+    breath_time_ += 1000.0/Server::MOTION_UPDATERATE;
+    if (breath_time_ >= CONST_BREATH_PERIOD) {
+        breath_time_ -= CONST_BREATH_PERIOD;
     }
 
     return breath_offset;
@@ -110,8 +110,8 @@ void NeckMotionGenerator::calculate_targets() {
                                                             &neck_roll_speed);
 
     // reached target?
-    float goal_diff   = fabs(get_current_gaze().distance_pt_abs(requested_gaze_state));
-    float target_diff = fabs(requested_gaze_state.distance_pt_abs(previous_neck_target));
+    float goal_diff   = fabs(get_current_gaze().distance_pt_abs(requested_gaze_state_));
+    float target_diff = fabs(requested_gaze_state_.distance_pt_abs(previous_neck_target_));
 
     // printf("GOAL DIFF = %f TARGET DIFF = %f\n",goal_diff,target_diff);
     // get_current_gaze().dump();
@@ -119,38 +119,38 @@ void NeckMotionGenerator::calculate_targets() {
 
     // check if new target
     // close to goal?
-    if ( (neck_saccade_active) && (goal_diff < 1.0) ) {
-        neck_saccade_reached_goal = true;
+    if ( (neck_saccade_active_) && (goal_diff < 1.0) ) {
+        neck_saccade_reached_goal_ = true;
     }
 
-    if (neck_saccade_active) {
-        previous_neck_target = requested_gaze_state;
+    if (neck_saccade_active_) {
+        previous_neck_target_ = requested_gaze_state_;
     }
 
     // if we get a new target now, we can stop the neck saccade
     if (target_diff > .1) {
-        if (neck_saccade_reached_goal) {
+        if (neck_saccade_reached_goal_) {
             // joint_interface->neck_saccade_done();
-            neck_saccade_active = false;
-            neck_saccade_reached_goal = false;
+            neck_saccade_active_ = false;
+            neck_saccade_reached_goal_ = false;
         }
     }
 
     if (neck_saccade_requested) {
-        neck_saccade_active = true;
+        neck_saccade_active_ = true;
     }
 
     // check if this is a small or big saccade
-    if (neck_saccade_active || neck_saccade_omr) {
+    if (neck_saccade_active_ || neck_saccade_omr) {
         // full saccade with neck motion -> update neck target
-        requested_neck_state = requested_gaze_state;
+        requested_neck_state_ = requested_gaze_state_;
     }
 
     // get targets: this is the sum of stored neck target and up-to-date offset:
-    float neck_pan_target  = requested_neck_state.pan  + requested_gaze_state.pan_offset;
-    float neck_tilt_target = requested_neck_state.tilt + requested_gaze_state.tilt_offset;
+    float neck_pan_target  = requested_neck_state_.pan  + requested_gaze_state_.pan_offset;
+    float neck_tilt_target = requested_neck_state_.tilt + requested_gaze_state_.tilt_offset;
     // roll is always equal to requested gaze (not neck) state
-    float neck_roll_target = requested_gaze_state.roll + requested_gaze_state.roll_offset;
+    float neck_roll_target = requested_gaze_state_.roll + requested_gaze_state_.roll_offset;
 
     // add breath wave to tilt
     neck_tilt_target += get_breath_offset();
@@ -164,15 +164,15 @@ void NeckMotionGenerator::calculate_targets() {
     reflexxes_calculate_profile();
 
     // tell the joint if about the new values
-    joint_interface->set_target(JointInterface::ID_NECK_PAN,
+    joint_interface_->set_target(JointInterface::ID_NECK_PAN,
                                 reflexxes_position_output->NewPositionVector->VecData[0],
                                 reflexxes_position_output->NewVelocityVector->VecData[0]);
 
-    joint_interface->set_target(JointInterface::ID_NECK_TILT,
+    joint_interface_->set_target(JointInterface::ID_NECK_TILT,
                                 reflexxes_position_output->NewPositionVector->VecData[1],
                                 reflexxes_position_output->NewVelocityVector->VecData[1]);
 
-    joint_interface->set_target(JointInterface::ID_NECK_ROLL,
+    joint_interface_->set_target(JointInterface::ID_NECK_ROLL,
                                 reflexxes_position_output->NewPositionVector->VecData[2],
                                 reflexxes_position_output->NewVelocityVector->VecData[2]);
 
@@ -188,9 +188,9 @@ void NeckMotionGenerator::calculate_targets() {
 void NeckMotionGenerator::publish_targets() {
     // publish values if there is an active gaze input within the last timerange
     if (gaze_target_input_active()) {
-        joint_interface->publish_target(JointInterface::ID_NECK_PAN);
-        joint_interface->publish_target(JointInterface::ID_NECK_TILT);
-        joint_interface->publish_target(JointInterface::ID_NECK_ROLL);
+        joint_interface_->publish_target(JointInterface::ID_NECK_PAN);
+        joint_interface_->publish_target(JointInterface::ID_NECK_TILT);
+        joint_interface_->publish_target(JointInterface::ID_NECK_ROLL);
     }
 }
 
diff --git a/src/server/server.cpp b/src/server/server.cpp
index aa61ecc..ebd7263 100644
--- a/src/server/server.cpp
+++ b/src/server/server.cpp
@@ -46,18 +46,18 @@ Server::Server(std::string scope, std::string mw, JointInterface *_joint_interfa
     printf("> initializing humotion server (on %s, middleware=%s)\n", scope.c_str(), mw.c_str());
 
     // store pointer to joint interface
-    joint_interface = _joint_interface;
+    joint_interface_ = _joint_interface;
 
     // tell joint interface our framerate
-    joint_interface->set_framerate(MOTION_UPDATERATE);
+    joint_interface_->set_framerate(MOTION_UPDATERATE);
 
     // create controller
-    controller = new Controller(joint_interface);
-    controller->init_motion_generators();
+    controller_ = new Controller(joint_interface_);
+    controller_->init_motion_generators();
 
     // start middleware
     if (mw == "ROS") {
-        middleware = new MiddlewareROS(scope, controller);
+        middleware_ = new MiddlewareROS(scope, controller_);
     } else {
         printf("> ERROR: invalid mw '%s' given. RSB support was dropped. Please use ROS\n\n",
                mw.c_str());
@@ -74,12 +74,12 @@ Server::~Server() {
 
 //! middleware still running?
 bool Server::ok() {
-    return middleware->ok();
+    return middleware_->ok();
 }
 
 //! start main thread
 void Server::start_motion_generation_thread() {
-    motion_generation_thread_ptr = new boost::thread(boost::bind(
+    motion_generation_thread_ptr_ = new boost::thread(boost::bind(
                                                          &Server::motion_generation_thread, this));
 }
 
@@ -98,11 +98,13 @@ void Server::motion_generation_thread() {
     printf("> one loop = %3.1fms\n", loop_delay);
 
     // wait for incoming joint data
-    while (middleware->ok()) {
+    while (middleware_->ok()) {
         // mw tick
-        middleware->tick();
+        middleware_->tick();
+
+        unsigned int incoming_data_count =
+                joint_interface_->get_and_clear_incoming_position_count();
 
-        unsigned int incoming_data_count = joint_interface->get_and_clear_incoming_position_count();
         if (incoming_data_count == 0) {
             incoming_data_count_invalid++;
             if (incoming_data_count_invalid >= MOTION_UPDATERATE) {
@@ -119,27 +121,29 @@ void Server::motion_generation_thread() {
     }
 
     printf("> joint data arrived, control loop active.\n");
-    controller->set_activated();
+    controller_->set_activated();
 
     // fine, data is arriving, activate and run control loop
-    while (middleware->ok()) {
+    while (middleware_->ok()) {
         // mw tick
-        middleware->tick();
+        middleware_->tick();
 
         // do some logging
         // controller->dump_angles();
 
         // calculate all targets
-        controller->calculate_targets();
+        controller_->calculate_targets();
 
         // publish data to joints
-        controller->publish_targets();
+        controller_->publish_targets();
 
         // finally execute the movement
-        joint_interface->execute_motion();
+        joint_interface_->execute_motion();
 
         // check if we received joint information in the last step
-        unsigned int incoming_data_count = joint_interface->get_and_clear_incoming_position_count();
+        unsigned int incoming_data_count =
+                joint_interface_->get_and_clear_incoming_position_count();
+
         if (incoming_data_count == 0) {
             // printf("> WARNING: no incoming joint data during the last iteration...\n");
             incoming_data_count_invalid++;
diff --git a/src/timestamped_list.cpp b/src/timestamped_list.cpp
index 9788540..9896bfc 100644
--- a/src/timestamped_list.cpp
+++ b/src/timestamped_list.cpp
@@ -35,26 +35,26 @@ using humotion::TimestampedList;
 TimestampedList::TimestampedList(unsigned int s) {
     // initialize the list to its desired size:
     TimestampedFloat now;
-    tsf_list.resize(s, now);
+    tsf_list_.resize(s, now);
 }
 
 TimestampedList::TimestampedList(TimestampedList const &l) {
     // lock the tsf_list for this access. by doing this we assure
     // that no other thread accessing this element can diturb the
     // following atomic instructions:
-    mutex::scoped_lock scoped_lock(l.access_mutex);
+    mutex::scoped_lock scoped_lock(l.access_mutex_);
 
     // now do a deep copy with locking!
-    tsf_list = l.tsf_list;
+    tsf_list_ = l.tsf_list_;
 }
 
 void TimestampedList::copy_tsf_list_to(timestamped_float_list_t *target) {
     // lock the tsf_list for this access. by doing this we assure
     // that no other thread accessing this element can diturb the
     // following atomic instructions:
-    mutex::scoped_lock scoped_lock(access_mutex);
+    mutex::scoped_lock scoped_lock(access_mutex_);
 
-    *target = tsf_list;
+    *target = tsf_list_;
 }
 
 
@@ -62,13 +62,13 @@ humotion::Timestamp TimestampedList::get_first_timestamp() {
     // lock the tsf_list for this access. by doing this we assure
     // that no other thread accessing this element can diturb the
     // following atomic instructions:
-    mutex::scoped_lock scoped_lock(access_mutex);
+    mutex::scoped_lock scoped_lock(access_mutex_);
 
-    if (tsf_list.empty()) {
+    if (tsf_list_.empty()) {
         return Timestamp(0, 0);
     }
 
-    timestamped_float_list_t::iterator it = tsf_list.begin();
+    timestamped_float_list_t::iterator it = tsf_list_.begin();
     return it->timestamp;
 }
 
@@ -76,21 +76,21 @@ humotion::Timestamp TimestampedList::get_last_timestamp() {
     // lock the tsf_list for this access. by doing this we assure
     // that no other thread accessing this element can diturb the
     // following atomic instructions:
-    mutex::scoped_lock scoped_lock(access_mutex);
+    mutex::scoped_lock scoped_lock(access_mutex_);
 
-    if (tsf_list.empty()) {
+    if (tsf_list_.empty()) {
         return Timestamp(0, 0);
     }
 
-    timestamped_float_list_t::iterator it = tsf_list.end();
+    timestamped_float_list_t::iterator it = tsf_list_.end();
     it--;
     return it->timestamp;
 }
 
 void TimestampedList::insert(Timestamp timestamp, float val) {
     // erase first element:
-    tsf_list.pop_front();
-    tsf_list.push_back(TimestampedFloat(timestamp, val));
+    tsf_list_.pop_front();
+    tsf_list_.push_back(TimestampedFloat(timestamp, val));
     // printf("insert [%5.3f] = %5.1f\n",timestamp,val);
 }
 
@@ -98,14 +98,14 @@ float TimestampedList::get_newest_value() {
     // lock the tsf_list for this access. by doing this we assure
     // that no other thread accessing this element can diturb the
     // following atomic instructions:
-    mutex::scoped_lock scoped_lock(access_mutex);
+    mutex::scoped_lock scoped_lock(access_mutex_);
 
-    if (tsf_list.empty()) {
+    if (tsf_list_.empty()) {
         printf("> WARNING: requested newest value from empty list, returning 0.0\n");
         return 0.0;
     }
 
-    timestamped_float_list_t::iterator it = tsf_list.end();
+    timestamped_float_list_t::iterator it = tsf_list_.end();
     it--;
     return it->value;
 }
@@ -114,19 +114,19 @@ float TimestampedList::get_interpolated_value(Timestamp target_ts) {
     // lock the tsf_list for this access. by doing this we assure
     // that no other thread accessing this element can diturb the
     // following atomic instructions:
-    mutex::scoped_lock scoped_lock(access_mutex);
+    mutex::scoped_lock scoped_lock(access_mutex_);
 
     TimestampedFloat previous;
     // printf("> latency %3.2fms\n", (Timestamped().to_seconds() - target_ts.to_seconds())*1000.0);
 
-    for ( timestamped_float_list_t::iterator it = tsf_list.begin(); it != tsf_list.end(); ++it ) {
+    for ( timestamped_float_list_t::iterator it = tsf_list_.begin(); it != tsf_list_.end(); ++it ) {
         if (it->timestamp >= target_ts) {
             // ok found close target
-            if (it == tsf_list.begin()) {
+            if (it == tsf_list_.begin()) {
                 // no preceding element
                 printf("> warning, timestamp %6.3f smaller than first element %6.3f in timestamped"
                        "list. this should not happen (increase ts buffer?)\n",
-                       target_ts.to_seconds(), tsf_list.begin()->timestamp.to_seconds());
+                       target_ts.to_seconds(), tsf_list_.begin()->timestamp.to_seconds());
                 return it->value;
             } else {
                 // do interpolation
