diff --git a/dev/js/src/menu.js b/dev/js/src/menu.js
index 86a8105..794d517 100644
--- a/dev/js/src/menu.js
+++ b/dev/js/src/menu.js
@@ -972,24 +972,6 @@
         item.element(),
         e.children[this._notItemElements]
       );
-    },
-
-    /**
-     * A Method for generating an array of nodes, that are direct descendants of the menus
-     * element node, using a tag tagName as a parameter. Supposed to be used by the specification only.
-     * @param {String} tagName The tag the children are looked for by
-     * @returns An array of children nodes with tag tagName
-     */
-    directElementChildrenByTagName : function (tagName) {
-      const tagElementsCollection=this._el.getElementsByTagName(tagName);
-      //var tagElements = Array.from(tagElementsCollection);
-      //var tagElements = [...tagElementsCollection];
-      //This one has the best compatability:
-      var tagElements = Array.prototype.slice.call(tagElementsCollection);
-      const t = this;
-      //filter by actually being direct child node
-      tagElements = tagElements.filter(element => element.parentNode === t._el);
-      return tagElements;
     }
   };
 });
diff --git a/dev/js/src/util.js b/dev/js/src/util.js
index c13ba3d..42edf44 100644
--- a/dev/js/src/util.js
+++ b/dev/js/src/util.js
@@ -166,3 +166,39 @@
 
   return KorAP;
 });
+
+/**
+ * A Method for generating an array of nodes, that are direct descendants of the passed
+ * element node, using a tag tagName as a parameter. Supposed to be used by the specification only.
+ * @param {HTMLNode} element The HTMLNode / element object whose children we are fetching
+ * @param {String} tagName The tag the children are looked for by
+ * @returns An array of children nodes with tag tagName
+ */
+function directElementChildrenByTagName (element, tagName) {
+  const tagElementsCollection=element.getElementsByTagName(tagName);
+  //var tagElements = Array.from(tagElementsCollection);
+  //var tagElements = [...tagElementsCollection];
+  //This one has the best compatability:
+  var tagElements = Array.prototype.slice.call(tagElementsCollection);
+  //filter by actually being direct child node
+  tagElements = tagElements.filter(subElement => subElement.parentNode === element);
+  return tagElements;
+};
+
+/**
+ * A Method for generating an array of nodes, that are direct descendants of the passed
+ * element node, using a class className as a parameter. Supposed to be used by the specification only.
+ * @param {HTMLNode} element The HTMLNode / element object whose children we are fetching
+ * @param {String} className The class the children are looked for by
+ * @returns An array of children nodes with class className
+ */
+ function directElementChildrenByClassName (element, className) {
+  const classElementsCollection=element.getElementsByTagName(className);
+  //var classElements = Array.from(classElementsCollection);
+  //var classElements = [...classElementsCollection];
+  //This one has the best compatability:
+  var classElements = Array.prototype.slice.call(classElementsCollection);
+  //filter by actually being direct child node
+  classElements = classElements.filter(subElement => subElement.parentNode === element);
+  return classElements;
+};
\ No newline at end of file
