diff --git a/src/PerformScan.cpp b/src/PerformScan.cpp
index a6fc794..51228b5 100644
--- a/src/PerformScan.cpp
+++ b/src/PerformScan.cpp
@@ -343,6 +343,27 @@
     return matchIt;
 }
 
+static void applyBindExposeAction(nlohmann::json& exposedObject,
+                                  nlohmann::json& expose,
+                                  const std::string& propertyName)
+{
+    if (boost::starts_with(propertyName, "Bind"))
+    {
+        std::string bind = propertyName.substr(sizeof("Bind") - 1);
+        exposedObject["Status"] = "okay";
+        expose[bind] = exposedObject;
+    }
+}
+
+static void applyDisableExposeAction(nlohmann::json& exposedObject,
+                                     const std::string& propertyName)
+{
+    if (propertyName == "DisableNode")
+    {
+        exposedObject["Status"] = "disabled";
+    }
+}
+
 void PerformScan::run()
 {
     boost::container::flat_set<std::string> dbusProbeInterfaces;
@@ -569,18 +590,10 @@
 
                                     matches.erase(*match);
 
-                                    if (isBind)
-                                    {
-                                        std::string bind = keyPair.key().substr(
-                                            sizeof("Bind") - 1);
-
-                                        exposedObject["Status"] = "okay";
-                                        expose[bind] = exposedObject;
-                                    }
-                                    else if (isDisable)
-                                    {
-                                        exposedObject["Status"] = "disabled";
-                                    }
+                                    applyBindExposeAction(exposedObject, expose,
+                                                          keyPair.key());
+                                    applyDisableExposeAction(exposedObject,
+                                                             keyPair.key());
                                 }
                             }
                             if (!matches.empty())
