diff --git a/src/entity_manager/entity_manager.cpp b/src/entity_manager/entity_manager.cpp
index 31e7ef4..ff9a5d5 100644
--- a/src/entity_manager/entity_manager.cpp
+++ b/src/entity_manager/entity_manager.cpp
@@ -86,6 +86,8 @@
         propertiesChangedCallback();
     });
     dbus_interface::tryIfaceInitialize(entityIface);
+
+    initFilters(configuration.probeInterfaces);
 }
 
 void EntityManager::postToDbus(const nlohmann::json& newConfiguration)
@@ -450,7 +452,7 @@
     loadOverlays(newConfiguration, io);
 
     boost::asio::post(io, [this]() {
-        if (!configuration::writeJsonFiles(systemConfiguration))
+        if (!writeJsonFiles(systemConfiguration))
         {
             std::cerr << "Error writing json files\n";
         }
@@ -498,16 +500,8 @@
             auto missingConfigurations = std::make_shared<nlohmann::json>();
             *missingConfigurations = systemConfiguration;
 
-            std::list<nlohmann::json> configurations;
-            if (!configuration::loadConfigurations(configurations))
-            {
-                std::cerr << "Could not load configurations\n";
-                propertiesChangedInProgress = false;
-                return;
-            }
-
             auto perfScan = std::make_shared<scan::PerformScan>(
-                *this, *missingConfigurations, configurations, io,
+                *this, *missingConfigurations, configuration.configurations, io,
                 [this, count, oldConfiguration, missingConfigurations]() {
                     // this is something that since ac has been applied to the
                     // bmc we saw, and we no longer see it
@@ -517,11 +511,9 @@
                     {
                         pruneConfiguration(powerOff, name, device);
                     }
-
                     nlohmann::json newConfiguration = systemConfiguration;
 
-                    configuration::deriveNewConfiguration(oldConfiguration,
-                                                          newConfiguration);
+                    deriveNewConfiguration(oldConfiguration, newConfiguration);
 
                     for (const auto& [_, device] : newConfiguration.items())
                     {
@@ -542,7 +534,8 @@
 
 // Check if InterfacesAdded payload contains an iface that needs probing.
 static bool iaContainsProbeInterface(
-    sdbusplus::message_t& msg, const std::set<std::string>& probeInterfaces)
+    sdbusplus::message_t& msg,
+    const std::unordered_set<std::string>& probeInterfaces)
 {
     sdbusplus::message::object_path path;
     DBusObject interfaces;
@@ -564,7 +557,8 @@
 
 // Check if InterfacesRemoved payload contains an iface that needs probing.
 static bool irContainsProbeInterface(
-    sdbusplus::message_t& msg, const std::set<std::string>& probeInterfaces)
+    sdbusplus::message_t& msg,
+    const std::unordered_set<std::string>& probeInterfaces)
 {
     sdbusplus::message::object_path path;
     std::set<std::string> interfaces;
@@ -582,15 +576,13 @@
 {
     if (em_utils::fwVersionIsSame())
     {
-        if (std::filesystem::is_regular_file(
-                configuration::currentConfiguration))
+        if (std::filesystem::is_regular_file(currentConfiguration))
         {
             // this file could just be deleted, but it's nice for debug
             std::filesystem::create_directory(tempConfigDir);
             std::filesystem::remove(lastConfiguration);
-            std::filesystem::copy(configuration::currentConfiguration,
-                                  lastConfiguration);
-            std::filesystem::remove(configuration::currentConfiguration);
+            std::filesystem::copy(currentConfiguration, lastConfiguration);
+            std::filesystem::remove(currentConfiguration);
 
             std::ifstream jsonStream(lastConfiguration);
             if (jsonStream.good())
@@ -616,7 +608,7 @@
     {
         // not an error, just logging at this level to make it in the journal
         std::cerr << "Clearing previous configuration\n";
-        std::filesystem::remove(configuration::currentConfiguration);
+        std::filesystem::remove(currentConfiguration);
     }
 }
 
@@ -644,7 +636,8 @@
 // org.freedesktop.DBus.Properties signals.  Similarly if a process exits
 // for any reason, expected or otherwise, we'll need a poke to remove
 // entities from DBus.
-void EntityManager::initFilters(const std::set<std::string>& probeInterfaces)
+void EntityManager::initFilters(
+    const std::unordered_set<std::string>& probeInterfaces)
 {
     nameOwnerChangedMatch = std::make_unique<sdbusplus::bus::match_t>(
         static_cast<sdbusplus::bus_t&>(*systemBus),
@@ -694,10 +687,6 @@
 
     nlohmann::json systemConfiguration = nlohmann::json::object();
 
-    std::set<std::string> probeInterfaces = configuration::getProbeInterfaces();
-
-    em.initFilters(probeInterfaces);
-
     boost::asio::post(io, [&]() { em.propertiesChangedCallback(); });
 
     em.handleCurrentConfigurationJson();
