diff --git a/procedures/query/applyPOV.sql b/procedures/query/applyPOV.sql
index d1d846784a5861237ef710fe90c40f42ef9c6d11..0dce57f3c7afe0b7e0b7aee836c7848680962e4e 100644
--- a/procedures/query/applyPOV.sql
+++ b/procedures/query/applyPOV.sql
@@ -34,13 +34,16 @@ DELIMITER //
  * ----------
  *
  * versioned : boolean
- *   If True, sourceSet and targetSet have an _iversion column, otherwise that column will be
-*    ignored (or only HEAD will be inserted into targetSet).
+ * If True, sourceSet and targetSet have an _iversion column, otherwise that column will be ignored
+ * (or only HEAD will be inserted into targetSet).
+
+
+ TODO description of sourceSet and targetSet is insufficient!
  */
 CREATE PROCEDURE db_5_0.applyPOV(in sourceSet VARCHAR(255), /* (?) Name of the table that the POV will be applied to. This can be a temporary table. */
                                  in targetSet VARCHAR(255), /* (?) Name of the result table of this POV. */
                                  in propertiesTable VARCHAR(255),
-                                 in refIdsTable VARCHAR(255),
+                                 in refIdsTable VARCHAR(255), /* (?) Name of a tmp table that contains all ids of children of the value interpreted as entity */
                                  in o CHAR(4), /* The operator for this operation. can be one of:
                                                     0   check for "equals NULL"
                                                     !0  check for "not NULL"
@@ -81,6 +84,10 @@ POV_LABEL: BEGIN
     DECLARE keepTabl VARCHAR(255) DEFAULT NULL;
     DECLARE existence_op VARCHAR(255) DEFAULT "EXISTS";
 
+        #-- ######### HINT ##############
+        #-- first the appropriate statement is created which in the end prepared and executed
+        #-- #############################
+
     IF o = '->' THEN
         #-- special case: pure reference property
         call applyRefPOV(sourceSet,targetSet, propertiesTable, refIdsTable, versioned);
@@ -229,6 +236,8 @@ POV_LABEL: BEGIN
             IF o = "!=" AND refIdsTable IS NOT NULL THEN
                 SET existence_op = "NOT EXISTS";
             END IF;
+			/* select all entities that reference the entity or a child of the
+			 * value interpreted as ID*/
             SET sRefData = IF(vText IS NULL,
                 ' UNION ALL SELECT DISTINCT domain_id, entity_id, property_id FROM `reference_data`',
                 IF(refIdsTable IS NULL,
@@ -243,6 +252,7 @@ POV_LABEL: BEGIN
 
     END IF;
 
+    #-- create array of statement parts (and replace null with empty string) (?)
     SET data = CONCAT('(',sTextData,
                 IF(sNameData IS NULL, '', sNameData),
                 IF(sEnumData IS NULL, '', sEnumData),
@@ -259,6 +269,7 @@ POV_LABEL: BEGIN
     call createTmpTable(keepTabl, versioned);
     IF versioned THEN
         #-- generate statement from statement parts
+        #--  (versioned section)
         SET @stmtPOVkeepTblStr = CONCAT(
             'INSERT IGNORE INTO `', keepTabl, '` (id, _iversion) SELECT entity_id AS id, _iversion FROM ', data,
             ' as data', IF(propertiesTable IS NULL, '', CONCAT(
@@ -299,7 +310,14 @@ POV_LABEL: BEGIN
         DEALLOCATE PREPARE stmtPOVkeepTbl;
     ELSE
         #-- generate statement from statement parts
-        SET @stmtPOVkeepTblStr = CONCAT('INSERT IGNORE INTO `', keepTabl, '` (id) SELECT DISTINCT entity_id AS id FROM ', data, ' as data', IF(propertiesTable IS NULL, '', CONCAT(' WHERE EXISTS (Select 1 from `', propertiesTable, '` AS prop WHERE prop.id = data.property_id AND (prop.id2=data.entity_id OR prop.id2=0))')));
+        SET @stmtPOVkeepTblStr = CONCAT(
+            'INSERT IGNORE INTO `', keepTabl,
+            '` (id) SELECT DISTINCT entity_id AS id FROM ', data, ' as data',
+            IF(propertiesTable IS NULL, '',
+                CONCAT(' WHERE EXISTS (Select 1 from `', propertiesTable,
+                        '` AS prop WHERE prop.id = data.property_id AND
+                        (prop.id2=data.entity_id OR prop.id2=0))')));
+        #--  (unversioned section)
 
         SET @stmtPOVStr = CONCAT(
                 IF(targetSet IS NULL,
diff --git a/procedures/query/initPOV.sql b/procedures/query/initPOV.sql
index 31347ba9a7f2cde33e619e50e7721875232b8628..377bc98c23d1bd9df1bd95bcbd7842c112fe7d3e 100644
--- a/procedures/query/initPOV.sql
+++ b/procedures/query/initPOV.sql
@@ -61,6 +61,7 @@ BEGIN
         call createTmpTable2(propertiesTable);
 
         -- fill in all properties named "PropertyName"
+		-- what are overwrites needed for?
         SET @initPOVPropertiesTableStmt1 = CONCAT('INSERT IGNORE INTO `', propertiesTable, '` (id, id2, domain) SELECT property_id, entity_id, domain_id from name_overrides WHERE name = ? UNION ALL SELECT entity_id, domain_id, 0 FROM name_data WHERE value = ?;');
         PREPARE stmt FROM @initPOVPropertiesTableStmt1;
         SET @PropertyName = PropertyName;
diff --git a/procedures/query/initSubEntity.sql b/procedures/query/initSubEntity.sql
index c60ddb61df7370f52ae8218720ad69c5d2bf5023..67484d092a3401cc830768a3e5c1d48374ae8d3a 100644
--- a/procedures/query/initSubEntity.sql
+++ b/procedures/query/initSubEntity.sql
@@ -24,6 +24,13 @@
 DROP PROCEDURE IF EXISTS db_5_0.initSubEntity;
 
 DELIMITER //
+/*
+* This procedures composes a table with the ids of all entities with the given
+ * name and all their children (!!)
+* and if provided adds the supplied entity id.
+* 
+* The table name has to be provided.
+*/
 
 /*
  * Initialize a new temporary table by loading an entity and all of its children
@@ -45,6 +52,7 @@ BEGIN
     DECLARE ecount INT DEFAULT 0;
     DECLARE op VARCHAR(255) DEFAULT '=';
 
+
     IF LOCATE("%", ename) > 0 THEN
         SET op = "LIKE";
     END IF;