diff --git a/source/RobotAPI/libraries/armem/core/base/CoreSegmentBase.h b/source/RobotAPI/libraries/armem/core/base/CoreSegmentBase.h
index ead811e5a744b9208a30eb7761c381b040cd7e90..3c3c0ef2c3ffa6f1020f6c3ff82dfce8e4650f5b 100644
--- a/source/RobotAPI/libraries/armem/core/base/CoreSegmentBase.h
+++ b/source/RobotAPI/libraries/armem/core/base/CoreSegmentBase.h
@@ -146,10 +146,8 @@ namespace armarx::armem::base
                     ProviderSegmentT& provSeg = addProviderSegment(update.entityID.providerSegmentName);
                     return provSeg.update(update);
                 }
-                else
-                {
-                    throw armem::error::MissingEntry("provider segment", update.entityID.providerSegmentName, getLevelName(), this->getKeyString());
-                }
+                throw armem::error::MissingEntry("provider segment", update.entityID.providerSegmentName, getLevelName(), this->getKeyString());
+
             }
         }
 
diff --git a/source/RobotAPI/libraries/aron/core/Randomizer.h b/source/RobotAPI/libraries/aron/core/Randomizer.h
index 71b1742308ddd4b2c035d20f8c0ed84796d3c26b..bdc272383357c6300f9d60d2f4e027319385f845 100644
--- a/source/RobotAPI/libraries/aron/core/Randomizer.h
+++ b/source/RobotAPI/libraries/aron/core/Randomizer.h
@@ -119,7 +119,7 @@ namespace armarx::aron
                     t->setSecondAcceptedType(b);
                     return t;
                 }
-                case type::Descriptor::eEigenMatrix: // TODO
+                case type::Descriptor::eEigenMatrix: // TODO (fabian.peller)
                 case type::Descriptor::eEigenQuaternion:
                 case type::Descriptor::eIVTCByteImage:
                 case type::Descriptor::eOpenCVMat:
diff --git a/source/RobotAPI/libraries/aron/core/codegenerator/codeWriter/cpp/AronCppClass.h b/source/RobotAPI/libraries/aron/core/codegenerator/codeWriter/cpp/AronCppClass.h
index d50039b436af042514e9dfb9deb91cac4349126e..7249a77170fd0f5c5e930d3d41ae465502ad3e96 100644
--- a/source/RobotAPI/libraries/aron/core/codegenerator/codeWriter/cpp/AronCppClass.h
+++ b/source/RobotAPI/libraries/aron/core/codegenerator/codeWriter/cpp/AronCppClass.h
@@ -47,9 +47,17 @@ namespace armarx::aron::cppserializer
 
     public:
         AronCppClass() = default;
+
+        /// Reset all member values of this class to default (as stated in the XML). This may mean that maybe types are null or false and images may be created as headers_only
         virtual void resetHard() = 0;
+
+        /// Reset all member values of this class softly, meaning if a maybe type has a value, we reset only the value (not the full maybe type) and if an image has data (width, height) we keep the data and width and height and only reset teh pixel values
         virtual void resetSoft() = 0;
-        virtual void read(armarx::aron::dataIO::ReaderInterface& r, bool skip_first_readStartDict = false) = 0;
+
+        /// Set members according to loaded data in ReaderInterface. If skip_first_readStartDict is true, we skip the first call of r.readStartDict() (It was already called outside. This is important for nested classes)
+        virtual void read(armarx::aron::dataIO::ReaderInterface& r, bool skip_first_readStartDict) = 0;
+
+        /// Set the data in WriterInterface to the values of this class. If a maybe type is null or false, this method calls w.writeNull().
         virtual void write(armarx::aron::dataIO::WriterInterface& w) const = 0;
     };
 }
diff --git a/source/RobotAPI/libraries/aron/core/codegenerator/codeWriter/cpp/serializer/Serializer.cpp b/source/RobotAPI/libraries/aron/core/codegenerator/codeWriter/cpp/serializer/Serializer.cpp
index 757995c47b71a196ae547cd1aae29127cb5ff58f..19220470403b00537971203580f336acb6105aa2 100644
--- a/source/RobotAPI/libraries/aron/core/codegenerator/codeWriter/cpp/serializer/Serializer.cpp
+++ b/source/RobotAPI/libraries/aron/core/codegenerator/codeWriter/cpp/serializer/Serializer.cpp
@@ -107,6 +107,7 @@ namespace armarx::aron::cppserializer
                     break;
                 }
                 case type::Maybe::eSharedPointer:
+                    [[fallthrough]];
                 case type::Maybe::eUniquePointer:
                 {
                     b->addLine("if (" + accessor + " != nullptr)");
@@ -172,6 +173,7 @@ namespace armarx::aron::cppserializer
                     break;
                 }
                 case type::Maybe::eSharedPointer:
+                    [[fallthrough]];
                 case type::Maybe::eUniquePointer:
                 {
                     auto s = FromAronTypeNaviagtorPtr(typenavigator);
@@ -203,43 +205,44 @@ namespace armarx::aron::cppserializer
             b->addLine("// Comparing two objects of type " + ExtractCppTypename(typenavigator));
         }
 
-        if (typenavigator->getMaybe() != type::Maybe::eNone)
+        switch (typenavigator->getMaybe())
         {
-            switch (typenavigator->getMaybe())
+            case type::Maybe::eNone:
             {
-                case type::Maybe::eOptional:
-                {
-                    b->addLine("if (" + accessor + ".has_value() and " + otherInstanceAccessor + ".has_value()) // both have a value set");
-                    b->addBlock(block_if_data);
-                    b->addLine("if ((" + accessor + ".has_value() and !" + otherInstanceAccessor + ".has_value()) or (!" + accessor + ".has_value() and " + otherInstanceAccessor + ".has_value())) // only one has a value set (XOR)");
-                    b->addLine("\t return false;");
-                    break;
-                }
-                case type::Maybe::eRawPointer:
-                {
-                    b->addLine("if (" + accessor + " != NULL and " + otherInstanceAccessor + " != NULL) // both have a value set");
-                    b->addBlock(block_if_data);
-                    b->addLine("if ((" + accessor + " != NULL and " + otherInstanceAccessor + " == NULL) or (" + accessor + " == NULL and " + otherInstanceAccessor + " != NULL)) // only one has a value set (XOR)");
-                    b->addLine("\t return false;");
-                    break;
-                }
-                case type::Maybe::eSharedPointer:
-                case type::Maybe::eUniquePointer:
-                {
-                    b->addLine("if (" + accessor + " != nullptr and " + otherInstanceAccessor + " != nullptr) // both have a value set");
-                    b->addBlock(block_if_data);
-                    b->addLine("if ((" + accessor + " != nullptr and " + otherInstanceAccessor + " == nullptr) or (" + accessor + " == nullptr and " + otherInstanceAccessor + " != nullptr)) // only one has a value set (XOR)");
-                    b->addLine("\t return false;");
-                    break;
-                }
-                default:
-                {
-                    throw error::MaybeNotValidException("Serializer", "ResolveMaybeEqualsBlock", "Unkown Maybe type (perhaps forgot to add in switch case?)", typenavigator->getMaybe(), typenavigator->getPath());
-                }
+                b->appendBlock(block_if_data);
+                break;
+            }
+            case type::Maybe::eOptional:
+            {
+                b->addLine("if (" + accessor + ".has_value() and " + otherInstanceAccessor + ".has_value()) // both have a value set");
+                b->addBlock(block_if_data);
+                b->addLine("if ((" + accessor + ".has_value() and !" + otherInstanceAccessor + ".has_value()) or (!" + accessor + ".has_value() and " + otherInstanceAccessor + ".has_value())) // only one has a value set (XOR)");
+                b->addLine("\t return false;");
+                break;
+            }
+            case type::Maybe::eRawPointer:
+            {
+                b->addLine("if (" + accessor + " != NULL and " + otherInstanceAccessor + " != NULL) // both have a value set");
+                b->addBlock(block_if_data);
+                b->addLine("if ((" + accessor + " != NULL and " + otherInstanceAccessor + " == NULL) or (" + accessor + " == NULL and " + otherInstanceAccessor + " != NULL)) // only one has a value set (XOR)");
+                b->addLine("\t return false;");
+                break;
+            }
+            case type::Maybe::eSharedPointer:
+                [[fallthrough]];
+            case type::Maybe::eUniquePointer:
+            {
+                b->addLine("if (" + accessor + " != nullptr and " + otherInstanceAccessor + " != nullptr) // both have a value set");
+                b->addBlock(block_if_data);
+                b->addLine("if ((" + accessor + " != nullptr and " + otherInstanceAccessor + " == nullptr) or (" + accessor + " == nullptr and " + otherInstanceAccessor + " != nullptr)) // only one has a value set (XOR)");
+                b->addLine("\t return false;");
+                break;
+            }
+            default:
+            {
+                throw error::MaybeNotValidException("Serializer", "ResolveMaybeEqualsBlock", "Unkown Maybe type (perhaps forgot to add in switch case?)", typenavigator->getMaybe(), typenavigator->getPath());
             }
-            return b;
         }
-        b->appendBlock(block_if_data);
         return b;
     }
 
@@ -256,37 +259,38 @@ namespace armarx::aron::cppserializer
             b->addLine("// Ressetting soft the type " + ExtractCppTypename(typenavigator));
         }
 
-        if (typenavigator->getMaybe() != type::Maybe::eNone)
+        switch (typenavigator->getMaybe())
         {
-            switch (typenavigator->getMaybe())
+            case type::Maybe::eNone:
             {
-                case type::Maybe::eOptional:
-                {
-                    b->addLine("if (" + accessor + ".has_value())");
-                    b->addBlock(block_if_data);
-                    break;
-                }
-                case type::Maybe::eRawPointer:
-                {
-                    b->addLine("if (" + accessor + " != NULL)");
-                    b->addBlock(block_if_data);
-                    break;
-                }
-                case type::Maybe::eSharedPointer:
-                case type::Maybe::eUniquePointer:
-                {
-                    b->addLine("if (" + accessor + " != nullptr)");
-                    b->addBlock(block_if_data);
-                    break;
-                }
-                default:
-                {
-                    throw error::MaybeNotValidException("Serializer", "ResolveMaybeResetSoftBlock", "Unkown Maybe type (perhaps forgot to add in switch case?)", typenavigator->getMaybe(), typenavigator->getPath());
-                }
+                b->appendBlock(block_if_data);
+                break;
+            }
+            case type::Maybe::eOptional:
+            {
+                b->addLine("if (" + accessor + ".has_value())");
+                b->addBlock(block_if_data);
+                break;
+            }
+            case type::Maybe::eRawPointer:
+            {
+                b->addLine("if (" + accessor + " != NULL)");
+                b->addBlock(block_if_data);
+                break;
+            }
+            case type::Maybe::eSharedPointer:
+                [[fallthrough]];
+            case type::Maybe::eUniquePointer:
+            {
+                b->addLine("if (" + accessor + " != nullptr)");
+                b->addBlock(block_if_data);
+                break;
+            }
+            default:
+            {
+                throw error::MaybeNotValidException("Serializer", "ResolveMaybeResetSoftBlock", "Unkown Maybe type (perhaps forgot to add in switch case?)", typenavigator->getMaybe(), typenavigator->getPath());
             }
-            return b;
         }
-        b->appendBlock(block_if_data);
         return b;
     }
 
@@ -302,26 +306,29 @@ namespace armarx::aron::cppserializer
             b->addLine("// Ressetting hard the type " + ExtractCppTypename(typenavigator));
         }
 
-        if (typenavigator->getMaybe() != type::Maybe::eNone)
+        switch (typenavigator->getMaybe())
         {
-            switch (typenavigator->getMaybe())
+            case type::Maybe::eNone:
             {
-                case type::Maybe::eOptional:
-                case type::Maybe::eRawPointer:
-                case type::Maybe::eSharedPointer:
-                case type::Maybe::eUniquePointer:
-                {
-                    b->addLine(accessor + " = {};");
-                    break;
-                }
-                default:
-                {
-                    throw error::MaybeNotValidException("Serializer", "ResolveMaybeResetSoftBlock", "Unkown Maybe type (perhaps forgot to add in switch case?)", typenavigator->getMaybe(), typenavigator->getPath());
-                }
+                b->appendBlock(block_if_data);
+                break;
+            }
+            case type::Maybe::eOptional:
+                [[fallthrough]];
+            case type::Maybe::eRawPointer:
+                [[fallthrough]];
+            case type::Maybe::eSharedPointer:
+                [[fallthrough]];
+            case type::Maybe::eUniquePointer:
+            {
+                b->addLine(accessor + " = {};");
+                break;
+            }
+            default:
+            {
+                throw error::MaybeNotValidException("Serializer", "ResolveMaybeResetSoftBlock", "Unkown Maybe type (perhaps forgot to add in switch case?)", typenavigator->getMaybe(), typenavigator->getPath());
             }
-            return b;
         }
-        b->appendBlock(block_if_data);
         return b;
     }
 
diff --git a/source/RobotAPI/libraries/aron/core/codegenerator/typeReader/xml/ReaderFactory.cpp b/source/RobotAPI/libraries/aron/core/codegenerator/typeReader/xml/ReaderFactory.cpp
index 2a7310d54b70df64d2b5a4cb69a0797c4350d353..6bc140e98a8d8ae555490e9c2b07b3360ac176cc 100644
--- a/source/RobotAPI/libraries/aron/core/codegenerator/typeReader/xml/ReaderFactory.cpp
+++ b/source/RobotAPI/libraries/aron/core/codegenerator/typeReader/xml/ReaderFactory.cpp
@@ -297,8 +297,8 @@ namespace armarx::aron::xmltypereader
         Data::EnforceTagName(node, Data::GENERATE_EIGEN_MATRIX_MEMBER_TAG);
         Data::EnforceAttribute(node, Data::TYPE_ATTRIBUTE_NAME);
 
-        int rows = std::stoi(Data::GetAttributeWithDefault(node, Data::ROWS_ATTRIBUTE_NAME, "4"));
-        int cols = std::stoi(Data::GetAttributeWithDefault(node, Data::COLS_ATTRIBUTE_NAME, "4"));
+        const int rows = std::stoi(Data::GetAttributeWithDefault(node, Data::ROWS_ATTRIBUTE_NAME, "4"));
+        const int cols = std::stoi(Data::GetAttributeWithDefault(node, Data::COLS_ATTRIBUTE_NAME, "4"));
         std::string type = node.attribute_value(Data::TYPE_ATTRIBUTE_NAME);
 
         typenavigator::EigenMatrixNavigatorPtr complex(new typenavigator::EigenMatrixNavigator(path));