commit f150aab5e67a545824004a49277c82f66c0c4651
Author: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>
Date:   Sat Nov 14 14:57:52 2020 +0100

    clang-format-10

diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..afedfbc
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,75 @@
+---
+BasedOnStyle:  Google
+ColumnLimit:    125
+MaxEmptyLinesToKeep: 1
+SortIncludes: false
+
+Standard:        Auto
+IndentWidth:     3
+TabWidth:        3
+UseTab:          ForIndentation
+AccessModifierOffset: -3
+ConstructorInitializerIndentWidth: 3
+NamespaceIndentation: None
+ContinuationIndentWidth: 3
+IndentCaseLabels: true
+IndentFunctionDeclarationAfterType: false
+
+AlignEscapedNewlinesLeft: false
+AlignTrailingComments: true
+
+AllowAllParametersOfDeclarationOnNextLine: false
+ExperimentalAutoDetectBinPacking: false
+ObjCSpaceBeforeProtocolList: true
+Cpp11BracedListStyle: false
+
+AllowShortBlocksOnASingleLine: true
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: None
+AllowShortCaseLabelsOnASingleLine: false
+
+AlwaysBreakTemplateDeclarations: true
+AlwaysBreakBeforeMultilineStrings: false
+BreakBeforeBinaryOperators: false
+BreakBeforeTernaryOperators: false
+BreakConstructorInitializersBeforeComma: true
+
+BinPackParameters: true
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+DerivePointerBinding: false
+PointerBindsToType: true
+
+PenaltyExcessCharacter: 50
+PenaltyBreakBeforeFirstCallParameter: 30
+PenaltyBreakComment: 1000
+PenaltyBreakFirstLessLess: 10
+PenaltyBreakString: 100
+PenaltyReturnTypeOnItsOwnLine: 50
+
+SpacesBeforeTrailingComments: 1
+SpacesInParentheses: false
+SpacesInAngles:  false
+SpaceInEmptyParentheses: false
+SpacesInCStyleCastParentheses: false
+SpaceAfterCStyleCast: false
+SpaceAfterControlStatementKeyword: true
+SpaceBeforeAssignmentOperators: true
+
+# Configure each individual brace in BraceWrapping
+BreakBeforeBraces: Custom
+
+# Control of individual brace wrapping cases
+BraceWrapping:
+    AfterCaseLabel: true
+    AfterClass: false
+    AfterControlStatement: false
+    AfterEnum: true
+    AfterFunction: false
+    AfterNamespace: false
+    AfterStruct: false
+    AfterUnion: false
+    BeforeCatch: true
+    BeforeElse: true
+    IndentBraces: false
+...
diff --git a/client/cpp/examples/random_gaze/main.cpp b/client/cpp/examples/random_gaze/main.cpp
index 2d52b03..4c3116a 100644
--- a/client/cpp/examples/random_gaze/main.cpp
+++ b/client/cpp/examples/random_gaze/main.cpp
@@ -1,74 +1,73 @@
 /*
-* This file is part of hlrc_client
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_client
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "RobotController.h"
 #include "RobotGaze.h"
 #include <unistd.h>
 
-float rand_float(float min, float max){
-    float f = (float)rand() / RAND_MAX;
-    return min + f * (max - min);
+float rand_float(float min, float max) {
+	float f = (float)rand() / RAND_MAX;
+	return min + f * (max - min);
 }
 
-int main (int argc, char **argv){
-    if (argc != 3){
-        printf("usage: %s <middleware> <robot scope>\n", argv[0]);
-        printf("       <middleware> is either ROS or RSB\n");
-	printf("       <robot scope> e.g. /flobi or /icub\n\n");
-        exit(EXIT_FAILURE);
-    }
+int main(int argc, char** argv) {
+	if (argc != 3) {
+		printf("usage: %s <middleware> <robot scope>\n", argv[0]);
+		printf("       <middleware> is either ROS or RSB\n");
+		printf("       <robot scope> e.g. /flobi or /icub\n\n");
+		exit(EXIT_FAILURE);
+	}
 
-    RobotController *robot_controller = new RobotController(argv[1], argv[2]); //"/flobi");
-    //robot_controller->set_current_emotion(RobotEmotion(RobotEmotion::NEUTRAL));
-    RobotGaze gaze;
+	RobotController* robot_controller = new RobotController(argv[1], argv[2]); //"/flobi");
+	// robot_controller->set_current_emotion(RobotEmotion(RobotEmotion::NEUTRAL));
+	RobotGaze gaze;
 
-    int count=0;
+	int count = 0;
 
-    while(1){
-        if (count++ >= 50){
-			//a new target every second:
-			gaze.pan  = rand_float(-20.0, 20.0);
+	while (1) {
+		if (count++ >= 50) {
+			// a new target every second:
+			gaze.pan = rand_float(-20.0, 20.0);
 			gaze.tilt = rand_float(-20.0, 20.0);
 			gaze.roll = 0.0;
 			gaze.vergence = 0.0;
 
-            //absolute mode
-            gaze.gaze_type      = RobotGaze::ABSOLUTE;
-            gaze.gaze_timestamp = RobotTimestamp::now();
+			// absolute mode
+			gaze.gaze_type = RobotGaze::ABSOLUTE;
+			gaze.gaze_timestamp = RobotTimestamp::now();
 
-            //robot_controller->set_current_emotion(RobotEmotion(RobotEmotion::ANGRY));
+			// robot_controller->set_current_emotion(RobotEmotion(RobotEmotion::ANGRY));
 
-			//reset counter
+			// reset counter
 			count = 0;
 		}
 
-        robot_controller->set_gaze_target(gaze);
-		usleep(1000/50 * 1000 );
-    }	
-
+		robot_controller->set_gaze_target(gaze);
+		usleep(1000 / 50 * 1000);
+	}
 }
diff --git a/client/cpp/examples/speech_test/main.cpp b/client/cpp/examples/speech_test/main.cpp
index 1631013..25be60f 100644
--- a/client/cpp/examples/speech_test/main.cpp
+++ b/client/cpp/examples/speech_test/main.cpp
@@ -1,49 +1,48 @@
 /*
-* This file is part of hlrc_client
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_client
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "RobotController.h"
 #include <unistd.h>
 
 #define BLOCKING true
 
-int main (int argc, char **argv){
-    RobotController *robot_controller = new RobotController("RSB", "/flobi");
+int main(int argc, char** argv) {
+	RobotController* robot_controller = new RobotController("RSB", "/flobi");
 
-    int count=0;
+	int count = 0;
 
-    printf("> speech test starting.\n");
-
-    robot_controller->set_speak("i will start counting now.\n", BLOCKING);
-    while(1){
-        std::string text = std::to_string(count++);
-        printf("> saying '%s'\n",text.c_str());
-        robot_controller->set_speak(text, BLOCKING);
-        sleep(1);
-    }
+	printf("> speech test starting.\n");
 
+	robot_controller->set_speak("i will start counting now.\n", BLOCKING);
+	while (1) {
+		std::string text = std::to_string(count++);
+		printf("> saying '%s'\n", text.c_str());
+		robot_controller->set_speak(text, BLOCKING);
+		sleep(1);
+	}
 }
diff --git a/client/cpp/include/Middleware.h b/client/cpp/include/Middleware.h
index 84f344d..ca71213 100644
--- a/client/cpp/include/Middleware.h
+++ b/client/cpp/include/Middleware.h
@@ -1,35 +1,35 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 #pragma once
 
 //*********************************************************************************
-//allow direct synthesis using inprotk calls. by default this is disabled
-//until inprotk gets to an usable state (e.g. the completion flag has to work)
+// allow direct synthesis using inprotk calls. by default this is disabled
+// until inprotk gets to an usable state (e.g. the completion flag has to work)
 #define USE_INPROTK_SYNTHESIS 0
 //*********************************************************************************
 
@@ -39,44 +39,40 @@
 #include "RobotGaze.h"
 #include "RobotMouth.h"
 
-class Middleware{
+class Middleware {
 public:
-    Middleware(std::string scope);
+	Middleware(std::string scope);
 
-    void set_default_emotion(RobotEmotion e, bool blocking);
-    void set_current_emotion(RobotEmotion e, bool blocking);
-    void set_gaze_target(RobotGaze target, bool blocking);
-    void set_lookat_target(float x, float y, float z, const std::string frame_id,
-                           bool blocking, float roll);
-    void set_mouth_target(RobotMouth target, bool blocking);
-    void set_head_animation(RobotHeadAnimation a, bool blocking);
-    void set_speak(std::string text, bool blocking);
+	void set_default_emotion(RobotEmotion e, bool blocking);
+	void set_current_emotion(RobotEmotion e, bool blocking);
+	void set_gaze_target(RobotGaze target, bool blocking);
+	void set_lookat_target(float x, float y, float z, const std::string frame_id, bool blocking, float roll);
+	void set_mouth_target(RobotMouth target, bool blocking);
+	void set_head_animation(RobotHeadAnimation a, bool blocking);
+	void set_speak(std::string text, bool blocking);
 
-    RobotEmotion get_current_emotion();
-    RobotEmotion get_default_emotion();
-    RobotGaze get_gaze_target();
+	RobotEmotion get_current_emotion();
+	RobotEmotion get_default_emotion();
+	RobotGaze get_gaze_target();
 
 protected:
-    virtual void init() = 0;
-    virtual void publish_default_emotion(RobotEmotion e, bool blocking) = 0;
-    virtual void publish_current_emotion(RobotEmotion e, bool blocking) = 0;
-    virtual void publish_gaze_target(RobotGaze g, bool blocking) = 0;
-    virtual void publish_lookat_target(float x, float y, float z, const std::string frame_id,
-                                       bool blocking, float roll) = 0;
-    virtual void publish_mouth_target(RobotMouth m, bool blocking) = 0;
-    virtual void publish_head_animation(RobotHeadAnimation a, bool blocking) = 0;
-    virtual void publish_speech(std::string text, bool blocking) = 0;
+	virtual void init() = 0;
+	virtual void publish_default_emotion(RobotEmotion e, bool blocking) = 0;
+	virtual void publish_current_emotion(RobotEmotion e, bool blocking) = 0;
+	virtual void publish_gaze_target(RobotGaze g, bool blocking) = 0;
+	virtual void publish_lookat_target(float x, float y, float z, const std::string frame_id, bool blocking, float roll) = 0;
+	virtual void publish_mouth_target(RobotMouth m, bool blocking) = 0;
+	virtual void publish_head_animation(RobotHeadAnimation a, bool blocking) = 0;
+	virtual void publish_speech(std::string text, bool blocking) = 0;
 
-    std::string base_scope;
+	std::string base_scope;
 
 private:
-    RobotEmotion defaultEmotion;
-    RobotEmotion currentEmotion;
+	RobotEmotion defaultEmotion;
+	RobotEmotion currentEmotion;
 
-    RobotGaze gazeTarget;
-    RobotMouth mouthTarget;
+	RobotGaze gazeTarget;
+	RobotMouth mouthTarget;
 
-    RobotHeadAnimation headAnimation;
+	RobotHeadAnimation headAnimation;
 };
-
-
diff --git a/client/cpp/include/MiddlewareROS.h b/client/cpp/include/MiddlewareROS.h
index f726354..5e25c6e 100644
--- a/client/cpp/include/MiddlewareROS.h
+++ b/client/cpp/include/MiddlewareROS.h
@@ -1,97 +1,95 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 
 #include "Middleware.h"
 #if ROS_SUPPORT
-    #include "ros/ros.h"
-    //ros messages
-    #include <hlrc_server/phoneme.h>
-    #include <hlrc_server/soundchunk.h>
-    #include <hlrc_server/gazetargetAction.h>
-    #include <hlrc_server/lookattargetAction.h>
-    #include <hlrc_server/animationAction.h>
-    #include <hlrc_server/mouthtargetAction.h>
-    #include <hlrc_server/utteranceAction.h>
-    #include <hlrc_server/emotionstateAction.h>
-    #include <hlrc_server/speechAction.h>
-    #include <actionlib/client/simple_action_client.h>
-    #include <actionlib/client/terminal_state.h>
-    #include <boost/shared_ptr.hpp>
+#include "ros/ros.h"
+// ros messages
+#include <hlrc_server/phoneme.h>
+#include <hlrc_server/soundchunk.h>
+#include <hlrc_server/gazetargetAction.h>
+#include <hlrc_server/lookattargetAction.h>
+#include <hlrc_server/animationAction.h>
+#include <hlrc_server/mouthtargetAction.h>
+#include <hlrc_server/utteranceAction.h>
+#include <hlrc_server/emotionstateAction.h>
+#include <hlrc_server/speechAction.h>
+#include <actionlib/client/simple_action_client.h>
+#include <actionlib/client/terminal_state.h>
+#include <boost/shared_ptr.hpp>
 #endif
 
 #define ROS_ACTION_CALL_TIMEOUT 30.0
 
-class MiddlewareROS : public Middleware{
+class MiddlewareROS : public Middleware {
 #ifndef ROS_SUPPORT
 public:
-    MiddlewareROS(std::string scope) : Middleware(scope){
-        printf("> ERROR: hlrc was compiled without ROS middleware support. Please use MiddlewareRSB() instead!\n\n");
-        exit(EXIT_FAILURE);
-    }
+	MiddlewareROS(std::string scope) : Middleware(scope) {
+		printf("> ERROR: hlrc was compiled without ROS middleware support. Please use MiddlewareRSB() instead!\n\n");
+		exit(EXIT_FAILURE);
+	}
 
-    void init(){};
-    void publish_default_emotion(RobotEmotion e, bool blocking){};
-    void publish_current_emotion(RobotEmotion e, bool blocking){};
-    void publish_gaze_target(RobotGaze g, bool blocking){};
-    void publish_lookat_target(float x, float y, float z, const std::string frame_id,
-                               bool blocking, float roll){};
-    void publish_mouth_target(RobotMouth m, bool blocking){};
-    void publish_head_animation(RobotHeadAnimation a, bool blocking) {};
-    void publish_speech(std::string text, bool blocking) {};
+	void init(){};
+	void publish_default_emotion(RobotEmotion e, bool blocking){};
+	void publish_current_emotion(RobotEmotion e, bool blocking){};
+	void publish_gaze_target(RobotGaze g, bool blocking){};
+	void publish_lookat_target(float x, float y, float z, const std::string frame_id, bool blocking, float roll){};
+	void publish_mouth_target(RobotMouth m, bool blocking){};
+	void publish_head_animation(RobotHeadAnimation a, bool blocking){};
+	void publish_speech(std::string text, bool blocking){};
 
 #else
 public:
-    MiddlewareROS(std::string scope);
+	MiddlewareROS(std::string scope);
 
 protected:
-    void init();
-    void publish_current_emotion(RobotEmotion e, bool blocking);
-    void publish_default_emotion(RobotEmotion e, bool blocking);
-    void publish_gaze_target(RobotGaze target, bool blocking);
-    void publish_lookat_target(float x, float y, float z, const std::string frame_id,
-                               bool blocking, float roll);
-    void publish_mouth_target(RobotMouth target, bool blocking);
-    void publish_head_animation(RobotHeadAnimation a, bool blocking);
-    void publish_speech(std::string text, bool blocking);
+	void init();
+	void publish_current_emotion(RobotEmotion e, bool blocking);
+	void publish_default_emotion(RobotEmotion e, bool blocking);
+	void publish_gaze_target(RobotGaze target, bool blocking);
+	void publish_lookat_target(float x, float y, float z, const std::string frame_id, bool blocking, float roll);
+	void publish_mouth_target(RobotMouth target, bool blocking);
+	void publish_head_animation(RobotHeadAnimation a, bool blocking);
+	void publish_speech(std::string text, bool blocking);
 
 private:
-    void publish_emotion(std::string scope_target, RobotEmotion e, bool blocking);
-    void check_service(ros::ServiceClient *service);
+	void publish_emotion(std::string scope_target, RobotEmotion e, bool blocking);
+	void check_service(ros::ServiceClient* service);
 
-    actionlib::SimpleActionClient<hlrc_server::animationAction>     *animation_ac;
-    actionlib::SimpleActionClient<hlrc_server::utteranceAction>     *utterance_ac;
-    actionlib::SimpleActionClient<hlrc_server::emotionstateAction>  *default_emotionstate_ac;
-    actionlib::SimpleActionClient<hlrc_server::emotionstateAction>  *current_emotionstate_ac;
-    actionlib::SimpleActionClient<hlrc_server::gazetargetAction>    *gazetarget_ac;
-    actionlib::SimpleActionClient<hlrc_server::lookattargetAction>  *lookattarget_ac;
-    actionlib::SimpleActionClient<hlrc_server::mouthtargetAction>   *mouthtarget_ac;
-    actionlib::SimpleActionClient<hlrc_server::speechAction>        *speech_ac;
+	actionlib::SimpleActionClient<hlrc_server::animationAction>* animation_ac;
+	actionlib::SimpleActionClient<hlrc_server::utteranceAction>* utterance_ac;
+	actionlib::SimpleActionClient<hlrc_server::emotionstateAction>* default_emotionstate_ac;
+	actionlib::SimpleActionClient<hlrc_server::emotionstateAction>* current_emotionstate_ac;
+	actionlib::SimpleActionClient<hlrc_server::gazetargetAction>* gazetarget_ac;
+	actionlib::SimpleActionClient<hlrc_server::lookattargetAction>* lookattarget_ac;
+	actionlib::SimpleActionClient<hlrc_server::mouthtargetAction>* mouthtarget_ac;
+	actionlib::SimpleActionClient<hlrc_server::speechAction>* speech_ac;
 #endif
 };
diff --git a/client/cpp/include/MiddlewareRSB.h b/client/cpp/include/MiddlewareRSB.h
index a742f13..a724ae6 100644
--- a/client/cpp/include/MiddlewareRSB.h
+++ b/client/cpp/include/MiddlewareRSB.h
@@ -1,103 +1,98 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "Middleware.h"
 #ifdef RSB_SUPPORT
-    #define BOOST_SIGNALS_NO_DEPRECATION_WARNING //mute warnings from RSB
-    #include <rsb/Factory.h>
-    #include <rsb/Informer.h>
-    #include <rsb/Listener.h>
+#define BOOST_SIGNALS_NO_DEPRECATION_WARNING // mute warnings from RSB
+#include <rsb/Factory.h>
+#include <rsb/Informer.h>
+#include <rsb/Listener.h>
 
-    #if USE_INPROTK_SYNTHESIS
-    #include <rst/communicationpatterns/TaskState.pb.h>
-    #endif
+#if USE_INPROTK_SYNTHESIS
+#include <rst/communicationpatterns/TaskState.pb.h>
+#endif
 #endif
 
-class MiddlewareRSB : public Middleware{
+class MiddlewareRSB : public Middleware {
 #ifndef RSB_SUPPORT
 public:
-    MiddlewareRSB(std::string scope) : Middleware(scope){
-        printf("> ERROR: hlrc was compiled without RSB middleware support. Please use MiddlewareROS() instead!\n\n");
-        exit(EXIT_FAILURE);
-    }
-
-    void init(){};
-    void publish_default_emotion(RobotEmotion e, bool blocking){};
-    void publish_current_emotion(RobotEmotion e, bool blocking){};
-    void publish_gaze_target(RobotGaze g, bool blocking){};
-    void publish_lookat_target(float x, float y, float z, const std::string frame_id,
-                               bool blocking, float roll){};
-    void publish_mouth_target(RobotMouth m, bool blocking){};
-    void publish_head_animation(RobotHeadAnimation a, bool blocking) {};
-    void publish_speech(std::string text, bool blocking) {};
+	MiddlewareRSB(std::string scope) : Middleware(scope) {
+		printf("> ERROR: hlrc was compiled without RSB middleware support. Please use MiddlewareROS() instead!\n\n");
+		exit(EXIT_FAILURE);
+	}
 
+	void init(){};
+	void publish_default_emotion(RobotEmotion e, bool blocking){};
+	void publish_current_emotion(RobotEmotion e, bool blocking){};
+	void publish_gaze_target(RobotGaze g, bool blocking){};
+	void publish_lookat_target(float x, float y, float z, const std::string frame_id, bool blocking, float roll){};
+	void publish_mouth_target(RobotMouth m, bool blocking){};
+	void publish_head_animation(RobotHeadAnimation a, bool blocking){};
+	void publish_speech(std::string text, bool blocking){};
 
 #else
 public:
-    MiddlewareRSB(std::string scope);
-
+	MiddlewareRSB(std::string scope);
 
 protected:
-    void init();
-    void publish_current_emotion(RobotEmotion e, bool blocking);
-    void publish_default_emotion(RobotEmotion e, bool blocking);
-    void publish_gaze_target(RobotGaze target, bool blocking);
-    void publish_lookat_target(float x, float y, float z, const std::string frame_id,
-                               bool blocking, float roll);
-    void publish_mouth_target(RobotMouth target, bool blocking);
-    void publish_head_animation(RobotHeadAnimation a, bool blocking);
-    void publish_speech(std::string text, bool blocking);
+	void init();
+	void publish_current_emotion(RobotEmotion e, bool blocking);
+	void publish_default_emotion(RobotEmotion e, bool blocking);
+	void publish_gaze_target(RobotGaze target, bool blocking);
+	void publish_lookat_target(float x, float y, float z, const std::string frame_id, bool blocking, float roll);
+	void publish_mouth_target(RobotMouth target, bool blocking);
+	void publish_head_animation(RobotHeadAnimation a, bool blocking);
+	void publish_speech(std::string text, bool blocking);
 
 private:
-    void publish_emotion(std::string scope_target, RobotEmotion e, bool blocking);
+	void publish_emotion(std::string scope_target, RobotEmotion e, bool blocking);
 
-    //rsb::patterns::RemoteServerPtr inprotk_server;
-    rsb::patterns::RemoteServerPtr hlrc_server;
-    //rsb::patterns::LocalServerPtr inprotk_server;
+	// rsb::patterns::RemoteServerPtr inprotk_server;
+	rsb::patterns::RemoteServerPtr hlrc_server;
+	// rsb::patterns::LocalServerPtr inprotk_server;
 #if USE_INPROTK_SYNTHESIS
-    rsb::Informer<rst::communicationpatterns::TaskState>::Ptr inprotk_informer;
-    rsb::ListenerPtr inprotk_listener;
-    rsb::ListenerPtr hack_listener;
+	rsb::Informer<rst::communicationpatterns::TaskState>::Ptr inprotk_informer;
+	rsb::ListenerPtr inprotk_listener;
+	rsb::ListenerPtr hack_listener;
 
-    boost::mutex pending_tasks_mutex;
-    std::vector<boost::shared_ptr<rst::communicationpatterns::TaskState>> pending_tasks;
-    unsigned int say_task_active;
-    unsigned int say_task_done;
+	boost::mutex pending_tasks_mutex;
+	std::vector<boost::shared_ptr<rst::communicationpatterns::TaskState> > pending_tasks;
+	unsigned int say_task_active;
+	unsigned int say_task_done;
 
-    boost::mutex current_saytask_mutex;
-    std::string current_saytask;
-    std::string get_current_saytask();
-    void set_current_saytask(std::string text);
+	boost::mutex current_saytask_mutex;
+	std::string current_saytask;
+	std::string get_current_saytask();
+	void set_current_saytask(std::string text);
 
-    void check_for_inprotk();
-    void incoming_hack(boost::shared_ptr<std::string> finished_task);
+	void check_for_inprotk();
+	void incoming_hack(boost::shared_ptr<std::string> finished_task);
 #endif
 #endif
 };
-
diff --git a/client/cpp/include/RobotController.h b/client/cpp/include/RobotController.h
index 552ff32..b23025d 100644
--- a/client/cpp/include/RobotController.h
+++ b/client/cpp/include/RobotController.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include <string>
@@ -35,26 +35,23 @@
 
 class Middleware;
 
-class RobotController{
+class RobotController {
 public:
-    RobotController(std::string middleware, std::string scope);
+	RobotController(std::string middleware, std::string scope);
 
-    void set_default_emotion(RobotEmotion e, bool blocking=false);
-    void set_current_emotion(RobotEmotion e, bool blocking=false);
+	void set_default_emotion(RobotEmotion e, bool blocking = false);
+	void set_current_emotion(RobotEmotion e, bool blocking = false);
 
-    void set_gaze_target(RobotGaze target, bool blocking=false);
-    RobotGaze get_gaze_target();
-    void set_lookat_target(float x, float y, float z, const std::string frame_id="",
-                           bool blocking=false, float roll=0.0);
+	void set_gaze_target(RobotGaze target, bool blocking = false);
+	RobotGaze get_gaze_target();
+	void set_lookat_target(float x, float y, float z, const std::string frame_id = "", bool blocking = false,
+	                       float roll = 0.0);
 
-    void set_mouth_target(RobotMouth target, bool blocking=false);
+	void set_mouth_target(RobotMouth target, bool blocking = false);
 
-    void set_head_animation(RobotHeadAnimation a, bool blocking=false);
-    void set_speak(std::string text, bool blocking=false);
+	void set_head_animation(RobotHeadAnimation a, bool blocking = false);
+	void set_speak(std::string text, bool blocking = false);
 
 private:
-    Middleware *middleware;
-
+	Middleware* middleware;
 };
-
-
diff --git a/client/cpp/include/RobotEmotion.h b/client/cpp/include/RobotEmotion.h
index b797905..530deef 100644
--- a/client/cpp/include/RobotEmotion.h
+++ b/client/cpp/include/RobotEmotion.h
@@ -1,47 +1,46 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 
-class RobotEmotion{
+class RobotEmotion {
 public:
-    RobotEmotion(int v=NEUTRAL){
-        value = v;
-        time_ms = 1000;
-    }
+	RobotEmotion(int v = NEUTRAL) {
+		value = v;
+		time_ms = 1000;
+	}
 
-    int value;
-    static const int NEUTRAL   = 0;
-    static const int HAPPY     = 1;
-    static const int SAD       = 2;
-    static const int ANGRY     = 3;
-    static const int SURPRISED = 4;
-    static const int FEAR      = 5;
-    int time_ms;
+	int value;
+	static const int NEUTRAL = 0;
+	static const int HAPPY = 1;
+	static const int SAD = 2;
+	static const int ANGRY = 3;
+	static const int SURPRISED = 4;
+	static const int FEAR = 5;
+	int time_ms;
 };
-
diff --git a/client/cpp/include/RobotGaze.h b/client/cpp/include/RobotGaze.h
index ac01c71..0206251 100644
--- a/client/cpp/include/RobotGaze.h
+++ b/client/cpp/include/RobotGaze.h
@@ -1,63 +1,63 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include <time.h>
 #include "RobotTimestamp.h"
 
-class RobotGaze{
+class RobotGaze {
 public:
-    RobotGaze() : gaze_timestamp() {
-        pan = 0.0;
-        tilt = 0.0;
-        roll = 0.0;
-        vergence = 0.0;
-        pan_offset = 0.0;
-        tilt_offset = 0.0;
-        gaze_type = ABSOLUTE;
-    }
+	RobotGaze() : gaze_timestamp() {
+		pan = 0.0;
+		tilt = 0.0;
+		roll = 0.0;
+		vergence = 0.0;
+		pan_offset = 0.0;
+		tilt_offset = 0.0;
+		gaze_type = ABSOLUTE;
+	}
 
-    /*static double now(){
-        //fetch time
-        struct timespec tp;
-        clock_gettime(CLOCK_REALTIME, &tp);
-        return tp.tv_sec+tp.tv_nsec/1000000000.0;
-    };*/
+	/*static double now(){
+	    //fetch time
+	    struct timespec tp;
+	    clock_gettime(CLOCK_REALTIME, &tp);
+	    return tp.tv_sec+tp.tv_nsec/1000000000.0;
+	};*/
 
-    enum {
-        RELATIVE = 0,
-        ABSOLUTE = 1
-    };
+	enum
+	{
+		RELATIVE = 0,
+		ABSOLUTE = 1
+	};
 
-    RobotTimestamp gaze_timestamp;
-    int gaze_type;
+	RobotTimestamp gaze_timestamp;
+	int gaze_type;
 
-    float pan, tilt, roll, vergence;
-    float pan_offset, tilt_offset;
+	float pan, tilt, roll, vergence;
+	float pan_offset, tilt_offset;
 };
-
diff --git a/client/cpp/include/RobotHeadAnimation.h b/client/cpp/include/RobotHeadAnimation.h
index 15c166a..904727f 100644
--- a/client/cpp/include/RobotHeadAnimation.h
+++ b/client/cpp/include/RobotHeadAnimation.h
@@ -1,56 +1,54 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
-class RobotHeadAnimation{
+class RobotHeadAnimation {
 public:
-    RobotHeadAnimation(int v=IDLE){
-        value = v;
-        time_ms = 1000;
-        repetitions = 1;
-        scale = 1.0;
-    }
+	RobotHeadAnimation(int v = IDLE) {
+		value = v;
+		time_ms = 1000;
+		repetitions = 1;
+		scale = 1.0;
+	}
 
-    int value;
-    static const int IDLE            = 0;
-    static const int HEAD_NOD        = 1;
-    static const int HEAD_SHAKE      = 2;
-    static const int EYEBLINK_L      = 3;
-    static const int EYEBLINK_R      = 4;
-    static const int EYEBLINK_BOTH   = 5;
-    static const int EYEBROWS_RAISE  = 6;
-    static const int EYEBROWS_LOWER  = 7;
-    static const int ENGAGEMENT_LEFT = 8;
-    static const int ENGAGEMENT_RIGHT = 9;
-
-    int time_ms;
-    int repetitions;
-    float scale;
+	int value;
+	static const int IDLE = 0;
+	static const int HEAD_NOD = 1;
+	static const int HEAD_SHAKE = 2;
+	static const int EYEBLINK_L = 3;
+	static const int EYEBLINK_R = 4;
+	static const int EYEBLINK_BOTH = 5;
+	static const int EYEBROWS_RAISE = 6;
+	static const int EYEBROWS_LOWER = 7;
+	static const int ENGAGEMENT_LEFT = 8;
+	static const int ENGAGEMENT_RIGHT = 9;
 
+	int time_ms;
+	int repetitions;
+	float scale;
 };
-
diff --git a/client/cpp/include/RobotMouth.h b/client/cpp/include/RobotMouth.h
index 9cb4933..131046b 100644
--- a/client/cpp/include/RobotMouth.h
+++ b/client/cpp/include/RobotMouth.h
@@ -1,44 +1,43 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
-class RobotMouth{
+class RobotMouth {
 public:
-    RobotMouth(){
-        opening_left   = 0.0;
-        opening_center = 0.0;
-        opening_right  = 0.0;
-        position_left  = 0.0;
-        position_center = 0.0;
-        position_right = 0.0;
-    }
+	RobotMouth() {
+		opening_left = 0.0;
+		opening_center = 0.0;
+		opening_right = 0.0;
+		position_left = 0.0;
+		position_center = 0.0;
+		position_right = 0.0;
+	}
 
-    float opening_left, opening_right, opening_center;
-    float position_left, position_right, position_center;
+	float opening_left, opening_right, opening_center;
+	float position_left, position_right, position_center;
 };
-
diff --git a/client/cpp/include/RobotTimestamp.h b/client/cpp/include/RobotTimestamp.h
index c1aa333..f0c46ab 100644
--- a/client/cpp/include/RobotTimestamp.h
+++ b/client/cpp/include/RobotTimestamp.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include <time.h>
@@ -32,26 +32,25 @@
 
 class RobotTimestamp {
 public:
-    RobotTimestamp(){
-        RobotTimestamp n = now();
-        sec = n.sec;
-        nsec = n.nsec;
-    }
+	RobotTimestamp() {
+		RobotTimestamp n = now();
+		sec = n.sec;
+		nsec = n.nsec;
+	}
 
-    RobotTimestamp(int32_t _sec, int32_t _nsec) {
-        sec = _sec;
-        nsec = _nsec;
-    }
+	RobotTimestamp(int32_t _sec, int32_t _nsec) {
+		sec = _sec;
+		nsec = _nsec;
+	}
 
-    static RobotTimestamp now(){
-        // fetch time
-        struct timespec tp;
-        clock_gettime(CLOCK_REALTIME, &tp);
+	static RobotTimestamp now() {
+		// fetch time
+		struct timespec tp;
+		clock_gettime(CLOCK_REALTIME, &tp);
 
-        return RobotTimestamp(tp.tv_sec, tp.tv_nsec);
-    };
+		return RobotTimestamp(tp.tv_sec, tp.tv_nsec);
+	};
 
-    int32_t sec;
-    int32_t nsec;
+	int32_t sec;
+	int32_t nsec;
 };
-
diff --git a/client/cpp/src/Middleware.cpp b/client/cpp/src/Middleware.cpp
index b27a269..23eda76 100644
--- a/client/cpp/src/Middleware.cpp
+++ b/client/cpp/src/Middleware.cpp
@@ -1,83 +1,82 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "Middleware.h"
 
 using namespace std;
 
-Middleware::Middleware(string scope){
-    base_scope = scope;
+Middleware::Middleware(string scope) {
+	base_scope = scope;
 }
 
-void Middleware::set_default_emotion(RobotEmotion e, bool blocking){
-    defaultEmotion = e;
-    publish_default_emotion(defaultEmotion, blocking);
+void Middleware::set_default_emotion(RobotEmotion e, bool blocking) {
+	defaultEmotion = e;
+	publish_default_emotion(defaultEmotion, blocking);
 }
 
-void Middleware::set_current_emotion(RobotEmotion e, bool blocking){
-    currentEmotion = e;
-    publish_current_emotion(currentEmotion, blocking);
+void Middleware::set_current_emotion(RobotEmotion e, bool blocking) {
+	currentEmotion = e;
+	publish_current_emotion(currentEmotion, blocking);
 }
 
-RobotEmotion Middleware::get_current_emotion(){
-    return currentEmotion;
+RobotEmotion Middleware::get_current_emotion() {
+	return currentEmotion;
 }
 
-RobotEmotion Middleware::get_default_emotion(){
-    return defaultEmotion;
+RobotEmotion Middleware::get_default_emotion() {
+	return defaultEmotion;
 }
 
-void Middleware::set_gaze_target(RobotGaze target, bool blocking){
-    //printf("> Middleware::set_gaze_target({%4.1f %4.1f %4.1f %4.1f}, %s)\n",target.pan,target.roll,target.tilt,target.vergence,blocking?"BLOCKING":"NONBLOCKING");
-    gazeTarget = target;
-    publish_gaze_target(gazeTarget, blocking);
+void Middleware::set_gaze_target(RobotGaze target, bool blocking) {
+	// printf("> Middleware::set_gaze_target({%4.1f %4.1f %4.1f %4.1f},
+	// %s)\n",target.pan,target.roll,target.tilt,target.vergence,blocking?"BLOCKING":"NONBLOCKING");
+	gazeTarget = target;
+	publish_gaze_target(gazeTarget, blocking);
 }
 
-void Middleware::set_lookat_target(float x, float y, float z, const string frame_id, bool blocking, float roll)
-{
-    publish_lookat_target(x,y,z, frame_id, blocking, roll);
+void Middleware::set_lookat_target(float x, float y, float z, const string frame_id, bool blocking, float roll) {
+	publish_lookat_target(x, y, z, frame_id, blocking, roll);
 }
 
-void Middleware::set_mouth_target(RobotMouth target, bool blocking){
-    mouthTarget = target;
-    publish_mouth_target(mouthTarget, blocking);
+void Middleware::set_mouth_target(RobotMouth target, bool blocking) {
+	mouthTarget = target;
+	publish_mouth_target(mouthTarget, blocking);
 }
 
-
-RobotGaze Middleware::get_gaze_target(){
-    return gazeTarget;
+RobotGaze Middleware::get_gaze_target() {
+	return gazeTarget;
 }
 
-void Middleware::set_head_animation(RobotHeadAnimation a, bool blocking){
-    headAnimation = a;
-    publish_head_animation(headAnimation, blocking);
+void Middleware::set_head_animation(RobotHeadAnimation a, bool blocking) {
+	headAnimation = a;
+	publish_head_animation(headAnimation, blocking);
 }
 
-void Middleware::set_speak(string text, bool blocking){
-    publish_speech(text, blocking);
+void Middleware::set_speak(string text, bool blocking) {
+	publish_speech(text, blocking);
 }
diff --git a/client/cpp/src/MiddlewareROS.cpp b/client/cpp/src/MiddlewareROS.cpp
index aad481e..d806dad 100644
--- a/client/cpp/src/MiddlewareROS.cpp
+++ b/client/cpp/src/MiddlewareROS.cpp
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 #ifdef ROS_SUPPORT
 
 #include "MiddlewareROS.h"
@@ -36,254 +36,250 @@
 using namespace std;
 
 MiddlewareROS::MiddlewareROS(string scope) : Middleware(scope) {
-    printf("> new MiddlewareROS() on base scope '%s'\n",base_scope.c_str());
-    init();
+	printf("> new MiddlewareROS() on base scope '%s'\n", base_scope.c_str());
+	init();
 }
 
 template <typename actionspec>
-actionlib::SimpleActionClient<actionspec> * create_action_client(string scope){
-    printf("> starting SimpleActionClient on %s\n",scope.c_str());
+actionlib::SimpleActionClient<actionspec>* create_action_client(string scope) {
+	printf("> starting SimpleActionClient on %s\n", scope.c_str());
 
-    actionlib::SimpleActionClient<actionspec> *ac = new actionlib::SimpleActionClient<actionspec>(scope, true);
+	actionlib::SimpleActionClient<actionspec>* ac = new actionlib::SimpleActionClient<actionspec>(scope, true);
 
-    if (!ac->waitForServer(ros::Duration(1))){
-        char buf[256];
-        snprintf(buf, 256, "ERROR: action service %s not ready", scope.c_str());
-        throw runtime_error(buf);
-    }
-    return ac;
+	if (!ac->waitForServer(ros::Duration(1))) {
+		char buf[256];
+		snprintf(buf, 256, "ERROR: action service %s not ready", scope.c_str());
+		throw runtime_error(buf);
+	}
+	return ac;
 }
 
-void MiddlewareROS::init(void){
-    printf("> MiddlewareROS::init()\n");
+void MiddlewareROS::init(void) {
+	printf("> MiddlewareROS::init()\n");
 
-    string scope = base_scope + "/set";
+	string scope = base_scope + "/set";
 
-    string node_name = "hlrc_client__"+ base_scope;
-    node_name.erase(boost::remove_if(node_name, boost::is_any_of("/")), node_name.end());
+	string node_name = "hlrc_client__" + base_scope;
+	node_name.erase(boost::remove_if(node_name, boost::is_any_of("/")), node_name.end());
 
-    printf("> registering on ROS as node %s, scope = %s\n",node_name.c_str(), scope.c_str());
-    if (!ros::isInitialized()){
-        ros::M_string no_remapping;
-        ros::init(no_remapping, node_name);
-    }
+	printf("> registering on ROS as node %s, scope = %s\n", node_name.c_str(), scope.c_str());
+	if (!ros::isInitialized()) {
+		ros::M_string no_remapping;
+		ros::init(no_remapping, node_name);
+	}
 
-    //create node handle
-    //ros_node_handle = new ros::NodeHandle();
-    //node_handle = boost::shared_ptr<ros::NodeHandle>(new ros::NodeHandle());
+	// create node handle
+	// ros_node_handle = new ros::NodeHandle();
+	// node_handle = boost::shared_ptr<ros::NodeHandle>(new ros::NodeHandle());
 
-    printf("> setting up ROS action clients...\n");
-    animation_ac = create_action_client<hlrc_server::animationAction>(scope + "/animation");
-    utterance_ac = create_action_client<hlrc_server::utteranceAction>(scope + "/utterance");
-    current_emotionstate_ac = create_action_client<hlrc_server::emotionstateAction>(scope + "/currentEmotion");
-    default_emotionstate_ac = create_action_client<hlrc_server::emotionstateAction>(scope + "/defaultEmotion");
-    gazetarget_ac = create_action_client<hlrc_server::gazetargetAction>(scope + "/gaze");
-    lookattarget_ac = create_action_client<hlrc_server::lookattargetAction>(scope + "/lookat");
-    mouthtarget_ac = create_action_client<hlrc_server::mouthtargetAction>(scope + "/mouth");
-    speech_ac = create_action_client<hlrc_server::speechAction>(scope + "/speech");
+	printf("> setting up ROS action clients...\n");
+	animation_ac = create_action_client<hlrc_server::animationAction>(scope + "/animation");
+	utterance_ac = create_action_client<hlrc_server::utteranceAction>(scope + "/utterance");
+	current_emotionstate_ac = create_action_client<hlrc_server::emotionstateAction>(scope + "/currentEmotion");
+	default_emotionstate_ac = create_action_client<hlrc_server::emotionstateAction>(scope + "/defaultEmotion");
+	gazetarget_ac = create_action_client<hlrc_server::gazetargetAction>(scope + "/gaze");
+	lookattarget_ac = create_action_client<hlrc_server::lookattargetAction>(scope + "/lookat");
+	mouthtarget_ac = create_action_client<hlrc_server::mouthtargetAction>(scope + "/mouth");
+	speech_ac = create_action_client<hlrc_server::speechAction>(scope + "/speech");
 
-    printf("> init done.\n");
+	printf("> init done.\n");
 }
 
-
-void MiddlewareROS::publish_emotion(string scope_target, RobotEmotion e, bool blocking){
-    hlrc_server::emotionstateGoal goal;
-
-    switch(e.value){
-        default:
-            printf("> WANRING: invalid emotion id %d. defaulting to NEUTRAL\n",e.value);
-            //fall through:
-        case(RobotEmotion::NEUTRAL):
-            goal.value = hlrc_server::emotionstateGoal::NEUTRAL;
-            break;
-        case(RobotEmotion::HAPPY):
-            goal.value = hlrc_server::emotionstateGoal::HAPPY;
-            break;
-        case(RobotEmotion::SAD):
-            goal.value = hlrc_server::emotionstateGoal::SAD;
-            break;
-        case(RobotEmotion::ANGRY):
-            goal.value = hlrc_server::emotionstateGoal::ANGRY;
-            break;
-        case(RobotEmotion::SURPRISED):
-            goal.value = hlrc_server::emotionstateGoal::SURPRISED;
-            break;
-        case(RobotEmotion::FEAR):
-            goal.value = hlrc_server::emotionstateGoal::FEAR;
-            break;
-    }
-
-    goal.duration = e.time_ms;
-
-    actionlib::SimpleActionClient<hlrc_server::emotionstateAction>  *ac;
-    if (scope_target == "defaultEmotion"){
-        ac = default_emotionstate_ac;
-    }else{
-        ac = current_emotionstate_ac;
-    }
-
-    //send
-    ac->sendGoal(goal);
-
-    if (blocking){
-        bool finished_before_timeout = ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
-        if (!finished_before_timeout){
-            printf("> ERROR: blocking call timed out!\n");
-        }
-    }
+void MiddlewareROS::publish_emotion(string scope_target, RobotEmotion e, bool blocking) {
+	hlrc_server::emotionstateGoal goal;
+
+	switch (e.value) {
+		default:
+			printf("> WANRING: invalid emotion id %d. defaulting to NEUTRAL\n", e.value);
+			// fall through:
+		case (RobotEmotion::NEUTRAL):
+			goal.value = hlrc_server::emotionstateGoal::NEUTRAL;
+			break;
+		case (RobotEmotion::HAPPY):
+			goal.value = hlrc_server::emotionstateGoal::HAPPY;
+			break;
+		case (RobotEmotion::SAD):
+			goal.value = hlrc_server::emotionstateGoal::SAD;
+			break;
+		case (RobotEmotion::ANGRY):
+			goal.value = hlrc_server::emotionstateGoal::ANGRY;
+			break;
+		case (RobotEmotion::SURPRISED):
+			goal.value = hlrc_server::emotionstateGoal::SURPRISED;
+			break;
+		case (RobotEmotion::FEAR):
+			goal.value = hlrc_server::emotionstateGoal::FEAR;
+			break;
+	}
+
+	goal.duration = e.time_ms;
+
+	actionlib::SimpleActionClient<hlrc_server::emotionstateAction>* ac;
+	if (scope_target == "defaultEmotion") {
+		ac = default_emotionstate_ac;
+	}
+	else {
+		ac = current_emotionstate_ac;
+	}
+
+	// send
+	ac->sendGoal(goal);
+
+	if (blocking) {
+		bool finished_before_timeout = ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
+		if (!finished_before_timeout) {
+			printf("> ERROR: blocking call timed out!\n");
+		}
+	}
 }
 
-
-void MiddlewareROS::publish_current_emotion(RobotEmotion e, bool blocking){
-    publish_emotion("currentEmotion", e, blocking);
+void MiddlewareROS::publish_current_emotion(RobotEmotion e, bool blocking) {
+	publish_emotion("currentEmotion", e, blocking);
 }
 
-void MiddlewareROS::publish_default_emotion(RobotEmotion e, bool blocking){
-    publish_emotion("defaultEmotion", e, blocking);
+void MiddlewareROS::publish_default_emotion(RobotEmotion e, bool blocking) {
+	publish_emotion("defaultEmotion", e, blocking);
 }
 
-void MiddlewareROS::publish_gaze_target(RobotGaze target, bool blocking){
-    hlrc_server::gazetargetGoal goal;
-
-    goal.pan = target.pan;
-    goal.tilt = target.tilt;
-    goal.roll = target.roll;
-    goal.vergence = target.vergence;
-
-    goal.tilt_offset = target.tilt_offset;
-    goal.pan_offset = target.pan_offset;
-
-    //timestamp:
-    goal.gaze_timestamp.sec  = target.gaze_timestamp.sec;
-    goal.gaze_timestamp.nsec = target.gaze_timestamp.nsec;
-
-    if (target.gaze_type == RobotGaze::ABSOLUTE){
-        goal.gaze_type = hlrc_server::gazetargetGoal::GAZETARGET_ABSOLUTE;
-    }else{
-        goal.gaze_type = hlrc_server::gazetargetGoal::GAZETARGET_RELATIVE;
-    }
-
-    //send
-    gazetarget_ac->sendGoal(goal);
-
-    if (blocking){
-        bool finished_before_timeout = gazetarget_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
-        if (!finished_before_timeout){
-            printf("> ERROR: blocking call timed out!\n");
-        }
-    }
+void MiddlewareROS::publish_gaze_target(RobotGaze target, bool blocking) {
+	hlrc_server::gazetargetGoal goal;
+
+	goal.pan = target.pan;
+	goal.tilt = target.tilt;
+	goal.roll = target.roll;
+	goal.vergence = target.vergence;
+
+	goal.tilt_offset = target.tilt_offset;
+	goal.pan_offset = target.pan_offset;
+
+	// timestamp:
+	goal.gaze_timestamp.sec = target.gaze_timestamp.sec;
+	goal.gaze_timestamp.nsec = target.gaze_timestamp.nsec;
+
+	if (target.gaze_type == RobotGaze::ABSOLUTE) {
+		goal.gaze_type = hlrc_server::gazetargetGoal::GAZETARGET_ABSOLUTE;
+	}
+	else {
+		goal.gaze_type = hlrc_server::gazetargetGoal::GAZETARGET_RELATIVE;
+	}
+
+	// send
+	gazetarget_ac->sendGoal(goal);
+
+	if (blocking) {
+		bool finished_before_timeout = gazetarget_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
+		if (!finished_before_timeout) {
+			printf("> ERROR: blocking call timed out!\n");
+		}
+	}
 }
 
-void MiddlewareROS::publish_lookat_target(float x, float y, float z, const string frame_id, bool blocking, float roll)
-{
-    hlrc_server::lookattargetGoal goal;
-    goal.point.header.frame_id = frame_id;
-    goal.point.header.stamp = ros::Time::now();
-
-    geometry_msgs::Point &p = goal.point.point;
-    p.x = x;
-    p.y = y;
-    p.z = z;
-    goal.roll = roll;
-
-    //send
-    lookattarget_ac->sendGoal(goal);
-
-    if (blocking){
-        bool finished_before_timeout = gazetarget_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
-        if (!finished_before_timeout){
-            printf("> ERROR: blocking call timed out!\n");
-        }
-    }
+void MiddlewareROS::publish_lookat_target(float x, float y, float z, const string frame_id, bool blocking, float roll) {
+	hlrc_server::lookattargetGoal goal;
+	goal.point.header.frame_id = frame_id;
+	goal.point.header.stamp = ros::Time::now();
+
+	geometry_msgs::Point& p = goal.point.point;
+	p.x = x;
+	p.y = y;
+	p.z = z;
+	goal.roll = roll;
+
+	// send
+	lookattarget_ac->sendGoal(goal);
+
+	if (blocking) {
+		bool finished_before_timeout = gazetarget_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
+		if (!finished_before_timeout) {
+			printf("> ERROR: blocking call timed out!\n");
+		}
+	}
 }
 
+void MiddlewareROS::publish_mouth_target(RobotMouth target, bool blocking) {
+	hlrc_server::mouthtargetGoal goal;
 
-void MiddlewareROS::publish_mouth_target(RobotMouth target, bool blocking){
-    hlrc_server::mouthtargetGoal goal;
-
-    goal.position_left   = target.position_left;
-    goal.position_center = target.position_center;
-    goal.position_right  = target.position_right;
+	goal.position_left = target.position_left;
+	goal.position_center = target.position_center;
+	goal.position_right = target.position_right;
 
-    goal.opening_left   = target.opening_left;
-    goal.opening_center = target.opening_center;
-    goal.opening_right  = target.opening_right;
+	goal.opening_left = target.opening_left;
+	goal.opening_center = target.opening_center;
+	goal.opening_right = target.opening_right;
 
+	// send
+	mouthtarget_ac->sendGoal(goal);
 
-    //send
-    mouthtarget_ac->sendGoal(goal);
-
-    if (blocking){
-        bool finished_before_timeout = mouthtarget_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
-        if (!finished_before_timeout){
-            printf("> ERROR: blocking call timed out!\n");
-        }
-    }
+	if (blocking) {
+		bool finished_before_timeout = mouthtarget_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
+		if (!finished_before_timeout) {
+			printf("> ERROR: blocking call timed out!\n");
+		}
+	}
 }
 
-void MiddlewareROS::publish_head_animation(RobotHeadAnimation a, bool blocking){
-    hlrc_server::animationGoal goal;
-
-    switch(a.value){
-        default:
-            printf("> WANRING: invalid animation id %d. defaulting to IDLE",a.value);
-            //fall through:
-        case(RobotHeadAnimation::IDLE):
-            goal.target = hlrc_server::animationGoal::IDLE;
-            break;
-        case(RobotHeadAnimation::HEAD_NOD):
-            goal.target = hlrc_server::animationGoal::HEAD_NOD;
-            break;
-        case(RobotHeadAnimation::HEAD_SHAKE):
-            goal.target = hlrc_server::animationGoal::HEAD_SHAKE;
-            break;
-        case(RobotHeadAnimation::EYEBLINK_L):
-            goal.target = hlrc_server::animationGoal::EYEBLINK_L;
-            break;
-        case(RobotHeadAnimation::EYEBLINK_R):
-            goal.target = hlrc_server::animationGoal::EYEBLINK_R;
-            break;
-        case(RobotHeadAnimation::EYEBLINK_BOTH):
-            goal.target = hlrc_server::animationGoal::EYEBLINK_BOTH;
-            break;
-        case(RobotHeadAnimation::EYEBROWS_RAISE):
-            goal.target = hlrc_server::animationGoal::EYEBROWS_RAISE;
-            break;
-        case(RobotHeadAnimation::EYEBROWS_LOWER):
-            goal.target = hlrc_server::animationGoal::EYEBROWS_LOWER;
-            break;
-    }
-
-    goal.repetitions = a.repetitions;
-    goal.scale       = a.scale;
-    goal.duration_each = a.time_ms;
-
-    //send
-    animation_ac->sendGoal(goal);
-
-    if (blocking){
-        bool finished_before_timeout = animation_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
-        if (!finished_before_timeout){
-            printf("> ERROR: blocking call timed out!\n");
-        }
-    }
+void MiddlewareROS::publish_head_animation(RobotHeadAnimation a, bool blocking) {
+	hlrc_server::animationGoal goal;
+
+	switch (a.value) {
+		default:
+			printf("> WANRING: invalid animation id %d. defaulting to IDLE", a.value);
+			// fall through:
+		case (RobotHeadAnimation::IDLE):
+			goal.target = hlrc_server::animationGoal::IDLE;
+			break;
+		case (RobotHeadAnimation::HEAD_NOD):
+			goal.target = hlrc_server::animationGoal::HEAD_NOD;
+			break;
+		case (RobotHeadAnimation::HEAD_SHAKE):
+			goal.target = hlrc_server::animationGoal::HEAD_SHAKE;
+			break;
+		case (RobotHeadAnimation::EYEBLINK_L):
+			goal.target = hlrc_server::animationGoal::EYEBLINK_L;
+			break;
+		case (RobotHeadAnimation::EYEBLINK_R):
+			goal.target = hlrc_server::animationGoal::EYEBLINK_R;
+			break;
+		case (RobotHeadAnimation::EYEBLINK_BOTH):
+			goal.target = hlrc_server::animationGoal::EYEBLINK_BOTH;
+			break;
+		case (RobotHeadAnimation::EYEBROWS_RAISE):
+			goal.target = hlrc_server::animationGoal::EYEBROWS_RAISE;
+			break;
+		case (RobotHeadAnimation::EYEBROWS_LOWER):
+			goal.target = hlrc_server::animationGoal::EYEBROWS_LOWER;
+			break;
+	}
+
+	goal.repetitions = a.repetitions;
+	goal.scale = a.scale;
+	goal.duration_each = a.time_ms;
+
+	// send
+	animation_ac->sendGoal(goal);
+
+	if (blocking) {
+		bool finished_before_timeout = animation_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
+		if (!finished_before_timeout) {
+			printf("> ERROR: blocking call timed out!\n");
+		}
+	}
 }
 
-void MiddlewareROS::publish_speech(string text, bool blocking){
-    hlrc_server::speechGoal goal;
+void MiddlewareROS::publish_speech(string text, bool blocking) {
+	hlrc_server::speechGoal goal;
 
-    goal.text = text;
+	goal.text = text;
 
-    //send
-    speech_ac->sendGoal(goal);
+	// send
+	speech_ac->sendGoal(goal);
 
-    if (blocking){
-        bool finished_before_timeout = speech_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
-        if (!finished_before_timeout){
-            printf("> ERROR: blocking call timed out!\n");
-        }
-    }
+	if (blocking) {
+		bool finished_before_timeout = speech_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
+		if (!finished_before_timeout) {
+			printf("> ERROR: blocking call timed out!\n");
+		}
+	}
 }
 
 #endif
-
diff --git a/client/cpp/src/MiddlewareRSB.cpp b/client/cpp/src/MiddlewareRSB.cpp
index 23cc5b3..435ef08 100644
--- a/client/cpp/src/MiddlewareRSB.cpp
+++ b/client/cpp/src/MiddlewareRSB.cpp
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #ifdef RSB_SUPPORT
 
@@ -45,202 +45,207 @@ using namespace rsb;
 using namespace rsb::patterns;
 
 MiddlewareRSB::MiddlewareRSB(string scope) : Middleware(scope) {
-    printf("> new MiddlewareRSB() on base scope '%s'\n",base_scope.c_str());
-    init();
+	printf("> new MiddlewareRSB() on base scope '%s'\n", base_scope.c_str());
+	init();
 }
 
-void MiddlewareRSB::init(void){
-    printf("> MiddlewareRSB::init() registering converters\n");
-
-    try{
-        //converter for EmotionState
-        rsb::converter::Converter<string>::Ptr emotionStateConverter(new rsb::converter::ProtocolBufferConverter<rst::animation::EmotionExpression>());
-        rsb::converter::converterRepository<string>()->registerConverter(emotionStateConverter);
-
-        //converter for Utterance
-        //rsb::converter::Converter<string>::Ptr UtteranceConverter(new rsb::converter::ProtocolBufferConverter<rst::audition::Utterance>());
-        //rsb::converter::converterRepository<string>()->registerConverter(UtteranceConverter);
-
-        //converter for GazeTarget
-        rsb::converter::Converter<string>::Ptr gazeTargetConverter(new rsb::converter::ProtocolBufferConverter<rst::animation::BinocularHeadGaze>());
-        rsb::converter::converterRepository<string>()->registerConverter(gazeTargetConverter);
-
-        //converter for MouthTarget
-        ///rsb::converter::Converter<string>::Ptr mouthTargetConverter(new rsb::converter::ProtocolBufferConverter<rst::robot::MouthTarget>());
-        ///rsb::converter::converterRepository<string>()->registerConverter(mouthTargetConverter);
-
-
-        //converter for Animation
-        rsb::converter::Converter<string>::Ptr animationConverter(new rsb::converter::ProtocolBufferConverter<rst::animation::HeadAnimation>());
-        rsb::converter::converterRepository<string>()->registerConverter(animationConverter);
-
-    }catch(std::invalid_argument e){
-        printf("> converters already registered\n");
-    }
-
-    //first get a factory instance that is used to create RSB domain objects
-    Factory &factory = getFactory();
-
-    //get server
-    string scope = base_scope + "/set/";
-    hlrc_server = factory.createRemoteServer(scope);
-
-    printf("> init done\n");
-
+void MiddlewareRSB::init(void) {
+	printf("> MiddlewareRSB::init() registering converters\n");
+
+	try {
+		// converter for EmotionState
+		rsb::converter::Converter<string>::Ptr emotionStateConverter(
+		   new rsb::converter::ProtocolBufferConverter<rst::animation::EmotionExpression>());
+		rsb::converter::converterRepository<string>()->registerConverter(emotionStateConverter);
+
+		// converter for Utterance
+		// rsb::converter::Converter<string>::Ptr UtteranceConverter(new
+		// rsb::converter::ProtocolBufferConverter<rst::audition::Utterance>());
+		// rsb::converter::converterRepository<string>()->registerConverter(UtteranceConverter);
+
+		// converter for GazeTarget
+		rsb::converter::Converter<string>::Ptr gazeTargetConverter(
+		   new rsb::converter::ProtocolBufferConverter<rst::animation::BinocularHeadGaze>());
+		rsb::converter::converterRepository<string>()->registerConverter(gazeTargetConverter);
+
+		// converter for MouthTarget
+		/// rsb::converter::Converter<string>::Ptr mouthTargetConverter(new
+		/// rsb::converter::ProtocolBufferConverter<rst::robot::MouthTarget>());
+		/// rsb::converter::converterRepository<string>()->registerConverter(mouthTargetConverter);
+
+		// converter for Animation
+		rsb::converter::Converter<string>::Ptr animationConverter(
+		   new rsb::converter::ProtocolBufferConverter<rst::animation::HeadAnimation>());
+		rsb::converter::converterRepository<string>()->registerConverter(animationConverter);
+	}
+	catch (std::invalid_argument e) {
+		printf("> converters already registered\n");
+	}
+
+	// first get a factory instance that is used to create RSB domain objects
+	Factory& factory = getFactory();
+
+	// get server
+	string scope = base_scope + "/set/";
+	hlrc_server = factory.createRemoteServer(scope);
+
+	printf("> init done\n");
 }
 
-void MiddlewareRSB::publish_emotion(string scope_target, RobotEmotion e, bool blocking){
-    boost::shared_ptr<rst::animation::EmotionExpression> request(new rst::animation::EmotionExpression());
-
-    switch(e.value){
-        default:
-            printf("> WANRING: invalid emotion id %d. defaulting to NEUTRAL\n",e.value);
-            //fall through:
-        case(RobotEmotion::NEUTRAL):
-            request->set_emotion(rst::animation::EmotionExpression::NEUTRAL);
-            break;
-        case(RobotEmotion::HAPPY):
-            request->set_emotion(rst::animation::EmotionExpression::HAPPY);
-            break;
-        case(RobotEmotion::SAD):
-            request->set_emotion(rst::animation::EmotionExpression::SAD);
-            break;
-        case(RobotEmotion::ANGRY):
-            request->set_emotion(rst::animation::EmotionExpression::ANGRY);
-            break;
-        case(RobotEmotion::SURPRISED):
-            request->set_emotion(rst::animation::EmotionExpression::SURPRISED);
-            break;
-        case(RobotEmotion::FEAR):
-            request->set_emotion(rst::animation::EmotionExpression::FEAR);
-            break;
-    }
-
-    request->set_duration(e.time_ms);
-
-    if (blocking){
-        hlrc_server->call<rst::animation::EmotionExpression>(scope_target, request);
-    }else{
-        hlrc_server->callAsync<rst::animation::EmotionExpression>(scope_target, request);
-    }
+void MiddlewareRSB::publish_emotion(string scope_target, RobotEmotion e, bool blocking) {
+	boost::shared_ptr<rst::animation::EmotionExpression> request(new rst::animation::EmotionExpression());
+
+	switch (e.value) {
+		default:
+			printf("> WANRING: invalid emotion id %d. defaulting to NEUTRAL\n", e.value);
+			// fall through:
+		case (RobotEmotion::NEUTRAL):
+			request->set_emotion(rst::animation::EmotionExpression::NEUTRAL);
+			break;
+		case (RobotEmotion::HAPPY):
+			request->set_emotion(rst::animation::EmotionExpression::HAPPY);
+			break;
+		case (RobotEmotion::SAD):
+			request->set_emotion(rst::animation::EmotionExpression::SAD);
+			break;
+		case (RobotEmotion::ANGRY):
+			request->set_emotion(rst::animation::EmotionExpression::ANGRY);
+			break;
+		case (RobotEmotion::SURPRISED):
+			request->set_emotion(rst::animation::EmotionExpression::SURPRISED);
+			break;
+		case (RobotEmotion::FEAR):
+			request->set_emotion(rst::animation::EmotionExpression::FEAR);
+			break;
+	}
+
+	request->set_duration(e.time_ms);
+
+	if (blocking) {
+		hlrc_server->call<rst::animation::EmotionExpression>(scope_target, request);
+	}
+	else {
+		hlrc_server->callAsync<rst::animation::EmotionExpression>(scope_target, request);
+	}
 }
 
-
-void MiddlewareRSB::publish_current_emotion(RobotEmotion e, bool blocking){
-    publish_emotion("currentEmotion", e, blocking);
+void MiddlewareRSB::publish_current_emotion(RobotEmotion e, bool blocking) {
+	publish_emotion("currentEmotion", e, blocking);
 }
 
-void MiddlewareRSB::publish_default_emotion(RobotEmotion e, bool blocking){
-    publish_emotion("defaultEmotion", e, blocking);
+void MiddlewareRSB::publish_default_emotion(RobotEmotion e, bool blocking) {
+	publish_emotion("defaultEmotion", e, blocking);
 }
 
-void MiddlewareRSB::publish_gaze_target(RobotGaze incoming_target, bool blocking){
-    boost::shared_ptr<rst::animation::BinocularHeadGaze> request(new rst::animation::BinocularHeadGaze ());
+void MiddlewareRSB::publish_gaze_target(RobotGaze incoming_target, bool blocking) {
+	boost::shared_ptr<rst::animation::BinocularHeadGaze> request(new rst::animation::BinocularHeadGaze());
 
-    boost::shared_ptr<rst::geometry::SphericalDirectionFloat> target(new rst::geometry::SphericalDirectionFloat ());
-    target->set_azimuth(incoming_target.pan);
-    target->set_elevation(incoming_target.tilt);
-    request->set_allocated_target(target.get());
+	boost::shared_ptr<rst::geometry::SphericalDirectionFloat> target(new rst::geometry::SphericalDirectionFloat());
+	target->set_azimuth(incoming_target.pan);
+	target->set_elevation(incoming_target.tilt);
+	request->set_allocated_target(target.get());
 
-    request->set_eye_vergence(incoming_target.vergence);
+	request->set_eye_vergence(incoming_target.vergence);
 
-    boost::shared_ptr<rst::geometry::SphericalDirectionFloat> offset(new rst::geometry::SphericalDirectionFloat());
-    offset->set_azimuth(incoming_target.pan_offset);
-    offset->set_elevation(incoming_target.tilt_offset);
-    request->set_allocated_offset(offset.get());
+	boost::shared_ptr<rst::geometry::SphericalDirectionFloat> offset(new rst::geometry::SphericalDirectionFloat());
+	offset->set_azimuth(incoming_target.pan_offset);
+	offset->set_elevation(incoming_target.tilt_offset);
+	request->set_allocated_offset(offset.get());
 
-    if (blocking){
-        hlrc_server->call<rst::animation::BinocularHeadGaze >("gaze", request);
-    }else{
-        hlrc_server->callAsync<rst::animation::BinocularHeadGaze >("gaze", request);
-    }
+	if (blocking) {
+		hlrc_server->call<rst::animation::BinocularHeadGaze>("gaze", request);
+	}
+	else {
+		hlrc_server->callAsync<rst::animation::BinocularHeadGaze>("gaze", request);
+	}
 }
 
-void MiddlewareRSB::publish_lookat_target(float x, float y, float z, const std::string frame_id,
-                                          bool blocking, float roll){
-    std::cerr << "not yet implemented" << std::endl;
+void MiddlewareRSB::publish_lookat_target(float x, float y, float z, const std::string frame_id, bool blocking, float roll) {
+	std::cerr << "not yet implemented" << std::endl;
 }
 
-void MiddlewareRSB::publish_mouth_target(RobotMouth target, bool blocking){
-/*
-    boost::shared_ptr<rst::robot::MouthTarget> request(new rst::robot::MouthTarget());
-
-    request->set_position_left(  target.position_left);
-    request->set_position_center(target.position_center);
-    request->set_position_right( target.position_right);
-
-    request->set_opening_left(  target.opening_left);
-    request->set_opening_center(target.opening_center);
-    request->set_opening_right( target.opening_right);
-
-    if (blocking){
-        hlrc_server->call<rst::robot::MouthTarget>("mouth", request);
-    }else{
-        hlrc_server->callAsync<rst::robot::MouthTarget>("mouth", request);
-    }
-*/
-    printf("> ERROR: mouth targets not yet implemented in RSB middleware!\n");
+void MiddlewareRSB::publish_mouth_target(RobotMouth target, bool blocking) {
+	/*
+	    boost::shared_ptr<rst::robot::MouthTarget> request(new rst::robot::MouthTarget());
+
+	    request->set_position_left(  target.position_left);
+	    request->set_position_center(target.position_center);
+	    request->set_position_right( target.position_right);
+
+	    request->set_opening_left(  target.opening_left);
+	    request->set_opening_center(target.opening_center);
+	    request->set_opening_right( target.opening_right);
+
+	    if (blocking){
+	        hlrc_server->call<rst::robot::MouthTarget>("mouth", request);
+	    }else{
+	        hlrc_server->callAsync<rst::robot::MouthTarget>("mouth", request);
+	    }
+	*/
+	printf("> ERROR: mouth targets not yet implemented in RSB middleware!\n");
 }
 
-void MiddlewareRSB::publish_head_animation(RobotHeadAnimation a, bool blocking){
-    boost::shared_ptr<rst::animation::HeadAnimation> request(new rst::animation::HeadAnimation());
-
-    switch(a.value){
-        default:
-            printf("> WANRING: invalid animation id %d. defaulting to IDLE",a.value);
-            //fall through:
-        case(RobotHeadAnimation::IDLE):
-            request->set_animation(rst::animation::HeadAnimation::IDLE);
-            break;
-        case(RobotHeadAnimation::HEAD_NOD):
-            request->set_animation(rst::animation::HeadAnimation::HEAD_NOD);
-            break;
-        case(RobotHeadAnimation::HEAD_SHAKE):
-            request->set_animation(rst::animation::HeadAnimation::HEAD_SHAKE);
-            break;
-        case(RobotHeadAnimation::EYEBLINK_L):
-            request->set_animation(rst::animation::HeadAnimation::EYEBLINK_LEFT);
-            break;
-        case(RobotHeadAnimation::EYEBLINK_R):
-            request->set_animation(rst::animation::HeadAnimation::EYEBLINK_RIGHT);
-            break;
-        case(RobotHeadAnimation::EYEBLINK_BOTH):
-            request->set_animation(rst::animation::HeadAnimation::EYEBLINK_BOTH);
-            break;
-        case(RobotHeadAnimation::EYEBROWS_RAISE):
-            request->set_animation(rst::animation::HeadAnimation::EYEBROWS_RAISE);
-            break;
-        case(RobotHeadAnimation::EYEBROWS_LOWER):
-            request->set_animation(rst::animation::HeadAnimation::EYEBROWS_LOWER);
-            break;
-        case(RobotHeadAnimation::ENGAGEMENT_LEFT):
-            request->set_animation(rst::animation::HeadAnimation::ENGAGEMENT_LEFT);
-            break;
-        case(RobotHeadAnimation::ENGAGEMENT_RIGHT):
-            request->set_animation(rst::animation::HeadAnimation::ENGAGEMENT_RIGHT);
-            break;
-    }
-
-    request->set_repetitions(a.repetitions);
-    request->set_emphasis_scale(a.scale);
-    request->set_duration_each(a.time_ms);
-
-    if (blocking){
-        hlrc_server->call<rst::animation::HeadAnimation>("animation", request);
-    }else{
-        hlrc_server->callAsync<rst::animation::HeadAnimation>("animation", request);
-    }
+void MiddlewareRSB::publish_head_animation(RobotHeadAnimation a, bool blocking) {
+	boost::shared_ptr<rst::animation::HeadAnimation> request(new rst::animation::HeadAnimation());
+
+	switch (a.value) {
+		default:
+			printf("> WANRING: invalid animation id %d. defaulting to IDLE", a.value);
+			// fall through:
+		case (RobotHeadAnimation::IDLE):
+			request->set_animation(rst::animation::HeadAnimation::IDLE);
+			break;
+		case (RobotHeadAnimation::HEAD_NOD):
+			request->set_animation(rst::animation::HeadAnimation::HEAD_NOD);
+			break;
+		case (RobotHeadAnimation::HEAD_SHAKE):
+			request->set_animation(rst::animation::HeadAnimation::HEAD_SHAKE);
+			break;
+		case (RobotHeadAnimation::EYEBLINK_L):
+			request->set_animation(rst::animation::HeadAnimation::EYEBLINK_LEFT);
+			break;
+		case (RobotHeadAnimation::EYEBLINK_R):
+			request->set_animation(rst::animation::HeadAnimation::EYEBLINK_RIGHT);
+			break;
+		case (RobotHeadAnimation::EYEBLINK_BOTH):
+			request->set_animation(rst::animation::HeadAnimation::EYEBLINK_BOTH);
+			break;
+		case (RobotHeadAnimation::EYEBROWS_RAISE):
+			request->set_animation(rst::animation::HeadAnimation::EYEBROWS_RAISE);
+			break;
+		case (RobotHeadAnimation::EYEBROWS_LOWER):
+			request->set_animation(rst::animation::HeadAnimation::EYEBROWS_LOWER);
+			break;
+		case (RobotHeadAnimation::ENGAGEMENT_LEFT):
+			request->set_animation(rst::animation::HeadAnimation::ENGAGEMENT_LEFT);
+			break;
+		case (RobotHeadAnimation::ENGAGEMENT_RIGHT):
+			request->set_animation(rst::animation::HeadAnimation::ENGAGEMENT_RIGHT);
+			break;
+	}
+
+	request->set_repetitions(a.repetitions);
+	request->set_emphasis_scale(a.scale);
+	request->set_duration_each(a.time_ms);
+
+	if (blocking) {
+		hlrc_server->call<rst::animation::HeadAnimation>("animation", request);
+	}
+	else {
+		hlrc_server->callAsync<rst::animation::HeadAnimation>("animation", request);
+	}
 }
 
-void MiddlewareRSB::publish_speech(string text, bool blocking){
-    //say it
-    boost::shared_ptr<std::string> request(new string(text));
+void MiddlewareRSB::publish_speech(string text, bool blocking) {
+	// say it
+	boost::shared_ptr<std::string> request(new string(text));
 
-    if (blocking){
-        hlrc_server->call<std::string>("speech", request);
-    }else{
-        hlrc_server->callAsync<std::string>("speech", request);
-    }
+	if (blocking) {
+		hlrc_server->call<std::string>("speech", request);
+	}
+	else {
+		hlrc_server->callAsync<std::string>("speech", request);
+	}
 }
 
 #endif
diff --git a/client/cpp/src/RobotController.cpp b/client/cpp/src/RobotController.cpp
index 0d81f1c..a08c871 100644
--- a/client/cpp/src/RobotController.cpp
+++ b/client/cpp/src/RobotController.cpp
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "RobotController.h"
 #include "Middleware.h"
@@ -33,53 +33,50 @@
 
 using namespace std;
 
-RobotController::RobotController(string mw_name, string base_scope){
-
-     if (mw_name == "ROS"){
-         //intantiate ROS mw
-         middleware = new MiddlewareROS(base_scope);
-     }else if (mw_name == "RSB"){
-         //intantiate RSB mw
-         middleware = new MiddlewareRSB(base_scope);
-    }else{
-         printf("ERROR: invalid middleware requested (%s). supported: {ROS, RSB}\n\n", mw_name.c_str());
-        exit(EXIT_FAILURE);
-    }
+RobotController::RobotController(string mw_name, string base_scope) {
+	if (mw_name == "ROS") {
+		// intantiate ROS mw
+		middleware = new MiddlewareROS(base_scope);
+	}
+	else if (mw_name == "RSB") {
+		// intantiate RSB mw
+		middleware = new MiddlewareRSB(base_scope);
+	}
+	else {
+		printf("ERROR: invalid middleware requested (%s). supported: {ROS, RSB}\n\n", mw_name.c_str());
+		exit(EXIT_FAILURE);
+	}
 }
 
-void RobotController::set_current_emotion(RobotEmotion e, bool blocking){
-    middleware->set_current_emotion(e, blocking);
+void RobotController::set_current_emotion(RobotEmotion e, bool blocking) {
+	middleware->set_current_emotion(e, blocking);
 }
 
-void RobotController::set_default_emotion(RobotEmotion e, bool blocking){
-    middleware->set_default_emotion(e, blocking);
+void RobotController::set_default_emotion(RobotEmotion e, bool blocking) {
+	middleware->set_default_emotion(e, blocking);
 }
 
-
-void RobotController::set_gaze_target(RobotGaze target, bool blocking){
-    middleware->set_gaze_target(target, blocking);
+void RobotController::set_gaze_target(RobotGaze target, bool blocking) {
+	middleware->set_gaze_target(target, blocking);
 }
 
-RobotGaze RobotController::get_gaze_target(){
-    return middleware->get_gaze_target();
+RobotGaze RobotController::get_gaze_target() {
+	return middleware->get_gaze_target();
 }
 
-void RobotController::set_lookat_target(float x, float y, float z, const std::string frame_id,
-                                        bool blocking, float roll){
-    middleware->set_lookat_target(x, y, z, frame_id, blocking, roll);
+void RobotController::set_lookat_target(float x, float y, float z, const std::string frame_id, bool blocking, float roll) {
+	middleware->set_lookat_target(x, y, z, frame_id, blocking, roll);
 }
 
-void RobotController::set_mouth_target(RobotMouth target, bool blocking){
-    middleware->set_mouth_target(target, blocking);
+void RobotController::set_mouth_target(RobotMouth target, bool blocking) {
+	middleware->set_mouth_target(target, blocking);
 }
 
-void RobotController::set_head_animation(RobotHeadAnimation a, bool blocking){
-    middleware->set_head_animation(a, blocking);
+void RobotController::set_head_animation(RobotHeadAnimation a, bool blocking) {
+	middleware->set_head_animation(a, blocking);
 }
 
-void RobotController::set_speak(string text, bool blocking){
-    printf("> DBG: set_speak(%s, %s)\n",text.c_str(),blocking?"blocking":"nonblock");
-    middleware->set_speak(text, blocking);
+void RobotController::set_speak(string text, bool blocking) {
+	printf("> DBG: set_speak(%s, %s)\n", text.c_str(), blocking ? "blocking" : "nonblock");
+	middleware->set_speak(text, blocking);
 }
-
-
diff --git a/server/include/Animation.h b/server/include/Animation.h
index ef7c19e..7dc9900 100644
--- a/server/include/Animation.h
+++ b/server/include/Animation.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include <humotion/gaze_state.h>
@@ -32,66 +32,76 @@
 #include <boost/thread/thread_time.hpp>
 #include <boost/thread/thread.hpp>
 
-class Animation{
+class Animation {
 public:
-    Animation();
-    ~Animation();
+	Animation();
+	~Animation();
 
-    void apply_on_gazestate(humotion::GazeState *gaze);
-    void start();
-    bool is_active();
-    bool collides_with(Animation *ani);
+	void apply_on_gazestate(humotion::GazeState* gaze);
+	void start();
+	bool is_active();
+	bool collides_with(Animation* ani);
 
+	typedef enum
+	{
+		IDLE = 0,
+		HEAD_NOD,
+		HEAD_SHAKE,
+		EYEBLINK_L,
+		EYEBLINK_R,
+		EYEBLINK_BOTH,
+		EYEBROWS_RAISE,
+		EYEBROWS_LOWER,
+		ENGAGEMENT_LEFT,
+		ENGAGEMENT_RIGHT
+	} AnimationType_t;
 
-    typedef enum {
-        IDLE  = 0,
-        HEAD_NOD,
-        HEAD_SHAKE,
-        EYEBLINK_L,
-        EYEBLINK_R,
-        EYEBLINK_BOTH,
-        EYEBROWS_RAISE,
-        EYEBROWS_LOWER,
-        ENGAGEMENT_LEFT,
-        ENGAGEMENT_RIGHT
-    } AnimationType_t;
+	AnimationType_t target;
+	unsigned int repetitions;
+	unsigned int duration_each; // in ms
+	float scale;
 
-    AnimationType_t target;
-    unsigned int repetitions;
-    unsigned int duration_each; //in ms
-    float  scale;
+	std::string type_as_string() {
+		switch ((int)target) {
+			case (IDLE):
+				return "IDLE";
+			case (HEAD_NOD):
+				return "HEAD_NOD";
+			case (HEAD_SHAKE):
+				return "HEAD_SHAKE";
+			case (EYEBLINK_L):
+				return "EYEBLINK_L";
+			case (EYEBLINK_R):
+				return "EYEBLINK_R";
+			case (EYEBLINK_BOTH):
+				return "EYEBLINK_BOTH";
+			case (EYEBROWS_RAISE):
+				return "EYEBROWS_RAISE";
+			case (EYEBROWS_LOWER):
+				return "EYEBROWS_LOWER";
+			case (ENGAGEMENT_LEFT):
+				return "ENGAGEMENT_LEFT";
+			case (ENGAGEMENT_RIGHT):
+				return "ENGAGEMENT_RIGHT";
+			default:
+				return "INVALID ID!";
+		}
+	}
 
-    std::string type_as_string(){
-        switch ((int)target){
-            case(IDLE):        return "IDLE";
-            case(HEAD_NOD):    return "HEAD_NOD";
-            case(HEAD_SHAKE):  return "HEAD_SHAKE";
-            case(EYEBLINK_L):  return "EYEBLINK_L";
-            case(EYEBLINK_R):  return "EYEBLINK_R";
-            case(EYEBLINK_BOTH): return "EYEBLINK_BOTH";
-            case(EYEBROWS_RAISE): return "EYEBROWS_RAISE";
-            case(EYEBROWS_LOWER): return "EYEBROWS_LOWER";
-            case(ENGAGEMENT_LEFT): return "ENGAGEMENT_LEFT";
-            case(ENGAGEMENT_RIGHT): return "ENGAGEMENT_RIGHT";
-            default: return "INVALID ID!";
-        }
-    }
-
-    std::string as_string(){
-        char buf[256];
-        snprintf(buf, 255, "Animation: %d times %s (duration each = %dms)", repetitions, type_as_string().c_str(), duration_each);
-        return buf;
-    }
+	std::string as_string() {
+		char buf[256];
+		snprintf(buf, 255, "Animation: %d times %s (duration each = %dms)", repetitions, type_as_string().c_str(),
+		         duration_each);
+		return buf;
+	}
 
 private:
-    float apply_motion_profile_positive(float tn);
-    float apply_motion_profile_symmetric(float tn, unsigned int rep);
-    float apply_motion_profile_asymmetric(float tn, unsigned int rep);
+	float apply_motion_profile_positive(float tn);
+	float apply_motion_profile_symmetric(float tn, unsigned int rep);
+	float apply_motion_profile_asymmetric(float tn, unsigned int rep);
 
-    bool active;
-    unsigned int repetition_now;
-    boost::system_time end_time;
-    boost::system_time start_time;
+	bool active;
+	unsigned int repetition_now;
+	boost::system_time end_time;
+	boost::system_time start_time;
 };
-
-
diff --git a/server/include/Arbiter.h b/server/include/Arbiter.h
index a9533f5..56564f5 100644
--- a/server/include/Arbiter.h
+++ b/server/include/Arbiter.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include <string>
@@ -38,75 +38,69 @@
 #include <boost/shared_ptr.hpp>
 #include <vector>
 
-class Arbiter{
+class Arbiter {
 public:
-    Arbiter(std::string audio_output);
-    ~Arbiter();
+	Arbiter(std::string audio_output);
+	~Arbiter();
 
-    void arbitrate();
+	void arbitrate();
 
-    void set_default_emotion(EmotionState e);
-    void set_current_emotion(EmotionState e);
-    void set_mouth_config(MouthConfig m);
-    void speak(boost::shared_ptr<Utterance> u);
-    bool speak_active();
+	void set_default_emotion(EmotionState e);
+	void set_current_emotion(EmotionState e);
+	void set_mouth_config(MouthConfig m);
+	void speak(boost::shared_ptr<Utterance> u);
+	bool speak_active();
 
-    void set_gaze_target(humotion::GazeState g);
-    void set_mouth_target(humotion::MouthState target);
-    void play_animation(boost::shared_ptr<Animation> ani);
+	void set_gaze_target(humotion::GazeState g);
+	void set_mouth_target(humotion::MouthState target);
+	void play_animation(boost::shared_ptr<Animation> ani);
 
-    humotion::GazeState  get_gaze_state();
-    humotion::MouthState get_mouth_state();
+	humotion::GazeState get_gaze_state();
+	humotion::MouthState get_mouth_state();
 
 private:
-    void override_by_emotion();
-    void override_by_gaze();
-    void override_by_animation();
-    void override_by_utterance();
-    void override_by_mouth();
+	void override_by_emotion();
+	void override_by_gaze();
+	void override_by_animation();
+	void override_by_utterance();
+	void override_by_mouth();
 
-    humotion::GazeState soft_overblend_gaze(humotion::GazeState gaze_now,
-                                            humotion::GazeState gaze_target,
-                                            unsigned int overblend_time);
+	humotion::GazeState soft_overblend_gaze(humotion::GazeState gaze_now, humotion::GazeState gaze_target,
+	                                        unsigned int overblend_time);
 
-    EmotionConfig emotion_config_current;
-    EmotionConfig emotion_config_default;
+	EmotionConfig emotion_config_current;
+	EmotionConfig emotion_config_default;
 
-    humotion::MouthState mouth_state;
-    humotion::GazeState gaze_state;
+	humotion::MouthState mouth_state;
+	humotion::GazeState gaze_state;
 
+	boost::posix_time::ptime gaze_state_end_time;
+	humotion::GazeState gaze_state_old;
+	bool gaze_state_animation_restart;
 
-    boost::posix_time::ptime gaze_state_end_time;
-    humotion::GazeState gaze_state_old;
-    bool gaze_state_animation_restart;
+	EmotionConfig* emotion_target;
 
-    EmotionConfig *emotion_target;
+	MouthConfig mouth_config;
 
-    MouthConfig mouth_config;
+	boost::shared_ptr<Utterance> utterance;
 
-    boost::shared_ptr<Utterance> utterance;
+	humotion::GazeState requested_gaze_state;
+	humotion::MouthState requested_mouth_state;
 
-    humotion::GazeState requested_gaze_state;
-    humotion::MouthState requested_mouth_state;
+	boost::mutex emotion_config_default_mutex;
+	boost::mutex emotion_config_current_mutex;
+	boost::mutex mouth_config_override_mutex;
+	boost::mutex utterance_mutex;
+	boost::mutex requested_gaze_state_mutex;
+	boost::mutex requested_mouth_state_mutex;
+	boost::mutex audio_player_mutex;
 
+	boost::mutex animation_mutex;
+	Animation active_animation;
 
-    boost::mutex emotion_config_default_mutex;
-    boost::mutex emotion_config_current_mutex;
-    boost::mutex mouth_config_override_mutex;
-    boost::mutex utterance_mutex;
-    boost::mutex requested_gaze_state_mutex;
-    boost::mutex requested_mouth_state_mutex;
-    boost::mutex audio_player_mutex;
+	typedef std::vector<boost::shared_ptr<Animation>> active_animation_vector_t;
+	boost::mutex active_animation_vector_mutex;
+	active_animation_vector_t active_animation_vector;
 
-    boost::mutex animation_mutex;
-    Animation active_animation;
-
-    typedef std::vector<boost::shared_ptr<Animation>> active_animation_vector_t;
-    boost::mutex active_animation_vector_mutex;
-    active_animation_vector_t active_animation_vector;
-
-
-    AudioPlayer *audio_player;
+	AudioPlayer* audio_player;
 };
-
-
diff --git a/server/include/AudioData.h b/server/include/AudioData.h
index 03abf3e..4a00584 100644
--- a/server/include/AudioData.h
+++ b/server/include/AudioData.h
@@ -1,55 +1,51 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include <vector>
 #include <string>
 
-class AudioData{
+class AudioData {
 public:
-    AudioData(){};
-    ~AudioData(){};
+	AudioData(){};
+	~AudioData(){};
 
-    std::vector<char> samples;
-    unsigned int sample_bit;  //8, 16, 24 bits per sample
-    unsigned int sample_rate; //e.g. 44800hz
-    unsigned int sample_channels; //1= mono, 2=stereo etc
+	std::vector<char> samples;
+	unsigned int sample_bit;      // 8, 16, 24 bits per sample
+	unsigned int sample_rate;     // e.g. 44800hz
+	unsigned int sample_channels; // 1= mono, 2=stereo etc
 
-    bool sample_big_endian; //true = big endian, false=little endian
-    bool sample_signed;
+	bool sample_big_endian; // true = big endian, false=little endian
+	bool sample_signed;
 
-    std::string to_string(){
-        return "AudioData[ sample_size=" +
-                std::to_string(samples.size()) +
-                " " + std::to_string(sample_bit) + "bits " +
-                " " + std::to_string(sample_rate) + "hz " +
-                std::to_string(sample_channels) + "ch " +
-                (sample_signed?"SIGNED ":"UNSIGNED ") +
-                (sample_big_endian?"BIG ENDIAN ":"LITTLE ENDIAN ") + "]";
-    }
+	std::string to_string() {
+		return "AudioData[ sample_size=" + std::to_string(samples.size()) + " " + std::to_string(sample_bit) + "bits " + " " +
+		       std::to_string(sample_rate) + "hz " + std::to_string(sample_channels) + "ch " +
+		       (sample_signed ? "SIGNED " : "UNSIGNED ") + (sample_big_endian ? "BIG ENDIAN " : "LITTLE ENDIAN ") + "]";
+	}
 };
diff --git a/server/include/AudioPlayer.h b/server/include/AudioPlayer.h
index 0a43fea..a7e5386 100644
--- a/server/include/AudioPlayer.h
+++ b/server/include/AudioPlayer.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include <string>
@@ -33,30 +33,29 @@
 #include <boost/shared_ptr.hpp>
 #include "AudioData.h"
 
-class AudioPlayer{
+class AudioPlayer {
 public:
+	AudioPlayer(std::string driver);
+	~AudioPlayer();
 
-    AudioPlayer(std::string driver);
-    ~AudioPlayer();
+	typedef enum
+	{
+		INITIALIZING = 0,
+		IDLE,
+		LOADING,
+		PLAYING,
+		ERROR,
+		EXITING,
+		CLOSED
+	} PLAYBACKSTATE_T;
 
-    typedef enum{
-        INITIALIZING=0,
-        IDLE,
-        LOADING,
-        PLAYING,
-        ERROR,
-        EXITING,
-        CLOSED
-    } PLAYBACKSTATE_T;
-
-    virtual void play(boost::shared_ptr<AudioData> audio) = 0;
-    bool is_playing();
+	virtual void play(boost::shared_ptr<AudioData> audio) = 0;
+	bool is_playing();
 
 protected:
-    boost::shared_ptr<AudioData> audio_data;
-    PLAYBACKSTATE_T playback_state;
-    std::string audio_driver;
-    bool playback_requested;
-    bool playback_active;
+	boost::shared_ptr<AudioData> audio_data;
+	PLAYBACKSTATE_T playback_state;
+	std::string audio_driver;
+	bool playback_requested;
+	bool playback_active;
 };
-
diff --git a/server/include/AudioPlayerLibAO.h b/server/include/AudioPlayerLibAO.h
index aadf904..cc8e354 100644
--- a/server/include/AudioPlayerLibAO.h
+++ b/server/include/AudioPlayerLibAO.h
@@ -1,56 +1,51 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "AudioPlayer.h"
 #include <ao/ao.h>
 
-class AudioPlayerLibAO : public AudioPlayer{
+class AudioPlayerLibAO : public AudioPlayer {
 public:
+	AudioPlayerLibAO(std::string driver);
+	~AudioPlayerLibAO();
 
-    AudioPlayerLibAO(std::string driver);
-    ~AudioPlayerLibAO();
-
-    void playback_thread();
-    void play(boost::shared_ptr<AudioData> audio);
-    bool is_playing();
-
-
+	void playback_thread();
+	void play(boost::shared_ptr<AudioData> audio);
+	bool is_playing();
 
 private:
-    ao_sample_format extract_ao_format(boost::shared_ptr<AudioData> audio);
-    boost::thread *playback_thread_ptr;
+	ao_sample_format extract_ao_format(boost::shared_ptr<AudioData> audio);
+	boost::thread* playback_thread_ptr;
 
-    //std::vector<char> audio_data;
-    ao_sample_format  audio_format;
-
-    ao_device *device;
-    int driver;
+	// std::vector<char> audio_data;
+	ao_sample_format audio_format;
 
+	ao_device* device;
+	int driver;
 };
-
diff --git a/server/include/AudioPlayerRSB.h b/server/include/AudioPlayerRSB.h
index 59d1cd4..2e3abbd 100644
--- a/server/include/AudioPlayerRSB.h
+++ b/server/include/AudioPlayerRSB.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "AudioPlayer.h"
@@ -35,21 +35,20 @@
 #include <rsb/Informer.h>
 #include <rst/audition/SoundChunk.pb.h>
 
-class AudioPlayerRSB : public AudioPlayer{
+class AudioPlayerRSB : public AudioPlayer {
 public:
+	AudioPlayerRSB(std::string driver);
+	~AudioPlayerRSB();
 
-    AudioPlayerRSB(std::string driver);
-    ~AudioPlayerRSB();
-
-    void playback_thread();
-    void play(boost::shared_ptr<AudioData> audio);
-    bool is_playing();
+	void playback_thread();
+	void play(boost::shared_ptr<AudioData> audio);
+	bool is_playing();
 
 private:
-    boost::thread *playback_thread_ptr;
-    void publish_audio_data();
-    rsb::Informer<rst::audition::SoundChunk>::DataPtr audio_data_ptr;
-    rsb::Informer<rst::audition::SoundChunk>::Ptr informer;
+	boost::thread* playback_thread_ptr;
+	void publish_audio_data();
+	rsb::Informer<rst::audition::SoundChunk>::DataPtr audio_data_ptr;
+	rsb::Informer<rst::audition::SoundChunk>::Ptr informer;
 };
 
 #endif
diff --git a/server/include/EmotionConfig.h b/server/include/EmotionConfig.h
index fcf6b96..d87dcf8 100644
--- a/server/include/EmotionConfig.h
+++ b/server/include/EmotionConfig.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include <humotion/client/client.h>
@@ -32,50 +32,47 @@
 #include <boost/thread/thread_time.hpp>
 #include <boost/thread/thread.hpp>
 
-
-class EmotionConfig{
+class EmotionConfig {
 public:
+	typedef enum
+	{
+		NEUTRAL = 0,
+		HAPPY = 1,
+		SAD = 2,
+		ANGRY = 3,
+		SURPRISED = 4,
+		FEAR = 5
+	} EmotionType;
 
-    typedef enum{
-        NEUTRAL  = 0,
-        HAPPY    = 1,
-        SAD      = 2,
-        ANGRY    = 3,
-        SURPRISED = 4,
-        FEAR     = 5
-    } EmotionType;
-
+	EmotionConfig();
+	EmotionConfig(EmotionType e);
+	~EmotionConfig();
 
-    EmotionConfig();
-    EmotionConfig(EmotionType e);
-    ~EmotionConfig();
+	void set_duration(unsigned long ms);
 
-    void set_duration(unsigned long ms);
+	void select_config(EmotionType e);
 
-    void select_config(EmotionType e);
+	void init_neutral();
+	void init_happy();
+	void init_sad();
+	void init_angry();
+	void init_surprised();
+	void init_fear();
 
-    void init_neutral();
-    void init_happy();
-    void init_sad();
-    void init_angry();
-    void init_surprised();
-    void init_fear();
+	bool is_active();
 
-    bool is_active();
+	// override/influence the gaze state
+	// -> override neck angles (will be added to neck ptr)
+	// -> set eyelid opening (rel to moving eyeball)
+	// -> force eyebrows
+	humotion::GazeState gaze_override;
 
+	// override mouth
+	humotion::MouthState mouth_override;
 
-    //override/influence the gaze state
-    // -> override neck angles (will be added to neck ptr)
-    // -> set eyelid opening (rel to moving eyeball)
-    // -> force eyebrows
-    humotion::GazeState gaze_override;
+	// overblend time
+	unsigned int overblend_time_ms;
 
-    //override mouth
-    humotion::MouthState mouth_override;
-
-    //overblend time
-    unsigned int overblend_time_ms;
 private:
-    boost::system_time end_time;
+	boost::system_time end_time;
 };
-
diff --git a/server/include/EmotionState.h b/server/include/EmotionState.h
index 27d620f..480805b 100644
--- a/server/include/EmotionState.h
+++ b/server/include/EmotionState.h
@@ -1,43 +1,40 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "EmotionConfig.h"
 
-
-class EmotionState{
+class EmotionState {
 public:
-    EmotionState();
-    ~EmotionState();
+	EmotionState();
+	~EmotionState();
 
-    EmotionConfig::EmotionType value;
-    unsigned int duration;
-    unsigned int overblend_time_ms;
+	EmotionConfig::EmotionType value;
+	unsigned int duration;
+	unsigned int overblend_time_ms;
 };
-
-
diff --git a/server/include/Middleware.h b/server/include/Middleware.h
index 431e4bb..dea1d64 100644
--- a/server/include/Middleware.h
+++ b/server/include/Middleware.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #define BOOST_SIGNALS_NO_DEPRECATION_WARNING 1
@@ -35,25 +35,22 @@
 
 class Middleware {
 public:
-    Middleware(Arbiter *arbiter, std::string _base_scope);
-    ~Middleware();
-    virtual void init() = 0;
-    virtual void tick() = 0;
+	Middleware(Arbiter* arbiter, std::string _base_scope);
+	~Middleware();
+	virtual void init() = 0;
+	virtual void tick() = 0;
 
-    void speak_callback(std::string text);
-    void utterance_callback(boost::shared_ptr<Utterance> u);
-    void gaze_callback(humotion::GazeState gaze);
-    void mouth_callback(humotion::MouthState mouth);
-    void default_emotion_callback(EmotionState emotion_state);
-    void current_emotion_callback(EmotionState emotion_state);
-    void animation_callback(boost::shared_ptr<Animation> ani);
+	void speak_callback(std::string text);
+	void utterance_callback(boost::shared_ptr<Utterance> u);
+	void gaze_callback(humotion::GazeState gaze);
+	void mouth_callback(humotion::MouthState mouth);
+	void default_emotion_callback(EmotionState emotion_state);
+	void current_emotion_callback(EmotionState emotion_state);
+	void animation_callback(boost::shared_ptr<Animation> ani);
 
-    virtual boost::shared_ptr<Utterance> tts_call(std::string text) = 0;
+	virtual boost::shared_ptr<Utterance> tts_call(std::string text) = 0;
 
 protected:
-    Arbiter *arbiter;
-    std::string base_scope;
+	Arbiter* arbiter;
+	std::string base_scope;
 };
-
-
-
diff --git a/server/include/MiddlewareROS.h b/server/include/MiddlewareROS.h
index 3b1e1c5..e351651 100644
--- a/server/include/MiddlewareROS.h
+++ b/server/include/MiddlewareROS.h
@@ -1,100 +1,101 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "Middleware.h"
 #ifdef ROS_SUPPORT
-    #include "ros/ros.h"
-    #include <actionlib/client/simple_action_client.h>
-    #include <tf2_ros/transform_listener.h>
+#include "ros/ros.h"
+#include <actionlib/client/simple_action_client.h>
+#include <tf2_ros/transform_listener.h>
 
-    //messages
-    #include "hlrc_server/phoneme.h"
-    #include "hlrc_server/soundchunk.h"
-    #include "hlrc_server/utterance.h"
-    //actions
-    #include "hlrc_server/gazetargetAction.h"
-    #include "hlrc_server/lookattargetAction.h"
-    #include "hlrc_server/ttsAction.h"
+// messages
+#include "hlrc_server/phoneme.h"
+#include "hlrc_server/soundchunk.h"
+#include "hlrc_server/utterance.h"
+// actions
+#include "hlrc_server/gazetargetAction.h"
+#include "hlrc_server/lookattargetAction.h"
+#include "hlrc_server/ttsAction.h"
 
-    #include "ROS/GazeCallbackWrapperROS.h"
-    #include "ROS/LookatCallbackWrapperROS.h"
-    #include "ROS/MouthCallbackWrapperROS.h"
-    #include "ROS/UtteranceCallbackWrapperROS.h"
-    #include "ROS/EmotionCallbackWrapperROS.h"
-    #include "ROS/AnimationCallbackWrapperROS.h"
-    #include "ROS/SpeechCallbackWrapperROS.h"
+#include "ROS/GazeCallbackWrapperROS.h"
+#include "ROS/LookatCallbackWrapperROS.h"
+#include "ROS/MouthCallbackWrapperROS.h"
+#include "ROS/UtteranceCallbackWrapperROS.h"
+#include "ROS/EmotionCallbackWrapperROS.h"
+#include "ROS/AnimationCallbackWrapperROS.h"
+#include "ROS/SpeechCallbackWrapperROS.h"
 #endif
 #include <boost/shared_ptr.hpp>
 
 #define ROS_ACTION_CALL_TIMEOUT 30.0
 
-class MiddlewareROS : public Middleware{
+class MiddlewareROS : public Middleware {
 #ifndef ROS_SUPPORT
 public:
-    MiddlewareROS(Arbiter *a, std::string _base_scope) : Middleware(a, _base_scope){
-        printf("> ERROR: hlrc was compiled without ROS middleware support. Please use MiddlewareRSB() instead!\n\n");
-        exit(EXIT_FAILURE);
-    }
+	MiddlewareROS(Arbiter* a, std::string _base_scope) : Middleware(a, _base_scope) {
+		printf("> ERROR: hlrc was compiled without ROS middleware support. Please use MiddlewareRSB() instead!\n\n");
+		exit(EXIT_FAILURE);
+	}
 
-    ~MiddlewareROS(){}
-    void init(){};
-    void tick(){};
+	~MiddlewareROS() {
+	}
+	void init(){};
+	void tick(){};
 
-    boost::shared_ptr<Utterance> tts_call(std::string text){
-        return boost::shared_ptr<Utterance>(new Utterance());
-    }
+	boost::shared_ptr<Utterance> tts_call(std::string text) {
+		return boost::shared_ptr<Utterance>(new Utterance());
+	}
 
 #else
 public:
-    MiddlewareROS(Arbiter *a, std::string _base_scope);
-    ~MiddlewareROS();
-    void init();
-    void tick();
-    boost::shared_ptr<Utterance> tts_call(std::string text);
+	MiddlewareROS(Arbiter* a, std::string _base_scope);
+	~MiddlewareROS();
+	void init();
+	void tick();
+	boost::shared_ptr<Utterance> tts_call(std::string text);
 
 private:
-    //boost::shared_ptr<ros::NodeHandle> node_handle;
-    ros::NodeHandle *ros_node_handle;
-    bool tick_necessary;
-    //listen to tf tree
-    tf2_ros::Buffer tfBuffer;
-    boost::shared_ptr<tf2_ros::TransformListener> tfListener;
+	// boost::shared_ptr<ros::NodeHandle> node_handle;
+	ros::NodeHandle* ros_node_handle;
+	bool tick_necessary;
+	// listen to tf tree
+	tf2_ros::Buffer tfBuffer;
+	boost::shared_ptr<tf2_ros::TransformListener> tfListener;
 
-    //FIXME: These pointers are never destroyed. Shouldn't they be shared_ptrs?
-    AnimationCallbackWrapper *animation_action_server;
-    UtteranceCallbackWrapper *utterance_action_server;
-    EmotionCallbackWrapper *current_emotion_action_server;
-    EmotionCallbackWrapper *default_emotion_action_server;
-    GazeCallbackWrapper *gaze_action_server;
-    LookatCallbackWrapper *lookat_action_server;
-    MouthCallbackWrapper *mouth_action_server;
-    SpeechCallbackWrapper *speech_action_server;
-    actionlib::SimpleActionClient<hlrc_server::ttsAction> *tts_ac;
+	// FIXME: These pointers are never destroyed. Shouldn't they be shared_ptrs?
+	AnimationCallbackWrapper* animation_action_server;
+	UtteranceCallbackWrapper* utterance_action_server;
+	EmotionCallbackWrapper* current_emotion_action_server;
+	EmotionCallbackWrapper* default_emotion_action_server;
+	GazeCallbackWrapper* gaze_action_server;
+	LookatCallbackWrapper* lookat_action_server;
+	MouthCallbackWrapper* mouth_action_server;
+	SpeechCallbackWrapper* speech_action_server;
+	actionlib::SimpleActionClient<hlrc_server::ttsAction>* tts_ac;
 #endif
 };
diff --git a/server/include/MiddlewareRSB.h b/server/include/MiddlewareRSB.h
index e8f86cb..3fb48c3 100644
--- a/server/include/MiddlewareRSB.h
+++ b/server/include/MiddlewareRSB.h
@@ -1,74 +1,71 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "Middleware.h"
 #ifdef RSB_SUPPORT
-    #define BOOST_SIGNALS_NO_DEPRECATION_WARNING 1
-    #include <rsb/Listener.h>
-    #include <rsb/patterns/LocalServer.h>
-    #include <rsb/patterns/RemoteServer.h>
+#define BOOST_SIGNALS_NO_DEPRECATION_WARNING 1
+#include <rsb/Listener.h>
+#include <rsb/patterns/LocalServer.h>
+#include <rsb/patterns/RemoteServer.h>
 #endif
 
-class MiddlewareRSB : public Middleware{
+class MiddlewareRSB : public Middleware {
 #ifndef RSB_SUPPORT
 public:
-    MiddlewareRSB(Arbiter *a, std::string _base_scope) : Middleware(a, _base_scope){
-        printf("> ERROR: hlrc was compiled without RSB middleware support. Please use MiddlewareROS() instead!\n\n");
-        exit(EXIT_FAILURE);
-    }
+	MiddlewareRSB(Arbiter* a, std::string _base_scope) : Middleware(a, _base_scope) {
+		printf("> ERROR: hlrc was compiled without RSB middleware support. Please use MiddlewareROS() instead!\n\n");
+		exit(EXIT_FAILURE);
+	}
 
-    ~MiddlewareRSB(){}
-    void init(){};
-    void tick(){};
-    boost::shared_ptr<Utterance> tts_call(std::string text){
-        return boost::shared_ptr<Utterance>(new Utterance());
-    }
+	~MiddlewareRSB() {
+	}
+	void init(){};
+	void tick(){};
+	boost::shared_ptr<Utterance> tts_call(std::string text) {
+		return boost::shared_ptr<Utterance>(new Utterance());
+	}
 
 #else
 public:
-    MiddlewareRSB(Arbiter *a, std::string _base_scope);
-    ~MiddlewareRSB();
-    void init();
-    void tick();
-    boost::shared_ptr<Utterance> tts_call(std::string text);
+	MiddlewareRSB(Arbiter* a, std::string _base_scope);
+	~MiddlewareRSB();
+	void init();
+	void tick();
+	boost::shared_ptr<Utterance> tts_call(std::string text);
 
 private:
-    void init_callbacks();
-    void init_callback(std::string name, rsb::patterns::LocalServer::CallbackPtr callback_ptr);
+	void init_callbacks();
+	void init_callback(std::string name, rsb::patterns::LocalServer::CallbackPtr callback_ptr);
 
-    rsb::patterns::LocalServerPtr server;
-    rsb::patterns::LocalServerPtr server_parallel;
-    rsb::patterns::RemoteServerPtr tts_server;
-    rsb::ListenerPtr speak_listener;
+	rsb::patterns::LocalServerPtr server;
+	rsb::patterns::LocalServerPtr server_parallel;
+	rsb::patterns::RemoteServerPtr tts_server;
+	rsb::ListenerPtr speak_listener;
 #endif
 };
-
-
-
-
diff --git a/server/include/MouthConfig.h b/server/include/MouthConfig.h
index 0c0516f..90b156c 100644
--- a/server/include/MouthConfig.h
+++ b/server/include/MouthConfig.h
@@ -1,55 +1,51 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include <humotion/client/client.h>
 
-class MouthConfig{
+class MouthConfig {
 public:
+	MouthConfig();
+	MouthConfig(std::string symbol);
+	~MouthConfig();
 
-    MouthConfig();
-    MouthConfig(std::string symbol);
-    ~MouthConfig();
-
-    void apply_on_mouth_state(humotion::MouthState *m);
-    void init_by_symbol(std::string symbol);
+	void apply_on_mouth_state(humotion::MouthState* m);
+	void init_by_symbol(std::string symbol);
 
 private:
-
-
-    enum side_t{
-        LEFT=0,
-        CENTER=1,
-        RIGHT=2
-    };
-
-    float opening[3];
-    bool  override[3];
-
+	enum side_t
+	{
+		LEFT = 0,
+		CENTER = 1,
+		RIGHT = 2
+	};
+
+	float opening[3];
+	bool override[3];
 };
-
diff --git a/server/include/ROS/AnimationCallbackWrapperROS.h b/server/include/ROS/AnimationCallbackWrapperROS.h
index e2ae4fa..a21b462 100644
--- a/server/include/ROS/AnimationCallbackWrapperROS.h
+++ b/server/include/ROS/AnimationCallbackWrapperROS.h
@@ -1,88 +1,104 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "hlrc_server/animationAction.h"
 #include "CallbackWrapperROS.h"
 
-//callback handler incoming gaze requests:
-class AnimationCallbackWrapper : CallbackWrapper<hlrc_server::animationAction>{
+// callback handler incoming gaze requests:
+class AnimationCallbackWrapper : CallbackWrapper<hlrc_server::animationAction> {
 protected:
-    hlrc_server::animationFeedback feedback;
-    hlrc_server::animationResult result;
+	hlrc_server::animationFeedback feedback;
+	hlrc_server::animationResult result;
 
 public:
-    AnimationCallbackWrapper(Middleware *mw, std::string scope, std::string name) : CallbackWrapper<hlrc_server::animationAction>(mw, scope, name, boost::bind(&AnimationCallbackWrapper::call, this, _1)){
-        //
-    };
+	AnimationCallbackWrapper(Middleware* mw, std::string scope, std::string name)
+	   : CallbackWrapper<hlrc_server::animationAction>(mw, scope, name,
+	                                                   boost::bind(&AnimationCallbackWrapper::call, this, _1)){
+		   //
+	   };
 
-    void call(const GoalConstPtr &goal){
-        hlrc_server::animationGoalConstPtr request = goal;
-        printf("> incoming animation (%d)\n", (int)request->target);
+	void call(const GoalConstPtr& goal) {
+		hlrc_server::animationGoalConstPtr request = goal;
+		printf("> incoming animation (%d)\n", (int)request->target);
 
-        boost::shared_ptr<Animation> ani(new Animation());
+		boost::shared_ptr<Animation> ani(new Animation());
 
-        //everything is ok, will be cleared on failures
-        feedback.result = 1;
+		// everything is ok, will be cleared on failures
+		feedback.result = 1;
 
-        switch ((int) request->target){
-            case(hlrc_server::animationGoal::IDLE):          ani->target = Animation::IDLE; break;
-            case(hlrc_server::animationGoal::HEAD_NOD):      ani->target = Animation::HEAD_NOD; break;
-            case(hlrc_server::animationGoal::HEAD_SHAKE):    ani->target = Animation::HEAD_SHAKE; break;
-            case(hlrc_server::animationGoal::EYEBLINK_L):    ani->target = Animation::EYEBLINK_L; break;
-            case(hlrc_server::animationGoal::EYEBLINK_R):    ani->target = Animation::EYEBLINK_R; break;
-            case(hlrc_server::animationGoal::EYEBLINK_BOTH): ani->target = Animation::EYEBLINK_BOTH; break;
-            case(hlrc_server::animationGoal::EYEBROWS_RAISE):ani->target = Animation::EYEBROWS_RAISE;break;
-            case(hlrc_server::animationGoal::EYEBROWS_LOWER):ani->target = Animation::EYEBROWS_LOWER;break;
-            default:
-                ani->target = Animation::IDLE;
-                printf("> unhandled animatin target %d\n",(int)request->target);
-                //throw std::runtime_error("AnimationCallback: invalid animation id");
-                feedback.result = 0;
-        }
+		switch ((int)request->target) {
+			case (hlrc_server::animationGoal::IDLE):
+				ani->target = Animation::IDLE;
+				break;
+			case (hlrc_server::animationGoal::HEAD_NOD):
+				ani->target = Animation::HEAD_NOD;
+				break;
+			case (hlrc_server::animationGoal::HEAD_SHAKE):
+				ani->target = Animation::HEAD_SHAKE;
+				break;
+			case (hlrc_server::animationGoal::EYEBLINK_L):
+				ani->target = Animation::EYEBLINK_L;
+				break;
+			case (hlrc_server::animationGoal::EYEBLINK_R):
+				ani->target = Animation::EYEBLINK_R;
+				break;
+			case (hlrc_server::animationGoal::EYEBLINK_BOTH):
+				ani->target = Animation::EYEBLINK_BOTH;
+				break;
+			case (hlrc_server::animationGoal::EYEBROWS_RAISE):
+				ani->target = Animation::EYEBROWS_RAISE;
+				break;
+			case (hlrc_server::animationGoal::EYEBROWS_LOWER):
+				ani->target = Animation::EYEBROWS_LOWER;
+				break;
+			default:
+				ani->target = Animation::IDLE;
+				printf("> unhandled animatin target %d\n", (int)request->target);
+				// throw std::runtime_error("AnimationCallback: invalid animation id");
+				feedback.result = 0;
+		}
 
-       ani->repetitions   = request->repetitions;
-       ani->duration_each = request->duration_each;
-       ani->scale         = request->scale;
+		ani->repetitions = request->repetitions;
+		ani->duration_each = request->duration_each;
+		ani->scale = request->scale;
 
-       printf("> new Animation: %s\n", ani->as_string().c_str());
+		printf("> new Animation: %s\n", ani->as_string().c_str());
 
-       //send to application
-       mw->animation_callback(ani);
+		// send to application
+		mw->animation_callback(ani);
 
-        if (feedback.result){
-            result.result = 1;
-            as_.setSucceeded(result);
-        }else{
-            as_.setAborted(result);
-        }
-
-    }
+		if (feedback.result) {
+			result.result = 1;
+			as_.setSucceeded(result);
+		}
+		else {
+			as_.setAborted(result);
+		}
+	}
 };
-
-
diff --git a/server/include/ROS/CallbackWrapperROS.h b/server/include/ROS/CallbackWrapperROS.h
index b91e2f0..ccd2f59 100644
--- a/server/include/ROS/CallbackWrapperROS.h
+++ b/server/include/ROS/CallbackWrapperROS.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "Middleware.h"
@@ -32,34 +32,36 @@
 #include <actionlib/server/simple_action_server.h>
 #include <actionlib/action_definition.h>
 
-template <typename actionspec> class CallbackWrapper{
-    protected:
-        //NODEHANDLE has to be created before evrything else, otherwise really strange things happen (really!)
-        //ros::NodeHandle nh_;
+template <typename actionspec>
+class CallbackWrapper {
+protected:
+	// NODEHANDLE has to be created before evrything else, otherwise really strange things happen (really!)
+	// ros::NodeHandle nh_;
 
-    public:
-        //get nice macros
-        ACTION_DEFINITION(actionspec);
+public:
+	// get nice macros
+	ACTION_DEFINITION(actionspec);
 
-        CallbackWrapper(Middleware *_mw, std::string scope, std::string _name, boost::function<void (const GoalConstPtr&)> cb = 0) : as_(scope + "/" + _name, cb, false){
-            name = _name;
-            mw = _mw;
-            as_.start();
-        }
+	CallbackWrapper(Middleware* _mw, std::string scope, std::string _name, boost::function<void(const GoalConstPtr&)> cb = 0)
+	   : as_(scope + "/" + _name, cb, false) {
+		name = _name;
+		mw = _mw;
+		as_.start();
+	}
 
-        ~CallbackWrapper(){}
+	~CallbackWrapper() {
+	}
 
+protected:
+	double get_timestamp() {
+		// fetch time
+		struct timespec tp;
+		clock_gettime(CLOCK_REALTIME, &tp);
+		return tp.tv_sec + tp.tv_nsec / 1000000000.0;
+	};
 
-    protected:
-        double get_timestamp(){
-            //fetch time
-            struct timespec tp;
-            clock_gettime(CLOCK_REALTIME, &tp);
-            return tp.tv_sec+tp.tv_nsec/1000000000.0;
-        };
+	actionlib::SimpleActionServer<actionspec> as_;
 
-        actionlib::SimpleActionServer<actionspec> as_;
-
-        std::string name;
-        Middleware *mw;
+	std::string name;
+	Middleware* mw;
 };
diff --git a/server/include/ROS/EmotionCallbackWrapperROS.h b/server/include/ROS/EmotionCallbackWrapperROS.h
index 3e7f4ec..14676b6 100644
--- a/server/include/ROS/EmotionCallbackWrapperROS.h
+++ b/server/include/ROS/EmotionCallbackWrapperROS.h
@@ -1,91 +1,103 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "hlrc_server/emotionstateAction.h"
 #include "CallbackWrapperROS.h"
 
-//callback handler incoming gaze requests:
-class EmotionCallbackWrapper : CallbackWrapper<hlrc_server::emotionstateAction>{
+// callback handler incoming gaze requests:
+class EmotionCallbackWrapper : CallbackWrapper<hlrc_server::emotionstateAction> {
 protected:
-    hlrc_server::emotionstateFeedback feedback;
-    hlrc_server::emotionstateResult result;
-
+	hlrc_server::emotionstateFeedback feedback;
+	hlrc_server::emotionstateResult result;
 
 public:
+	EmotionCallbackWrapper(Middleware* mw, std::string scope, std::string name)
+	   : CallbackWrapper<hlrc_server::emotionstateAction>(mw, scope, name,
+	                                                      boost::bind(&EmotionCallbackWrapper::call, this, _1)){
+		   //
+	   };
 
-    EmotionCallbackWrapper(Middleware *mw, std::string scope, std::string name) : CallbackWrapper<hlrc_server::emotionstateAction>(mw, scope, name, boost::bind(&EmotionCallbackWrapper::call, this, _1)){
-        //
-    };
-
-    void call(const GoalConstPtr &goal){
-        hlrc_server::emotionstateGoalConstPtr request = goal;
-        printf("> incoming emotion (%s = %d)\n", name.c_str(), (int)request->value);
-        feedback.result = 1;
-
-        EmotionState emotion_state;
+	void call(const GoalConstPtr& goal) {
+		hlrc_server::emotionstateGoalConstPtr request = goal;
+		printf("> incoming emotion (%s = %d)\n", name.c_str(), (int)request->value);
+		feedback.result = 1;
 
-        //extract data & copy it to our datatype (might be good when we allow multiple middlewares in the feature)
-        switch ((int)request->value){
-            case(hlrc_server::emotionstateGoal::NEUTRAL):   emotion_state.value = EmotionConfig::NEUTRAL; break;
-            case(hlrc_server::emotionstateGoal::HAPPY):     emotion_state.value = EmotionConfig::HAPPY; break;
-            case(hlrc_server::emotionstateGoal::SAD):       emotion_state.value = EmotionConfig::SAD; break;
-            case(hlrc_server::emotionstateGoal::ANGRY):     emotion_state.value = EmotionConfig::ANGRY; break;
-            case(hlrc_server::emotionstateGoal::SURPRISED): emotion_state.value = EmotionConfig::SURPRISED; break;
-            case(hlrc_server::emotionstateGoal::FEAR):      emotion_state.value = EmotionConfig::FEAR; break;
-            default:
-                printf("> invalid EmotionState value. exiting\n");
-                feedback.result = 0;
-                return;
-        }
+		EmotionState emotion_state;
 
-        emotion_state.duration = request->duration;
+		// extract data & copy it to our datatype (might be good when we allow multiple middlewares in the feature)
+		switch ((int)request->value) {
+			case (hlrc_server::emotionstateGoal::NEUTRAL):
+				emotion_state.value = EmotionConfig::NEUTRAL;
+				break;
+			case (hlrc_server::emotionstateGoal::HAPPY):
+				emotion_state.value = EmotionConfig::HAPPY;
+				break;
+			case (hlrc_server::emotionstateGoal::SAD):
+				emotion_state.value = EmotionConfig::SAD;
+				break;
+			case (hlrc_server::emotionstateGoal::ANGRY):
+				emotion_state.value = EmotionConfig::ANGRY;
+				break;
+			case (hlrc_server::emotionstateGoal::SURPRISED):
+				emotion_state.value = EmotionConfig::SURPRISED;
+				break;
+			case (hlrc_server::emotionstateGoal::FEAR):
+				emotion_state.value = EmotionConfig::FEAR;
+				break;
+			default:
+				printf("> invalid EmotionState value. exiting\n");
+				feedback.result = 0;
+				return;
+		}
 
-        //send to application
-        if (name == "defaultEmotion"){
-            //set default emotion:
-            mw->default_emotion_callback(emotion_state);
-        }else if (name == "currentEmotion"){
-            //set current emotion:
-            mw->current_emotion_callback(emotion_state);
-        }else{
-            printf("> invalid method called '%s'\n",name.c_str());
-            return;
-        }
+		emotion_state.duration = request->duration;
 
-        if (feedback.result){
-            result.result = 1;
-            as_.setSucceeded(result);
-        }else{
-            as_.setAborted(result);
-        }
+		// send to application
+		if (name == "defaultEmotion") {
+			// set default emotion:
+			mw->default_emotion_callback(emotion_state);
+		}
+		else if (name == "currentEmotion") {
+			// set current emotion:
+			mw->current_emotion_callback(emotion_state);
+		}
+		else {
+			printf("> invalid method called '%s'\n", name.c_str());
+			return;
+		}
 
-    }
+		if (feedback.result) {
+			result.result = 1;
+			as_.setSucceeded(result);
+		}
+		else {
+			as_.setAborted(result);
+		}
+	}
 };
-
-
diff --git a/server/include/ROS/GazeCallbackWrapperROS.h b/server/include/ROS/GazeCallbackWrapperROS.h
index 6046381..aa1c101 100644
--- a/server/include/ROS/GazeCallbackWrapperROS.h
+++ b/server/include/ROS/GazeCallbackWrapperROS.h
@@ -1,95 +1,95 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "hlrc_server/gazetargetAction.h"
 #include "CallbackWrapperROS.h"
 
-//callback handler incoming gaze requests:
-class GazeCallbackWrapper : CallbackWrapper<hlrc_server::gazetargetAction>{
+// callback handler incoming gaze requests:
+class GazeCallbackWrapper : CallbackWrapper<hlrc_server::gazetargetAction> {
 protected:
-    hlrc_server::gazetargetFeedback feedback;
-    hlrc_server::gazetargetResult result;
+	hlrc_server::gazetargetFeedback feedback;
+	hlrc_server::gazetargetResult result;
 
 public:
-
-    GazeCallbackWrapper(Middleware *mw, std::string scope, std::string name) : CallbackWrapper<hlrc_server::gazetargetAction>(mw, scope, name, boost::bind(&GazeCallbackWrapper::call, this, _1)){
-        //
-    };
-
-    void call(const GoalConstPtr &goal){
-        feedback.result = 1;
-
-        hlrc_server::gazetargetGoalConstPtr request = goal;
-        /*printf("> incoming gaze (p=%3.1f t=%3.1f r=%3.1f / v=%3.1f) [%s ts=%f]\n",
-               request->pan,
-               request->tilt,
-               request->roll,
-               request->vergence,
-               request->gaze_type==hlrc_server::gazetargetGoal::GAZETARGET_ABSOLUTE?"ABSOLUTE":"RELATIVE",
-               request->gaze_timestamp.toSec()
-        );*/
-
-        humotion::GazeState gaze_state;
-
-        //fill in gaze
-        gaze_state.pan   = request->pan;
-        gaze_state.tilt  = request->tilt;
-        gaze_state.roll  = request->roll;
-
-        //use timestamp from request
-        gaze_state.timestamp.set(request->gaze_timestamp.sec, request->gaze_timestamp.nsec);
-
-        if (request->gaze_type == hlrc_server::gazetargetGoal::GAZETARGET_ABSOLUTE){
-            gaze_state.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE;
-        }else{
-            gaze_state.gaze_type = humotion::GazeState::GAZETYPE_RELATIVE;
-        }
-
-        //default:
-        gaze_state.vergence  = request->vergence;
-        gaze_state.pan_offset = request->pan_offset;
-        gaze_state.tilt_offset = request->tilt_offset;
-
-        //processing
-        feedback.result = 1;
-        as_.publishFeedback(feedback);
-
-        //send to application:
-        mw->gaze_callback(gaze_state);
-
-        if (feedback.result){
-            result.result = feedback.result;
-            as_.setSucceeded(result);
-        }else{
-            as_.setAborted(result);
-        }
-
-
-    }
+	GazeCallbackWrapper(Middleware* mw, std::string scope, std::string name)
+	   : CallbackWrapper<hlrc_server::gazetargetAction>(mw, scope, name, boost::bind(&GazeCallbackWrapper::call, this, _1)){
+		   //
+	   };
+
+	void call(const GoalConstPtr& goal) {
+		feedback.result = 1;
+
+		hlrc_server::gazetargetGoalConstPtr request = goal;
+		/*printf("> incoming gaze (p=%3.1f t=%3.1f r=%3.1f / v=%3.1f) [%s ts=%f]\n",
+		       request->pan,
+		       request->tilt,
+		       request->roll,
+		       request->vergence,
+		       request->gaze_type==hlrc_server::gazetargetGoal::GAZETARGET_ABSOLUTE?"ABSOLUTE":"RELATIVE",
+		       request->gaze_timestamp.toSec()
+		);*/
+
+		humotion::GazeState gaze_state;
+
+		// fill in gaze
+		gaze_state.pan = request->pan;
+		gaze_state.tilt = request->tilt;
+		gaze_state.roll = request->roll;
+
+		// use timestamp from request
+		gaze_state.timestamp.set(request->gaze_timestamp.sec, request->gaze_timestamp.nsec);
+
+		if (request->gaze_type == hlrc_server::gazetargetGoal::GAZETARGET_ABSOLUTE) {
+			gaze_state.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE;
+		}
+		else {
+			gaze_state.gaze_type = humotion::GazeState::GAZETYPE_RELATIVE;
+		}
+
+		// default:
+		gaze_state.vergence = request->vergence;
+		gaze_state.pan_offset = request->pan_offset;
+		gaze_state.tilt_offset = request->tilt_offset;
+
+		// processing
+		feedback.result = 1;
+		as_.publishFeedback(feedback);
+
+		// send to application:
+		mw->gaze_callback(gaze_state);
+
+		if (feedback.result) {
+			result.result = feedback.result;
+			as_.setSucceeded(result);
+		}
+		else {
+			as_.setAborted(result);
+		}
+	}
 };
diff --git a/server/include/ROS/LookatCallbackWrapperROS.h b/server/include/ROS/LookatCallbackWrapperROS.h
index 3acead5..f069356 100644
--- a/server/include/ROS/LookatCallbackWrapperROS.h
+++ b/server/include/ROS/LookatCallbackWrapperROS.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "hlrc_server/lookattargetAction.h"
@@ -33,98 +33,97 @@
 #include <tf2_eigen/tf2_eigen.h>
 #include <angles/angles.h>
 
-//callback handler incoming lookat requests:
-class LookatCallbackWrapper : CallbackWrapper<hlrc_server::lookattargetAction>{
+// callback handler incoming lookat requests:
+class LookatCallbackWrapper : CallbackWrapper<hlrc_server::lookattargetAction> {
 protected:
-    hlrc_server::lookattargetFeedback feedback;
-    hlrc_server::lookattargetResult result;
-    const tf2_ros::Buffer& tfBuffer;
-    const std::string FLOBI_BASE_LINK="head_base_link";
-    // pan/tilt will be computed w.r.t. to virtual frame at height of eyes
-    Eigen::Affine3d eig_eyes_to_base;
-    double eye_distance; // distance from center of eyes to eye frame
+	hlrc_server::lookattargetFeedback feedback;
+	hlrc_server::lookattargetResult result;
+	const tf2_ros::Buffer& tfBuffer;
+	const std::string FLOBI_BASE_LINK = "head_base_link";
+	// pan/tilt will be computed w.r.t. to virtual frame at height of eyes
+	Eigen::Affine3d eig_eyes_to_base;
+	double eye_distance; // distance from center of eyes to eye frame
 
 public:
+	LookatCallbackWrapper(Middleware* mw, std::string scope, std::string name, const tf2_ros::Buffer& tfBuffer)
+	   : CallbackWrapper<hlrc_server::lookattargetAction>(mw, scope, name, boost::bind(&LookatCallbackWrapper::call, this, _1))
+	   , tfBuffer(tfBuffer) {
+		// eyes frame has z-axis pointing along view dir (90° rotation w.r.t. base)
+		// and z-position is shifted to height of eyes
+		eig_eyes_to_base =
+		   (Eigen::Translation3d(0.0, 0.0, 0.188) * Eigen::AngleAxisd(angles::from_degrees(90), Eigen::Vector3d::UnitY()) *
+		    Eigen::AngleAxisd(angles::from_degrees(180), Eigen::Vector3d::UnitZ()))
+		      .inverse();
+		// eig_eyes_to_base = Eigen::Translation3d(0.070621, 0, 0.2006).inverse();
 
-    LookatCallbackWrapper(Middleware *mw, std::string scope, std::string name, const tf2_ros::Buffer &tfBuffer)
-       : CallbackWrapper<hlrc_server::lookattargetAction>(mw, scope, name, boost::bind(&LookatCallbackWrapper::call, this, _1))
-       , tfBuffer(tfBuffer)
-    {
-        // eyes frame has z-axis pointing along view dir (90° rotation w.r.t. base)
-        // and z-position is shifted to height of eyes
-        eig_eyes_to_base = (Eigen::Translation3d(0.0, 0.0, 0.188)
-                * Eigen::AngleAxisd(angles::from_degrees(90), Eigen::Vector3d::UnitY())
-                * Eigen::AngleAxisd(angles::from_degrees(180), Eigen::Vector3d::UnitZ())).inverse();
-        //eig_eyes_to_base = Eigen::Translation3d(0.070621, 0, 0.2006).inverse();
-        
-        //std::cout << "MATRIX" << eig_eyes_to_base << std::endl;
-                //* Eigen::AngleAxisd(angles::from_degrees(90), Eigen::Vector3d::UnitY())
-                //* Eigen::AngleAxisd(angles::from_degrees(180), Eigen::Vector3d::UnitZ())).inverse();
-        eye_distance = 0.069;
-    }
+		// std::cout << "MATRIX" << eig_eyes_to_base << std::endl;
+		//* Eigen::AngleAxisd(angles::from_degrees(90), Eigen::Vector3d::UnitY())
+		//* Eigen::AngleAxisd(angles::from_degrees(180), Eigen::Vector3d::UnitZ())).inverse();
+		eye_distance = 0.069;
+	}
 
-    void call(const GoalConstPtr &goal){
-        feedback.result = 1;
+	void call(const GoalConstPtr& goal) {
+		feedback.result = 1;
 
-        hlrc_server::lookattargetGoalConstPtr request = goal;
-        const geometry_msgs::PointStamped &p = request->point;
+		hlrc_server::lookattargetGoalConstPtr request = goal;
+		const geometry_msgs::PointStamped& p = request->point;
 
-        Eigen::Vector3d target(p.point.x, p.point.y, p.point.z);
-        try {
-            if (!p.header.frame_id.empty()) { // only consider tf, when frame_id is non-empty
-                geometry_msgs::TransformStamped base_to_source =
-                    // lookupTransform can throw
-                    tfBuffer.lookupTransform(FLOBI_BASE_LINK, p.header.frame_id,
-                                             p.header.stamp, ros::Duration(0.1));
+		Eigen::Vector3d target(p.point.x, p.point.y, p.point.z);
+		try {
+			if (!p.header.frame_id.empty()) { // only consider tf, when frame_id is non-empty
+				geometry_msgs::TransformStamped base_to_source =
+				   // lookupTransform can throw
+				   tfBuffer.lookupTransform(FLOBI_BASE_LINK, p.header.frame_id, p.header.stamp, ros::Duration(0.1));
 
-                target = eig_eyes_to_base * (tf2::transformToEigen(base_to_source) * target);                        
+				target = eig_eyes_to_base * (tf2::transformToEigen(base_to_source) * target);
+			}
+			else {
+				// otherwise we interpret target directly w.r.t. eye center
+				ROS_WARN("NO Frame provided with target!");
+			}
+		}
+		catch (const std::exception& e) {
+			// Failed to resolve tf
+			ROS_WARN_STREAM_THROTTLE(2, e.what());
+			result.result = 0;
+			as_.setAborted(result, e.what());
+			return;
+		}
 
-            } else {
-                // otherwise we interpret target directly w.r.t. eye center
-                ROS_WARN("NO Frame provided with target!");
-            }
-        } catch (const std::exception &e) {
-            // Failed to resolve tf
-            ROS_WARN_STREAM_THROTTLE(2, e.what());
-            result.result = 0;
-            as_.setAborted(result, e.what());
-            return;
-        }
+		// compute pan + tilt: let point z-axis of eyes frames towards target
+		// alternatively, compute inverse kinematics of pan-tilt chain
+		// as here: https://github.com/pal-robotics/head_action
+		humotion::GazeState gaze_state;
+		double distance = target.norm();
+		if (distance > 1e-3) {
+			// normalize vector from eyes-center to target
+			target /= distance;
+			// pan = rotation about x-axis: angle of projection of target onto yz-plane to z-axis
+			gaze_state.pan = (90 - angles::to_degrees(atan2(target.z(), target.y())));
+			// tilt = rotation about y-axis: angle between target and yz-plane
+			Eigen::Vector2d projection(target.y(), target.z());
+			gaze_state.tilt = angles::to_degrees(atan2(target.x(), projection.norm()));
+		}
+		// fill in rest of gaze_state
+		gaze_state.roll = request->roll;
+		gaze_state.vergence = -angles::to_degrees(atan2(eye_distance, distance));
 
-        // compute pan + tilt: let point z-axis of eyes frames towards target
-        // alternatively, compute inverse kinematics of pan-tilt chain
-        // as here: https://github.com/pal-robotics/head_action
-        humotion::GazeState gaze_state;
-        double distance = target.norm();
-        if (distance > 1e-3) {
-            // normalize vector from eyes-center to target
-            target /= distance;
-            // pan = rotation about x-axis: angle of projection of target onto yz-plane to z-axis
-            gaze_state.pan = (90 - angles::to_degrees(atan2(target.z(), target.y())));
-            // tilt = rotation about y-axis: angle between target and yz-plane
-            Eigen::Vector2d projection(target.y(), target.z());
-            gaze_state.tilt = angles::to_degrees(atan2(target.x(), projection.norm()));
-        }
-        // fill in rest of gaze_state
-        gaze_state.roll  = request->roll;
-        gaze_state.vergence  = -angles::to_degrees(atan2(eye_distance, distance));
+		// use timestamp from request
+		gaze_state.timestamp.set(p.header.stamp.sec, p.header.stamp.nsec);
+		gaze_state.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE;
 
-        // use timestamp from request
-        gaze_state.timestamp.set(p.header.stamp.sec, p.header.stamp.nsec);
-        gaze_state.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE;
+		// processing
+		as_.publishFeedback(feedback);
 
-        // processing
-        as_.publishFeedback(feedback);
+		// send to application:
+		mw->gaze_callback(gaze_state);
 
-        // send to application:
-        mw->gaze_callback(gaze_state);
-
-        if (feedback.result){
-            result.result = feedback.result;
-            as_.setSucceeded(result);
-        }else{
-            as_.setAborted(result);
-        }
-
-    }
+		if (feedback.result) {
+			result.result = feedback.result;
+			as_.setSucceeded(result);
+		}
+		else {
+			as_.setAborted(result);
+		}
+	}
 };
diff --git a/server/include/ROS/MouthCallbackWrapperROS.h b/server/include/ROS/MouthCallbackWrapperROS.h
index 373d2c7..76f6e1b 100644
--- a/server/include/ROS/MouthCallbackWrapperROS.h
+++ b/server/include/ROS/MouthCallbackWrapperROS.h
@@ -1,77 +1,76 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "hlrc_server/mouthtargetAction.h"
 #include "CallbackWrapperROS.h"
 
-//callback handler incoming gaze requests:
-class MouthCallbackWrapper : CallbackWrapper<hlrc_server::mouthtargetAction>{
+// callback handler incoming gaze requests:
+class MouthCallbackWrapper : CallbackWrapper<hlrc_server::mouthtargetAction> {
 protected:
-    hlrc_server::mouthtargetFeedback feedback;
-    hlrc_server::mouthtargetResult result;
+	hlrc_server::mouthtargetFeedback feedback;
+	hlrc_server::mouthtargetResult result;
 
 public:
+	MouthCallbackWrapper(Middleware* mw, std::string scope, std::string name)
+	   : CallbackWrapper<hlrc_server::mouthtargetAction>(mw, scope, name, boost::bind(&MouthCallbackWrapper::call, this, _1)){
+		   //
+	   };
 
-    MouthCallbackWrapper(Middleware *mw, std::string scope, std::string name) : CallbackWrapper<hlrc_server::mouthtargetAction>(mw, scope, name, boost::bind(&MouthCallbackWrapper::call, this, _1)){
-        //
-    };
+	void call(const GoalConstPtr& goal) {
+		feedback.result = 1;
 
-    void call(const GoalConstPtr &goal){
-        feedback.result = 1;
+		hlrc_server::mouthtargetGoalConstPtr request = goal;
 
-        hlrc_server::mouthtargetGoalConstPtr request = goal;
+		humotion::MouthState mouth_state;
 
-        humotion::MouthState mouth_state;
+		// fill in mouth
+		//#include "RSB/SpeechCallbackWrapper.h".opening_left   = request->opening_left;
+		mouth_state.opening_center = request->opening_center;
+		mouth_state.opening_right = request->opening_right;
 
-        //fill in mouth
-        //#include "RSB/SpeechCallbackWrapper.h".opening_left   = request->opening_left;
-        mouth_state.opening_center = request->opening_center;
-        mouth_state.opening_right  = request->opening_right;
+		mouth_state.position_left = request->position_left;
+		mouth_state.position_center = request->position_center;
+		mouth_state.position_right = request->position_right;
 
-        mouth_state.position_left   = request->position_left;
-        mouth_state.position_center = request->position_center;
-        mouth_state.position_right  = request->position_right;
+		// processing
+		feedback.result = 1;
+		as_.publishFeedback(feedback);
 
-        //processing
-        feedback.result = 1;
-        as_.publishFeedback(feedback);
+		// send to application:
+		mw->mouth_callback(mouth_state);
 
-        //send to application:
-        mw->mouth_callback(mouth_state);
-
-        if (feedback.result){
-            result.result = feedback.result;
-            as_.setSucceeded(result);
-        }else{
-            as_.setAborted(result);
-        }
-
-
-    }
+		if (feedback.result) {
+			result.result = feedback.result;
+			as_.setSucceeded(result);
+		}
+		else {
+			as_.setAborted(result);
+		}
+	}
 };
diff --git a/server/include/ROS/SpeechCallbackWrapperROS.h b/server/include/ROS/SpeechCallbackWrapperROS.h
index d2ef1a7..484a355 100644
--- a/server/include/ROS/SpeechCallbackWrapperROS.h
+++ b/server/include/ROS/SpeechCallbackWrapperROS.h
@@ -1,69 +1,70 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "hlrc_server/speechAction.h"
 #include "CallbackWrapperROS.h"
 
-//callback handler incoming gaze requests:
-class SpeechCallbackWrapper : CallbackWrapper<hlrc_server::speechAction>{
+// callback handler incoming gaze requests:
+class SpeechCallbackWrapper : CallbackWrapper<hlrc_server::speechAction> {
 protected:
-    hlrc_server::speechFeedback feedback;
-    hlrc_server::speechResult result;
+	hlrc_server::speechFeedback feedback;
+	hlrc_server::speechResult result;
 
 public:
+	SpeechCallbackWrapper(Middleware* mw, std::string scope, std::string name)
+	   : CallbackWrapper<hlrc_server::speechAction>(mw, scope, name, boost::bind(&SpeechCallbackWrapper::call, this, _1)){
+		   //
+	   };
 
-    SpeechCallbackWrapper(Middleware *mw, std::string scope, std::string name) : CallbackWrapper<hlrc_server::speechAction>(mw, scope, name, boost::bind(&SpeechCallbackWrapper::call, this, _1)){
-        //
-    };
+	void call(const GoalConstPtr& goal) {
+		feedback.result = 1;
 
-    void call(const GoalConstPtr &goal){
-        feedback.result = 1;
+		hlrc_server::speechGoalConstPtr request = goal;
 
-        hlrc_server::speechGoalConstPtr request = goal;
+		std::string text = request->text;
 
-        std::string text = request->text;
+		// processing
+		feedback.result = 1;
+		as_.publishFeedback(feedback);
 
-        //processing
-        feedback.result = 1;
-        as_.publishFeedback(feedback);
+		// send to application:
+		text = "<maryxml version=\"0.4\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
+		       "xmlns=\"http://mary.dfki.de/2002/MaryXML\" xml:lang=\"en_US\">" +
+		       text + "</maryxml>";
+		mw->speak_callback(text);
 
-        //send to application:
-        text = "<maryxml version=\"0.4\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://mary.dfki.de/2002/MaryXML\" xml:lang=\"en_US\">" +
-                text +
-                "</maryxml>";
-        mw->speak_callback(text);
-
-        if (feedback.result){
-            result.result = feedback.result;
-            as_.setSucceeded(result);
-        }else{
-            as_.setAborted(result);
-        }
-    }
+		if (feedback.result) {
+			result.result = feedback.result;
+			as_.setSucceeded(result);
+		}
+		else {
+			as_.setAborted(result);
+		}
+	}
 };
diff --git a/server/include/ROS/UtteranceCallbackWrapperROS.h b/server/include/ROS/UtteranceCallbackWrapperROS.h
index 481684a..fa37c5f 100644
--- a/server/include/ROS/UtteranceCallbackWrapperROS.h
+++ b/server/include/ROS/UtteranceCallbackWrapperROS.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "hlrc_server/utteranceAction.h"
@@ -32,116 +32,125 @@
 #include "hlrc_server/phoneme.h"
 #include "hlrc_server/soundchunk.h"
 
-//callback handler incoming gaze requests:
-class UtteranceCallbackWrapper : CallbackWrapper<hlrc_server::utteranceAction>{
+// callback handler incoming gaze requests:
+class UtteranceCallbackWrapper : CallbackWrapper<hlrc_server::utteranceAction> {
 protected:
-    hlrc_server::utteranceFeedback feedback;
-    hlrc_server::utteranceResult result;
+	hlrc_server::utteranceFeedback feedback;
+	hlrc_server::utteranceResult result;
 
 public:
-
-    UtteranceCallbackWrapper(Middleware *mw, std::string scope, std::string name) : CallbackWrapper<hlrc_server::utteranceAction>(mw, scope, name, boost::bind(&UtteranceCallbackWrapper::call, this, _1)){
-        //
-    };
-
-    void call(const GoalConstPtr &goal){
-        hlrc_server::utteranceGoalConstPtr request = goal;
-        printf("> incoming utterance '%s' (%d phone symbols)\n", request->utterance.text.c_str(), (int)request->utterance.phonemes.size());
-
-        //everything is ok, will be cleared on failures
-        feedback.result = 1;
-
-        boost::shared_ptr<Utterance> utterance(new Utterance());
-
-        //copy values:
-        utterance->set_text(request->utterance.text);
-
-        boost::shared_ptr<AudioData> audio_data(new AudioData());
-        if (!extract_audio(request->utterance.audio, audio_data)){
-            feedback.result = 0;
-        }
-
-        utterance->set_audio_data(audio_data);
-        utterance->set_phoneme_vector(extract_phoneme_vector(request->utterance.phonemes));
-
-        //send to application;
-        mw->utterance_callback(utterance);
-
-
-        if (feedback.result){
-            result.result = 1;
-            as_.setSucceeded(result);
-        }else{
-            as_.setAborted(result);
-        }
-    }
-
-
-    //convert ros message audio data to our own implementation
-    bool extract_audio(hlrc_server::soundchunk sound_chunk, boost::shared_ptr<AudioData> audio_data){
-        //extract data:
-        unsigned int audio_len = sound_chunk.data.size();
-        char *audio_data_char = (char *)sound_chunk.data.data();
-
-        //audio.samples = vector<char>(audio_data_char, audio_data_char+audio_len);
-        audio_data->samples.resize(audio_len);
-        audio_data->samples.assign(audio_data_char, audio_data_char+audio_len);
-
-        printf("audio samplesize is %d bytes\n",(int)audio_data->samples.size());
-
-        //extract format:
-        audio_data->sample_signed = true;
-        switch (sound_chunk.sample_type){
-            case(hlrc_server::soundchunk::SAMPLE_U8):  audio_data->sample_signed = false; //and fall through:
-            case(hlrc_server::soundchunk::SAMPLE_S8):  audio_data->sample_bit =  8; break;
-
-            case(hlrc_server::soundchunk::SAMPLE_U16): audio_data->sample_signed = false; //and fall through:
-            case(hlrc_server::soundchunk::SAMPLE_S16): audio_data->sample_bit = 16; break;
-
-            case(hlrc_server::soundchunk::SAMPLE_U24): audio_data->sample_signed = false; //and fall through:
-            case(hlrc_server::soundchunk::SAMPLE_S24): audio_data->sample_bit = 24; break;
-
-            default:
-                printf("> invalid sample type %d in SoundChunk! ignoring request!\n", sound_chunk.sample_type);
-                return false;
-                //throw runtime_error("UtteranceRSB::convert_audio_data() unsupported sample type in soundchunk");
-        }
-
-        //bitrate
-        audio_data->sample_rate = sound_chunk.rate;
-
-        //endianness
-        if (sound_chunk.endianess == hlrc_server::soundchunk::ENDIAN_LITTLE){
-            audio_data->sample_big_endian = false;
-        }else if (sound_chunk.endianess == hlrc_server::soundchunk::ENDIAN_BIG){
-            audio_data->sample_big_endian = true;
-        }else{
-            printf("> invalid SoundChunk byte_format");
-            throw std::runtime_error("UtteranceRSB::convert_audio_data() unsupported byte_format in soundchunk");
-        }
-
-        //number of channels
-        audio_data->sample_channels = sound_chunk.channels;
-
-        printf("> new AudioData: %s\n",audio_data->to_string().c_str());
-
-        return true;
-    }
-
-    //convert ros phoneme vector to out own implementation
-    Utterance::phonemes_vector_t extract_phoneme_vector(std::vector<hlrc_server::phoneme> pv){
-        Utterance::phonemes_vector_t result;
-
-        //extract phoneme vector
-        for(unsigned int i=0; i<pv.size(); i++){
-            hlrc_server::phoneme ros_phoneme = pv[i];
-            Utterance::symbol_duration_pair_t phoneme = make_pair(ros_phoneme.symbol, ros_phoneme.duration);
-            result.push_back(phoneme);
-        }
-
-        return result;
-    }
-
+	UtteranceCallbackWrapper(Middleware* mw, std::string scope, std::string name)
+	   : CallbackWrapper<hlrc_server::utteranceAction>(mw, scope, name,
+	                                                   boost::bind(&UtteranceCallbackWrapper::call, this, _1)){
+		   //
+	   };
+
+	void call(const GoalConstPtr& goal) {
+		hlrc_server::utteranceGoalConstPtr request = goal;
+		printf("> incoming utterance '%s' (%d phone symbols)\n", request->utterance.text.c_str(),
+		       (int)request->utterance.phonemes.size());
+
+		// everything is ok, will be cleared on failures
+		feedback.result = 1;
+
+		boost::shared_ptr<Utterance> utterance(new Utterance());
+
+		// copy values:
+		utterance->set_text(request->utterance.text);
+
+		boost::shared_ptr<AudioData> audio_data(new AudioData());
+		if (!extract_audio(request->utterance.audio, audio_data)) {
+			feedback.result = 0;
+		}
+
+		utterance->set_audio_data(audio_data);
+		utterance->set_phoneme_vector(extract_phoneme_vector(request->utterance.phonemes));
+
+		// send to application;
+		mw->utterance_callback(utterance);
+
+		if (feedback.result) {
+			result.result = 1;
+			as_.setSucceeded(result);
+		}
+		else {
+			as_.setAborted(result);
+		}
+	}
+
+	// convert ros message audio data to our own implementation
+	bool extract_audio(hlrc_server::soundchunk sound_chunk, boost::shared_ptr<AudioData> audio_data) {
+		// extract data:
+		unsigned int audio_len = sound_chunk.data.size();
+		char* audio_data_char = (char*)sound_chunk.data.data();
+
+		// audio.samples = vector<char>(audio_data_char, audio_data_char+audio_len);
+		audio_data->samples.resize(audio_len);
+		audio_data->samples.assign(audio_data_char, audio_data_char + audio_len);
+
+		printf("audio samplesize is %d bytes\n", (int)audio_data->samples.size());
+
+		// extract format:
+		audio_data->sample_signed = true;
+		switch (sound_chunk.sample_type) {
+			case (hlrc_server::soundchunk::SAMPLE_U8):
+				audio_data->sample_signed = false; // and fall through:
+			case (hlrc_server::soundchunk::SAMPLE_S8):
+				audio_data->sample_bit = 8;
+				break;
+
+			case (hlrc_server::soundchunk::SAMPLE_U16):
+				audio_data->sample_signed = false; // and fall through:
+			case (hlrc_server::soundchunk::SAMPLE_S16):
+				audio_data->sample_bit = 16;
+				break;
+
+			case (hlrc_server::soundchunk::SAMPLE_U24):
+				audio_data->sample_signed = false; // and fall through:
+			case (hlrc_server::soundchunk::SAMPLE_S24):
+				audio_data->sample_bit = 24;
+				break;
+
+			default:
+				printf("> invalid sample type %d in SoundChunk! ignoring request!\n", sound_chunk.sample_type);
+				return false;
+				// throw runtime_error("UtteranceRSB::convert_audio_data() unsupported sample type in soundchunk");
+		}
+
+		// bitrate
+		audio_data->sample_rate = sound_chunk.rate;
+
+		// endianness
+		if (sound_chunk.endianess == hlrc_server::soundchunk::ENDIAN_LITTLE) {
+			audio_data->sample_big_endian = false;
+		}
+		else if (sound_chunk.endianess == hlrc_server::soundchunk::ENDIAN_BIG) {
+			audio_data->sample_big_endian = true;
+		}
+		else {
+			printf("> invalid SoundChunk byte_format");
+			throw std::runtime_error("UtteranceRSB::convert_audio_data() unsupported byte_format in soundchunk");
+		}
+
+		// number of channels
+		audio_data->sample_channels = sound_chunk.channels;
+
+		printf("> new AudioData: %s\n", audio_data->to_string().c_str());
+
+		return true;
+	}
+
+	// convert ros phoneme vector to out own implementation
+	Utterance::phonemes_vector_t extract_phoneme_vector(std::vector<hlrc_server::phoneme> pv) {
+		Utterance::phonemes_vector_t result;
+
+		// extract phoneme vector
+		for (unsigned int i = 0; i < pv.size(); i++) {
+			hlrc_server::phoneme ros_phoneme = pv[i];
+			Utterance::symbol_duration_pair_t phoneme = make_pair(ros_phoneme.symbol, ros_phoneme.duration);
+			result.push_back(phoneme);
+		}
+
+		return result;
+	}
 };
-
-
diff --git a/server/include/ROS/UtteranceROS.h b/server/include/ROS/UtteranceROS.h
index dbaebb5..8e6c62e 100644
--- a/server/include/ROS/UtteranceROS.h
+++ b/server/include/ROS/UtteranceROS.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "AudioData.h"
@@ -35,75 +35,84 @@ using namespace hlrc_server;
 #include "hlrc_server/utterance.h"
 #include "hlrc_server/ttsAction.h"
 
-//converter from ros utterance
+// converter from ros utterance
 class UtteranceROS : public Utterance {
-    public:
-        UtteranceROS(ttsResultConstPtr ros_utterance){
-            //set text:
-            set_text(ros_utterance->utterance.text);
-
-            //convert soundchunk to audio data:
-            extract_audio_data(ros_utterance->utterance.audio);
-
-            //convert phonemes:
-            extract_phonemes(ros_utterance->utterance.phonemes);
-        }
-
-        ~UtteranceROS(){};
-
-        void extract_audio_data(soundchunk sound_chunk){
-            //extract data:
-            unsigned int audio_len = sound_chunk.data.size();
-            char *audio_data_char = (char *)sound_chunk.data.data();
-
-            audio_data->samples.resize(audio_len);
-            audio_data->samples.assign(audio_data_char, audio_data_char+audio_len);
-            printf("audio samplesize is %d bytes\n",(unsigned int)audio_data->samples.size());
-
-            //extract format:
-            audio_data->sample_signed = true;
-            switch (sound_chunk.sample_type){
-                case(soundchunk::SAMPLE_U8):  audio_data->sample_signed = false; //and fall through:
-                case(soundchunk::SAMPLE_S8):  audio_data->sample_bit =  8; break;
-
-                case(soundchunk::SAMPLE_U16): audio_data->sample_signed = false; //and fall through:
-                case(soundchunk::SAMPLE_S16): audio_data->sample_bit = 16; break;
-
-                case(soundchunk::SAMPLE_U24): audio_data->sample_signed = false; //and fall through:
-                case(soundchunk::SAMPLE_S24): audio_data->sample_bit = 24; break;
-
-                default:
-                    printf("> invalid sample type %d in ROS SoundChunk! ignoring request!\n", sound_chunk.sample_type);
-                    throw runtime_error("UtteranceROS::convert_audio_data() unsupported sample type in ros SoundChunk");
-            }
-
-            //bitrate
-            audio_data->sample_rate = sound_chunk.rate;
-
-            //endianness
-            if (sound_chunk.endianess == soundchunk::ENDIAN_LITTLE){
-                audio_data->sample_big_endian = false;
-            }else if (sound_chunk.endianess == soundchunk::ENDIAN_BIG){
-                audio_data->sample_big_endian = true;
-            }else{
-                printf("> invalid SoundChunk byte_format");
-                throw runtime_error("UtteranceROS::convert_audio_data() unsupported byte_format in ros SoundChunk");
-            }
-
-        //number of channels
-        audio_data->sample_channels = sound_chunk.channels;
-
-        printf("> new AudioData: %s\n",audio_data->to_string().c_str());
-    }
-
-    void extract_phonemes(utterance::_phonemes_type ros_phones){
-        //extract phoneme vector
-        phonemes_vector.clear();
-        for(auto it = ros_phones.begin(); it<ros_phones.end(); it++){
-            Utterance::symbol_duration_pair_t phoneme = make_pair(it->symbol, it->duration);
-            phonemes_vector.push_back(phoneme);
-        }
-    }
-
+public:
+	UtteranceROS(ttsResultConstPtr ros_utterance) {
+		// set text:
+		set_text(ros_utterance->utterance.text);
+
+		// convert soundchunk to audio data:
+		extract_audio_data(ros_utterance->utterance.audio);
+
+		// convert phonemes:
+		extract_phonemes(ros_utterance->utterance.phonemes);
+	}
+
+	~UtteranceROS(){};
+
+	void extract_audio_data(soundchunk sound_chunk) {
+		// extract data:
+		unsigned int audio_len = sound_chunk.data.size();
+		char* audio_data_char = (char*)sound_chunk.data.data();
+
+		audio_data->samples.resize(audio_len);
+		audio_data->samples.assign(audio_data_char, audio_data_char + audio_len);
+		printf("audio samplesize is %d bytes\n", (unsigned int)audio_data->samples.size());
+
+		// extract format:
+		audio_data->sample_signed = true;
+		switch (sound_chunk.sample_type) {
+			case (soundchunk::SAMPLE_U8):
+				audio_data->sample_signed = false; // and fall through:
+			case (soundchunk::SAMPLE_S8):
+				audio_data->sample_bit = 8;
+				break;
+
+			case (soundchunk::SAMPLE_U16):
+				audio_data->sample_signed = false; // and fall through:
+			case (soundchunk::SAMPLE_S16):
+				audio_data->sample_bit = 16;
+				break;
+
+			case (soundchunk::SAMPLE_U24):
+				audio_data->sample_signed = false; // and fall through:
+			case (soundchunk::SAMPLE_S24):
+				audio_data->sample_bit = 24;
+				break;
+
+			default:
+				printf("> invalid sample type %d in ROS SoundChunk! ignoring request!\n", sound_chunk.sample_type);
+				throw runtime_error("UtteranceROS::convert_audio_data() unsupported sample type in ros SoundChunk");
+		}
+
+		// bitrate
+		audio_data->sample_rate = sound_chunk.rate;
+
+		// endianness
+		if (sound_chunk.endianess == soundchunk::ENDIAN_LITTLE) {
+			audio_data->sample_big_endian = false;
+		}
+		else if (sound_chunk.endianess == soundchunk::ENDIAN_BIG) {
+			audio_data->sample_big_endian = true;
+		}
+		else {
+			printf("> invalid SoundChunk byte_format");
+			throw runtime_error("UtteranceROS::convert_audio_data() unsupported byte_format in ros SoundChunk");
+		}
+
+		// number of channels
+		audio_data->sample_channels = sound_chunk.channels;
+
+		printf("> new AudioData: %s\n", audio_data->to_string().c_str());
+	}
+
+	void extract_phonemes(utterance::_phonemes_type ros_phones) {
+		// extract phoneme vector
+		phonemes_vector.clear();
+		for (auto it = ros_phones.begin(); it < ros_phones.end(); it++) {
+			Utterance::symbol_duration_pair_t phoneme = make_pair(it->symbol, it->duration);
+			phonemes_vector.push_back(phoneme);
+		}
+	}
 };
-
diff --git a/server/include/RSB/AnimationCallbackWrapper.h b/server/include/RSB/AnimationCallbackWrapper.h
index 588d5ea..92b84ed 100644
--- a/server/include/RSB/AnimationCallbackWrapper.h
+++ b/server/include/RSB/AnimationCallbackWrapper.h
@@ -1,71 +1,92 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "CallbackWrapper.h"
 #include "Animation.h"
 
-//callback handler incoming animation requests:
-class AnimationCallbackWrapper : public CallbackWrapper<rst::animation::HeadAnimation>{
-    public:
-       AnimationCallbackWrapper(Middleware *mw) : CallbackWrapper(mw){}
+// callback handler incoming animation requests:
+class AnimationCallbackWrapper : public CallbackWrapper<rst::animation::HeadAnimation> {
+public:
+	AnimationCallbackWrapper(Middleware* mw) : CallbackWrapper(mw) {
+	}
 
-       void call(const std::string& method_name, boost::shared_ptr<rst::animation::HeadAnimation> input){
-           printf("> incomint animation (method = %s)\n",method_name.c_str());
+	void call(const std::string& method_name, boost::shared_ptr<rst::animation::HeadAnimation> input) {
+		printf("> incomint animation (method = %s)\n", method_name.c_str());
 
-           //fetch animation passed by rsb:
-           rst::animation::HeadAnimation *rst_ani = input.get();
-           boost::shared_ptr<Animation> ani(new Animation());
+		// fetch animation passed by rsb:
+		rst::animation::HeadAnimation* rst_ani = input.get();
+		boost::shared_ptr<Animation> ani(new Animation());
 
-           switch ((int) rst_ani->animation()){
-               case(rst_ani->IDLE):             ani->target = Animation::IDLE; break;
-               case(rst_ani->HEAD_NOD):         ani->target = Animation::HEAD_NOD; break;
-               case(rst_ani->HEAD_SHAKE):       ani->target = Animation::HEAD_SHAKE; break;
-               case(rst_ani->EYEBLINK_LEFT):    ani->target = Animation::EYEBLINK_L; break;
-               case(rst_ani->EYEBLINK_RIGHT):   ani->target = Animation::EYEBLINK_R; break;
-               case(rst_ani->EYEBLINK_BOTH):    ani->target = Animation::EYEBLINK_BOTH; break;
-               case(rst_ani->EYEBROWS_RAISE):   ani->target = Animation::EYEBROWS_RAISE;break;
-               case(rst_ani->EYEBROWS_LOWER):   ani->target = Animation::EYEBROWS_LOWER;break;
-               case(rst_ani->ENGAGEMENT_LEFT):  ani->target = Animation::ENGAGEMENT_LEFT;break;
-               case(rst_ani->ENGAGEMENT_RIGHT): ani->target = Animation::ENGAGEMENT_RIGHT;break;
-               default:
-                   ani->target = Animation::IDLE;
-                   printf("> unhandled animatin target %d\n",(int)rst_ani->animation());
-                   throw std::runtime_error("AnimationCallback: invalid animation id");
-                   return;
-           }
-           ani->repetitions   = rst_ani->repetitions();
-           ani->duration_each = rst_ani->duration_each();
-           ani->scale         = rst_ani->emphasis_scale();
+		switch ((int)rst_ani->animation()) {
+			case (rst_ani->IDLE):
+				ani->target = Animation::IDLE;
+				break;
+			case (rst_ani->HEAD_NOD):
+				ani->target = Animation::HEAD_NOD;
+				break;
+			case (rst_ani->HEAD_SHAKE):
+				ani->target = Animation::HEAD_SHAKE;
+				break;
+			case (rst_ani->EYEBLINK_LEFT):
+				ani->target = Animation::EYEBLINK_L;
+				break;
+			case (rst_ani->EYEBLINK_RIGHT):
+				ani->target = Animation::EYEBLINK_R;
+				break;
+			case (rst_ani->EYEBLINK_BOTH):
+				ani->target = Animation::EYEBLINK_BOTH;
+				break;
+			case (rst_ani->EYEBROWS_RAISE):
+				ani->target = Animation::EYEBROWS_RAISE;
+				break;
+			case (rst_ani->EYEBROWS_LOWER):
+				ani->target = Animation::EYEBROWS_LOWER;
+				break;
+			case (rst_ani->ENGAGEMENT_LEFT):
+				ani->target = Animation::ENGAGEMENT_LEFT;
+				break;
+			case (rst_ani->ENGAGEMENT_RIGHT):
+				ani->target = Animation::ENGAGEMENT_RIGHT;
+				break;
+			default:
+				ani->target = Animation::IDLE;
+				printf("> unhandled animatin target %d\n", (int)rst_ani->animation());
+				throw std::runtime_error("AnimationCallback: invalid animation id");
+				return;
+		}
+		ani->repetitions = rst_ani->repetitions();
+		ani->duration_each = rst_ani->duration_each();
+		ani->scale = rst_ani->emphasis_scale();
 
-           printf("> new Animation: %s\n", ani->as_string().c_str());
+		printf("> new Animation: %s\n", ani->as_string().c_str());
 
-           //send to application
-           mw->animation_callback(ani);
-       }
+		// send to application
+		mw->animation_callback(ani);
+	}
 };
diff --git a/server/include/RSB/CallbackWrapper.h b/server/include/RSB/CallbackWrapper.h
index fd8b9e3..6a38437 100644
--- a/server/include/RSB/CallbackWrapper.h
+++ b/server/include/RSB/CallbackWrapper.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "Middleware.h"
@@ -37,17 +37,17 @@
 #include <rsb/Factory.h>
 
 template <typename T>
-class CallbackWrapper : public rsb::patterns::LocalServer::Callback<T, void>{
-    public:
-        CallbackWrapper(Middleware *_mw){
-            mw = _mw;
-        }
+class CallbackWrapper : public rsb::patterns::LocalServer::Callback<T, void> {
+public:
+	CallbackWrapper(Middleware* _mw) {
+		mw = _mw;
+	}
 
+	~CallbackWrapper() {
+	}
 
-        ~CallbackWrapper(){}
+	virtual void call(const std::string&, boost::shared_ptr<T> param) = 0;
 
-        virtual void call(const std::string&, boost::shared_ptr<T> param) = 0;
-
-    protected:
-        Middleware *mw;
+protected:
+	Middleware* mw;
 };
diff --git a/server/include/RSB/EmotionCallbackWrapper.h b/server/include/RSB/EmotionCallbackWrapper.h
index 5fc6c70..59c34bf 100644
--- a/server/include/RSB/EmotionCallbackWrapper.h
+++ b/server/include/RSB/EmotionCallbackWrapper.h
@@ -1,69 +1,85 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "CallbackWrapper.h"
 
-//callback handler incoming emotion requests:
-class EmotionCallbackWrapper : public CallbackWrapper<rst::animation::EmotionExpression>{
-    public:
-       EmotionCallbackWrapper(Middleware *mw) : CallbackWrapper(mw){}
+// callback handler incoming emotion requests:
+class EmotionCallbackWrapper : public CallbackWrapper<rst::animation::EmotionExpression> {
+public:
+	EmotionCallbackWrapper(Middleware* mw) : CallbackWrapper(mw) {
+	}
 
-       void call(const std::string& method_name, boost::shared_ptr<rst::animation::EmotionExpression> input){
-           printf("> incoming emotion (%s = %d)\n", method_name.c_str(),(int)input->emotion());
+	void call(const std::string& method_name, boost::shared_ptr<rst::animation::EmotionExpression> input) {
+		printf("> incoming emotion (%s = %d)\n", method_name.c_str(), (int)input->emotion());
 
-           EmotionState emotion_state;
-           rst::animation::EmotionExpression *emotion = input.get();
+		EmotionState emotion_state;
+		rst::animation::EmotionExpression* emotion = input.get();
 
-           //extract data & copy it to our datatype (might be good when we allow multiple middlewares in the feature)
-           switch ((int)emotion->emotion()){
-               case(rst::animation::EmotionExpression_Emotion_NEUTRAL):   emotion_state.value = EmotionConfig::NEUTRAL; break;
-               case(rst::animation::EmotionExpression_Emotion_HAPPY):     emotion_state.value = EmotionConfig::HAPPY; break;
-               case(rst::animation::EmotionExpression_Emotion_SAD):       emotion_state.value = EmotionConfig::SAD; break;
-               case(rst::animation::EmotionExpression_Emotion_ANGRY):     emotion_state.value = EmotionConfig::ANGRY; break;
-               case(rst::animation::EmotionExpression_Emotion_SURPRISED): emotion_state.value = EmotionConfig::SURPRISED; break;
-               case(rst::animation::EmotionExpression_Emotion_FEAR):      emotion_state.value = EmotionConfig::FEAR; break;
-               default:
-               printf("> invalid EmotionExpression emotion value. exiting\n"); exit(EXIT_FAILURE);
-           }
+		// extract data & copy it to our datatype (might be good when we allow multiple middlewares in the feature)
+		switch ((int)emotion->emotion()) {
+			case (rst::animation::EmotionExpression_Emotion_NEUTRAL):
+				emotion_state.value = EmotionConfig::NEUTRAL;
+				break;
+			case (rst::animation::EmotionExpression_Emotion_HAPPY):
+				emotion_state.value = EmotionConfig::HAPPY;
+				break;
+			case (rst::animation::EmotionExpression_Emotion_SAD):
+				emotion_state.value = EmotionConfig::SAD;
+				break;
+			case (rst::animation::EmotionExpression_Emotion_ANGRY):
+				emotion_state.value = EmotionConfig::ANGRY;
+				break;
+			case (rst::animation::EmotionExpression_Emotion_SURPRISED):
+				emotion_state.value = EmotionConfig::SURPRISED;
+				break;
+			case (rst::animation::EmotionExpression_Emotion_FEAR):
+				emotion_state.value = EmotionConfig::FEAR;
+				break;
+			default:
+				printf("> invalid EmotionExpression emotion value. exiting\n");
+				exit(EXIT_FAILURE);
+		}
 
-           emotion_state.duration = emotion->duration();
+		emotion_state.duration = emotion->duration();
 
-           //send to application
-           if (method_name == "defaultEmotion"){
-               //set default emotion:
-               mw->default_emotion_callback(emotion_state);
-           }else if (method_name == "currentEmotion"){
-               //set current emotion:
-               mw->current_emotion_callback(emotion_state);
-           }else{
-               printf("> invalid method called '%s'\n",method_name.c_str());
-               exit(EXIT_FAILURE);
-           }
-        }
+		// send to application
+		if (method_name == "defaultEmotion") {
+			// set default emotion:
+			mw->default_emotion_callback(emotion_state);
+		}
+		else if (method_name == "currentEmotion") {
+			// set current emotion:
+			mw->current_emotion_callback(emotion_state);
+		}
+		else {
+			printf("> invalid method called '%s'\n", method_name.c_str());
+			exit(EXIT_FAILURE);
+		}
+	}
 };
diff --git a/server/include/RSB/GazeCallbackWrapper.h b/server/include/RSB/GazeCallbackWrapper.h
index 7c9dd10..8e53157 100644
--- a/server/include/RSB/GazeCallbackWrapper.h
+++ b/server/include/RSB/GazeCallbackWrapper.h
@@ -1,61 +1,62 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "CallbackWrapper.h"
 
-//callback handler incoming gaze requests:
-class GazeCallbackWrapper : public CallbackWrapper<rst::animation::BinocularHeadGaze>{
-    public:
-        GazeCallbackWrapper(Middleware *mw) : CallbackWrapper(mw){}
-        void call(const std::string& method_name, boost::shared_ptr<rst::animation::BinocularHeadGaze> input){
-            rst::animation::BinocularHeadGaze *gaze = input.get();
-            //printf("> incoming gaze (p=%3.1f t=%3.1f r=%3.1f / v=%3.1f)\n", gaze->pan(), gaze->tilt(), gaze->roll(), gaze->vergence());
+// callback handler incoming gaze requests:
+class GazeCallbackWrapper : public CallbackWrapper<rst::animation::BinocularHeadGaze> {
+public:
+	GazeCallbackWrapper(Middleware* mw) : CallbackWrapper(mw) {
+	}
+	void call(const std::string& method_name, boost::shared_ptr<rst::animation::BinocularHeadGaze> input) {
+		rst::animation::BinocularHeadGaze* gaze = input.get();
+		// printf("> incoming gaze (p=%3.1f t=%3.1f r=%3.1f / v=%3.1f)\n", gaze->pan(), gaze->tilt(), gaze->roll(), gaze->vergence());
 
-            humotion::GazeState gaze_state;
+		humotion::GazeState gaze_state;
 
-            //fill in gaze
-            gaze_state.pan   = gaze->target().azimuth();
-            gaze_state.tilt  = gaze->target().elevation();
-            gaze_state.roll  = 0.0;
+		// fill in gaze
+		gaze_state.pan = gaze->target().azimuth();
+		gaze_state.tilt = gaze->target().elevation();
+		gaze_state.roll = 0.0;
 
-            //RSB supports only absolute targets for now...
-            gaze_state.timestamp = 123.45; //FIXME!!
-            gaze_state.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE;
+		// RSB supports only absolute targets for now...
+		gaze_state.timestamp = 123.45; // FIXME!!
+		gaze_state.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE;
 
-            //vergence
-            gaze_state.vergence  = (gaze->has_eye_vergence())?gaze->eye_vergence():0.0;
+		// vergence
+		gaze_state.vergence = (gaze->has_eye_vergence()) ? gaze->eye_vergence() : 0.0;
 
-            //offsets
-            gaze_state.pan_offset  = (gaze->has_offset())?gaze->offset().azimuth():0.0;
-            gaze_state.tilt_offset = (gaze->has_offset())?gaze->offset().elevation():0.0;
+		// offsets
+		gaze_state.pan_offset = (gaze->has_offset()) ? gaze->offset().azimuth() : 0.0;
+		gaze_state.tilt_offset = (gaze->has_offset()) ? gaze->offset().elevation() : 0.0;
 
-            //send to application:
-            mw->gaze_callback(gaze_state);
-        }
+		// send to application:
+		mw->gaze_callback(gaze_state);
+	}
 };
diff --git a/server/include/RSB/MouthCallbackWrapper.h b/server/include/RSB/MouthCallbackWrapper.h
index 47f69c1..b9dcaa3 100644
--- a/server/include/RSB/MouthCallbackWrapper.h
+++ b/server/include/RSB/MouthCallbackWrapper.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "CallbackWrapper.h"
diff --git a/server/include/RSB/SpeechCallbackWrapper.h b/server/include/RSB/SpeechCallbackWrapper.h
index fd33103..0066634 100644
--- a/server/include/RSB/SpeechCallbackWrapper.h
+++ b/server/include/RSB/SpeechCallbackWrapper.h
@@ -1,47 +1,48 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "CallbackWrapper.h"
 
-//callback handler incoming speech requests:
-class SpeechCallbackWrapper : public CallbackWrapper<std::string>{
-    public:
-       SpeechCallbackWrapper(Middleware *mw) : CallbackWrapper(mw){}
+// callback handler incoming speech requests:
+class SpeechCallbackWrapper : public CallbackWrapper<std::string> {
+public:
+	SpeechCallbackWrapper(Middleware* mw) : CallbackWrapper(mw) {
+	}
 
-       void call(const std::string&, boost::shared_ptr<std::string> _text){
-            //send to application
-           std::string text = *_text.get();
-   	   //<voice effect=\"Rate(durScale:1.5) + TractScaler(durScale:1.1)\">" +
+	void call(const std::string&, boost::shared_ptr<std::string> _text) {
+		// send to application
+		std::string text = *_text.get();
+		//<voice effect=\"Rate(durScale:1.5) + TractScaler(durScale:1.1)\">" +
 
-           text = "<maryxml version=\"0.4\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://mary.dfki.de/2002/MaryXML\" xml:lang=\"en_US\">" +
-                   text + 
-                   "</maryxml>";
-            mw->speak_callback(text);
-        }
+		text = "<maryxml version=\"0.4\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
+		       "xmlns=\"http://mary.dfki.de/2002/MaryXML\" xml:lang=\"en_US\">" +
+		       text + "</maryxml>";
+		mw->speak_callback(text);
+	}
 };
diff --git a/server/include/RSB/UtteranceCallbackWrapper.h b/server/include/RSB/UtteranceCallbackWrapper.h
index 4d04734..57e34aa 100644
--- a/server/include/RSB/UtteranceCallbackWrapper.h
+++ b/server/include/RSB/UtteranceCallbackWrapper.h
@@ -1,50 +1,51 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "CallbackWrapper.h"
 #include "UtteranceRSB.h"
 
-//callback handler incoming Utterance requests:
-class UtteranceCallbackWrapper : public CallbackWrapper<rst::audition::Utterance>{
-    public:
-        UtteranceCallbackWrapper(Middleware *mw) : CallbackWrapper(mw){}
-        void call(const std::string&, boost::shared_ptr<rst::audition::Utterance> param){
-            //convert rsb utterance to out own:
-            rst::audition::Utterance *rst_utterance = param.get();
-            printf("> incoming utterance '%s' (%d phone symbols)\n", param->textual_representation().c_str(), (int)rst_utterance->phonemes().element().size());
+// callback handler incoming Utterance requests:
+class UtteranceCallbackWrapper : public CallbackWrapper<rst::audition::Utterance> {
+public:
+	UtteranceCallbackWrapper(Middleware* mw) : CallbackWrapper(mw) {
+	}
+	void call(const std::string&, boost::shared_ptr<rst::audition::Utterance> param) {
+		// convert rsb utterance to out own:
+		rst::audition::Utterance* rst_utterance = param.get();
+		printf("> incoming utterance '%s' (%d phone symbols)\n", param->textual_representation().c_str(),
+		       (int)rst_utterance->phonemes().element().size());
 
-            boost::shared_ptr<Utterance> utterance(new UtteranceRSB(*rst_utterance));
+		boost::shared_ptr<Utterance> utterance(new UtteranceRSB(*rst_utterance));
 
-            //send to application;
-            mw->utterance_callback(utterance);
-        }
-
-    private:
+		// send to application;
+		mw->utterance_callback(utterance);
+	}
 
+private:
 };
diff --git a/server/include/RSB/UtteranceRSB.h b/server/include/RSB/UtteranceRSB.h
index 145dece..06d31a0 100644
--- a/server/include/RSB/UtteranceRSB.h
+++ b/server/include/RSB/UtteranceRSB.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include "AudioData.h"
@@ -32,79 +32,89 @@
 #include <rst/audition/Utterance.pb.h>
 using namespace std;
 
-//converter from rsb utterance
+// converter from rsb utterance
 class UtteranceRSB : public Utterance {
-    public:
-        UtteranceRSB(rst::audition::Utterance rst_utterance){
-            //set text:
-            set_text(rst_utterance.textual_representation());
-
-            //convert soundchunk to audio data:
-            extract_audio_data(rst_utterance.audio());
-
-            //convert phonemes:
-            extract_phonemes(rst_utterance);
-        }
-
-        ~UtteranceRSB(){};
-
-        void extract_audio_data(rst::audition::SoundChunk sound_chunk){
-            //cout << sound_chunk.DebugString();
-
-            //extract data:
-            unsigned int audio_len = sound_chunk.data().length();
-            char *audio_data_char = (char *)sound_chunk.data().c_str();
-
-            //audio.samples = vector<char>(audio_data_char, audio_data_char+audio_len);
-            audio_data->samples.resize(audio_len);
-            audio_data->samples.assign(audio_data_char, audio_data_char+audio_len);
-
-            printf("audio samplesize is %d bytes\n",(unsigned int)audio_data->samples.size());
-
-            //extract format:
-            audio_data->sample_signed = true;
-            switch (sound_chunk.sample_type()){
-                case(rst::audition::SoundChunk::SAMPLE_U8):  audio_data->sample_signed = false; //and fall through:
-                case(rst::audition::SoundChunk::SAMPLE_S8):  audio_data->sample_bit =  8; break;
-
-                case(rst::audition::SoundChunk::SAMPLE_U16): audio_data->sample_signed = false; //and fall through:
-                case(rst::audition::SoundChunk::SAMPLE_S16): audio_data->sample_bit = 16; break;
-
-                case(rst::audition::SoundChunk::SAMPLE_U24): audio_data->sample_signed = false; //and fall through:
-                case(rst::audition::SoundChunk::SAMPLE_S24): audio_data->sample_bit = 24; break;
-
-                default:
-                    printf("> invalid sample type %d in RST SoundChunk! ignoring request!\n", sound_chunk.sample_type());
-                    throw runtime_error("UtteranceRSB::convert_audio_data() unsupported sample type in rst::audition::SoundChunk");
-            }
-
-            //bitrate
-            audio_data->sample_rate = sound_chunk.rate();
-
-        //endianness
-        if (sound_chunk.endianness() == rst::audition::SoundChunk::ENDIAN_LITTLE){
-            audio_data->sample_big_endian = false;
-        }else if (sound_chunk.endianness() == rst::audition::SoundChunk::ENDIAN_BIG){
-            audio_data->sample_big_endian = true;
-        }else{
-            printf("> invalid SoundChunk byte_format");
-            throw runtime_error("UtteranceRSB::convert_audio_data() unsupported byte_format in rst::audition::SoundChunk");
-        }
-
-        //number of channels
-        audio_data->sample_channels = sound_chunk.channels();
-
-        printf("> new AudioData: %s\n",audio_data->to_string().c_str());
-    }
-
-    void extract_phonemes(rst::audition::Utterance rst_utterance){
-        //extract phoneme vector
-        phonemes_vector.clear();
-        for(int i=0; i<rst_utterance.phonemes().element().size(); i++){
-            rst::audition::Phoneme rst_phoneme = rst_utterance.phonemes().element().Get(i);
-            Utterance::symbol_duration_pair_t phoneme = make_pair(rst_phoneme.symbol(), rst_phoneme.duration());
-            phonemes_vector.push_back(phoneme);
-        }
-    }
+public:
+	UtteranceRSB(rst::audition::Utterance rst_utterance) {
+		// set text:
+		set_text(rst_utterance.textual_representation());
+
+		// convert soundchunk to audio data:
+		extract_audio_data(rst_utterance.audio());
+
+		// convert phonemes:
+		extract_phonemes(rst_utterance);
+	}
+
+	~UtteranceRSB(){};
+
+	void extract_audio_data(rst::audition::SoundChunk sound_chunk) {
+		// cout << sound_chunk.DebugString();
+
+		// extract data:
+		unsigned int audio_len = sound_chunk.data().length();
+		char* audio_data_char = (char*)sound_chunk.data().c_str();
+
+		// audio.samples = vector<char>(audio_data_char, audio_data_char+audio_len);
+		audio_data->samples.resize(audio_len);
+		audio_data->samples.assign(audio_data_char, audio_data_char + audio_len);
+
+		printf("audio samplesize is %d bytes\n", (unsigned int)audio_data->samples.size());
+
+		// extract format:
+		audio_data->sample_signed = true;
+		switch (sound_chunk.sample_type()) {
+			case (rst::audition::SoundChunk::SAMPLE_U8):
+				audio_data->sample_signed = false; // and fall through:
+			case (rst::audition::SoundChunk::SAMPLE_S8):
+				audio_data->sample_bit = 8;
+				break;
+
+			case (rst::audition::SoundChunk::SAMPLE_U16):
+				audio_data->sample_signed = false; // and fall through:
+			case (rst::audition::SoundChunk::SAMPLE_S16):
+				audio_data->sample_bit = 16;
+				break;
+
+			case (rst::audition::SoundChunk::SAMPLE_U24):
+				audio_data->sample_signed = false; // and fall through:
+			case (rst::audition::SoundChunk::SAMPLE_S24):
+				audio_data->sample_bit = 24;
+				break;
+
+			default:
+				printf("> invalid sample type %d in RST SoundChunk! ignoring request!\n", sound_chunk.sample_type());
+				throw runtime_error("UtteranceRSB::convert_audio_data() unsupported sample type in rst::audition::SoundChunk");
+		}
+
+		// bitrate
+		audio_data->sample_rate = sound_chunk.rate();
+
+		// endianness
+		if (sound_chunk.endianness() == rst::audition::SoundChunk::ENDIAN_LITTLE) {
+			audio_data->sample_big_endian = false;
+		}
+		else if (sound_chunk.endianness() == rst::audition::SoundChunk::ENDIAN_BIG) {
+			audio_data->sample_big_endian = true;
+		}
+		else {
+			printf("> invalid SoundChunk byte_format");
+			throw runtime_error("UtteranceRSB::convert_audio_data() unsupported byte_format in rst::audition::SoundChunk");
+		}
+
+		// number of channels
+		audio_data->sample_channels = sound_chunk.channels();
+
+		printf("> new AudioData: %s\n", audio_data->to_string().c_str());
+	}
+
+	void extract_phonemes(rst::audition::Utterance rst_utterance) {
+		// extract phoneme vector
+		phonemes_vector.clear();
+		for (int i = 0; i < rst_utterance.phonemes().element().size(); i++) {
+			rst::audition::Phoneme rst_phoneme = rst_utterance.phonemes().element().Get(i);
+			Utterance::symbol_duration_pair_t phoneme = make_pair(rst_phoneme.symbol(), rst_phoneme.duration());
+			phonemes_vector.push_back(phoneme);
+		}
+	}
 };
-
diff --git a/server/include/Utterance.h b/server/include/Utterance.h
index b8ca9d2..09d02ab 100644
--- a/server/include/Utterance.h
+++ b/server/include/Utterance.h
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #pragma once
 #include <string>
@@ -34,34 +34,32 @@
 #include <boost/thread/thread.hpp>
 #include "AudioData.h"
 
-class Utterance{
+class Utterance {
 public:
-    typedef std::pair<std::string, unsigned int> symbol_duration_pair_t;
-    typedef std::vector<symbol_duration_pair_t> phonemes_vector_t;
+	typedef std::pair<std::string, unsigned int> symbol_duration_pair_t;
+	typedef std::vector<symbol_duration_pair_t> phonemes_vector_t;
 
-    Utterance();
-    ~Utterance();
+	Utterance();
+	~Utterance();
 
-    void set_phoneme_vector(phonemes_vector_t p);
-    void set_text(std::string t);
-    void set_audio_data(boost::shared_ptr<AudioData> a);
+	void set_phoneme_vector(phonemes_vector_t p);
+	void set_text(std::string t);
+	void set_audio_data(boost::shared_ptr<AudioData> a);
 
-    void start_playback();
-    bool is_playing();
-    std::string currently_active_phoneme();
-    boost::shared_ptr<AudioData> get_audio_data();
-    std::string get_text();
+	void start_playback();
+	bool is_playing();
+	std::string currently_active_phoneme();
+	boost::shared_ptr<AudioData> get_audio_data();
+	std::string get_text();
 
 protected:
-    boost::shared_ptr<AudioData> audio_data;
-    std::string text;
-    phonemes_vector_t phonemes_vector;
+	boost::shared_ptr<AudioData> audio_data;
+	std::string text;
+	phonemes_vector_t phonemes_vector;
 
 private:
-    phonemes_vector_t::iterator phonemes_vector_iterator;
-    boost::system_time symbol_end_time;
-
-    bool playing;
+	phonemes_vector_t::iterator phonemes_vector_iterator;
+	boost::system_time symbol_end_time;
 
+	bool playing;
 };
-
diff --git a/server/src/Animation.cpp b/server/src/Animation.cpp
index 12ef64c..4c5d44d 100644
--- a/server/src/Animation.cpp
+++ b/server/src/Animation.cpp
@@ -1,286 +1,288 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "Animation.h"
 using namespace std;
 using namespace boost;
 
-Animation::Animation(){
-    active = false;
-    repetitions = 1;
-    duration_each = 1000.0; //in ms
-    scale = 1.0;
+Animation::Animation() {
+	active = false;
+	repetitions = 1;
+	duration_each = 1000.0; // in ms
+	scale = 1.0;
 }
 
-Animation::~Animation(){
+Animation::~Animation() {
 }
 
-void Animation::start(){
-    if (active){
-        printf("> Animation already active. ignored play() call\n");
-        return;
-    }
+void Animation::start() {
+	if (active) {
+		printf("> Animation already active. ignored play() call\n");
+		return;
+	}
 
-    active = true;
-    repetition_now = 0;
+	active = true;
+	repetition_now = 0;
 
-    //Set up end time
-    int duration = duration_each * repetitions;
-    start_time = get_system_time(); //posix_time::microsec_clock::local_time();
-    end_time   = start_time + boost::posix_time::milliseconds(duration);
+	// Set up end time
+	int duration = duration_each * repetitions;
+	start_time = get_system_time(); // posix_time::microsec_clock::local_time();
+	end_time = start_time + boost::posix_time::milliseconds(duration);
 }
 
-bool Animation::is_active(){
-    return active;
+bool Animation::is_active() {
+	return active;
 }
 
 //! calculate motion profile based on constant acceleration
 //! \param  tn time now (normalized to [0...1[)
 //! \return value [0...1], f[tn=0] = 0
-float Animation::apply_motion_profile_positive(float tn){
-    float result = 0.0;
-
-    if ((tn < 0.0) || (tn > 1.0)){
-        printf("> Animation::apply_motion_profile(%4.2f) called with invalid input (allowed is [0..1])\n",tn);
-        return 0.0;
-    }
-
-    if (tn <= 0.5){
-        //accelerated motion
-        result = (2.0 * pow(tn, 2));
-    }else if (tn <= 1.0){
-        //deaccelerate
-        result = (1.0 - 2.0 * pow(1.0 - tn, 2));
-    }
-    return result;
+float Animation::apply_motion_profile_positive(float tn) {
+	float result = 0.0;
+
+	if ((tn < 0.0) || (tn > 1.0)) {
+		printf("> Animation::apply_motion_profile(%4.2f) called with invalid input (allowed is [0..1])\n", tn);
+		return 0.0;
+	}
+
+	if (tn <= 0.5) {
+		// accelerated motion
+		result = (2.0 * pow(tn, 2));
+	}
+	else if (tn <= 1.0) {
+		// deaccelerate
+		result = (1.0 - 2.0 * pow(1.0 - tn, 2));
+	}
+	return result;
 }
 
-//start from 0, go to +1, go to -1, ... , -1 to 0
-float Animation::apply_motion_profile_symmetric(float tn, unsigned int rep){
-    unsigned int phases = 2*rep + 1;
-    float fstep = 1.0 / phases;
-    float result = 0.0;
-
-    if (tn > 1.0){
-        printf("> apply_motion_profile_symmetric(%f, %d) -> invalid tn > 1.0!\n",tn,rep);
-        exit(1);
-    }else if (tn <= fstep){
-        //first slow advance to +1.0
-        result = apply_motion_profile_positive(tn / (fstep));
-    }else if (tn >= 1.0-fstep){
-        //last slow return from -1 to 0
-        result = -1.0 + apply_motion_profile_positive((tn-(1.0-fstep)) / (fstep));
-    }else{
-        //motion in between, alternating between +1,-1,+1,...,-1
-        //convert to ]0,phases-fstep]
-        float tnn = tn - fstep;
-        //convert to (multiples) ]0,fstep]
-        tnn = fmod(tnn, 2*fstep);
-        //result has to be from+1 to -1
-        if (tnn <= fstep){
-            //+1 -> -1
-            result = 1.0 - 2.0 * apply_motion_profile_positive(tnn/fstep);
-        }else{
-            //-1 -> +1
-            result = -1.0 + 2.0 * apply_motion_profile_positive((tnn-fstep)/fstep);
-        }
-    }
-    return result;
+// start from 0, go to +1, go to -1, ... , -1 to 0
+float Animation::apply_motion_profile_symmetric(float tn, unsigned int rep) {
+	unsigned int phases = 2 * rep + 1;
+	float fstep = 1.0 / phases;
+	float result = 0.0;
+
+	if (tn > 1.0) {
+		printf("> apply_motion_profile_symmetric(%f, %d) -> invalid tn > 1.0!\n", tn, rep);
+		exit(1);
+	}
+	else if (tn <= fstep) {
+		// first slow advance to +1.0
+		result = apply_motion_profile_positive(tn / (fstep));
+	}
+	else if (tn >= 1.0 - fstep) {
+		// last slow return from -1 to 0
+		result = -1.0 + apply_motion_profile_positive((tn - (1.0 - fstep)) / (fstep));
+	}
+	else {
+		// motion in between, alternating between +1,-1,+1,...,-1
+		// convert to ]0,phases-fstep]
+		float tnn = tn - fstep;
+		// convert to (multiples) ]0,fstep]
+		tnn = fmod(tnn, 2 * fstep);
+		// result has to be from+1 to -1
+		if (tnn <= fstep) {
+			//+1 -> -1
+			result = 1.0 - 2.0 * apply_motion_profile_positive(tnn / fstep);
+		}
+		else {
+			//-1 -> +1
+			result = -1.0 + 2.0 * apply_motion_profile_positive((tnn - fstep) / fstep);
+		}
+	}
+	return result;
 }
 
-//start from 0, go to +1, goto 0, ... , +1 to 0
-float Animation::apply_motion_profile_asymmetric(float tn, unsigned int rep){
-    unsigned int phases = 2*rep;
-    float fstep = 1.0 / phases;
-    float result = 0.0;
-
-    //motion in between, alternating between 0,1,0,1...
-    //convert to (multiples) ]0,2*fstep]
-    float tnn = fmod(tn, 2*fstep);
-
-    //result has to be from+1 to -1
-    if (tnn <= fstep){
-        //0->1
-        result = apply_motion_profile_positive(tnn/fstep);
-    }else{
-        //1->0
-        result = 1.0 - apply_motion_profile_positive((tnn-fstep)/fstep);
-    }
-    return result;
+// start from 0, go to +1, goto 0, ... , +1 to 0
+float Animation::apply_motion_profile_asymmetric(float tn, unsigned int rep) {
+	unsigned int phases = 2 * rep;
+	float fstep = 1.0 / phases;
+	float result = 0.0;
+
+	// motion in between, alternating between 0,1,0,1...
+	// convert to (multiples) ]0,2*fstep]
+	float tnn = fmod(tn, 2 * fstep);
+
+	// result has to be from+1 to -1
+	if (tnn <= fstep) {
+		// 0->1
+		result = apply_motion_profile_positive(tnn / fstep);
+	}
+	else {
+		// 1->0
+		result = 1.0 - apply_motion_profile_positive((tnn - fstep) / fstep);
+	}
+	return result;
 }
 
-void Animation::apply_on_gazestate(humotion::GazeState *gaze){
-    //first check: active?
-    if (!active){
-        return;
-    }
-
-    //now check if this animation ended:
-    system_time now = get_system_time(); //posix_time::microsec_clock::local_time();
-    if (now > end_time){
-        active = false;
-        return;
-    }
-
-    //milliseconds from the beginning of this ani:
-    posix_time::time_duration diff = now - start_time;
-    float elapsed_ms = diff.total_milliseconds();
-    //printf("mili %f\n",elapsed_ms);
-
-    float max_elongation = 0.0;
-    float profile = 0.0;
-
-
-    //TODO: animation subclasses instead of switch() !!!
-    switch((int)target){
-        case(IDLE):
-            //nothing to do!
-            break;
-
-        case(HEAD_SHAKE):
-            max_elongation = scale * 15.0;
-            profile = apply_motion_profile_symmetric(elapsed_ms / (repetitions * duration_each), repetitions);
-            gaze->pan_offset = 0.5 * max_elongation * profile;
-            //printf("%f %f %f %f DDD\n",elapsed_ms,elapsed_ms / (repetitions * duration_each), profile, gaze->pan_offset);fflush(stdout);
-            break;
-
-
-        case(HEAD_NOD):
-            max_elongation = scale * 10.0;
-            profile = apply_motion_profile_asymmetric(elapsed_ms / (repetitions * duration_each), repetitions);
-            gaze->tilt_offset = - max_elongation * profile;
-            break;
-
-        case(EYEBLINK_L):
-            if(elapsed_ms >= repetition_now*duration_each){
-                //NOTE: duration/2 because we close the eye for 0.5x the time and keep it open for 0.5x time ;)
-                //      scale can influence this 0.5/0.5 divider. i.e. scale = 0.5 -> 0.25*t closed & 0.75*t open
-                gaze->eyeblink_request_left = scale * duration_each/2;
-                repetition_now++;
-            }
-            break;
-
-        case(EYEBLINK_R):
-            if(elapsed_ms >= repetition_now*duration_each){
-                //NOTE: see EYEBLINK_L for formula description
-                gaze->eyeblink_request_right = scale * duration_each/2;
-                repetition_now++;
-            }
-            break;
-
-        case(EYEBLINK_BOTH):
-            if(elapsed_ms >= repetition_now*duration_each){
-                //NOTE: see EYEBLINK_L for formula description
-                gaze->eyeblink_request_left  = scale * duration_each/2;
-                gaze->eyeblink_request_right = scale * duration_each/2;
-                repetition_now++;
-            }
-            break;
-
-        case(ENGAGEMENT_LEFT):
-            //TODO: use smooth animation instead of step like change
-            gaze->pan_offset = scale * -10.0;
-            break;
-
-        case(ENGAGEMENT_RIGHT):
-            //TODO: use smooth animation instead of step like change
-            gaze->pan_offset = scale * 10.0;
-            break;
-
-        case(EYEBROWS_RAISE):
-            profile = 15.0 * scale * apply_motion_profile_asymmetric(elapsed_ms / (repetitions * duration_each), repetitions);
-            gaze->eyebrow_left   += -profile;
-            gaze->eyebrow_right  +=  profile;
-            break;
-
-        case(EYEBROWS_LOWER):
-            profile = 15.0 * scale * apply_motion_profile_asymmetric(elapsed_ms / (repetitions * duration_each), repetitions);
-            gaze->eyebrow_left   +=  profile;
-            gaze->eyebrow_right  += -profile;
-            break;
-
-
-
-        default:
-            printf("> invalid animation target id (%d)\n",(int)target);
-            active = false;
-            throw runtime_error("unsupported animation id requested");
-            break;
-    }
-
-
-    //ok, currently active. overwrite values:
-    //gaze->tilt_offset = 20;
-    //gaze->roll_offset = 20;
-
+void Animation::apply_on_gazestate(humotion::GazeState* gaze) {
+	// first check: active?
+	if (!active) {
+		return;
+	}
+
+	// now check if this animation ended:
+	system_time now = get_system_time(); // posix_time::microsec_clock::local_time();
+	if (now > end_time) {
+		active = false;
+		return;
+	}
+
+	// milliseconds from the beginning of this ani:
+	posix_time::time_duration diff = now - start_time;
+	float elapsed_ms = diff.total_milliseconds();
+	// printf("mili %f\n",elapsed_ms);
+
+	float max_elongation = 0.0;
+	float profile = 0.0;
+
+	// TODO: animation subclasses instead of switch() !!!
+	switch ((int)target) {
+		case (IDLE):
+			// nothing to do!
+			break;
+
+		case (HEAD_SHAKE):
+			max_elongation = scale * 15.0;
+			profile = apply_motion_profile_symmetric(elapsed_ms / (repetitions * duration_each), repetitions);
+			gaze->pan_offset = 0.5 * max_elongation * profile;
+			// printf("%f %f %f %f DDD\n",elapsed_ms,elapsed_ms / (repetitions * duration_each), profile, gaze->pan_offset);fflush(stdout);
+			break;
+
+		case (HEAD_NOD):
+			max_elongation = scale * 10.0;
+			profile = apply_motion_profile_asymmetric(elapsed_ms / (repetitions * duration_each), repetitions);
+			gaze->tilt_offset = -max_elongation * profile;
+			break;
+
+		case (EYEBLINK_L):
+			if (elapsed_ms >= repetition_now * duration_each) {
+				// NOTE: duration/2 because we close the eye for 0.5x the time and keep it open for 0.5x time ;)
+				//      scale can influence this 0.5/0.5 divider. i.e. scale = 0.5 -> 0.25*t closed & 0.75*t open
+				gaze->eyeblink_request_left = scale * duration_each / 2;
+				repetition_now++;
+			}
+			break;
+
+		case (EYEBLINK_R):
+			if (elapsed_ms >= repetition_now * duration_each) {
+				// NOTE: see EYEBLINK_L for formula description
+				gaze->eyeblink_request_right = scale * duration_each / 2;
+				repetition_now++;
+			}
+			break;
+
+		case (EYEBLINK_BOTH):
+			if (elapsed_ms >= repetition_now * duration_each) {
+				// NOTE: see EYEBLINK_L for formula description
+				gaze->eyeblink_request_left = scale * duration_each / 2;
+				gaze->eyeblink_request_right = scale * duration_each / 2;
+				repetition_now++;
+			}
+			break;
+
+		case (ENGAGEMENT_LEFT):
+			// TODO: use smooth animation instead of step like change
+			gaze->pan_offset = scale * -10.0;
+			break;
+
+		case (ENGAGEMENT_RIGHT):
+			// TODO: use smooth animation instead of step like change
+			gaze->pan_offset = scale * 10.0;
+			break;
+
+		case (EYEBROWS_RAISE):
+			profile = 15.0 * scale * apply_motion_profile_asymmetric(elapsed_ms / (repetitions * duration_each), repetitions);
+			gaze->eyebrow_left += -profile;
+			gaze->eyebrow_right += profile;
+			break;
+
+		case (EYEBROWS_LOWER):
+			profile = 15.0 * scale * apply_motion_profile_asymmetric(elapsed_ms / (repetitions * duration_each), repetitions);
+			gaze->eyebrow_left += profile;
+			gaze->eyebrow_right += -profile;
+			break;
+
+		default:
+			printf("> invalid animation target id (%d)\n", (int)target);
+			active = false;
+			throw runtime_error("unsupported animation id requested");
+			break;
+	}
+
+	// ok, currently active. overwrite values:
+	// gaze->tilt_offset = 20;
+	// gaze->roll_offset = 20;
 }
 
+bool Animation::collides_with(Animation* ani) {
+	// same type -> always bad
+	if (ani->target == target)
+		return true;
 
-bool Animation::collides_with(Animation *ani){
-    //same type -> always bad
-    if (ani->target == target) return true;
-
-    switch((int)target){
-        case(IDLE):
-            break;
-
-        default:
-            throw runtime_error("missing collides_with() case for animation");
-            break;
-
-        case(HEAD_SHAKE):
-            break;
+	switch ((int)target) {
+		case (IDLE):
+			break;
 
+		default:
+			throw runtime_error("missing collides_with() case for animation");
+			break;
 
-        case(HEAD_NOD):
-            break;
+		case (HEAD_SHAKE):
+			break;
 
-        case(EYEBLINK_L):
-            if (ani->target == EYEBLINK_BOTH) return true;
-            break;
+		case (HEAD_NOD):
+			break;
 
-        case(EYEBLINK_R):
-            if (ani->target == EYEBLINK_BOTH) return true;
-            break;
+		case (EYEBLINK_L):
+			if (ani->target == EYEBLINK_BOTH)
+				return true;
+			break;
 
-        case(EYEBLINK_BOTH):
-            if (ani->target == EYEBLINK_L) return true;
-            if (ani->target == EYEBLINK_R) return true;
-            break;
+		case (EYEBLINK_R):
+			if (ani->target == EYEBLINK_BOTH)
+				return true;
+			break;
 
-        case(EYEBROWS_RAISE):
-            break;
+		case (EYEBLINK_BOTH):
+			if (ani->target == EYEBLINK_L)
+				return true;
+			if (ani->target == EYEBLINK_R)
+				return true;
+			break;
 
-        case(EYEBROWS_LOWER):
-            break;
-    }
+		case (EYEBROWS_RAISE):
+			break;
 
-    //fine
-    return false;
+		case (EYEBROWS_LOWER):
+			break;
+	}
 
+	// fine
+	return false;
 }
diff --git a/server/src/Arbiter.cpp b/server/src/Arbiter.cpp
index 938e76e..e025c24 100644
--- a/server/src/Arbiter.cpp
+++ b/server/src/Arbiter.cpp
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "Arbiter.h"
 #include "AudioPlayerLibAO.h"
@@ -34,331 +34,337 @@
 using namespace boost;
 using namespace std;
 
-Arbiter::Arbiter(std::string audio_output){
-    //initialize audio player:
-    if (iequals(audio_output, "none")){
-        //allow none for no sound output
-        audio_player = NULL;
-    }else if (iequals(audio_output.substr(0,3), "rsb")){
-        #ifdef RSB_SUPPORT
-            audio_player = new AudioPlayerRSB(audio_output);
-        #else
-            printf("> ERROR: hlc is compiled without RSB support, RSB audio transport not available, defaulting to libao (default output!)\n");
-            audio_player = new AudioPlayerLibAO("");
-        #endif
-    }else{
-        audio_player = new AudioPlayerLibAO(audio_output);
-    }
-
-    //set default emotion:
-    emotion_config_current.init_sad();
-    emotion_config_current.set_duration(2000);
-    emotion_config_default.init_neutral();
-
-    gaze_state_animation_restart = true;
-    emotion_target = &emotion_config_default;
-
-    utterance = boost::shared_ptr<Utterance>(new Utterance());
+Arbiter::Arbiter(std::string audio_output) {
+	// initialize audio player:
+	if (iequals(audio_output, "none")) {
+		// allow none for no sound output
+		audio_player = NULL;
+	}
+	else if (iequals(audio_output.substr(0, 3), "rsb")) {
+#ifdef RSB_SUPPORT
+		audio_player = new AudioPlayerRSB(audio_output);
+#else
+		printf("> ERROR: hlc is compiled without RSB support, RSB audio transport not available, defaulting to libao (default "
+		       "output!)\n");
+		audio_player = new AudioPlayerLibAO("");
+#endif
+	}
+	else {
+		audio_player = new AudioPlayerLibAO(audio_output);
+	}
+
+	// set default emotion:
+	emotion_config_current.init_sad();
+	emotion_config_current.set_duration(2000);
+	emotion_config_default.init_neutral();
+
+	gaze_state_animation_restart = true;
+	emotion_target = &emotion_config_default;
+
+	utterance = boost::shared_ptr<Utterance>(new Utterance());
 }
 
-Arbiter::~Arbiter(){
+Arbiter::~Arbiter() {
 }
 
-void Arbiter::set_default_emotion(EmotionState e){
-    //lock access
-    mutex::scoped_lock scoped_lock(emotion_config_default_mutex);
+void Arbiter::set_default_emotion(EmotionState e) {
+	// lock access
+	mutex::scoped_lock scoped_lock(emotion_config_default_mutex);
 
-    //update our config, ignore duration as this is the default emotion
-    emotion_config_default.select_config(e.value);
-    emotion_target = &emotion_config_default;
+	// update our config, ignore duration as this is the default emotion
+	emotion_config_default.select_config(e.value);
+	emotion_target = &emotion_config_default;
 
-    gaze_state_animation_restart = true;
+	gaze_state_animation_restart = true;
 
-    printf("> stored default emotion\n");
+	printf("> stored default emotion\n");
 }
 
-void Arbiter::set_current_emotion(EmotionState e){
-    //lock access
-    mutex::scoped_lock scoped_lock(emotion_config_current_mutex);
+void Arbiter::set_current_emotion(EmotionState e) {
+	// lock access
+	mutex::scoped_lock scoped_lock(emotion_config_current_mutex);
 
-    //this will set a emotion override for a given time, after the timeout
-    //we will return to the default emotion state:
-    emotion_config_current.select_config(e.value);
-    emotion_config_current.set_duration(e.duration);
+	// this will set a emotion override for a given time, after the timeout
+	// we will return to the default emotion state:
+	emotion_config_current.select_config(e.value);
+	emotion_config_current.set_duration(e.duration);
 
-    emotion_target = &emotion_config_current;
-    gaze_state_animation_restart = true;
+	emotion_target = &emotion_config_current;
+	gaze_state_animation_restart = true;
 
-    printf("> stored current emotion (val=%d, duration = %dms)\n",e.value, e.duration);
+	printf("> stored current emotion (val=%d, duration = %dms)\n", e.value, e.duration);
 }
 
-void Arbiter::set_mouth_config(MouthConfig m){
-    //lock access
-    mutex::scoped_lock scoped_lock(mouth_config_override_mutex);
+void Arbiter::set_mouth_config(MouthConfig m) {
+	// lock access
+	mutex::scoped_lock scoped_lock(mouth_config_override_mutex);
 
-    mouth_config = m;
+	mouth_config = m;
 }
 
-void Arbiter::set_gaze_target(humotion::GazeState target){
-    //lock access
-    mutex::scoped_lock scoped_lock(requested_gaze_state_mutex);
+void Arbiter::set_gaze_target(humotion::GazeState target) {
+	// lock access
+	mutex::scoped_lock scoped_lock(requested_gaze_state_mutex);
 
-    requested_gaze_state = target;
+	requested_gaze_state = target;
 }
 
-void Arbiter::set_mouth_target(humotion::MouthState target){
-    //lock access
-    mutex::scoped_lock scoped_lock(requested_mouth_state_mutex);
+void Arbiter::set_mouth_target(humotion::MouthState target) {
+	// lock access
+	mutex::scoped_lock scoped_lock(requested_mouth_state_mutex);
 
-    requested_mouth_state = target;
+	requested_mouth_state = target;
 }
 
 //! note: this is blocking!
-void Arbiter::play_animation(boost::shared_ptr<Animation> incoming_animation){
-    //incoming animation, check if this would conflict with any pending animations:
-    //lock access & iterate over vector:
-    mutex::scoped_lock lock_av(active_animation_vector_mutex);
-    active_animation_vector_t::iterator it;
-    for(it = active_animation_vector.begin(); it<active_animation_vector.end(); it++){
-        boost::shared_ptr<Animation> current_ani = *it;
-        //check if the running animation collides with the incoming animation:
-        if (current_ani->collides_with(incoming_animation.get())){
-            //this would fail, we can not play this animation right now!
-            throw runtime_error("incoming animation collides with unfinished active animation");
-            return;
-        }
-    }
-
-    //ok, fine. no other animations are active that would collide with the new request
-    //thus it is safe to enqueue this item:
-    active_animation_vector.push_back(incoming_animation);
-
-    //unlock mutex
-    lock_av.unlock();
-
-    //start playback!
-    incoming_animation->start();
-
-    //block until ani was played back
-    while(incoming_animation->is_active()){
-        //printf("A"); fflush(stdout);
-        usleep(1*1000); //1ms, save cpu cycles
-    }
-
-    //ok, it finished. we can safely remove it now:
-    lock_av.lock();
-    for(it = active_animation_vector.begin(); it<active_animation_vector.end();){
-        boost::shared_ptr<Animation> current_ani = *it;
-        if (*it == incoming_animation){
-            //printf(">match -> remove incoming ani again\n");
-            it = active_animation_vector.erase(it);
-          }else{
-            ++it;
-          }
-    }
+void Arbiter::play_animation(boost::shared_ptr<Animation> incoming_animation) {
+	// incoming animation, check if this would conflict with any pending animations:
+	// lock access & iterate over vector:
+	mutex::scoped_lock lock_av(active_animation_vector_mutex);
+	active_animation_vector_t::iterator it;
+	for (it = active_animation_vector.begin(); it < active_animation_vector.end(); it++) {
+		boost::shared_ptr<Animation> current_ani = *it;
+		// check if the running animation collides with the incoming animation:
+		if (current_ani->collides_with(incoming_animation.get())) {
+			// this would fail, we can not play this animation right now!
+			throw runtime_error("incoming animation collides with unfinished active animation");
+			return;
+		}
+	}
+
+	// ok, fine. no other animations are active that would collide with the new request
+	// thus it is safe to enqueue this item:
+	active_animation_vector.push_back(incoming_animation);
+
+	// unlock mutex
+	lock_av.unlock();
+
+	// start playback!
+	incoming_animation->start();
+
+	// block until ani was played back
+	while (incoming_animation->is_active()) {
+		// printf("A"); fflush(stdout);
+		usleep(1 * 1000); // 1ms, save cpu cycles
+	}
+
+	// ok, it finished. we can safely remove it now:
+	lock_av.lock();
+	for (it = active_animation_vector.begin(); it < active_animation_vector.end();) {
+		boost::shared_ptr<Animation> current_ani = *it;
+		if (*it == incoming_animation) {
+			// printf(">match -> remove incoming ani again\n");
+			it = active_animation_vector.erase(it);
+		}
+		else {
+			++it;
+		}
+	}
 }
 
-void Arbiter::speak(boost::shared_ptr<Utterance> u){ //, ao_sample_format audio_format, char *audio_data, unsigned int audio_len){
-    //lock audio playback as such:
-    mutex::scoped_lock scoped_lock_audio(audio_player_mutex);
-
-    //lock utterance & store data:
-    mutex::scoped_lock scoped_lock(utterance_mutex);
-    utterance = u;
-    scoped_lock.unlock();
-
-    //start audio playback, this function returns once we started playback
-    if (audio_player == NULL){
-        printf("> audio_player disabled, not speaking '%s'\n", u.get()->get_text().c_str());
-    }else{
-        audio_player->play(utterance->get_audio_data());
-    }
-    utterance->start_playback();
-
-    //wait until audio playback was finished:
-    if (audio_player != NULL){
-        while(audio_player->is_playing()){
-            //save some cpu cycles:
-            usleep(1*1000); //1ms
-        }
-    }
-
-    //in case the audio output fails, we end up here before the utterance is finished.
-    //so check now if the utterance finished as well:
-    while (utterance->is_playing()){
-        //save some cpu cycles:
-        usleep(1*1000); //1ms
-    }
-
+void Arbiter::speak(
+   boost::shared_ptr<Utterance> u) { //, ao_sample_format audio_format, char *audio_data, unsigned int audio_len){
+	// lock audio playback as such:
+	mutex::scoped_lock scoped_lock_audio(audio_player_mutex);
+
+	// lock utterance & store data:
+	mutex::scoped_lock scoped_lock(utterance_mutex);
+	utterance = u;
+	scoped_lock.unlock();
+
+	// start audio playback, this function returns once we started playback
+	if (audio_player == NULL) {
+		printf("> audio_player disabled, not speaking '%s'\n", u.get()->get_text().c_str());
+	}
+	else {
+		audio_player->play(utterance->get_audio_data());
+	}
+	utterance->start_playback();
+
+	// wait until audio playback was finished:
+	if (audio_player != NULL) {
+		while (audio_player->is_playing()) {
+			// save some cpu cycles:
+			usleep(1 * 1000); // 1ms
+		}
+	}
+
+	// in case the audio output fails, we end up here before the utterance is finished.
+	// so check now if the utterance finished as well:
+	while (utterance->is_playing()) {
+		// save some cpu cycles:
+		usleep(1 * 1000); // 1ms
+	}
 }
 
-bool Arbiter::speak_active(){
-    if (audio_player == NULL){
-        return false;
-    }else{
-        return audio_player->is_playing();
-    }
+bool Arbiter::speak_active() {
+	if (audio_player == NULL) {
+		return false;
+	}
+	else {
+		return audio_player->is_playing();
+	}
 }
 
-void Arbiter::arbitrate(){
-    //handle arbitration, DO NOT RE-ORDER these calls!
+void Arbiter::arbitrate() {
+	// handle arbitration, DO NOT RE-ORDER these calls!
 
-    //try to process all incoming requests
-    override_by_emotion();
+	// try to process all incoming requests
+	override_by_emotion();
 
-    //overwrite with mouth targets from outside:
-    override_by_mouth();
+	// overwrite with mouth targets from outside:
+	override_by_mouth();
 
-    //lip animation
-    override_by_utterance();
+	// lip animation
+	override_by_utterance();
 
-    //animations
-    override_by_animation();
+	// animations
+	override_by_animation();
 
-    //gaze target is set by requested_gaze_target
-    override_by_gaze();
+	// gaze target is set by requested_gaze_target
+	override_by_gaze();
 }
 
-void Arbiter::override_by_utterance(){
-    //fetch MouthState by utterance:
-    if (!utterance->is_playing()){
-        //not playing -> return
-        return;
-    }
+void Arbiter::override_by_utterance() {
+	// fetch MouthState by utterance:
+	if (!utterance->is_playing()) {
+		// not playing -> return
+		return;
+	}
 
-    //fetch symbol
-    string symbol = utterance->currently_active_phoneme();
-    if ((symbol.empty()) || (symbol == "")){
-        return;
-    }
+	// fetch symbol
+	string symbol = utterance->currently_active_phoneme();
+	if ((symbol.empty()) || (symbol == "")) {
+		return;
+	}
 
-    //fetch config
-    mouth_config.init_by_symbol(symbol);
+	// fetch config
+	mouth_config.init_by_symbol(symbol);
 
-    //overwrite mouth with offsets from utterance player
-    mouth_config.apply_on_mouth_state(&mouth_state);
+	// overwrite mouth with offsets from utterance player
+	mouth_config.apply_on_mouth_state(&mouth_state);
 }
 
-void Arbiter::override_by_mouth(){
-    //external mouth requests can overwrite the mouth targets!
-    if ((requested_mouth_state.position_center + requested_mouth_state.position_left + requested_mouth_state.position_right) > 0.0){
-        //values given -> override emotion data
-        mouth_state = requested_mouth_state;
-    }
-    //requested_mouth_state.dump();
-    //mouth_state.dump();
+void Arbiter::override_by_mouth() {
+	// external mouth requests can overwrite the mouth targets!
+	if ((requested_mouth_state.position_center + requested_mouth_state.position_left + requested_mouth_state.position_right) >
+	    0.0) {
+		// values given -> override emotion data
+		mouth_state = requested_mouth_state;
+	}
+	// requested_mouth_state.dump();
+	// mouth_state.dump();
 }
 
-void Arbiter::override_by_gaze(){
-    //copy from requested target:
-    gaze_state.pan   = requested_gaze_state.pan;
-    gaze_state.tilt  = requested_gaze_state.tilt;
-    gaze_state.roll  = requested_gaze_state.roll;
+void Arbiter::override_by_gaze() {
+	// copy from requested target:
+	gaze_state.pan = requested_gaze_state.pan;
+	gaze_state.tilt = requested_gaze_state.tilt;
+	gaze_state.roll = requested_gaze_state.roll;
 
-    gaze_state.gaze_type = requested_gaze_state.gaze_type;
-    gaze_state.timestamp = requested_gaze_state.timestamp;
-    gaze_state.vergence  = requested_gaze_state.vergence;
+	gaze_state.gaze_type = requested_gaze_state.gaze_type;
+	gaze_state.timestamp = requested_gaze_state.timestamp;
+	gaze_state.vergence = requested_gaze_state.vergence;
 
-    //add offset values from user:
-    gaze_state.pan_offset  += requested_gaze_state.pan_offset;
-    gaze_state.tilt_offset += requested_gaze_state.tilt_offset;
+	// add offset values from user:
+	gaze_state.pan_offset += requested_gaze_state.pan_offset;
+	gaze_state.tilt_offset += requested_gaze_state.tilt_offset;
 }
 
-void Arbiter::override_by_emotion(){
-    if (emotion_target == NULL) {
-        return;
-    }
-
-    //lock access
-    mutex::scoped_lock scoped_lock1(emotion_config_default_mutex);
-
-
-    // did the current emotion time out?
-    if (!emotion_target->is_active()){
-        // revert to default:
-        emotion_target = &emotion_config_default;
-        // trigger soft fade
-        gaze_state_animation_restart = true;
-    }
-
-    //emotions will set the mouth state here (will be overwritten by speak)
-    mouth_state = emotion_target->mouth_override;
-    //mouth_state = ...
-
-    //emotions will add an offset to the gaze state:
-    //pan,tilt,roll will be overwritten by override_by_gaze() we only keep the offset values from this!
-    //FIXME: change to eyelid opening  upper/lower once humotion supports it
-    //eyebrow angles come from this
-    humotion::GazeState gaze_state_target = emotion_target->gaze_override;
-    // apply a soft overblending to the new gaze target
-    gaze_state = soft_overblend_gaze(gaze_state, gaze_state_target, emotion_target->overblend_time_ms);
-
-    //gaze_state.dump();
-
-    //IMPORTANT: clear request from emotion target:
-    emotion_target->gaze_override.eyeblink_request_left = 0;
-    emotion_target->gaze_override.eyeblink_request_right = 0;
+void Arbiter::override_by_emotion() {
+	if (emotion_target == NULL) {
+		return;
+	}
+
+	// lock access
+	mutex::scoped_lock scoped_lock1(emotion_config_default_mutex);
+
+	// did the current emotion time out?
+	if (!emotion_target->is_active()) {
+		// revert to default:
+		emotion_target = &emotion_config_default;
+		// trigger soft fade
+		gaze_state_animation_restart = true;
+	}
+
+	// emotions will set the mouth state here (will be overwritten by speak)
+	mouth_state = emotion_target->mouth_override;
+	// mouth_state = ...
+
+	// emotions will add an offset to the gaze state:
+	// pan,tilt,roll will be overwritten by override_by_gaze() we only keep the offset values from this!
+	// FIXME: change to eyelid opening  upper/lower once humotion supports it
+	// eyebrow angles come from this
+	humotion::GazeState gaze_state_target = emotion_target->gaze_override;
+	// apply a soft overblending to the new gaze target
+	gaze_state = soft_overblend_gaze(gaze_state, gaze_state_target, emotion_target->overblend_time_ms);
+
+	// gaze_state.dump();
+
+	// IMPORTANT: clear request from emotion target:
+	emotion_target->gaze_override.eyeblink_request_left = 0;
+	emotion_target->gaze_override.eyeblink_request_right = 0;
 }
 
-humotion::GazeState Arbiter::soft_overblend_gaze(humotion::GazeState gaze_now,
-                                                 humotion::GazeState gaze_target,
+humotion::GazeState Arbiter::soft_overblend_gaze(humotion::GazeState gaze_now, humotion::GazeState gaze_target,
                                                  unsigned int overblend_time) {
-    humotion::GazeState result = gaze_now;
-
-    result.eyeblink_request_left = 0;
-    result.eyeblink_request_right = 0;
-
-    if (gaze_state_animation_restart) {
-        // new incoming target, set up soft fade:
-        cout << "NEW EMOTION\n";
-        gaze_state_old = gaze_state;
-        gaze_state_end_time = get_system_time() + boost::posix_time::milliseconds(overblend_time);
-        gaze_state_animation_restart = false;
-    }
-    // do smooth overblend, all targets should be reached at gaze_state_end_time
-    boost::posix_time::time_duration tdiff = gaze_state_end_time - get_system_time();
-    if (tdiff.is_negative()) {
-        // animation is done, exit now
-        return gaze_target;
-    } else {
-        // do smooth animation
-        double diff_ms = tdiff.total_milliseconds();
-        double tp = 1.0 - diff_ms / static_cast<double>(overblend_time);
-
-        result.pan_offset = gaze_state_old.pan_offset + tp * (gaze_target.pan_offset - gaze_state_old.pan_offset);
-        result.tilt_offset = gaze_state_old.tilt_offset + tp * (gaze_target.tilt_offset - gaze_state_old.tilt_offset);
-        result.roll_offset = gaze_state_old.roll_offset + tp * (gaze_target.roll_offset - gaze_state_old.roll_offset);
-
-        result.eyelid_opening_lower = gaze_state_old.eyelid_opening_lower + tp * (gaze_target.eyelid_opening_lower - gaze_state_old.eyelid_opening_lower);
-        result.eyelid_opening_upper = gaze_state_old.eyelid_opening_upper + tp * (gaze_target.eyelid_opening_upper - gaze_state_old.eyelid_opening_upper);
-
-        result.eyebrow_left = gaze_target.eyebrow_left;
-        result.eyebrow_right = gaze_target.eyebrow_right;
-
-    }
-
-    return result;
+	humotion::GazeState result = gaze_now;
+
+	result.eyeblink_request_left = 0;
+	result.eyeblink_request_right = 0;
+
+	if (gaze_state_animation_restart) {
+		// new incoming target, set up soft fade:
+		cout << "NEW EMOTION\n";
+		gaze_state_old = gaze_state;
+		gaze_state_end_time = get_system_time() + boost::posix_time::milliseconds(overblend_time);
+		gaze_state_animation_restart = false;
+	}
+	// do smooth overblend, all targets should be reached at gaze_state_end_time
+	boost::posix_time::time_duration tdiff = gaze_state_end_time - get_system_time();
+	if (tdiff.is_negative()) {
+		// animation is done, exit now
+		return gaze_target;
+	}
+	else {
+		// do smooth animation
+		double diff_ms = tdiff.total_milliseconds();
+		double tp = 1.0 - diff_ms / static_cast<double>(overblend_time);
+
+		result.pan_offset = gaze_state_old.pan_offset + tp * (gaze_target.pan_offset - gaze_state_old.pan_offset);
+		result.tilt_offset = gaze_state_old.tilt_offset + tp * (gaze_target.tilt_offset - gaze_state_old.tilt_offset);
+		result.roll_offset = gaze_state_old.roll_offset + tp * (gaze_target.roll_offset - gaze_state_old.roll_offset);
+
+		result.eyelid_opening_lower =
+		   gaze_state_old.eyelid_opening_lower + tp * (gaze_target.eyelid_opening_lower - gaze_state_old.eyelid_opening_lower);
+		result.eyelid_opening_upper =
+		   gaze_state_old.eyelid_opening_upper + tp * (gaze_target.eyelid_opening_upper - gaze_state_old.eyelid_opening_upper);
+
+		result.eyebrow_left = gaze_target.eyebrow_left;
+		result.eyebrow_right = gaze_target.eyebrow_right;
+	}
+
+	return result;
 }
 
-
-void Arbiter::override_by_animation(){
-    //lock access & iterate over vector:
-    mutex::scoped_lock lock_av(active_animation_vector_mutex);
-    active_animation_vector_t::iterator it;
-    for(it = active_animation_vector.begin(); it<active_animation_vector.end(); it++){
-        boost::shared_ptr<Animation> current_ani = *it;
-
-        //gaze_state.dump();
-        current_ani->apply_on_gazestate(&gaze_state);
-        //gaze_state.dump();
-    }
+void Arbiter::override_by_animation() {
+	// lock access & iterate over vector:
+	mutex::scoped_lock lock_av(active_animation_vector_mutex);
+	active_animation_vector_t::iterator it;
+	for (it = active_animation_vector.begin(); it < active_animation_vector.end(); it++) {
+		boost::shared_ptr<Animation> current_ani = *it;
+
+		// gaze_state.dump();
+		current_ani->apply_on_gazestate(&gaze_state);
+		// gaze_state.dump();
+	}
 }
 
-humotion::GazeState Arbiter::get_gaze_state(){
-    //gaze_state.dump();
-    return gaze_state;
+humotion::GazeState Arbiter::get_gaze_state() {
+	// gaze_state.dump();
+	return gaze_state;
 }
 
-humotion::MouthState Arbiter::get_mouth_state(){
-    return mouth_state;
+humotion::MouthState Arbiter::get_mouth_state() {
+	return mouth_state;
 }
diff --git a/server/src/AudioPlayer.cpp b/server/src/AudioPlayer.cpp
index a5db3eb..d126c8b 100644
--- a/server/src/AudioPlayer.cpp
+++ b/server/src/AudioPlayer.cpp
@@ -1,54 +1,54 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "AudioPlayer.h"
 
 using namespace std;
 
-//new audio player with given driver type
-AudioPlayer::AudioPlayer(string driver){
-    audio_driver = driver;
-    playback_state = INITIALIZING;
-    playback_requested = false;
-    playback_active = false;
+// new audio player with given driver type
+AudioPlayer::AudioPlayer(string driver) {
+	audio_driver = driver;
+	playback_state = INITIALIZING;
+	playback_requested = false;
+	playback_active = false;
 
-    printf("> AudioPlayer(driver=%s)\n",audio_driver.c_str());
+	printf("> AudioPlayer(driver=%s)\n", audio_driver.c_str());
 }
 
-bool AudioPlayer::is_playing(){
-    return playback_active;
+bool AudioPlayer::is_playing() {
+	return playback_active;
 }
 
-AudioPlayer::~AudioPlayer(){
-    playback_state = EXITING;
+AudioPlayer::~AudioPlayer() {
+	playback_state = EXITING;
 
-    while(playback_state != CLOSED){
-        printf("> waiting for end of audio playback\n");
-        usleep(1000);
-    }
+	while (playback_state != CLOSED) {
+		printf("> waiting for end of audio playback\n");
+		usleep(1000);
+	}
 }
diff --git a/server/src/AudioPlayerLibAO.cpp b/server/src/AudioPlayerLibAO.cpp
index b86a25e..77934a2 100644
--- a/server/src/AudioPlayerLibAO.cpp
+++ b/server/src/AudioPlayerLibAO.cpp
@@ -1,192 +1,193 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "AudioPlayerLibAO.h"
 
 using namespace std;
 using namespace boost;
 
-//new audio player with gievn device type (default is pulse)
-AudioPlayerLibAO::AudioPlayerLibAO(string driver): AudioPlayer(driver){
-    printf("> using libao for playback\n");
+// new audio player with gievn device type (default is pulse)
+AudioPlayerLibAO::AudioPlayerLibAO(string driver) : AudioPlayer(driver) {
+	printf("> using libao for playback\n");
 
-    //initialize
-    ao_initialize();
+	// initialize
+	ao_initialize();
 
-    //configure driver
-    if (audio_driver.empty()){
-        //use default:
-        driver = ao_default_driver_id();
-    }else{
-        driver = ao_driver_id(audio_driver.c_str());
-    }
+	// configure driver
+	if (audio_driver.empty()) {
+		// use default:
+		driver = ao_default_driver_id();
+	}
+	else {
+		driver = ao_driver_id(audio_driver.c_str());
+	}
 
-    //start audio playback thread:
-    playback_thread_ptr = new boost::thread(boost::bind(&AudioPlayerLibAO::playback_thread, this));
+	// start audio playback thread:
+	playback_thread_ptr = new boost::thread(boost::bind(&AudioPlayerLibAO::playback_thread, this));
 }
 
+// this will return once we start playing
+void AudioPlayerLibAO::play(boost::shared_ptr<AudioData> audio) {
+	audio_data = audio;
 
-//this will return once we start playing
-void AudioPlayerLibAO::play(boost::shared_ptr<AudioData> audio){
-    audio_data = audio;
+	printf("> AudioPlayerLibAO: play() %d samples requested\n", (int)audio_data->samples.size());
 
-    printf("> AudioPlayerLibAO: play() %d samples requested\n",(int)audio_data->samples.size());
+	// skip empty audio data
+	if (audio_data->samples.size() == 0) {
+		printf("> warning: empty audio data - skipped.\n");
+		return;
+	}
 
-    //skip empty audio data
-    if (audio_data->samples.size() == 0){
-        printf("> warning: empty audio data - skipped.\n");
-        return;
-    }
+	// check if we can play this file:
+	while (playback_state != IDLE) {
+		printf("> player not ready yet, waiting for 10ms\n");
+		usleep(10 * 1000);
+	}
 
-    //check if we can play this file:
-    while(playback_state != IDLE){
-        printf("> player not ready yet, waiting for 10ms\n");
-        usleep(10*1000);
-    }
+	audio_format = extract_ao_format(audio_data);
 
-    audio_format = extract_ao_format(audio_data);
+	playback_requested = true;
 
-    playback_requested = true;
-
-    //wait for playback to start:
-    printf("> waiting for playback start...\n");
-    while(playback_requested){
-        usleep(1*1000);
-    }
-    printf("> playback running.\n");
+	// wait for playback to start:
+	printf("> waiting for playback start...\n");
+	while (playback_requested) {
+		usleep(1 * 1000);
+	}
+	printf("> playback running.\n");
 }
 
-
-ao_sample_format AudioPlayerLibAO::extract_ao_format(boost::shared_ptr<AudioData> audio){
-    ao_sample_format ao_format;
-
-    //get bits per sample
-    ao_format.bits = audio->sample_bit;
-    //bitrate
-    ao_format.rate = audio->sample_rate;
-    //endianess
-    ao_format.byte_format = audio->sample_big_endian?AO_FMT_BIG:AO_FMT_LITTLE;
-    //number of channels
-    ao_format.channels = audio->sample_channels;
-
-    //format matrix:
-    if (ao_format.channels == 1){
-        ao_format.matrix = (char *)"L";
-    }else if(ao_format.channels == 2){
-        ao_format.matrix = (char *)"L,R";
-    }else{
-        printf("> invalid AudioData channel count given. ignoring request\n");
-        throw runtime_error("AudioPlayerLibAO::extract_ao_format() unsupported number of audio channels given in AudioData");
-    }
-
-    printf("> AudioPlayerLibAO: format=%d rate=%d endianess=%d channels=%d\n", ao_format.bits, ao_format.rate, ao_format.byte_format, ao_format.channels);
-
-    return ao_format;
+ao_sample_format AudioPlayerLibAO::extract_ao_format(boost::shared_ptr<AudioData> audio) {
+	ao_sample_format ao_format;
+
+	// get bits per sample
+	ao_format.bits = audio->sample_bit;
+	// bitrate
+	ao_format.rate = audio->sample_rate;
+	// endianess
+	ao_format.byte_format = audio->sample_big_endian ? AO_FMT_BIG : AO_FMT_LITTLE;
+	// number of channels
+	ao_format.channels = audio->sample_channels;
+
+	// format matrix:
+	if (ao_format.channels == 1) {
+		ao_format.matrix = (char*)"L";
+	}
+	else if (ao_format.channels == 2) {
+		ao_format.matrix = (char*)"L,R";
+	}
+	else {
+		printf("> invalid AudioData channel count given. ignoring request\n");
+		throw runtime_error("AudioPlayerLibAO::extract_ao_format() unsupported number of audio channels given in AudioData");
+	}
+
+	printf("> AudioPlayerLibAO: format=%d rate=%d endianess=%d channels=%d\n", ao_format.bits, ao_format.rate,
+	       ao_format.byte_format, ao_format.channels);
+
+	return ao_format;
 }
 
-
-
-void AudioPlayerLibAO::playback_thread(){
-    printf("> playback thread started\n");
-    playback_state = IDLE;
-
-    while(playback_state != EXITING){
-        switch (playback_state){
-            default:
-            case(INITIALIZING):
-                //waiting to be ready
-                break;
-
-            case(IDLE):
-                //nothing to do, wait here until we are triggered to play!
-                if (playback_requested){
-                    printf("> AudioPlayer: loading\n");
-                    playback_state = LOADING;
-                }
-                break;
-
-            case(LOADING):
-                //check if we can play that format:
-                device = ao_open_live(driver, &audio_format, NULL /* no options */);
-
-                if (device == NULL){
-                    printf("> AudioPlayer: WARNING: can not open requested audio device. trying to fall back to default driver\n");
-                    driver = ao_default_driver_id();
-                    device = ao_open_live(driver, &audio_format, NULL /* no options */);
-                }
-
-                if (device == NULL){
-                    //failed to init device for format:
-                    printf("> AudioPlayer: WARNING: can not open audio device, not playing audio file!\n");
-                    playback_active = false;
-                    playback_requested = false;
-                    playback_state = IDLE;
-                    break;
-                }else{
-                    //ok we can now play the data
-                    printf("> AudioPlayer: playback started\n");
-                    //mark request as beeing processed
-                    playback_requested = false;
-                    //enter actual playing state
-                    playback_state = PLAYING;
-                    playback_active = true;
-
-                    ao_play(device, audio_data->samples.data(), audio_data->samples.size());
-                    printf("> AudioPlayer: finished playback\n");
-                }
-                break;
-
-            case(PLAYING):
-                //when we reach this case, the ao_play() call finished
-                //-> we can close this now:
-                ao_close(device);
-                playback_state = IDLE;
-                playback_active = false;
-                printf("> AudioPlayer: device closed\n");
-                break;
-
-            case(ERROR):
-                printf("> AudioPlayer ERROR! exiting\n");
-                exit(EXIT_FAILURE);
-                break;
-        }
-
-        //1ms delay to safe cpu time
-        usleep(1000);
-    }
-
-    //shutdown audio!
-    ao_shutdown();
-
-    //done
-    playback_state = CLOSED;
-
+void AudioPlayerLibAO::playback_thread() {
+	printf("> playback thread started\n");
+	playback_state = IDLE;
+
+	while (playback_state != EXITING) {
+		switch (playback_state) {
+			default:
+			case (INITIALIZING):
+				// waiting to be ready
+				break;
+
+			case (IDLE):
+				// nothing to do, wait here until we are triggered to play!
+				if (playback_requested) {
+					printf("> AudioPlayer: loading\n");
+					playback_state = LOADING;
+				}
+				break;
+
+			case (LOADING):
+				// check if we can play that format:
+				device = ao_open_live(driver, &audio_format, NULL /* no options */);
+
+				if (device == NULL) {
+					printf(
+					   "> AudioPlayer: WARNING: can not open requested audio device. trying to fall back to default driver\n");
+					driver = ao_default_driver_id();
+					device = ao_open_live(driver, &audio_format, NULL /* no options */);
+				}
+
+				if (device == NULL) {
+					// failed to init device for format:
+					printf("> AudioPlayer: WARNING: can not open audio device, not playing audio file!\n");
+					playback_active = false;
+					playback_requested = false;
+					playback_state = IDLE;
+					break;
+				}
+				else {
+					// ok we can now play the data
+					printf("> AudioPlayer: playback started\n");
+					// mark request as beeing processed
+					playback_requested = false;
+					// enter actual playing state
+					playback_state = PLAYING;
+					playback_active = true;
+
+					ao_play(device, audio_data->samples.data(), audio_data->samples.size());
+					printf("> AudioPlayer: finished playback\n");
+				}
+				break;
+
+			case (PLAYING):
+				// when we reach this case, the ao_play() call finished
+				//-> we can close this now:
+				ao_close(device);
+				playback_state = IDLE;
+				playback_active = false;
+				printf("> AudioPlayer: device closed\n");
+				break;
+
+			case (ERROR):
+				printf("> AudioPlayer ERROR! exiting\n");
+				exit(EXIT_FAILURE);
+				break;
+		}
+
+		// 1ms delay to safe cpu time
+		usleep(1000);
+	}
+
+	// shutdown audio!
+	ao_shutdown();
+
+	// done
+	playback_state = CLOSED;
 }
 
-AudioPlayerLibAO::~AudioPlayerLibAO(){
+AudioPlayerLibAO::~AudioPlayerLibAO() {
 }
diff --git a/server/src/AudioPlayerRSB.cpp b/server/src/AudioPlayerRSB.cpp
index e96346d..ffe6439 100644
--- a/server/src/AudioPlayerRSB.cpp
+++ b/server/src/AudioPlayerRSB.cpp
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "AudioPlayerRSB.h"
 
@@ -37,155 +37,156 @@ using namespace std;
 using namespace rsb;
 using namespace boost;
 
+// new audio player with gievn device type (default is pulse)
+AudioPlayerRSB::AudioPlayerRSB(string driver) : AudioPlayer(driver) {
+	assert(driver.length() > 3);
 
-//new audio player with gievn device type (default is pulse)
-AudioPlayerRSB::AudioPlayerRSB(string driver): AudioPlayer(driver){
-    assert(driver.length() > 3);
+	string scope = driver.substr(3);
 
-    string scope = driver.substr(3);
+	printf("> using rsb for playback, scope = '%s'\n", scope.c_str());
 
-    printf("> using rsb for playback, scope = '%s'\n", scope.c_str());
+	printf("> registering converters\n");
+	rsb::converter::Converter<string>::Ptr soundChunkConverter(
+	   new rsb::converter::ProtocolBufferConverter<rst::audition::SoundChunk>());
+	rsb::converter::converterRepository<string>()->registerConverter(soundChunkConverter);
 
+	// first get a factory instance that is used to create RSB domain objects
+	Factory& factory = getFactory();
 
-    printf("> registering converters\n");
-    rsb::converter::Converter<string>::Ptr soundChunkConverter(new rsb::converter::ProtocolBufferConverter<rst::audition::SoundChunk>());
-    rsb::converter::converterRepository<string>()->registerConverter(soundChunkConverter);
+	// create informer
+	informer = factory.createInformer<rst::audition::SoundChunk>(scope);
 
-    //first get a factory instance that is used to create RSB domain objects
-    Factory &factory = getFactory();
-
-    //create informer
-    informer = factory.createInformer<rst::audition::SoundChunk> (scope);
-
-    //start audio playback thread:
-    playback_thread_ptr = new boost::thread(boost::bind(&AudioPlayerRSB::playback_thread, this));
+	// start audio playback thread:
+	playback_thread_ptr = new boost::thread(boost::bind(&AudioPlayerRSB::playback_thread, this));
 }
 
+// this will return once we start playing
+void AudioPlayerRSB::play(boost::shared_ptr<AudioData> _audio_data) {
+	audio_data = _audio_data;
 
-//this will return once we start playing
-void AudioPlayerRSB::play(boost::shared_ptr<AudioData> _audio_data){
-    audio_data = _audio_data;
-
-    printf("> AudioPlayerRSB: play() %d samples requested\n",(int)audio_data->samples.size());
+	printf("> AudioPlayerRSB: play() %d samples requested\n", (int)audio_data->samples.size());
 
-    //check if we can play this file:
-    while(playback_state != IDLE){
-        printf("> player not ready yet, waiting for 10ms\n");
-        usleep(10*1000);
-    }
+	// check if we can play this file:
+	while (playback_state != IDLE) {
+		printf("> player not ready yet, waiting for 10ms\n");
+		usleep(10 * 1000);
+	}
 
-    //ok, we can play the audio. copy/setup data:
-    //audio_data_ptr = boost::shared_ptr<rst::audition::SoundChunk>(boost::make_shared<rst::audition::SoundChunk>(*audio_chunk));
-    playback_requested = true;
+	// ok, we can play the audio. copy/setup data:
+	// audio_data_ptr = boost::shared_ptr<rst::audition::SoundChunk>(boost::make_shared<rst::audition::SoundChunk>(*audio_chunk));
+	playback_requested = true;
 }
 
-
-void AudioPlayerRSB::playback_thread(){
-    printf("> playback thread started\n");
-    playback_state = IDLE;
-
-    while(playback_state != EXITING){
-        switch (playback_state){
-            default:
-            case(INITIALIZING):
-                //waiting to be ready
-                break;
-
-            case(IDLE):
-                //nothing to do, wait here until we are triggered to play!
-                if (playback_requested){
-                    printf("> AudioPlayerRSB: loading\n");
-                    playback_state = LOADING;
-                }
-                break;
-
-            case(LOADING):{
-                //send the data
-                try{
-                    publish_audio_data();
-                }catch (std::exception e) {
-                        printf("> AudioPlayerRSB: WARNING: failed to call informer. audio playback probably failed\n> error message = %s",e.what());
-                        playback_active = false;
-                        playback_requested = false;
-                        playback_state = IDLE;
-                        break;
-                }
-
-                //add some delay to meet the delay until playback starts (FIXME: this should be determined!)
-                //usleep(100*1000); //100ms
-
-                //ok we can now play the data
-                printf("> AudioPlayer: playback started\n");
-                //mark request as beeing processed
-                playback_requested = false;
-                //enter actual playing state
-                playback_state = PLAYING;
-                playback_active = true;
-
-                //now we have to wait until the audio playback finished....
-                long sample_count = audio_data_ptr->sample_count();
-                int sampling_rate  = audio_data_ptr->rate();
-                double playback_time = (double)sample_count / (double)sampling_rate;
-                printf("> AudioPlayerRSB estimated playbacktime to %5.3lf seconds. will wait now...",playback_time);
-                boost::this_thread::sleep(boost::posix_time::milliseconds(1000.0 * playback_time));
-                printf("> AudioPlayerRSB finished waiting...\n");
-                break;
-            }
-
-            case(PLAYING):
-                //when we reach this case, the playback finshed
-                playback_state = IDLE;
-                playback_active = false;
-                printf("> AudioPlayerRSB: finished playback");
-                break;
-
-            case(ERROR):
-                printf("> AudioPlayerRSB ERROR! exiting\n");
-                exit(EXIT_FAILURE);
-                break;
-        }
-
-        //1ms delay to safe cpu time
-        usleep(1000);
-    }
-
-    //done
-    playback_state = CLOSED;
+void AudioPlayerRSB::playback_thread() {
+	printf("> playback thread started\n");
+	playback_state = IDLE;
+
+	while (playback_state != EXITING) {
+		switch (playback_state) {
+			default:
+			case (INITIALIZING):
+				// waiting to be ready
+				break;
+
+			case (IDLE):
+				// nothing to do, wait here until we are triggered to play!
+				if (playback_requested) {
+					printf("> AudioPlayerRSB: loading\n");
+					playback_state = LOADING;
+				}
+				break;
+
+			case (LOADING):
+			{
+				// send the data
+				try {
+					publish_audio_data();
+				}
+				catch (std::exception e) {
+					printf(
+					   "> AudioPlayerRSB: WARNING: failed to call informer. audio playback probably failed\n> error message = %s",
+					   e.what());
+					playback_active = false;
+					playback_requested = false;
+					playback_state = IDLE;
+					break;
+				}
+
+				// add some delay to meet the delay until playback starts (FIXME: this should be determined!)
+				// usleep(100*1000); //100ms
+
+				// ok we can now play the data
+				printf("> AudioPlayer: playback started\n");
+				// mark request as beeing processed
+				playback_requested = false;
+				// enter actual playing state
+				playback_state = PLAYING;
+				playback_active = true;
+
+				// now we have to wait until the audio playback finished....
+				long sample_count = audio_data_ptr->sample_count();
+				int sampling_rate = audio_data_ptr->rate();
+				double playback_time = (double)sample_count / (double)sampling_rate;
+				printf("> AudioPlayerRSB estimated playbacktime to %5.3lf seconds. will wait now...", playback_time);
+				boost::this_thread::sleep(boost::posix_time::milliseconds(1000.0 * playback_time));
+				printf("> AudioPlayerRSB finished waiting...\n");
+				break;
+			}
+
+			case (PLAYING):
+				// when we reach this case, the playback finshed
+				playback_state = IDLE;
+				playback_active = false;
+				printf("> AudioPlayerRSB: finished playback");
+				break;
+
+			case (ERROR):
+				printf("> AudioPlayerRSB ERROR! exiting\n");
+				exit(EXIT_FAILURE);
+				break;
+		}
+
+		// 1ms delay to safe cpu time
+		usleep(1000);
+	}
+
+	// done
+	playback_state = CLOSED;
 }
 
-void AudioPlayerRSB::publish_audio_data(){
-    boost::shared_ptr<rst::audition::SoundChunk> request(new rst::audition::SoundChunk());
-
-    request->set_channels(audio_data->sample_channels);
-    request->set_data(audio_data->samples.data());
-/*
-    if (audio_data.sample_big_endian){
-        request->set_endianness(rst::audition::SoundChunk_EndianNess_ENDIAN_BIG);
-    }else{
-        request->set_endianness(rst::audition::SoundChunk_EndianNess_ENDIAN_LITTLE);
-    }
-
-    request->set_rate(audio_data.sample_rate);
-    request->set_sample_count(audio_data.samples.size() / audio_data.sample_channels / (audio_data.sample_bit/8));
-
-    switch (audio_data.sample_bit){
-        case(8):
-            request->set_sample_type(audio_data.sample_signed?(rst::audition::SoundChunk::SAMPLE_S8):(rst::audition::SoundChunk::SAMPLE_U8));
-            break;
-        case(16):
-            request->set_sample_type(audio_data.sample_signed?(rst::audition::SoundChunk::SAMPLE_S16):(rst::audition::SoundChunk::SAMPLE_U16));
-            break;
-        case(24):
-            request->set_sample_type(audio_data.sample_signed?(rst::audition::SoundChunk::SAMPLE_S24):(rst::audition::SoundChunk::SAMPLE_U24));
-            break;
-        default:
-            throw runtime_error("AudioPlayerRSB::publish_audio_data() unsupported sample type bit width");
-    }
-*/
-    informer->publish(request);
+void AudioPlayerRSB::publish_audio_data() {
+	boost::shared_ptr<rst::audition::SoundChunk> request(new rst::audition::SoundChunk());
+
+	request->set_channels(audio_data->sample_channels);
+	request->set_data(audio_data->samples.data());
+	/*
+	    if (audio_data.sample_big_endian){
+	        request->set_endianness(rst::audition::SoundChunk_EndianNess_ENDIAN_BIG);
+	    }else{
+	        request->set_endianness(rst::audition::SoundChunk_EndianNess_ENDIAN_LITTLE);
+	    }
+
+	    request->set_rate(audio_data.sample_rate);
+	    request->set_sample_count(audio_data.samples.size() / audio_data.sample_channels / (audio_data.sample_bit/8));
+
+	    switch (audio_data.sample_bit){
+	        case(8):
+	            request->set_sample_type(audio_data.sample_signed?(rst::audition::SoundChunk::SAMPLE_S8):(rst::audition::SoundChunk::SAMPLE_U8));
+	            break;
+	        case(16):
+	            request->set_sample_type(audio_data.sample_signed?(rst::audition::SoundChunk::SAMPLE_S16):(rst::audition::SoundChunk::SAMPLE_U16));
+	            break;
+	        case(24):
+	            request->set_sample_type(audio_data.sample_signed?(rst::audition::SoundChunk::SAMPLE_S24):(rst::audition::SoundChunk::SAMPLE_U24));
+	            break;
+	        default:
+	            throw runtime_error("AudioPlayerRSB::publish_audio_data() unsupported sample type bit width");
+	    }
+	*/
+	informer->publish(request);
 }
 
-AudioPlayerRSB::~AudioPlayerRSB(){
+AudioPlayerRSB::~AudioPlayerRSB() {
 }
 
 #endif
diff --git a/server/src/EmotionConfig.cpp b/server/src/EmotionConfig.cpp
index 47b8d66..e79556c 100644
--- a/server/src/EmotionConfig.cpp
+++ b/server/src/EmotionConfig.cpp
@@ -1,274 +1,278 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "EmotionConfig.h"
 using namespace boost;
 
-EmotionConfig::EmotionConfig(){
-    select_config(NEUTRAL);
+EmotionConfig::EmotionConfig() {
+	select_config(NEUTRAL);
 }
 
-EmotionConfig::EmotionConfig(EmotionType e){
-    select_config(e);
+EmotionConfig::EmotionConfig(EmotionType e) {
+	select_config(e);
 }
 
-EmotionConfig::~EmotionConfig(){
+EmotionConfig::~EmotionConfig() {
 }
 
+bool EmotionConfig::is_active() {
+	if (get_system_time() >= end_time) {
+		return false;
+	}
 
-bool EmotionConfig::is_active(){
-    if (get_system_time() >= end_time){
-        return false;
-    }
-
-    return true;
+	return true;
 }
 
-void EmotionConfig::set_duration(unsigned long ms){
-    //set a timeout:
-    end_time = get_system_time() + posix_time::milliseconds(ms);
+void EmotionConfig::set_duration(unsigned long ms) {
+	// set a timeout:
+	end_time = get_system_time() + posix_time::milliseconds(ms);
 }
 
-void EmotionConfig::select_config(EmotionType e){
-    // default overblend time
-    overblend_time_ms = 500;
-
-    switch((int) e){
-        default:
-        case(NEUTRAL): init_neutral(); break;
-        case(HAPPY  ): init_happy(); break;
-        case(SAD    ): init_sad(); break;
-        case(ANGRY  ): init_angry(); break;
-        case(SURPRISED): init_surprised(); break;
-        case(FEAR):      init_fear(); break;
-    }
+void EmotionConfig::select_config(EmotionType e) {
+	// default overblend time
+	overblend_time_ms = 500;
+
+	switch ((int)e) {
+		default:
+		case (NEUTRAL):
+			init_neutral();
+			break;
+		case (HAPPY):
+			init_happy();
+			break;
+		case (SAD):
+			init_sad();
+			break;
+		case (ANGRY):
+			init_angry();
+			break;
+		case (SURPRISED):
+			init_surprised();
+			break;
+		case (FEAR):
+			init_fear();
+			break;
+	}
 }
 
-void EmotionConfig::init_neutral(){
-    //neutral = look straight
-    gaze_override.pan_offset = 0.0;
-    gaze_override.tilt_offset = 0.0;
-    gaze_override.roll_offset = 0.0;
-    gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE; //GAZETYPE_OVERRIDE;
-
-    //not setable right now
-    gaze_override.vergence = 0.0;
-
-    gaze_override.eyelid_opening_upper = 25.0;
-    gaze_override.eyelid_opening_lower = 30.0;
-
-    //eyebrow angles
-    gaze_override.eyebrow_left = -3.0;
-    gaze_override.eyebrow_right = 3.0;
-
-    //eyeblink request
-    gaze_override.eyeblink_request_left  = 0;
-    gaze_override.eyeblink_request_right = 0;
-
-    //mouth:
-    /*mouth_override.position_left   = 14.7;
-    mouth_override.opening_left    = 0.0;
-    mouth_override.position_center = 16.0;
-    mouth_override.opening_center  = 1.0;
-    mouth_override.position_right  = 14.7;
-    mouth_override.opening_right   = 0.0;*/
-    /*mouth_override.position_left   = 11.54200000000000000000;
-    mouth_override.opening_left    = 0; //2.412000;
-    mouth_override.position_center = 12.50000000000000000;
-    mouth_override.opening_center  = 0; //1.737000;
-    mouth_override.position_right  = 11.5250000000000000000;
-    mouth_override.opening_right   = 0;//2.412000;
-    */
-    
-    mouth_override.position_left   = 20;
-    mouth_override.opening_left    = 0.0;
-    mouth_override.position_center = 22;
-    mouth_override.opening_center  = 2.0;
-    mouth_override.position_right  = 20-2;
-    mouth_override.opening_right   = 0.0;
-
+void EmotionConfig::init_neutral() {
+	// neutral = look straight
+	gaze_override.pan_offset = 0.0;
+	gaze_override.tilt_offset = 0.0;
+	gaze_override.roll_offset = 0.0;
+	gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE; // GAZETYPE_OVERRIDE;
+
+	// not setable right now
+	gaze_override.vergence = 0.0;
+
+	gaze_override.eyelid_opening_upper = 25.0;
+	gaze_override.eyelid_opening_lower = 30.0;
+
+	// eyebrow angles
+	gaze_override.eyebrow_left = -3.0;
+	gaze_override.eyebrow_right = 3.0;
+
+	// eyeblink request
+	gaze_override.eyeblink_request_left = 0;
+	gaze_override.eyeblink_request_right = 0;
+
+	// mouth:
+	/*mouth_override.position_left   = 14.7;
+	mouth_override.opening_left    = 0.0;
+	mouth_override.position_center = 16.0;
+	mouth_override.opening_center  = 1.0;
+	mouth_override.position_right  = 14.7;
+	mouth_override.opening_right   = 0.0;*/
+	/*mouth_override.position_left   = 11.54200000000000000000;
+	mouth_override.opening_left    = 0; //2.412000;
+	mouth_override.position_center = 12.50000000000000000;
+	mouth_override.opening_center  = 0; //1.737000;
+	mouth_override.position_right  = 11.5250000000000000000;
+	mouth_override.opening_right   = 0;//2.412000;
+	*/
+
+	mouth_override.position_left = 20;
+	mouth_override.opening_left = 0.0;
+	mouth_override.position_center = 22;
+	mouth_override.opening_center = 2.0;
+	mouth_override.position_right = 20 - 2;
+	mouth_override.opening_right = 0.0;
 }
 
-void EmotionConfig::init_happy(){
-    //neutral = look straight
-    gaze_override.pan_offset = 0.0;
-    gaze_override.tilt_offset = 0.0;
-    gaze_override.roll_offset = 0.0;
-    gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE; //GAZETYPE_OVERRIDE;
-
-    //not setable right now
-    gaze_override.vergence = 0.0;
-
-    gaze_override.eyelid_opening_upper = 30.0;
-    gaze_override.eyelid_opening_lower = 30.0;
-
-    //eyebrow angles
-    gaze_override.eyebrow_left = -1.0;
-    gaze_override.eyebrow_right = 1.0;
-
-    //eyeblink request
-    gaze_override.eyeblink_request_left  = humotion::GazeState::EYEBLINK_TIME_DEFAULT;
-    gaze_override.eyeblink_request_right = humotion::GazeState::EYEBLINK_TIME_DEFAULT;
-/*
-    mouth_override.position_left   = -1+9.5;
-    mouth_override.opening_left    = 0.0;
-    mouth_override.position_center = 24.3;
-    mouth_override.opening_center  = 7.0;
-    mouth_override.position_right  = -1+10.5;
-    mouth_override.opening_right   = 0.0;*/
-  
-    mouth_override.position_left   = 18; //13.56850000000000000000;
-    mouth_override.opening_left    = 0; //.791000;
-    mouth_override.position_center = 26; //14.18400000000000000000;
-    mouth_override.opening_center  = 5;
-    mouth_override.position_right  = 18; //15.31800000000000000000;
-    mouth_override.opening_right   = 0; //2.791000;
-
- 
-
+void EmotionConfig::init_happy() {
+	// neutral = look straight
+	gaze_override.pan_offset = 0.0;
+	gaze_override.tilt_offset = 0.0;
+	gaze_override.roll_offset = 0.0;
+	gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE; // GAZETYPE_OVERRIDE;
+
+	// not setable right now
+	gaze_override.vergence = 0.0;
+
+	gaze_override.eyelid_opening_upper = 30.0;
+	gaze_override.eyelid_opening_lower = 30.0;
+
+	// eyebrow angles
+	gaze_override.eyebrow_left = -1.0;
+	gaze_override.eyebrow_right = 1.0;
+
+	// eyeblink request
+	gaze_override.eyeblink_request_left = humotion::GazeState::EYEBLINK_TIME_DEFAULT;
+	gaze_override.eyeblink_request_right = humotion::GazeState::EYEBLINK_TIME_DEFAULT;
+	/*
+	    mouth_override.position_left   = -1+9.5;
+	    mouth_override.opening_left    = 0.0;
+	    mouth_override.position_center = 24.3;
+	    mouth_override.opening_center  = 7.0;
+	    mouth_override.position_right  = -1+10.5;
+	    mouth_override.opening_right   = 0.0;*/
+
+	mouth_override.position_left = 18;   // 13.56850000000000000000;
+	mouth_override.opening_left = 0;     //.791000;
+	mouth_override.position_center = 26; // 14.18400000000000000000;
+	mouth_override.opening_center = 5;
+	mouth_override.position_right = 18; // 15.31800000000000000000;
+	mouth_override.opening_right = 0;   // 2.791000;
 }
 
-void EmotionConfig::init_sad(){
-    gaze_override.pan_offset = 0.0;
-    gaze_override.tilt_offset = -3.0;
-    gaze_override.roll_offset = -3.0;
-    gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE; //GAZETYPE_OVERRIDE;
-
-    //not setable right now
-    gaze_override.vergence = 0.0;
-
-    gaze_override.eyelid_opening_upper = 15.0;
-    gaze_override.eyelid_opening_lower = 40.0;
-
-    //eyebrow angles
-    gaze_override.eyebrow_left = -20.0;
-    gaze_override.eyebrow_right = 20.0;
-
-    //eyeblink request
-    gaze_override.eyeblink_request_left  = 3 * humotion::GazeState::EYEBLINK_TIME_DEFAULT;
-    gaze_override.eyeblink_request_right = 3 * humotion::GazeState::EYEBLINK_TIME_DEFAULT;
-
-    //mouth:
-    mouth_override.position_left   = 21.0;
-    mouth_override.opening_left    = 0.0;
-    mouth_override.position_center = 16.0;
-    mouth_override.opening_center  = 0.0;
-    mouth_override.position_right  = 21.0;
-    mouth_override.opening_right   = 0.0;
+void EmotionConfig::init_sad() {
+	gaze_override.pan_offset = 0.0;
+	gaze_override.tilt_offset = -3.0;
+	gaze_override.roll_offset = -3.0;
+	gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE; // GAZETYPE_OVERRIDE;
+
+	// not setable right now
+	gaze_override.vergence = 0.0;
+
+	gaze_override.eyelid_opening_upper = 15.0;
+	gaze_override.eyelid_opening_lower = 40.0;
+
+	// eyebrow angles
+	gaze_override.eyebrow_left = -20.0;
+	gaze_override.eyebrow_right = 20.0;
+
+	// eyeblink request
+	gaze_override.eyeblink_request_left = 3 * humotion::GazeState::EYEBLINK_TIME_DEFAULT;
+	gaze_override.eyeblink_request_right = 3 * humotion::GazeState::EYEBLINK_TIME_DEFAULT;
+
+	// mouth:
+	mouth_override.position_left = 21.0;
+	mouth_override.opening_left = 0.0;
+	mouth_override.position_center = 16.0;
+	mouth_override.opening_center = 0.0;
+	mouth_override.position_right = 21.0;
+	mouth_override.opening_right = 0.0;
 }
 
-void EmotionConfig::init_angry(){
-    gaze_override.pan_offset = 0.0;
-    gaze_override.tilt_offset = -5.0;
-    gaze_override.roll_offset = 0.0;
-    gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE; //GAZETYPE_OVERRIDE;
-
-    //not setable right now
-    gaze_override.vergence = 0.0;
-
-    gaze_override.eyelid_opening_upper = 18.0;
-    gaze_override.eyelid_opening_lower = 18.0;
-
-    //eyebrow angles
-    gaze_override.eyebrow_left =  21.0;
-    gaze_override.eyebrow_right = -21.0;
-
-    //eyeblink request
-    gaze_override.eyeblink_request_left  = 0;
-    gaze_override.eyeblink_request_right = 0;
-
-    //mouth:
-    mouth_override.position_left   = 21;
-    mouth_override.opening_left    = 6.0;
-    mouth_override.position_center = 22.3;
-    mouth_override.opening_center  = 0.0;
-    mouth_override.position_right  = 21;
-    mouth_override.opening_right   = 6.0;
+void EmotionConfig::init_angry() {
+	gaze_override.pan_offset = 0.0;
+	gaze_override.tilt_offset = -5.0;
+	gaze_override.roll_offset = 0.0;
+	gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE; // GAZETYPE_OVERRIDE;
+
+	// not setable right now
+	gaze_override.vergence = 0.0;
+
+	gaze_override.eyelid_opening_upper = 18.0;
+	gaze_override.eyelid_opening_lower = 18.0;
+
+	// eyebrow angles
+	gaze_override.eyebrow_left = 21.0;
+	gaze_override.eyebrow_right = -21.0;
+
+	// eyeblink request
+	gaze_override.eyeblink_request_left = 0;
+	gaze_override.eyeblink_request_right = 0;
+
+	// mouth:
+	mouth_override.position_left = 21;
+	mouth_override.opening_left = 6.0;
+	mouth_override.position_center = 22.3;
+	mouth_override.opening_center = 0.0;
+	mouth_override.position_right = 21;
+	mouth_override.opening_right = 6.0;
 }
 
-void EmotionConfig::init_surprised(){
-    gaze_override.pan_offset  = 0.0;
-    gaze_override.tilt_offset = 8.0;
-    gaze_override.roll_offset = 0.0;
-    gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE; //GAZETYPE_OVERRIDE;
-
-    //not setable right now
-    gaze_override.vergence = 0.0;
-
-    //eyelids
-    gaze_override.eyelid_opening_upper = 60.0;
-    gaze_override.eyelid_opening_lower = 60.0;
-
-    //eyebrow angles
-    gaze_override.eyebrow_left =  -2.0;
-    gaze_override.eyebrow_right =  2.0;
-
-    //eyeblink request
-    gaze_override.eyeblink_request_left  = humotion::GazeState::EYEBLINK_TIME_DEFAULT;
-    gaze_override.eyeblink_request_right = humotion::GazeState::EYEBLINK_TIME_DEFAULT;
-
-    //mouth:
-    mouth_override.position_left   = 22;
-    mouth_override.opening_left    = 0.0;
-    mouth_override.position_center = 26.0;
-    mouth_override.opening_center  = 10.0;
-    mouth_override.position_right  = 22.0;
-    mouth_override.opening_right   = 0.0;
-
-    
+void EmotionConfig::init_surprised() {
+	gaze_override.pan_offset = 0.0;
+	gaze_override.tilt_offset = 8.0;
+	gaze_override.roll_offset = 0.0;
+	gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE; // GAZETYPE_OVERRIDE;
+
+	// not setable right now
+	gaze_override.vergence = 0.0;
+
+	// eyelids
+	gaze_override.eyelid_opening_upper = 60.0;
+	gaze_override.eyelid_opening_lower = 60.0;
+
+	// eyebrow angles
+	gaze_override.eyebrow_left = -2.0;
+	gaze_override.eyebrow_right = 2.0;
+
+	// eyeblink request
+	gaze_override.eyeblink_request_left = humotion::GazeState::EYEBLINK_TIME_DEFAULT;
+	gaze_override.eyeblink_request_right = humotion::GazeState::EYEBLINK_TIME_DEFAULT;
+
+	// mouth:
+	mouth_override.position_left = 22;
+	mouth_override.opening_left = 0.0;
+	mouth_override.position_center = 26.0;
+	mouth_override.opening_center = 10.0;
+	mouth_override.position_right = 22.0;
+	mouth_override.opening_right = 0.0;
 }
 
-void EmotionConfig::init_fear(){
-    gaze_override.pan_offset  = 5.0;
-    gaze_override.tilt_offset = 0.0;
-    gaze_override.roll_offset = 0.0;
-    gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE;
-
-    //not setable right now
-    gaze_override.vergence = 0.0;
-
-    gaze_override.eyelid_opening_upper = 50.0;
-    gaze_override.eyelid_opening_lower = 50.0;
-
-
-    //eyebrow angles
-    gaze_override.eyebrow_left =  -23.0;
-    gaze_override.eyebrow_right =  23.0;
-
-    //eyeblink request
-    gaze_override.eyeblink_request_left  = 0;
-    gaze_override.eyeblink_request_right = 0;
-
-    //mouth:
-    mouth_override.position_left   = 14;
-    mouth_override.opening_left    = 0.0;
-    mouth_override.position_center = 21;
-    mouth_override.opening_center  = 5;
-    mouth_override.position_right  = 35.9;
-    mouth_override.opening_right   = 0.0;
+void EmotionConfig::init_fear() {
+	gaze_override.pan_offset = 5.0;
+	gaze_override.tilt_offset = 0.0;
+	gaze_override.roll_offset = 0.0;
+	gaze_override.gaze_type = humotion::GazeState::GAZETYPE_ABSOLUTE;
+
+	// not setable right now
+	gaze_override.vergence = 0.0;
+
+	gaze_override.eyelid_opening_upper = 50.0;
+	gaze_override.eyelid_opening_lower = 50.0;
+
+	// eyebrow angles
+	gaze_override.eyebrow_left = -23.0;
+	gaze_override.eyebrow_right = 23.0;
+
+	// eyeblink request
+	gaze_override.eyeblink_request_left = 0;
+	gaze_override.eyeblink_request_right = 0;
+
+	// mouth:
+	mouth_override.position_left = 14;
+	mouth_override.opening_left = 0.0;
+	mouth_override.position_center = 21;
+	mouth_override.opening_center = 5;
+	mouth_override.position_right = 35.9;
+	mouth_override.opening_right = 0.0;
 }
diff --git a/server/src/EmotionState.cpp b/server/src/EmotionState.cpp
index 01182fd..f3df571 100644
--- a/server/src/EmotionState.cpp
+++ b/server/src/EmotionState.cpp
@@ -1,40 +1,38 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "EmotionState.h"
 #include "EmotionConfig.h"
 
-
-EmotionState::EmotionState(){
-    value = EmotionConfig::NEUTRAL;
-    duration = 0;
+EmotionState::EmotionState() {
+	value = EmotionConfig::NEUTRAL;
+	duration = 0;
 }
 
-EmotionState::~EmotionState(){
+EmotionState::~EmotionState() {
 }
-
diff --git a/server/src/Middleware.cpp b/server/src/Middleware.cpp
index 0be5e5a..d00b33c 100644
--- a/server/src/Middleware.cpp
+++ b/server/src/Middleware.cpp
@@ -1,87 +1,87 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "Middleware.h"
 using namespace std;
 
-Middleware::Middleware(Arbiter *_arbiter, std::string scope){
-    base_scope = scope;
-    arbiter = _arbiter;
+Middleware::Middleware(Arbiter* _arbiter, std::string scope) {
+	base_scope = scope;
+	arbiter = _arbiter;
 
-    printf("> new Middleware on base scope '%s'\n", base_scope.c_str());
+	printf("> new Middleware on base scope '%s'\n", base_scope.c_str());
 }
 
-
-Middleware::~Middleware(){
+Middleware::~Middleware() {
 }
 
-void Middleware::speak_callback(string text){
-    printf("> %s(%s) called\n", __FUNCTION__,text.c_str());
+void Middleware::speak_callback(string text) {
+	printf("> %s(%s) called\n", __FUNCTION__, text.c_str());
 
-    //call a tts system to convert the text to an utterance:
-    boost::shared_ptr<Utterance> utterance = tts_call(text);
+	// call a tts system to convert the text to an utterance:
+	boost::shared_ptr<Utterance> utterance = tts_call(text);
 
-    //and then process it
-    utterance_callback(utterance);
+	// and then process it
+	utterance_callback(utterance);
 }
 
-void Middleware::utterance_callback(boost::shared_ptr<Utterance> utterance){
-    printf("> %s(text=%s) called\n", __FUNCTION__,utterance->get_text().c_str());
+void Middleware::utterance_callback(boost::shared_ptr<Utterance> utterance) {
+	printf("> %s(text=%s) called\n", __FUNCTION__, utterance->get_text().c_str());
 
-    //can we speak this now?
-    if (arbiter->speak_active()){
-        //we can not start to speak!
-        printf("> still speaking, fixme\n");
-        throw runtime_error("UtteranceCallback: audio playback already running");
-    }else{
-        //fine, play this now, this will block until we finished speaking!
-        arbiter->speak(utterance);
-    }
+	// can we speak this now?
+	if (arbiter->speak_active()) {
+		// we can not start to speak!
+		printf("> still speaking, fixme\n");
+		throw runtime_error("UtteranceCallback: audio playback already running");
+	}
+	else {
+		// fine, play this now, this will block until we finished speaking!
+		arbiter->speak(utterance);
+	}
 }
 
-void Middleware::gaze_callback(humotion::GazeState gaze){
-    //printf("> %s() called\n", __FUNCTION__);
-    arbiter->set_gaze_target(gaze);
+void Middleware::gaze_callback(humotion::GazeState gaze) {
+	// printf("> %s() called\n", __FUNCTION__);
+	arbiter->set_gaze_target(gaze);
 }
 
-void Middleware::mouth_callback(humotion::MouthState mouth){
-    //printf("> %s() called\n", __FUNCTION__);
-    arbiter->set_mouth_target(mouth);
+void Middleware::mouth_callback(humotion::MouthState mouth) {
+	// printf("> %s() called\n", __FUNCTION__);
+	arbiter->set_mouth_target(mouth);
 }
 
-void Middleware::default_emotion_callback(EmotionState emotion_state){
-    arbiter->set_default_emotion(emotion_state);
+void Middleware::default_emotion_callback(EmotionState emotion_state) {
+	arbiter->set_default_emotion(emotion_state);
 }
 
-void Middleware::current_emotion_callback(EmotionState emotion_state){
-    arbiter->set_current_emotion(emotion_state);
+void Middleware::current_emotion_callback(EmotionState emotion_state) {
+	arbiter->set_current_emotion(emotion_state);
 }
 
-void Middleware::animation_callback(boost::shared_ptr<Animation> ani){
-    arbiter->play_animation(ani);
+void Middleware::animation_callback(boost::shared_ptr<Animation> ani) {
+	arbiter->play_animation(ani);
 }
diff --git a/server/src/MiddlewareROS.cpp b/server/src/MiddlewareROS.cpp
index 7c1ac3c..bcaaef2 100644
--- a/server/src/MiddlewareROS.cpp
+++ b/server/src/MiddlewareROS.cpp
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "MiddlewareROS.h"
 
@@ -32,7 +32,7 @@
 
 #include <cstdio>
 
-//CallbackWrapper:
+// CallbackWrapper:
 #include <boost/range/algorithm/remove_if.hpp>
 #include <boost/algorithm/string/classification.hpp>
 #include <actionlib/client/simple_action_client.h>
@@ -42,115 +42,114 @@ using namespace std;
 using namespace hlrc_server;
 
 template <typename actionspec>
-actionlib::SimpleActionClient<actionspec> * create_action_client(string scope){
-    printf("> starting SimpleActionClient on %s\n",scope.c_str());
+actionlib::SimpleActionClient<actionspec>* create_action_client(string scope) {
+	printf("> starting SimpleActionClient on %s\n", scope.c_str());
 
-    actionlib::SimpleActionClient<actionspec> *ac = new actionlib::SimpleActionClient<actionspec>(scope, true);
+	actionlib::SimpleActionClient<actionspec>* ac = new actionlib::SimpleActionClient<actionspec>(scope, true);
 
-    if (!ac->waitForServer(ros::Duration(1))){
-        printf("> ERROR: action service %s not ready, wait timed out...\n", scope.c_str());
-        return NULL;
-    }
-    return ac;
+	if (!ac->waitForServer(ros::Duration(1))) {
+		printf("> ERROR: action service %s not ready, wait timed out...\n", scope.c_str());
+		return NULL;
+	}
+	return ac;
 }
 
-
-MiddlewareROS::MiddlewareROS(Arbiter *arbiter, std::string scope) : Middleware(arbiter, scope){
-    init();
+MiddlewareROS::MiddlewareROS(Arbiter* arbiter, std::string scope) : Middleware(arbiter, scope) {
+	init();
 }
 
-MiddlewareROS::~MiddlewareROS(){
-
+MiddlewareROS::~MiddlewareROS() {
 }
 
-void MiddlewareROS::init(){
-    string scope = base_scope + "/set/";
-
-    string node_name = "hlrc_server__"+ base_scope;
-    node_name.erase(boost::remove_if(node_name, boost::is_any_of("/")), node_name.end());
-
-    printf("> registering on ROS as node %s\n",node_name.c_str());
-    if (ros::isInitialized()){
-        //ros is already active, no need to take care of that
-        //FIXME: Instead of deciding based on ros::isInitialized() to tick or not,
-        //we shoud use our own MessageQueue and AsyncSpinner.
-        tick_necessary = false;
-    }else{
-        printf("> ROS not initialized, calling ros::init()\n");
-        ros::M_string no_remapping;
-        ros::init(no_remapping, node_name);
-        tick_necessary = true;
-    }
-
-    //create node handle
-    //printf("> creating ros node handle\n");
-    //ros::NodeHa
-    ros::NodeHandle n;
-
-    printf("> setting up ROS services...\n");
-    //ros::AsyncSpinner *spinner = new ros::AsyncSpinner(4); // Use 4 threads
-    //spinner->start();
-
-    tfListener.reset(new tf2_ros::TransformListener(tfBuffer));
-    tfBuffer.clear();
-
-    animation_action_server = new AnimationCallbackWrapper(this, scope, "animation");
-    utterance_action_server = new UtteranceCallbackWrapper(this, scope, "utterance");
-    current_emotion_action_server = new EmotionCallbackWrapper(this, scope, "currentEmotion");
-    default_emotion_action_server = new EmotionCallbackWrapper(this, scope, "defaultEmotion");
-    gaze_action_server = new GazeCallbackWrapper(this, scope, "gaze");
-    lookat_action_server = new LookatCallbackWrapper(this, scope, "lookat", tfBuffer);
-    mouth_action_server = new MouthCallbackWrapper(this, scope, "mouth");
-    speech_action_server = new SpeechCallbackWrapper(this, scope, "speech");
-
-    //create tts client
-    tts_ac = create_action_client<hlrc_server::ttsAction>(base_scope + "/tts_provider");
-    if (tts_ac == NULL){
-        printf("> tts action service not available, will not do any TTS !\n");
-    }
-
-    printf("> init done\n");
+void MiddlewareROS::init() {
+	string scope = base_scope + "/set/";
+
+	string node_name = "hlrc_server__" + base_scope;
+	node_name.erase(boost::remove_if(node_name, boost::is_any_of("/")), node_name.end());
+
+	printf("> registering on ROS as node %s\n", node_name.c_str());
+	if (ros::isInitialized()) {
+		// ros is already active, no need to take care of that
+		// FIXME: Instead of deciding based on ros::isInitialized() to tick or not,
+		// we shoud use our own MessageQueue and AsyncSpinner.
+		tick_necessary = false;
+	}
+	else {
+		printf("> ROS not initialized, calling ros::init()\n");
+		ros::M_string no_remapping;
+		ros::init(no_remapping, node_name);
+		tick_necessary = true;
+	}
+
+	// create node handle
+	// printf("> creating ros node handle\n");
+	// ros::NodeHa
+	ros::NodeHandle n;
+
+	printf("> setting up ROS services...\n");
+	// ros::AsyncSpinner *spinner = new ros::AsyncSpinner(4); // Use 4 threads
+	// spinner->start();
+
+	tfListener.reset(new tf2_ros::TransformListener(tfBuffer));
+	tfBuffer.clear();
+
+	animation_action_server = new AnimationCallbackWrapper(this, scope, "animation");
+	utterance_action_server = new UtteranceCallbackWrapper(this, scope, "utterance");
+	current_emotion_action_server = new EmotionCallbackWrapper(this, scope, "currentEmotion");
+	default_emotion_action_server = new EmotionCallbackWrapper(this, scope, "defaultEmotion");
+	gaze_action_server = new GazeCallbackWrapper(this, scope, "gaze");
+	lookat_action_server = new LookatCallbackWrapper(this, scope, "lookat", tfBuffer);
+	mouth_action_server = new MouthCallbackWrapper(this, scope, "mouth");
+	speech_action_server = new SpeechCallbackWrapper(this, scope, "speech");
+
+	// create tts client
+	tts_ac = create_action_client<hlrc_server::ttsAction>(base_scope + "/tts_provider");
+	if (tts_ac == NULL) {
+		printf("> tts action service not available, will not do any TTS !\n");
+	}
+
+	printf("> init done\n");
 }
 
-void MiddlewareROS::tick(){
-    if (tick_necessary){
-        ros::spinOnce();
-    }
+void MiddlewareROS::tick() {
+	if (tick_necessary) {
+		ros::spinOnce();
+	}
 }
 
-//call a tts system to convert a string to an utterance
-boost::shared_ptr<Utterance> MiddlewareROS::tts_call(string text){
-    boost::shared_ptr<Utterance> utterance(new Utterance());
+// call a tts system to convert a string to an utterance
+boost::shared_ptr<Utterance> MiddlewareROS::tts_call(string text) {
+	boost::shared_ptr<Utterance> utterance(new Utterance());
 
-    //double tts_timeout = 1.0; //seconds. DO NOT CHANGE THIS!
-    if (tts_ac == NULL){
-        printf("> tts action service not available. will not speak '%s'\n", text.c_str());
-        return utterance;
-    }
+	// double tts_timeout = 1.0; //seconds. DO NOT CHANGE THIS!
+	if (tts_ac == NULL) {
+		printf("> tts action service not available. will not speak '%s'\n", text.c_str());
+		return utterance;
+	}
 
-    hlrc_server::ttsGoal goal;
+	hlrc_server::ttsGoal goal;
 
-    goal.text = text;
+	goal.text = text;
 
-    //send
-    tts_ac->sendGoal(goal);
+	// send
+	tts_ac->sendGoal(goal);
 
-    //call ros:
-    bool finished_before_timeout = tts_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
+	// call ros:
+	bool finished_before_timeout = tts_ac->waitForResult(ros::Duration(ROS_ACTION_CALL_TIMEOUT));
 
-    if (!finished_before_timeout){
-        printf("> ERROR: NO REPLY to utterance action call received within %4.2f s\n",ROS_ACTION_CALL_TIMEOUT);
-    }else{
-        //done, return utterance ptr
-        ttsResultConstPtr tts_res = tts_ac->getResult();
-        boost::shared_ptr<Utterance> utterance(new UtteranceROS(tts_res));
-        printf("> done. got utterance (text=%s)\n",utterance->get_text().c_str());
-        return utterance;
-    }
+	if (!finished_before_timeout) {
+		printf("> ERROR: NO REPLY to utterance action call received within %4.2f s\n", ROS_ACTION_CALL_TIMEOUT);
+	}
+	else {
+		// done, return utterance ptr
+		ttsResultConstPtr tts_res = tts_ac->getResult();
+		boost::shared_ptr<Utterance> utterance(new UtteranceROS(tts_res));
+		printf("> done. got utterance (text=%s)\n", utterance->get_text().c_str());
+		return utterance;
+	}
 
-    printf("> failed... got no utterance\n");
-    return utterance;
+	printf("> failed... got no utterance\n");
+	return utterance;
 }
 
-
 #endif
diff --git a/server/src/MiddlewareRSB.cpp b/server/src/MiddlewareRSB.cpp
index ab93250..7b56209 100644
--- a/server/src/MiddlewareRSB.cpp
+++ b/server/src/MiddlewareRSB.cpp
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "MiddlewareRSB.h"
 
@@ -33,7 +33,7 @@
 #include <rsb/converter/ProtocolBufferConverter.h>
 #include <cstdio>
 
-//CallbackWrapper:
+// CallbackWrapper:
 #include "RSB/GazeCallbackWrapper.h"
 #include "RSB/MouthCallbackWrapper.h"
 #include "RSB/SpeechCallbackWrapper.h"
@@ -45,135 +45,150 @@ using namespace std;
 using namespace rsb;
 using namespace rsb::patterns;
 
-
-MiddlewareRSB::MiddlewareRSB(Arbiter *arbiter, std::string scope) : Middleware(arbiter, scope){
-    init();
+MiddlewareRSB::MiddlewareRSB(Arbiter* arbiter, std::string scope) : Middleware(arbiter, scope) {
+	init();
 }
 
-MiddlewareRSB::~MiddlewareRSB(){
-
+MiddlewareRSB::~MiddlewareRSB() {
 }
 
-void MiddlewareRSB::tick(){
-    //nothing to do
+void MiddlewareRSB::tick() {
+	// nothing to do
 }
 
-void MiddlewareRSB::init(){
-    printf("> registering converters\n");
-
-    //converter for EmotionState
-    try {
-    rsb::converter::Converter<string>::Ptr emotionStateConverter(new rsb::converter::ProtocolBufferConverter<rst::animation::EmotionExpression>());
-    rsb::converter::converterRepository<string>()->registerConverter(emotionStateConverter);
-    } catch (...) {}
-
-    //converter for SoundChunk
-    try {
-    rsb::converter::Converter<string>::Ptr SoundChunkConverter(new rsb::converter::ProtocolBufferConverter<rst::audition::SoundChunk>());
-    rsb::converter::converterRepository<string>()->registerConverter(SoundChunkConverter);
-    } catch (...) {}
-
-    //converter for Utterance
-    try {
-    rsb::converter::Converter<string>::Ptr UtteranceConverter(new rsb::converter::ProtocolBufferConverter<rst::audition::Utterance>());
-    rsb::converter::converterRepository<string>()->registerConverter(UtteranceConverter);
-    } catch (...) {}
-
-    //converter for GazeTarget
-    try {
-    rsb::converter::Converter<string>::Ptr gazeTargetConverter(new rsb::converter::ProtocolBufferConverter<rst::animation::BinocularHeadGaze>());
-    rsb::converter::converterRepository<string>()->registerConverter(gazeTargetConverter);
-    } catch (...) {}
-
-    //converter for MouthTarget
-    //rsb::converter::Converter<string>::Ptr mouthTargetConverter(new rsb::converter::ProtocolBufferConverter<rst::robot::MouthTarget>());
-    //rsb::converter::converterRepository<string>()->registerConverter(mouthTargetConverter);
-
-    //converter for Animation
-    try {
-    rsb::converter::Converter<string>::Ptr animationConverter(new rsb::converter::ProtocolBufferConverter<rst::animation::HeadAnimation>());
-    rsb::converter::converterRepository<string>()->registerConverter(animationConverter);
-    } catch (...) {}
-
-    //first get a factory instance that is used to create RSB domain objects
-    Factory &factory = getFactory();
-
-    //scope to listen on:
-    string scope = base_scope + "/set/";
-
-    //get server
-    server = factory.createLocalServer(scope);
-
-    //get tts server:
-    string tts_scope = base_scope + "/tts_provider";
-    printf("> registering remote server on %s\n",tts_scope.c_str());
-    tts_server = factory.createRemoteServer(tts_scope);
-
-
-    //create local server with parallel exec strategy (HACK!)
-    rsb::ParticipantConfig config = factory.getDefaultParticipantConfig();
-    rsc::runtime::Properties &properties = config.mutableEventReceivingStrategy().mutableOptions();
-    properties.set<string>("parallelhandlercalls", "1");
-
-    //now we can create a server with parallel execution:
-    server_parallel = factory.createLocalServer(scope, config);
-
-    //this server will now handle/call these methods in multiple threads:
-    server_parallel->registerMethod("animation", LocalServer::CallbackPtr(new AnimationCallbackWrapper(this)));
-
-    //initialise callbacks:
-    init_callbacks();
-
-    //informer->publish(gaze_target);
-    printf("> MiddlewareRSB initialised\n");
+void MiddlewareRSB::init() {
+	printf("> registering converters\n");
+
+	// converter for EmotionState
+	try {
+		rsb::converter::Converter<string>::Ptr emotionStateConverter(
+		   new rsb::converter::ProtocolBufferConverter<rst::animation::EmotionExpression>());
+		rsb::converter::converterRepository<string>()->registerConverter(emotionStateConverter);
+	}
+	catch (...) {
+	}
+
+	// converter for SoundChunk
+	try {
+		rsb::converter::Converter<string>::Ptr SoundChunkConverter(
+		   new rsb::converter::ProtocolBufferConverter<rst::audition::SoundChunk>());
+		rsb::converter::converterRepository<string>()->registerConverter(SoundChunkConverter);
+	}
+	catch (...) {
+	}
+
+	// converter for Utterance
+	try {
+		rsb::converter::Converter<string>::Ptr UtteranceConverter(
+		   new rsb::converter::ProtocolBufferConverter<rst::audition::Utterance>());
+		rsb::converter::converterRepository<string>()->registerConverter(UtteranceConverter);
+	}
+	catch (...) {
+	}
+
+	// converter for GazeTarget
+	try {
+		rsb::converter::Converter<string>::Ptr gazeTargetConverter(
+		   new rsb::converter::ProtocolBufferConverter<rst::animation::BinocularHeadGaze>());
+		rsb::converter::converterRepository<string>()->registerConverter(gazeTargetConverter);
+	}
+	catch (...) {
+	}
+
+	// converter for MouthTarget
+	// rsb::converter::Converter<string>::Ptr mouthTargetConverter(new
+	// rsb::converter::ProtocolBufferConverter<rst::robot::MouthTarget>());
+	// rsb::converter::converterRepository<string>()->registerConverter(mouthTargetConverter);
+
+	// converter for Animation
+	try {
+		rsb::converter::Converter<string>::Ptr animationConverter(
+		   new rsb::converter::ProtocolBufferConverter<rst::animation::HeadAnimation>());
+		rsb::converter::converterRepository<string>()->registerConverter(animationConverter);
+	}
+	catch (...) {
+	}
+
+	// first get a factory instance that is used to create RSB domain objects
+	Factory& factory = getFactory();
+
+	// scope to listen on:
+	string scope = base_scope + "/set/";
+
+	// get server
+	server = factory.createLocalServer(scope);
+
+	// get tts server:
+	string tts_scope = base_scope + "/tts_provider";
+	printf("> registering remote server on %s\n", tts_scope.c_str());
+	tts_server = factory.createRemoteServer(tts_scope);
+
+	// create local server with parallel exec strategy (HACK!)
+	rsb::ParticipantConfig config = factory.getDefaultParticipantConfig();
+	rsc::runtime::Properties& properties = config.mutableEventReceivingStrategy().mutableOptions();
+	properties.set<string>("parallelhandlercalls", "1");
+
+	// now we can create a server with parallel execution:
+	server_parallel = factory.createLocalServer(scope, config);
+
+	// this server will now handle/call these methods in multiple threads:
+	server_parallel->registerMethod("animation", LocalServer::CallbackPtr(new AnimationCallbackWrapper(this)));
+
+	// initialise callbacks:
+	init_callbacks();
+
+	// informer->publish(gaze_target);
+	printf("> MiddlewareRSB initialised\n");
 }
 
-void MiddlewareRSB::init_callback(string name, LocalServer::CallbackPtr callback_ptr){
-    printf("> init_callback(%s%s)\n", server->getScope()->toString().c_str(), name.c_str());
-    server->registerMethod(name, callback_ptr);
+void MiddlewareRSB::init_callback(string name, LocalServer::CallbackPtr callback_ptr) {
+	printf("> init_callback(%s%s)\n", server->getScope()->toString().c_str(), name.c_str());
+	server->registerMethod(name, callback_ptr);
 }
 
-void MiddlewareRSB::init_callbacks(){
-    printf("> registering callbacks (rpc methods)\n");
+void MiddlewareRSB::init_callbacks() {
+	printf("> registering callbacks (rpc methods)\n");
 
-    init_callback("speech",    LocalServer::CallbackPtr(new SpeechCallbackWrapper(this)));
-    init_callback("utterance", LocalServer::CallbackPtr(new UtteranceCallbackWrapper(this)));
-    init_callback("gaze",      LocalServer::CallbackPtr(new GazeCallbackWrapper(this)));
-    ///init_callback("mouth",     LocalServer::CallbackPtr(new MouthCallbackWrapper(this)));
+	init_callback("speech", LocalServer::CallbackPtr(new SpeechCallbackWrapper(this)));
+	init_callback("utterance", LocalServer::CallbackPtr(new UtteranceCallbackWrapper(this)));
+	init_callback("gaze", LocalServer::CallbackPtr(new GazeCallbackWrapper(this)));
+	/// init_callback("mouth",     LocalServer::CallbackPtr(new MouthCallbackWrapper(this)));
 
-    EmotionCallbackWrapper *emotion_cb = new EmotionCallbackWrapper(this);
-    init_callback("defaultEmotion", LocalServer::CallbackPtr(emotion_cb));
-    init_callback("currentEmotion", LocalServer::CallbackPtr(emotion_cb));
+	EmotionCallbackWrapper* emotion_cb = new EmotionCallbackWrapper(this);
+	init_callback("defaultEmotion", LocalServer::CallbackPtr(emotion_cb));
+	init_callback("currentEmotion", LocalServer::CallbackPtr(emotion_cb));
 }
 
-//call a tts system to convert a string to an utterance
-boost::shared_ptr<Utterance> MiddlewareRSB::tts_call(string text){
-    double tts_timeout = 1.0; //seconds. DO NOT CHANGE THIS!
-
-    //build request
-    boost::shared_ptr<std::string> request(new string(text));
-
-    //try to fetch it asynchronously:
-    try{
-        RemoteServer::DataFuture<rst::audition::Utterance> future_ptr = tts_server->callAsync<rst::audition::Utterance>("create_utterance", request);
-
-        //try to fetch the result
-        boost::shared_ptr<rst::audition::Utterance> utterance_ptr = future_ptr.get(tts_timeout);
-
-        //done, return utterance ptr
-        boost::shared_ptr<Utterance> utterance(new UtteranceRSB(*(utterance_ptr.get())));
-        printf("> done. got utterance (text=%s)\n",utterance->get_text().c_str());
-        return utterance;
-
-    }catch(rsc::threading::FutureTimeoutException e){
-        printf("> error: tts_call timed out after %3.1f seconds.\n", tts_timeout);
-    }catch(rsc::threading::FutureTaskExecutionException e){
-        printf("> error: tts_call failed: %s\n", e.what());
-    }
-
-    printf("> failed... got no utterance\n");
-    boost::shared_ptr<Utterance> utterance(new Utterance());
-    return utterance;
+// call a tts system to convert a string to an utterance
+boost::shared_ptr<Utterance> MiddlewareRSB::tts_call(string text) {
+	double tts_timeout = 1.0; // seconds. DO NOT CHANGE THIS!
+
+	// build request
+	boost::shared_ptr<std::string> request(new string(text));
+
+	// try to fetch it asynchronously:
+	try {
+		RemoteServer::DataFuture<rst::audition::Utterance> future_ptr =
+		   tts_server->callAsync<rst::audition::Utterance>("create_utterance", request);
+
+		// try to fetch the result
+		boost::shared_ptr<rst::audition::Utterance> utterance_ptr = future_ptr.get(tts_timeout);
+
+		// done, return utterance ptr
+		boost::shared_ptr<Utterance> utterance(new UtteranceRSB(*(utterance_ptr.get())));
+		printf("> done. got utterance (text=%s)\n", utterance->get_text().c_str());
+		return utterance;
+	}
+	catch (rsc::threading::FutureTimeoutException e) {
+		printf("> error: tts_call timed out after %3.1f seconds.\n", tts_timeout);
+	}
+	catch (rsc::threading::FutureTaskExecutionException e) {
+		printf("> error: tts_call failed: %s\n", e.what());
+	}
+
+	printf("> failed... got no utterance\n");
+	boost::shared_ptr<Utterance> utterance(new Utterance());
+	return utterance;
 }
 
 #endif
diff --git a/server/src/MouthConfig.cpp b/server/src/MouthConfig.cpp
index b13f06c..c87fa24 100644
--- a/server/src/MouthConfig.cpp
+++ b/server/src/MouthConfig.cpp
@@ -1,280 +1,284 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "MouthConfig.h"
 using namespace std;
 
-MouthConfig::MouthConfig(){
-    init_by_symbol("");
+MouthConfig::MouthConfig() {
+	init_by_symbol("");
 }
 
-MouthConfig::MouthConfig(string symbol){
-    init_by_symbol(symbol);
+MouthConfig::MouthConfig(string symbol) {
+	init_by_symbol(symbol);
 }
 
-
-MouthConfig::~MouthConfig(){
+MouthConfig::~MouthConfig() {
 }
 
-void MouthConfig::init_by_symbol(string symbol){
-    //default is no change:
-    for(int i=0; i<2; i++){
-        opening[i] = 0.0;
-        override[i] = 0.0;
-    }
-
-    //default?
-    if (symbol.length() == 0){
-        return;
-    }
-
-    //see http://www.phon.ucl.ac.uk/home/sampa/german.htm
-    if (symbol.length() ==1){
-        //single digit phonemes:
-        unsigned char sc = symbol.c_str()[0];
-        switch(sc){
-            default:
-                printf("> ignoring unknown phoneme '%c'\n",sc);
-                break;
+void MouthConfig::init_by_symbol(string symbol) {
+	// default is no change:
+	for (int i = 0; i < 2; i++) {
+		opening[i] = 0.0;
+		override[i] = 0.0;
+	}
 
-            case('_'): //pause
-                break;
+	// default?
+	if (symbol.length() == 0) {
+		return;
+	}
 
-            case('T'): //en: _th_in
-            case('D'): //en: _th_is
-                //as we dont have a tongue, only open the mouth slighly
-                override[CENTER] = true;
-                opening[CENTER] = 4.0;
-                break;
+	// see http://www.phon.ucl.ac.uk/home/sampa/german.htm
+	if (symbol.length() == 1) {
+		// single digit phonemes:
+		unsigned char sc = symbol.c_str()[0];
+		switch (sc) {
+			default:
+				printf("> ignoring unknown phoneme '%c'\n", sc);
+				break;
 
-            case('u'): //en: l_o_se
-                 override[CENTER] = true;
-                 opening[CENTER]  = 13.0;
+			case ('_'): // pause
+				break;
 
-            case('e'): //en: r_ai_se
-                 override[CENTER] = true;
-                 opening[CENTER]  = 5.0;
-                    break;
+			case ('T'): // en: _th_in
+			case ('D'): // en: _th_is
+				// as we dont have a tongue, only open the mouth slighly
+				override[CENTER] = true;
+				opening[CENTER] = 4.0;
+				break;
 
-            case('V'): //en: c_u_t
-                 override[CENTER] = true;
-                 opening[CENTER]  = 3.0;
-                 break;
+			case ('u'): // en: l_o_se
+				override[CENTER] = true;
+				opening[CENTER] = 13.0;
 
-            case('{'): //en: p_a_t
-                 //open mouth
-                 override[CENTER] = true;
-                 opening[CENTER]  = 12.0;
-                 break;
+			case ('e'): // en: r_ai_se
+				override[CENTER] = true;
+				opening[CENTER] = 5.0;
+				break;
 
-            case('w'): //en: _w_asp
-                //mouth nearly closed:
-                override[CENTER] = true;
-                opening[CENTER] = 4.0;
-                break;
+			case ('V'): // en: c_u_t
+				override[CENTER] = true;
+				opening[CENTER] = 3.0;
+				break;
 
-            case('p'): //Pein + en: _p_in
-            case('b'): //Bein
-                //close mouth at the center:
-                override[CENTER] = true;
-                break;
+			case ('{'): // en: p_a_t
+				// open mouth
+				override[CENTER] = true;
+				opening[CENTER] = 12.0;
+				break;
 
-            case('t'): //Teich
-            case('d'): //Deich
-            case('k'): //Kunst
-            case('g'): //Gunst
-                //open mouth at the center
-                override[CENTER] = true;
-                opening[CENTER]  = 11.0;
-                break;
+			case ('w'): // en: _w_asp
+				// mouth nearly closed:
+				override[CENTER] = true;
+				opening[CENTER] = 4.0;
+				break;
 
-            case('?'): //global stop?! ignore
-                break;
+			case ('p'): // Pein + en: _p_in
+			case ('b'): // Bein
+				// close mouth at the center:
+				override[CENTER] = true;
+				break;
 
-            case('f'): //fast
-            case('v'): //was
-            case('@'): // unstressed "schwa" vowel is
-                override[CENTER] = true;
-                opening[CENTER] = 4.0;
-                break;
+			case ('t'): // Teich
+			case ('d'): // Deich
+			case ('k'): // Kunst
+			case ('g'): // Gunst
+				// open mouth at the center
+				override[CENTER] = true;
+				opening[CENTER] = 11.0;
+				break;
 
-            case('z'): //Tasse
-            case('s'): //Tasse
-            case('Z'): //Genie
-            case('C'): //Ich
-            case('j'): //Jahr
-            case('x'): //Buch
-            case('h'): //Hand
-                override[CENTER] = true;
-                opening[CENTER] = 7.0;
-                break;
+			case ('?'): // global stop?! ignore
+				break;
 
-            case('S'): //waschen
-            case('O'): //Trotz
-            case('9'): //plötzlich
-                override[CENTER] = true;
-                opening[CENTER] = 11.0;
-                break;
+			case ('f'): // fast
+			case ('v'): // was
+			case ('@'): // unstressed "schwa" vowel is
+				override[CENTER] = true;
+				opening[CENTER] = 4.0;
+				break;
 
-            case('m'): //mein
-                override[CENTER] = true;
-                break;
+			case ('z'): // Tasse
+			case ('s'): // Tasse
+			case ('Z'): // Genie
+			case ('C'): // Ich
+			case ('j'): // Jahr
+			case ('x'): // Buch
+			case ('h'): // Hand
+				override[CENTER] = true;
+				opening[CENTER] = 7.0;
+				break;
 
-            case('n'): //nein
-            case('N'): //Ding
-            case('l'): //leim
-            case('R'): //Reim
-            case('r'): //en: wrong
-            case('I'): //Sitz
-            case('i'): //en: _ea_se
-            case('E'): //gesetz
-            case('a'): //Satz
-            case('U'): //Schutz
-            case('Y'): //hübsch
-                override[CENTER] = true;
-                opening[CENTER] = 7.0;
-                break;
+			case ('S'): // waschen
+			case ('O'): // Trotz
+			case ('9'): // plötzlich
+				override[CENTER] = true;
+				opening[CENTER] = 11.0;
+				break;
 
-            case('o'): //en: n_o_se
-            case('Q'): //gb: p_o_t
-            case('A'): //english o
-                override[CENTER] = true;
-                opening[CENTER]  = 13.0;
-                break;
-            //r:
-            case('6'): //besser
-                override[CENTER] = true;
-                opening[CENTER] = 3.0;
-                break;
-
-        }
-    }else if (symbol.length() == 2){
-        if (symbol == "pf"){ //Pfahl
-            override[CENTER] = true;
-        }else if(symbol == "ts"){ //Zahl
-            override[CENTER] = true;
-            opening[CENTER]  = 11.0;
-        }else if(symbol == "tS"){ //deutsch
-            override[CENTER] = true;
-            opening[CENTER]  = 10.5;
-        }else if(symbol == "dZ"){ //Dschungel
-            override[CENTER] = true;
-            opening[CENTER]  = 11.0;
-        }else if (
-                (symbol == "OI") || //en: n_oi_se
-                (symbol == "@`") || //en: c_o_rner
-                (symbol == "@U") || //gb: n_o_se
-                (symbol == "o:") || //rot
-                (symbol == "O:") || //gb: c_au_se
-                (symbol == "U@") || //gb: c_u_res
-                (symbol == "u:") || //Blut
-                (symbol == "y:") || //süß
-                (symbol == "2:") || //blöd
-                (symbol == "aU")    //Haus
-                  ){
-            override[CENTER] = true;
-            opening[CENTER]  = 13.0;
-        }else if (
-                (symbol == "i:") || //Lied
-                (symbol == "I@") || //gb: f_ea_rs
-                (symbol == "e:") || //Beet
-                (symbol == "E:") || //spät
-                (symbol == "a:") || //Tat
-                (symbol == "A:")    //gb: st_a_rs
-                  ){
-            override[CENTER] = true;
-            opening[CENTER]  = 9.0;
-        }else if (
-                  (symbol == "aI")|| //Eis
-                  (symbol == "eI")   //gb: r_ai_se
-                  ){
-            override[CENTER] = true;
-            opening[CENTER]  = 5.0;
-        }else if(
-                 (symbol == "OY") || //Kreuz
-                 (symbol == "3:") || //gb: f_ur_s
-                 (symbol == "3`")    //en: f_ur_s
-                 ){
-            override[CENTER] = true;
-            opening[CENTER]  = 5.0;
-        }else if (
-                  (symbol == "I6") || //Wirt
-                  (symbol == "Y6") || //Türke
-                  (symbol == "E6") || //Berg
-                  (symbol == "96") || //Wörter
-                  (symbol == "a6") || //hart
-                  (symbol == "U6") || //kurz
-                  (symbol == "e@") || //gb: st_ai_rs
-                  (symbol == "O6") //dort
-                  ){
-            override[CENTER] = true;
-            opening[CENTER]  = 5.0;
-        }
-    }else if (symbol.length() == 3){
-        if(
-                (symbol == "i:6") || //Tier
-                (symbol == "y:6") || //Tür
-                (symbol == "e:6") || //schwer
-                (symbol == "E:6") || //Bär
-                (symbol == "2:6") || //Föhr
-                (symbol == "a:6") || //Haar
-                (symbol == "u:6") || //Kur
-                (symbol == "o:6")    //Ohr
-                ){
-            override[CENTER] = true;
-            opening[CENTER]  = 5.0;
-        }else{
-            printf("> invalid phoneme '%s' unhandled\n",symbol.c_str());
-        }
-    }else{
-        printf("> invalid phoneme length, phoneme '%s' unhandled\n",symbol.c_str());
-    }
+			case ('m'): // mein
+				override[CENTER] = true;
+				break;
 
+			case ('n'): // nein
+			case ('N'): // Ding
+			case ('l'): // leim
+			case ('R'): // Reim
+			case ('r'): // en: wrong
+			case ('I'): // Sitz
+			case ('i'): // en: _ea_se
+			case ('E'): // gesetz
+			case ('a'): // Satz
+			case ('U'): // Schutz
+			case ('Y'): // hübsch
+				override[CENTER] = true;
+				opening[CENTER] = 7.0;
+				break;
 
+			case ('o'): // en: n_o_se
+			case ('Q'): // gb: p_o_t
+			case ('A'): // english o
+				override[CENTER] = true;
+				opening[CENTER] = 13.0;
+				break;
+			// r:
+			case ('6'): // besser
+				override[CENTER] = true;
+				opening[CENTER] = 3.0;
+				break;
+		}
+	}
+	else if (symbol.length() == 2) {
+		if (symbol == "pf") { // Pfahl
+			override[CENTER] = true;
+		}
+		else if (symbol == "ts") { // Zahl
+			override[CENTER] = true;
+			opening[CENTER] = 11.0;
+		}
+		else if (symbol == "tS") { // deutsch
+			override[CENTER] = true;
+			opening[CENTER] = 10.5;
+		}
+		else if (symbol == "dZ") { // Dschungel
+			override[CENTER] = true;
+			opening[CENTER] = 11.0;
+		}
+		else if ((symbol == "OI") || // en: n_oi_se
+		         (symbol == "@`") || // en: c_o_rner
+		         (symbol == "@U") || // gb: n_o_se
+		         (symbol == "o:") || // rot
+		         (symbol == "O:") || // gb: c_au_se
+		         (symbol == "U@") || // gb: c_u_res
+		         (symbol == "u:") || // Blut
+		         (symbol == "y:") || // süß
+		         (symbol == "2:") || // blöd
+		         (symbol == "aU")    // Haus
+		) {
+			override[CENTER] = true;
+			opening[CENTER] = 13.0;
+		}
+		else if ((symbol == "i:") || // Lied
+		         (symbol == "I@") || // gb: f_ea_rs
+		         (symbol == "e:") || // Beet
+		         (symbol == "E:") || // spät
+		         (symbol == "a:") || // Tat
+		         (symbol == "A:")    // gb: st_a_rs
+		) {
+			override[CENTER] = true;
+			opening[CENTER] = 9.0;
+		}
+		else if ((symbol == "aI") || // Eis
+		         (symbol == "eI")    // gb: r_ai_se
+		) {
+			override[CENTER] = true;
+			opening[CENTER] = 5.0;
+		}
+		else if ((symbol == "OY") || // Kreuz
+		         (symbol == "3:") || // gb: f_ur_s
+		         (symbol == "3`")    // en: f_ur_s
+		) {
+			override[CENTER] = true;
+			opening[CENTER] = 5.0;
+		}
+		else if ((symbol == "I6") || // Wirt
+		         (symbol == "Y6") || // Türke
+		         (symbol == "E6") || // Berg
+		         (symbol == "96") || // Wörter
+		         (symbol == "a6") || // hart
+		         (symbol == "U6") || // kurz
+		         (symbol == "e@") || // gb: st_ai_rs
+		         (symbol == "O6")    // dort
+		) {
+			override[CENTER] = true;
+			opening[CENTER] = 5.0;
+		}
+	}
+	else if (symbol.length() == 3) {
+		if ((symbol == "i:6") || // Tier
+		    (symbol == "y:6") || // Tür
+		    (symbol == "e:6") || // schwer
+		    (symbol == "E:6") || // Bär
+		    (symbol == "2:6") || // Föhr
+		    (symbol == "a:6") || // Haar
+		    (symbol == "u:6") || // Kur
+		    (symbol == "o:6")    // Ohr
+		) {
+			override[CENTER] = true;
+			opening[CENTER] = 5.0;
+		}
+		else {
+			printf("> invalid phoneme '%s' unhandled\n", symbol.c_str());
+		}
+	}
+	else {
+		printf("> invalid phoneme length, phoneme '%s' unhandled\n", symbol.c_str());
+	}
 }
 
+void MouthConfig::apply_on_mouth_state(humotion::MouthState* m) {
+	if (override[LEFT]) {
+		m->opening_left = opening[LEFT];
+	}
+	else {
+		m->opening_left += opening[LEFT];
+	}
 
-void MouthConfig::apply_on_mouth_state(humotion::MouthState *m){
-    if (override[LEFT]){
-        m->opening_left = opening[LEFT];
-    }else{
-        m->opening_left += opening[LEFT];
-    }
-
-    if (override[CENTER]){
-        m->opening_center = opening[CENTER];
-    }else{
-        m->opening_center += opening[CENTER];
-    }
+	if (override[CENTER]) {
+		m->opening_center = opening[CENTER];
+	}
+	else {
+		m->opening_center += opening[CENTER];
+	}
 
-    if (override[RIGHT]){
-        m->opening_right = opening[RIGHT];
-    }else{
-        m->opening_right += opening[RIGHT];
-    }
+	if (override[RIGHT]) {
+		m->opening_right = opening[RIGHT];
+	}
+	else {
+		m->opening_right += opening[RIGHT];
+	}
 }
diff --git a/server/src/Utterance.cpp b/server/src/Utterance.cpp
index 7dc945c..b16d949 100644
--- a/server/src/Utterance.cpp
+++ b/server/src/Utterance.cpp
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "Utterance.h"
 using namespace std;
@@ -32,88 +32,94 @@ using namespace boost;
 
 #define DEBUG_PRINT_PHONEMES 1
 
-Utterance::Utterance(){
-    playing = false;
-    text = "UNINITIALISED UTTERANCE";
-    audio_data = boost::shared_ptr<AudioData>(new AudioData());
+Utterance::Utterance() {
+	playing = false;
+	text = "UNINITIALISED UTTERANCE";
+	audio_data = boost::shared_ptr<AudioData>(new AudioData());
 }
 
-void Utterance::set_phoneme_vector(phonemes_vector_t p){
-    phonemes_vector = p;
+void Utterance::set_phoneme_vector(phonemes_vector_t p) {
+	phonemes_vector = p;
 }
 
-void Utterance::set_text(string t){
-    text = t;
+void Utterance::set_text(string t) {
+	text = t;
 }
 
-void Utterance::set_audio_data(boost::shared_ptr<AudioData> a){
-    audio_data = a;
+void Utterance::set_audio_data(boost::shared_ptr<AudioData> a) {
+	audio_data = a;
 }
 
-Utterance::~Utterance(){
+Utterance::~Utterance() {
 }
 
-string Utterance::get_text(){
-    return text;
+string Utterance::get_text() {
+	return text;
 }
 
-boost::shared_ptr<AudioData> Utterance::get_audio_data(){
-    return audio_data;
+boost::shared_ptr<AudioData> Utterance::get_audio_data() {
+	return audio_data;
 }
 
-void Utterance::start_playback(){
-    if (phonemes_vector.size() == 0){
-        printf("> we have an empty phoneme vector. not playing.\n");
-        return;
-    }
+void Utterance::start_playback() {
+	if (phonemes_vector.size() == 0) {
+		printf("> we have an empty phoneme vector. not playing.\n");
+		return;
+	}
 
-    //set iterator to start:
-    phonemes_vector_iterator = phonemes_vector.begin();
+	// set iterator to start:
+	phonemes_vector_iterator = phonemes_vector.begin();
 
-    //fetch first end time
-    symbol_duration_pair_t symbol_duration_pair = *phonemes_vector_iterator;
-    symbol_end_time = get_system_time() + boost::posix_time::milliseconds(symbol_duration_pair.second);
+	// fetch first end time
+	symbol_duration_pair_t symbol_duration_pair = *phonemes_vector_iterator;
+	symbol_end_time = get_system_time() + boost::posix_time::milliseconds(symbol_duration_pair.second);
 
-    printf("> we have %d pairs\n",(int)phonemes_vector.size());
+	printf("> we have %d pairs\n", (int)phonemes_vector.size());
 
-    //go!
-    playing = true;
+	// go!
+	playing = true;
 }
 
-string Utterance::currently_active_phoneme(){
-    //not active -> return
-    if (!playing) return "";
-
-    //empty phoneme list
-    if (phonemes_vector.size() == 0) return "";
-
-    system_time now = get_system_time();
-
-    while(now > symbol_end_time){
-        //fetch next phoneme:
-        symbol_duration_pair_t symbol_duration_pair = *phonemes_vector_iterator;
-        symbol_end_time = symbol_end_time + boost::posix_time::milliseconds(symbol_duration_pair.second);
-        //printf("time: %d", symbol_duration_pair.second);
-
-        //do we have to increment the iterator or are we done? (NOTE: -1 is necessary here!)
-        if (phonemes_vector_iterator < phonemes_vector.end() - 1){
-            phonemes_vector_iterator++;
-        }else{
-            //reached end, stop playback
-            playing=false;
-            return "";
-            if (DEBUG_PRINT_PHONEMES) printf("\n");
-        }
-    }
-
-    //fetch active symbol:
-    string symbol = ((symbol_duration_pair_t)*phonemes_vector_iterator).first;
-    //printf("> active symbol = %s\n",symbol.c_str());
-    if (DEBUG_PRINT_PHONEMES) printf("%s ",symbol.c_str()); fflush(stdout);
-
-    return symbol;
+string Utterance::currently_active_phoneme() {
+	// not active -> return
+	if (!playing)
+		return "";
+
+	// empty phoneme list
+	if (phonemes_vector.size() == 0)
+		return "";
+
+	system_time now = get_system_time();
+
+	while (now > symbol_end_time) {
+		// fetch next phoneme:
+		symbol_duration_pair_t symbol_duration_pair = *phonemes_vector_iterator;
+		symbol_end_time = symbol_end_time + boost::posix_time::milliseconds(symbol_duration_pair.second);
+		// printf("time: %d", symbol_duration_pair.second);
+
+		// do we have to increment the iterator or are we done? (NOTE: -1 is necessary here!)
+		if (phonemes_vector_iterator < phonemes_vector.end() - 1) {
+			phonemes_vector_iterator++;
+		}
+		else {
+			// reached end, stop playback
+			playing = false;
+			return "";
+			if (DEBUG_PRINT_PHONEMES)
+				printf("\n");
+		}
+	}
+
+	// fetch active symbol:
+	string symbol = ((symbol_duration_pair_t)*phonemes_vector_iterator).first;
+	// printf("> active symbol = %s\n",symbol.c_str());
+	if (DEBUG_PRINT_PHONEMES)
+		printf("%s ", symbol.c_str());
+	fflush(stdout);
+
+	return symbol;
 }
 
-bool Utterance::is_playing(){
-    return playing;
+bool Utterance::is_playing() {
+	return playing;
 }
diff --git a/server/src/main.cpp b/server/src/main.cpp
index 38c52cb..e6ce5ed 100644
--- a/server/src/main.cpp
+++ b/server/src/main.cpp
@@ -1,30 +1,30 @@
 /*
-* This file is part of hlrc_server
-*
-* Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
-* http://opensource.cit-ec.de/projects/hlrc_server
-*
-* This file may be licensed under the terms of the
-* GNU General Public License Version 3 (the ``GPL''),
-* or (at your option) any later version.
-*
-* Software distributed under the License is distributed
-* on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
-* express or implied. See the GPL for the specific language
-* governing rights and limitations.
-*
-* You should have received a copy of the GPL along with this
-* program. If not, go to http://www.gnu.org/licenses/gpl.html
-* or write to the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-* The development of this software was supported by the
-* Excellence Cluster EXC 277 Cognitive Interaction Technology.
-* The Excellence Cluster EXC 277 is a grant of the Deutsche
-* Forschungsgemeinschaft (DFG) in the context of the German
-* Excellence Initiative.
-*
-*/
+ * This file is part of hlrc_server
+ *
+ * Copyright(c) sschulz <AT> techfak.uni-bielefeld.de
+ * http://opensource.cit-ec.de/projects/hlrc_server
+ *
+ * This file may be licensed under the terms of the
+ * GNU General Public License Version 3 (the ``GPL''),
+ * or (at your option) any later version.
+ *
+ * Software distributed under the License is distributed
+ * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
+ * express or implied. See the GPL for the specific language
+ * governing rights and limitations.
+ *
+ * You should have received a copy of the GPL along with this
+ * program. If not, go to http://www.gnu.org/licenses/gpl.html
+ * or write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The development of this software was supported by the
+ * Excellence Cluster EXC 277 Cognitive Interaction Technology.
+ * The Excellence Cluster EXC 277 is a grant of the Deutsche
+ * Forschungsgemeinschaft (DFG) in the context of the German
+ * Excellence Initiative.
+ *
+ */
 
 #include "MiddlewareRSB.h"
 #include "MiddlewareROS.h"
@@ -39,74 +39,75 @@
 #include <boost/thread/thread.hpp>
 #include <boost/algorithm/string.hpp>
 
-Arbiter *arbiter;
+Arbiter* arbiter;
 
 using namespace std;
 using namespace boost;
 
-int main(int argc, char *argv[]) {
-    if ((argc != 5) && (argc != 6)){
-        printf("> ERROR: invalid number of parameters passed to server!\n\nusage: %s <mw_hlrc> <mw_humotion> <base scopename hlrc> <base scopename humotion> [<audio output>]  (example: %s RSB RSB /flobi1/ pulse )\n",argv[0],argv[0]);
-        printf("          audio output is optional and can be {pulse,oss,alsa,null,sndio,..}\n\n");
-        exit(EXIT_FAILURE);
-    }
+int main(int argc, char* argv[]) {
+	if ((argc != 5) && (argc != 6)) {
+		printf("> ERROR: invalid number of parameters passed to server!\n\nusage: %s <mw_hlrc> <mw_humotion> <base scopename "
+		       "hlrc> <base scopename humotion> [<audio output>]  (example: %s RSB RSB /flobi1/ pulse )\n",
+		       argv[0], argv[0]);
+		printf("          audio output is optional and can be {pulse,oss,alsa,null,sndio,..}\n\n");
+		exit(EXIT_FAILURE);
+	}
 
-    printf("> hlrc_server starting\n");
+	printf("> hlrc_server starting\n");
 
-    //fetch scope from cmd line
-    std::string scope_hlrc = argv[3];
-    std::string scope_humotion = argv[4];
+	// fetch scope from cmd line
+	std::string scope_hlrc = argv[3];
+	std::string scope_humotion = argv[4];
 
-    //fetch middleware from cmd line
-    std::string mw = argv[1];
-    to_upper(mw); //convert to uppercase
+	// fetch middleware from cmd line
+	std::string mw = argv[1];
+	to_upper(mw); // convert to uppercase
 
-    //fetch mw for humotion
-    std::string mw_humotion = argv[2];
+	// fetch mw for humotion
+	std::string mw_humotion = argv[2];
 
-    //arbiter
-    std::string sound_output = "pulse";
-    if (argc == 6){
-        sound_output = argv[5];
-    }
-    arbiter = new Arbiter(sound_output);
+	// arbiter
+	std::string sound_output = "pulse";
+	if (argc == 6) {
+		sound_output = argv[5];
+	}
+	arbiter = new Arbiter(sound_output);
 
-    //mw connection
-    Middleware *middleware;
-    if (mw == "ROS"){
-        middleware = new MiddlewareROS(arbiter, scope_hlrc);
-    }else{
-        middleware = new MiddlewareRSB(arbiter, scope_hlrc);
-    }
+	// mw connection
+	Middleware* middleware;
+	if (mw == "ROS") {
+		middleware = new MiddlewareROS(arbiter, scope_hlrc);
+	}
+	else {
+		middleware = new MiddlewareRSB(arbiter, scope_hlrc);
+	}
 
-    //human motion connection:
-    humotion::client::Client *client = new humotion::client::Client(scope_humotion, mw_humotion);
+	// human motion connection:
+	humotion::client::Client* client = new humotion::client::Client(scope_humotion, mw_humotion);
 
-    printf("> all done. hlrc server ready\n");
+	printf("> all done. hlrc server ready\n");
 
-    //send values to human motion server
-    float loop_delay = 1000.0 / 50.0; //run with 50Hz
-    boost::system_time timeout = get_system_time() + posix_time::milliseconds(loop_delay);
+	// send values to human motion server
+	float loop_delay = 1000.0 / 50.0; // run with 50Hz
+	boost::system_time timeout = get_system_time() + posix_time::milliseconds(loop_delay);
 
-    while(client->ok()){
-        middleware->tick();
+	while (client->ok()) {
+		middleware->tick();
 
-        //find correct arbitration
-        arbiter->arbitrate();
+		// find correct arbitration
+		arbiter->arbitrate();
 
-        //periodically send mouth & gaze target
-        client->update_mouth_target(arbiter->get_mouth_state());
-        client->update_gaze_target(arbiter->get_gaze_state());
-        client->send_all();
+		// periodically send mouth & gaze target
+		client->update_mouth_target(arbiter->get_mouth_state());
+		client->update_gaze_target(arbiter->get_gaze_state());
+		client->send_all();
 
-        //debug:
-        //arbiter->get_mouth_state().dump();
+		// debug:
+		// arbiter->get_mouth_state().dump();
 
-        thread::sleep(timeout);
-        timeout = get_system_time() + posix_time::milliseconds(loop_delay);
-    }
-
-    return EXIT_SUCCESS;
+		thread::sleep(timeout);
+		timeout = get_system_time() + posix_time::milliseconds(loop_delay);
+	}
 
+	return EXIT_SUCCESS;
 }
-
