Index: /code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc
===================================================================
--- /code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc	(revision 10945)
+++ /code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc	(revision 10946)
@@ -113,4 +113,6 @@
             this->moveToTargetPosition(dt);
         }
+        if (!this || !this->getControllableEntity())
+            return;
         else if (this->bLookAtTarget_)
         {
@@ -146,4 +148,6 @@
             this->bDodge_ = true;
         }
+        if (!this || !this->getControllableEntity())
+            return;
         if (ActionpointController::sTicks_ % 100 == step * this->actionpointControllerId_ + 1)
         {
@@ -175,4 +179,6 @@
                 this->doFire();
             }
+            if (!this || !this->getControllableEntity())
+                return;
             this->deltaHp = orxonox_cast<Pawn*> (this->getControllableEntity())->getHealth() - this->previousHp;
             this->previousHp = orxonox_cast<Pawn*> (this->getControllableEntity())->getHealth();
@@ -202,8 +208,14 @@
             if (this->parsedActionpoints_.empty() && this->loopActionpoints_.empty() && this->bDefaultFightAll_)
             {
+                if (!this || !this->getControllableEntity())
+                    return;
                 Point p = { Action::FIGHTALL, "", Vector3::ZERO, false };
                 this->parsedActionpoints_.push_back (p);
             }
+            if (!this || !this->getControllableEntity())
+                return;
             this->executeActionpoint();
+            if (!this || !this->getControllableEntity())
+                return;
             this->bTakenOver_ = false;
         }
@@ -220,9 +232,15 @@
                 if (newTarget)
                 {
+                    if (!this || !this->getControllableEntity())
+                        return;
                     this->setAction (Action::FIGHTALL, newTarget);
                 }
                 else
                 {
+                    if (!this || !this->getControllableEntity())
+                        return;
                     this->nextActionpoint();
+                    if (!this || !this->getControllableEntity())
+                        return;
                     this->executeActionpoint();
     
@@ -233,17 +251,24 @@
         else if (this->action_ == Action::FIGHT)
         {
-
             if (!this->hasTarget() )
             {
                 //----find a target----
-                ControllableEntity* newTarget = this->closestTarget();    
+                ControllableEntity* newTarget = this->closestTarget();  
+                if (!this || !this->getControllableEntity())
+                    return;  
                 if (newTarget && 
                         CommonController::distance (this->getControllableEntity(), newTarget) < this->attackRange_)
                 {
+                    if (!this || !this->getControllableEntity())
+                        return;
                     this->setAction (Action::FIGHT, newTarget);
                 }
                 else
                 {
+                    if (!this || !this->getControllableEntity())
+                        return;
                     this->nextActionpoint();
+                    if (!this || !this->getControllableEntity())
+                        return;
                     this->executeActionpoint();
                 }
@@ -257,13 +282,20 @@
                 {
                     ControllableEntity* newTarget = this->closestTarget();
-                    
+                    if (!this || !this->getControllableEntity())
+                        return;
                     if (newTarget && 
                         CommonController::distance (this->getControllableEntity(), newTarget) < this->attackRange_)
                     {
+                        if (!this || !this->getControllableEntity())
+                            return;
                         this->setAction (Action::FIGHT, newTarget);
                     }
                     else
                     {
+                        if (!this || !this->getControllableEntity())
+                            return;
                         this->nextActionpoint();
+                        if (!this || !this->getControllableEntity())
+                            return;
                         this->executeActionpoint();
                     }
@@ -275,5 +307,9 @@
             if (this->squaredDistanceToTarget() <= this->squaredaccuracy_)
             {
+                if (!this || !this->getControllableEntity())
+                    return;
                 this->nextActionpoint();   
+                if (!this || !this->getControllableEntity())
+                    return;
                 this->executeActionpoint();
             }
@@ -283,15 +319,26 @@
             if (!this->getProtect())
             {
+                if (!this || !this->getControllableEntity())
+                    return;
                 this->nextActionpoint();
+                if (!this || !this->getControllableEntity())
+                    return;
                 this->executeActionpoint(); 
             }
+            if (!this || !this->getControllableEntity())
+                return;
             this->stayNearProtect();
         }
         else if (this->action_ == Action::ATTACK)
         {   
-
+            if (!this || !this->getControllableEntity())
+                return;
             if (!this->hasTarget())
             {
+                if (!this || !this->getControllableEntity())
+                    return;
                 this->nextActionpoint();
+                if (!this || !this->getControllableEntity())
+                    return;
                 this->executeActionpoint();
             }
@@ -302,8 +349,10 @@
     void ActionpointController::setProtect (ControllableEntity* protect)
     {
+
         this->protect_ = protect;
     }
     ControllableEntity* ActionpointController::getProtect ()
     {
+
         return this->protect_;
     }
@@ -401,4 +450,6 @@
     void ActionpointController::setAction (Action::Value action, ControllableEntity* target)
     {
+        if (!this || !this->getControllableEntity())
+            return;
         this->action_ = action;
         if (action == Action::FIGHT || action == Action::FIGHTALL || action == Action::ATTACK)
@@ -415,4 +466,6 @@
     void ActionpointController::setAction (Action::Value action, const Vector3& target)
     {
+        if (!this || !this->getControllableEntity())
+            return;
         this->action_ = action;
         if (action == Action::FLY)
@@ -423,4 +476,6 @@
     void ActionpointController::setAction (Action::Value action, const Vector3& target,  const Quaternion& orient )
     {
+        if (!this || !this->getControllableEntity())
+            return;
         this->action_ = action;
         if (action == Action::FLY)
@@ -466,12 +521,18 @@
             return;
         }
+        if (!this || !this->getControllableEntity())
+            return;
         if (!this->bLoop_ && this->parsedActionpoints_.back().inLoop)
         {
             //MOVES all points that are in loop to a loop vector
             this->fillLoop();
+            if (!this || !this->getControllableEntity())
+                return;
             this->bLoop_ = true;
             executeActionpoint();
             return;
         }
+        if (!this || !this->getControllableEntity())
+            return;
         this->setAction (p.action);
         if (!this || !this->getControllableEntity())
@@ -487,4 +548,6 @@
                 for (ObjectList<Pawn>::iterator itP = ObjectList<Pawn>::begin(); itP; ++itP)
                 {
+                    if (!this || !this->getControllableEntity())
+                        return;
                     if (CommonController::getName(*itP) == targetName)
                     {
@@ -497,7 +560,13 @@
             {
                 this->setTargetPosition( p.position );
+                if (!this || !this->getControllableEntity())
+                    return;
                 if (this->squaredDistanceToTarget() <= this->squaredaccuracy_)
                 {
+                    if (!this || !this->getControllableEntity())
+                        return;
                     this->nextActionpoint();
+                    if (!this || !this->getControllableEntity())
+                        return;
                     this->executeActionpoint();
                 }
@@ -553,4 +622,6 @@
                     if (CommonController::getName(*itP) == targetName)
                     {
+                        if (!this || !this->getControllableEntity())
+                            return;
                         this->setTarget (static_cast<ControllableEntity*>(*itP));
                     }
@@ -559,4 +630,6 @@
                 {
                     this->nextActionpoint();
+                    if (!this || !this->getControllableEntity())
+                        return;
                     this->executeActionpoint();
                 }
@@ -648,8 +721,12 @@
     void ActionpointController::takeActionpoints (const std::vector<Point>& vector, const std::vector<Point>& loop, bool b)
     {
-      this->parsedActionpoints_ = vector;
-      this->loopActionpoints_ = loop;
-      this->bLoop_ = b;
-      this->bTakenOver_ = true;
+        if (!this || !this->getControllableEntity())
+            return;
+        this->parsedActionpoints_ = vector;
+        if (!this || !this->getControllableEntity())
+            return;
+        this->loopActionpoints_ = loop;
+        this->bLoop_ = b;
+        this->bTakenOver_ = true;
     }
     void ActionpointController::setClosestTarget()
@@ -667,4 +744,6 @@
         for (ObjectList<Pawn>::iterator itP = ObjectList<Pawn>::begin(); itP; ++itP)
         {
+            if (!this || !this->getControllableEntity())
+                return 0;
             if ( CommonController::sameTeam (this->getControllableEntity(), static_cast<ControllableEntity*>(*itP), gt) )
                 continue;
@@ -692,4 +771,6 @@
             if (!this->target_ || (this->target_ && CommonController::distance (this->getControllableEntity(), this->target_) > this->attackRange_))
             {
+                if (!this || !this->getControllableEntity())
+                    return;
                 Pawn* newTarget = this->closestTarget();
                 if ( newTarget && 
Index: /code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.h
===================================================================
--- /code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.h	(revision 10945)
+++ /code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.h	(revision 10946)
@@ -246,13 +246,9 @@
                 bool bDefaultPatrol_;
                 bool stop_;
-                static unsigned int sTicks_;     //<! a hack? I don't want action() and maneuver() to be called multiple times in a tick, so I keep
-                                        //<! track of ticks and if current tick is "assigned" to this object, than I call maneuver()/action()
+                static unsigned int sTicks_;    //<! a hack? I don't want action() and maneuver() to be called multiple times in a tick, so I keep
+                                                //<! track of ticks and if current tick is "assigned" to this object, than I call maneuver()/action()
                 static unsigned int nextActionpointControllerId_;    //<! if level has 16 ActionpointControllers, than this variable equals to 17 after first tick 
                 unsigned int actionpointControllerId_;   //<! integer from 0 to nextActionpointControllerId_, different for every ActionpointController in level
-                unsigned int ticks_;     //<! local tick counter
-
-
-        private:
-            
+                unsigned int ticks_;     //<! local tick counter            
     };
 }
Index: /code/branches/campaignHS15/src/orxonox/controllers/CommonController.cc
===================================================================
--- /code/branches/campaignHS15/src/orxonox/controllers/CommonController.cc	(revision 10945)
+++ /code/branches/campaignHS15/src/orxonox/controllers/CommonController.cc	(revision 10946)
@@ -9,5 +9,5 @@
  *   modify it under the terms of the GNU General Public License
  *   as published by the Free Software Foundation; either version 2
- *   of the License, or ( at your option )any later version.
+ *   of the License, or (at your option)any later version.
  *
  *   This program is distributed in the hope that it will be useful,
@@ -28,5 +28,5 @@
 #include "controllers/CommonController.h"
 
-//stuff for sameTeam function
+//here starts stuff for sameTeam function copied from FormationController
 #include "gametypes/TeamDeathmatch.h"
 #include "gametypes/Gametype.h"
@@ -39,30 +39,45 @@
 {
 
-    RegisterClass( CommonController );
-
-    CommonController::CommonController( Context* context ): Controller( context )
-    {
-        RegisterObject( CommonController );
+    RegisterClass(CommonController);
+
+    CommonController::CommonController(Context* context): Controller(context)
+    {
+        RegisterObject(CommonController);
     }
     CommonController::~CommonController() 
     {
-        
-    }
-
-    float CommonController::randomInRange( float a, float b )
+        //no member variables - nothing to destroy
+    }
+    /**
+    @brief
+      PRE: a < b.
+      returns random float between a and b.
+    */
+    float CommonController::randomInRange(float a, float b)
     {
         return a + rnd(1.0f) * (b - a);
     }
-    float CommonController::distance (ControllableEntity* entity1, ControllableEntity* entity2)
+    /**
+    @brief
+      returns distance between two entities, if either is zero pointer, returns infinity
+    */    
+    float CommonController::distance (const ControllableEntity* entity1, const ControllableEntity* entity2)
     {
         if (!entity1 || !entity2)
             return std::numeric_limits<float>::infinity();
-        return ( entity1->getPosition() - entity2->getPosition() ).length();
-    }
+        return (entity1->getPosition() - entity2->getPosition()).length();
+    }
+    /**
+    @brief
+      bad function from FormationController that returns true if both entities have same team
+    */    
     bool CommonController::sameTeam (ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype)
     {
+        //uncomment following code if functions stops working due to being a hack
         /*if (!entity1 || !entity2)
             return false;
         return entity1->getTeam() == entity2->getTeam();*/
+        if (!entity1 || !entity2)
+            return false;
         if (entity1 == entity2)
             return true;
@@ -161,5 +176,5 @@
                 team2 = dynamic->getParty(entity2->getPlayer());
 
-            if (team1 ==-1 ||team2 ==-1 ) {return false;}
+            if (team1 ==-1 ||team2 ==-1) {return false;}
             else if (team1 == dynamic->chaser && team2 != dynamic->chaser) {return false;}
             else if (team1 == dynamic->piggy && team2 == dynamic->chaser) {return false;}
@@ -170,13 +185,21 @@
         return (team1 == team2 && team1 != -1);
     }
-    bool CommonController::isLooking( ControllableEntity* entityThatLooks, ControllableEntity* entityBeingLookedAt, float angle )
-    {
-        if ( !entityThatLooks || !entityBeingLookedAt )
+    /**
+    @brief
+      returns true if entityThatLooks does look at entityBeingLookeAt with a tolerance of angle.
+    */    
+    bool CommonController::isLooking(const ControllableEntity* entityThatLooks, const ControllableEntity* entityBeingLookedAt, float angle)
+    {
+        if (!entityThatLooks || !entityBeingLookedAt)
             return false;
-        return ( getAngle( entityThatLooks ->getPosition() , 
+        return (getAngle(entityThatLooks ->getPosition() , 
             entityThatLooks->getOrientation()  * WorldEntity::FRONT, 
-            entityBeingLookedAt->getWorldPosition() ) < angle );
-    }
-    std::string CommonController::getName(Pawn* entity)
+            entityBeingLookedAt->getWorldPosition()) < angle);
+    }
+    /**
+    @brief
+      returns a name of a Pawn entity, if no name set, returns string representing address of the Pawn.
+    */    
+    std::string CommonController::getName(const Pawn* entity)
     {
         std::string name = entity->getName();
Index: /code/branches/campaignHS15/src/orxonox/controllers/CommonController.h
===================================================================
--- /code/branches/campaignHS15/src/orxonox/controllers/CommonController.h	(revision 10945)
+++ /code/branches/campaignHS15/src/orxonox/controllers/CommonController.h	(revision 10946)
@@ -31,9 +31,10 @@
 
 
-#include "controllers/Controller.h"
-#include <limits>
+#include "controllers/Controller.h"                 //that's what I inherit from
 
-#include "worldentities/ControllableEntity.h"
-#include "worldentities/pawns/Pawn.h"
+#include <limits>                                   //I use limits pretty much in every class, so might as well include it in the parent class
+
+#include "worldentities/ControllableEntity.h"       //same for ControllableEntity
+#include "worldentities/pawns/Pawn.h"               //and Pawn
 
 
@@ -44,7 +45,5 @@
 
         public:
-            static const float ACTION_INTERVAL = 1.0f;
-
-            static const float hardcoded_projectile_speed = 750;
+            static const float hardcoded_projectile_speed = 750;        //<! FightingController uses it to predict enemy position
 
             CommonController(Context* context);
@@ -52,8 +51,8 @@
 
             static float randomInRange(float a, float b);
-            static float distance(ControllableEntity* entity1, ControllableEntity* entity2);
+            static float distance(const ControllableEntity* entity1, const ControllableEntity* entity2);
             static bool sameTeam (ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gt);
-            static bool isLooking( ControllableEntity* entityThatLooks, ControllableEntity* entityBeingLookedAt, float angle ) ;
-            static std::string getName( Pawn* entity ) ;           
+            static bool isLooking(const ControllableEntity* entityThatLooks, const ControllableEntity* entityBeingLookedAt, float angle ) ;
+            static std::string getName(const Pawn* entity ) ;           
     };
 }
Index: /code/branches/campaignHS15/src/orxonox/controllers/DivisionController.cc
===================================================================
--- /code/branches/campaignHS15/src/orxonox/controllers/DivisionController.cc	(revision 10945)
+++ /code/branches/campaignHS15/src/orxonox/controllers/DivisionController.cc	(revision 10946)
@@ -70,5 +70,5 @@
     void DivisionController::action()
     {   
-        if (!this || !this->getControllableEntity())
+        if (!this || !this->getControllableEntity() || !this->isActive())
             return;
         
Index: /code/branches/campaignHS15/src/orxonox/controllers/FlyingController.cc
===================================================================
--- /code/branches/campaignHS15/src/orxonox/controllers/FlyingController.cc	(revision 10945)
+++ /code/branches/campaignHS15/src/orxonox/controllers/FlyingController.cc	(revision 10946)
@@ -9,5 +9,5 @@
  *   modify it under the terms of the GNU General Public License
  *   as published by the Free Software Foundation; either version 2
- *   of the License, or ( at your option )any later version.
+ *   of the License, or (at your option)any later version.
  *
  *   This program is distributed in the hope that it will be useful,
@@ -27,9 +27,11 @@
  *
  */
+#include <OgreMatrix3.h>                        //for Quaternion manipulations
+
+#include "util/Math.h"                          
+#include "core/XMLPort.h"
 #include "controllers/FlyingController.h"
-#include "core/XMLPort.h"
-#include "worldentities/pawns/SpaceShip.h"
-#include "util/Math.h"
-#include <OgreMatrix3.h>
+
+#include "worldentities/pawns/SpaceShip.h"      //for boosting
 
 namespace orxonox
@@ -60,17 +62,17 @@
         FormationMode::Value value;
         
-        if ( valUpper == "WALL" )
+        if (valUpper == "WALL")
             value = FormationMode::WALL;
-        else if ( valUpper == "FINGER4" )
+        else if (valUpper == "FINGER4")
             value = FormationMode::FINGER4;
-        else if ( valUpper == "DIAMOND" )
+        else if (valUpper == "DIAMOND")
             value = FormationMode::DIAMOND;
         else
-            ThrowException(ParseError, std::string( "Attempting to set an unknown FormationMode: '" )+ val + "'.");
+            ThrowException(ParseError, std::string("Attempting to set an unknown FormationMode: '")+ val + "'.");
         this->setFormationMode(value);
     }
     std::string FlyingController::getFormationModeXML() const
     {
-        switch ( this->formationMode_ )
+        switch (this->formationMode_)
         {
             case FormationMode::WALL:
@@ -88,4 +90,10 @@
         this->bHasTargetPosition_ = false;
     }
+    /**
+    @brief
+      if distance to targetPosition is smaller than this->tolerance_, no moving should be made, otherwise
+      find amount of yaw and pitch that have to be applied, so that ship looks at targetPosition, then
+      ship is moved forward towards targetPosition. Also target orientation is being applied.
+    */
     void FlyingController::moveToPosition(const Vector3& targetPosition, float dt)
     {
@@ -94,21 +102,33 @@
         ControllableEntity* entity = this->getControllableEntity();
 
-        float distance = ( targetPosition - entity->getPosition() ).length();
-
-        if ( distance >= this->tolerance_ )
-        {
+        float distance = (targetPosition - entity->getPosition()).length();
+
+        if (distance >= this->tolerance_)
+        {
+            //function that calculates how much yaw and pitch are to be applied
             Vector2 coord = get2DViewCoordinates
-                ( entity->getPosition() , 
+                (entity->getPosition() , 
                 entity->getOrientation()  * WorldEntity::FRONT, 
                 entity->getOrientation()  * WorldEntity::UP, 
-                targetPosition );
-            float rotateX = -clamp( coord.x * 10, -1.0f, 1.0f );
-            float rotateY = clamp( coord.y * 10, -1.0f, 1.0f );
-            entity->rotateYaw( ROTATEFACTOR * rotateX * dt );
-            entity->rotatePitch( ROTATEFACTOR * rotateY * dt );
-          
+                targetPosition);
+            //limit yaw and pitch by [-1,1]
+            float rotateX = -clamp(coord.x * 10, -1.0f, 1.0f);
+            float rotateY = clamp(coord.y * 10, -1.0f, 1.0f);
+
+            if (!entity)
+                return;
+
+            //apply yaw and pitch
+            entity->rotateYaw(ROTATEFACTOR * rotateX * dt);
+            entity->rotatePitch(ROTATEFACTOR * rotateY * dt);
+            
+            if (!entity)
+                return;
+           
+            //only move either if ship looks at target with a certain tolerance, or if ship is far enough for it to be ok to move in a curve.
             if (distance > this->tolerance_*1.5f || (rotateX > -0.03 && rotateX < 0.03 && rotateY > -0.03 && rotateY < 0.03))
-                entity->moveFrontBack( SPEED * dt );
-                copyTargetOrientation(dt);
+                entity->moveFrontBack(SPEED * dt);
+            //roll
+            copyTargetOrientation(dt);
         }
         else
@@ -117,9 +137,16 @@
         }
     }
-    
+    /**
+    @brief
+      fly towards a preset targetPosition_
+    */
     void FlyingController::moveToTargetPosition(float dt)
     {
         this->moveToPosition (this->targetPosition_, dt);
     }
+    /**
+    @brief
+      roll ship so that it has same roll as orient
+    */
     void FlyingController::copyOrientation(const Quaternion& orient, float dt)
     {
@@ -155,5 +182,8 @@
         }
     }
-
+    /**
+    @brief
+      roll ship so that it has same roll as a preset targetOrientation_
+    */
     void FlyingController::copyTargetOrientation(float dt)
     {
@@ -163,5 +193,8 @@
         }
     }
-    
+    /**
+    @brief
+      set Vector to fly to
+    */
     void FlyingController::setTargetPosition(const Vector3& target)
     {
@@ -169,5 +202,8 @@
         this->bHasTargetPosition_ = true;
     }
-
+    /**
+    @brief
+      set orientation to apply
+    */
     void FlyingController::setTargetOrientation(const Quaternion& orient)
     {
@@ -175,5 +211,8 @@
         this->bHasTargetOrientation_=true;
     }
-
+    /**
+    @brief
+      set orientation to apply
+    */
     void FlyingController::setTargetOrientation(ControllableEntity* target)
     {
@@ -181,4 +220,8 @@
             this->setTargetOrientation(target->getOrientation());
     }
+    /**
+    @brief
+      boost if you can
+    */
     void FlyingController::boostControl()
     {
@@ -187,5 +230,5 @@
         SpaceShip* ship = orxonox_cast<SpaceShip*>(this->getControllableEntity());
         if(ship == NULL) return;
-        if(ship->getBoostPower()*1.5f > ship->getInitialBoostPower() ) //upper limit ->boost
+        if(ship->getBoostPower()*1.5f > ship->getInitialBoostPower()) //upper limit ->boost
         {
             this->getControllableEntity()->boost(true);
@@ -196,6 +239,12 @@
         }
     }
+    /**
+    @brief
+      keep this ship in a formation with its division
+    */
     void FlyingController::keepFormation(const ControllableEntity* leaderEntity, Vector3& targetRelativePosition)
     {
+        if (!this->getControllableEntity())
+            return;
         ControllableEntity* myEntity = this->getControllableEntity();
         Vector3 myPosition = myEntity->getWorldPosition();
@@ -212,11 +261,15 @@
             return;
         }
+        //calculate where in world coordinates this ship should fly
         Vector3 targetAbsolutePosition = 
             (leaderPosition + (orient*WorldEntity::FRONT) * (leaderEntity->getVelocity().length()/5)
              + (orient* (targetRelativePosition)));
-        //let ship finish rotating. also don't call copyOrientation to often as it is a slow function.
+        //let ship finish rotating. also don't call copyOrientation too often as it is a slow function. Don't know how to do it different
         if (static_cast<int>(rnd(1.0f) * 100) % 3 == 0)
             this->setTargetOrientation (orient);
+        //set a position to fly to
         this->setTargetPosition (targetAbsolutePosition);
+
+        //boost if too far
         if ((targetAbsolutePosition - myPosition).length() > this->tolerance_ * 1.5f)
         {
@@ -225,5 +278,7 @@
         else
         {
-           this->getControllableEntity()->boost(false);
+            if (!this->getControllableEntity())
+                return;
+            this->getControllableEntity()->boost(false);
         }
     }
Index: /code/branches/campaignHS15/src/orxonox/controllers/FlyingController.h
===================================================================
--- /code/branches/campaignHS15/src/orxonox/controllers/FlyingController.h	(revision 10945)
+++ /code/branches/campaignHS15/src/orxonox/controllers/FlyingController.h	(revision 10946)
@@ -39,4 +39,6 @@
         FlyingController stores all the flying methods and member variables of AI.
     */
+
+    //Formation mode for the divisions
     namespace FormationMode
     {
@@ -51,6 +53,6 @@
 
         public:
-            static const float SPEED = 0.9f/0.02f;
-            static const float ROTATEFACTOR = 0.6f/0.02f;
+            static const float SPEED = 0.9f/0.02f;              //<! ship's speed
+            static const float ROTATEFACTOR = 0.6f/0.02f;       //<! ship's rotation factor
  
             FlyingController(Context* context);
@@ -58,7 +60,7 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
 
-            void setSpread (int spread)
+            void setSpread (int spread)                         //<! spread is a multiplier for formation flight, should be bigger than 100
                 { this->spread_ = spread; }
-            int getSpread () const
+            int getSpread () const                              
                 { return this->spread_; }
 
@@ -72,27 +74,28 @@
 
         protected:
-            void stopMoving();
+            void stopMoving();                                  //<! don't call moveToTargetPosition() in tick, call lookAtTarget() from FightingController instead
 
-            void moveToPosition(const Vector3& target, float dt);
-            void moveToTargetPosition(float dt);
+            void moveToPosition(const Vector3& target, float dt);   //<! move towards a vector
+            void moveToTargetPosition(float dt);                    //<! move to the preset position. Don't mix with positionOfTarget!
 
-            void copyOrientation(const Quaternion& orient, float dt);
-            void copyTargetOrientation(float dt);
+            void copyOrientation(const Quaternion& orient, float dt);   //<! roll to have same roll as orient
+            void copyTargetOrientation(float dt);                       //<! roll to have a preset orient
 
-            void setTargetPosition(const Vector3& target);
-            void setTargetOrientation(const Quaternion& orient);
-            void setTargetOrientation(ControllableEntity* target);
-            virtual void boostControl();  
-            void keepFormation (const ControllableEntity* leaderEntity, Vector3& targetRelativePosition);      
+            void setTargetPosition(const Vector3& target);              //<! preset a Vector to fly to
+            void setTargetOrientation(const Quaternion& orient);        //<! preset a desired orientation
+            void setTargetOrientation(ControllableEntity* target);      //<! preset a desired orientation
+            virtual void boostControl();                                //<! boost if you can
+            void keepFormation (const ControllableEntity* leaderEntity, Vector3& targetRelativePosition);   //<! preset targetPosition, so that 
+                                                                                                            //<! this stays in a certain position relative to leader      
             
             FormationMode::Value formationMode_;
           
-            float rotationProgress_;    //<! for slerp
+            float rotationProgress_;    //<! for slerping 
             bool bHasTargetPosition_;
-            Vector3 targetPosition_;
+            Vector3 targetPosition_;    //<! vector to fly to
             bool bHasTargetOrientation_;
-            Quaternion targetOrientation_; 
-            int spread_;
-            int tolerance_; 
+            Quaternion targetOrientation_;  //<! orientation to take
+            int spread_;                //<! spread is a multiplier for formation flight, should be bigger than 100
+            int tolerance_;             //<! if this ship is tolerance_ away from targetPosition_, ship decides that it finished moving
     };
 }
Index: /code/branches/campaignHS15/src/orxonox/controllers/SectionController.cc
===================================================================
--- /code/branches/campaignHS15/src/orxonox/controllers/SectionController.cc	(revision 10945)
+++ /code/branches/campaignHS15/src/orxonox/controllers/SectionController.cc	(revision 10946)
@@ -73,5 +73,5 @@
     void SectionController::action()
     {
-        if (!this || !this->getControllableEntity())
+        if (!this || !this->getControllableEntity() || !this->isActive())
             return;
 
Index: /code/branches/campaignHS15/src/orxonox/controllers/WingmanController.cc
===================================================================
--- /code/branches/campaignHS15/src/orxonox/controllers/WingmanController.cc	(revision 10945)
+++ /code/branches/campaignHS15/src/orxonox/controllers/WingmanController.cc	(revision 10946)
@@ -73,5 +73,5 @@
     void WingmanController::action()
     {
-        if (!this || !this->getControllableEntity())
+        if (!this || !this->getControllableEntity() || !this->isActive())
             return;
         //----If no leader, find one----
