diff --git a/BaseLib/ConfigTreeNew.cpp b/BaseLib/ConfigTreeNew.cpp
index fffbdad9efb027875a1ab8e962983aea1df92205..a15409eb8bff8749dc4e339906b079adc6df21d2 100644
--- a/BaseLib/ConfigTreeNew.cpp
+++ b/BaseLib/ConfigTreeNew.cpp
@@ -350,7 +350,7 @@ ConfigTreeNew::checkAndInvalidate()
         auto const& tag   = p.first.second;
         auto const& count = p.second.count;
 
-        if (p.first.first) { // tag
+        if (p.first.first) { // XML attribute
             if (count > 0) {
                 warning("XML attribute \"" + tag + "\" has been read " + std::to_string(count)
                         + " time(s) more than it was present in the configuration tree.");
@@ -358,7 +358,7 @@ ConfigTreeNew::checkAndInvalidate()
                 warning("XML attribute \"" + tag + "\" has been read " + std::to_string(-count)
                         + " time(s) less than it was present in the configuration tree.");
             }
-        } else { // XML attribute
+        } else { // tag
             if (count > 0) {
                 warning("Key <" + tag + "> has been read " + std::to_string(count)
                         + " time(s) more than it was present in the configuration tree.");
diff --git a/BaseLib/ConfigTreeNew.h b/BaseLib/ConfigTreeNew.h
index 61c85c70bc6615412b3cd924401220c4d639717e..dab5e2a33f05d7c9d32e7c420dad8fc456663cfc 100644
--- a/BaseLib/ConfigTreeNew.h
+++ b/BaseLib/ConfigTreeNew.h
@@ -220,11 +220,16 @@ public:
         ConfigTreeNew const& _parent;
     };
 
+    //! The tree being wrapped by this class.
     using PTree = boost::property_tree::ptree;
 
-    //! Type of the function objects used as callbacks.
-    //! The first argument denotes the path in the tree at which an event (warning/error)
-    //! occured, the second argument is the associated message
+    /*! Type of the function objects used as callbacks.
+     *
+     * Arguments of the callback:
+     * \arg \c filename the file being from which this ConfigTree has been read.
+     * \arg \c path     the path in the tree where the message was generated.
+     * \arg \c message  the message to be printed.
+     */
     using Callback = std::function<void(const std::string& filename,
                                         const std::string& path,
                                         const std::string& message)>;
@@ -581,7 +586,8 @@ private:
     //! The path of the file from which this tree has been read.
     std::string _filename;
 
-    //! A pair (is attribute, tag/attribute name)
+    //! A pair (is attribute, tag/attribute name).
+    //! The first entry is true for an XML attribute and false for a tag.
     using KeyType = std::pair<bool, std::string>;
 
     //! A map KeyType -> (count, type) keeping track which parameters have been read