diff --git a/Makefile.am b/Makefile.am
index e392086..a0d5d10 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,7 +22,8 @@
 	bmc_state_manager_main.cpp
 
 phosphor_discover_system_state_SOURCES = \
-	discover_system_state.cpp
+	discover_system_state.cpp \
+	settings.cpp
 
 phosphor_host_check_SOURCES = \
 	host_check_main.cpp
diff --git a/discover_system_state.cpp b/discover_system_state.cpp
index 3989b3f..c055f9f 100644
--- a/discover_system_state.cpp
+++ b/discover_system_state.cpp
@@ -5,8 +5,12 @@
 #include <systemd/sd-bus.h>
 #include <sdbusplus/server.hpp>
 #include <phosphor-logging/log.hpp>
+#include <phosphor-logging/elog-errors.hpp>
 #include "chassis_state_manager.hpp"
 #include "host_state_manager.hpp"
+#include "settings.hpp"
+#include "xyz/openbmc_project/Common/error.hpp"
+#include "xyz/openbmc_project/Control/Power/RestorePolicy/server.hpp"
 
 namespace phosphor
 {
@@ -16,6 +20,8 @@
 {
 
 using namespace phosphor::logging;
+using namespace sdbusplus::xyz::openbmc_project::Common::Error;
+using namespace sdbusplus::xyz::openbmc_project::Control::Power::server;
 
 constexpr auto MAPPER_BUSNAME = "xyz.openbmc_project.ObjectMapper";
 constexpr auto MAPPER_PATH = "/xyz/openbmc_project/object_mapper";
@@ -25,9 +31,6 @@
 
 constexpr auto HOST_PATH = "/xyz/openbmc_project/state/host0";
 
-constexpr auto SETTINGS_PATH = "/org/openbmc/settings/host0";
-constexpr auto SETTINGS_INTERFACE = "org.openbmc.settings.Host";
-
 constexpr auto CHASSIS_PATH = "/xyz/openbmc_project/state/chassis0";
 
 std::string getService(sdbusplus::bus::bus& bus, std::string path,
@@ -118,8 +121,13 @@
 
 int main()
 {
+    using namespace phosphor::logging;
+
     auto bus = sdbusplus::bus::new_default();
 
+    using namespace settings;
+    Objects settings(bus);
+
     using namespace phosphor::state::manager;
     namespace server = sdbusplus::xyz::openbmc_project::State::server;
 
@@ -129,14 +137,30 @@
 
     if(currentPowerState == convertForMessage(server::Chassis::PowerState::Off))
     {
-        std::string power_policy = getProperty(bus, SETTINGS_PATH,
-                                               SETTINGS_INTERFACE,
-                                               "power_policy");
+        auto method =
+            bus.new_method_call(
+                    settings.service(settings.powerRestorePolicy,
+                        powerRestoreIntf).c_str(),
+                    settings.powerRestorePolicy.c_str(),
+                    "org.freedesktop.DBus.Properties",
+                    "Get");
+        method.append(powerRestoreIntf, "PowerRestorePolicy");
+        auto reply = bus.call(method);
+        if (reply.is_method_error())
+        {
+            log<level::ERR>("Error in PowerRestorePolicy Get");
+            elog<InternalFailure>();
+        }
+
+        sdbusplus::message::variant<std::string> result;
+        reply.read(result);
+        auto powerPolicy = result.get<std::string>();
 
         log<level::INFO>("Host power is off, checking power policy",
-                         entry("POWER_POLICY=%s", power_policy.c_str()));
+                         entry("POWER_POLICY=%s", powerPolicy.c_str()));
 
-        if (power_policy == "ALWAYS_POWER_ON")
+        if (RestorePolicy::Policy::AlwaysOn ==
+            RestorePolicy::convertPolicyFromString(powerPolicy))
         {
             log<level::INFO>("power_policy=ALWAYS_POWER_ON, powering host on");
             setProperty(bus, HOST_PATH, HOST_BUSNAME,
diff --git a/host_state_manager.cpp b/host_state_manager.cpp
index 54321d2..6e2fd22 100644
--- a/host_state_manager.cpp
+++ b/host_state_manager.cpp
@@ -4,8 +4,10 @@
 #include <systemd/sd-bus.h>
 #include <sdbusplus/server.hpp>
 #include <phosphor-logging/log.hpp>
+#include <phosphor-logging/elog-errors.hpp>
 #include <experimental/filesystem>
 #include <xyz/openbmc_project/Control/Power/RestorePolicy/server.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
 #include "host_state_manager.hpp"
 #include "host_state_serialize.hpp"
 #include "config.h"
@@ -57,11 +59,6 @@
 constexpr auto SYSTEMD_PROPERTY_IFACE = "org.freedesktop.DBus.Properties";
 constexpr auto SYSTEMD_INTERFACE_UNIT = "org.freedesktop.systemd1.Unit";
 
-constexpr auto SETTINGS_INTERFACE =
-               "xyz.openbmc_project.Control.Power.RestorePolicy";
-constexpr auto SETTINGS_SERVICE_ROOT = "/";
-constexpr auto SETTINGS_HOST_STATE_RESTORE = "PowerRestorePolicy";
-
 // TODO openbmc/openbmc#1646 - boot count needs to be defined in 1 place
 constexpr auto DEFAULT_BOOTCOUNT = 3;
 
@@ -116,58 +113,32 @@
 
 bool Host::getStateRestoreSetting() const
 {
-    using namespace phosphor::logging;
-    auto depth = 0;
-    auto mapperCall = bus.new_method_call(MAPPER_BUSNAME,
-                                          MAPPER_PATH,
-                                          MAPPER_INTERFACE,
-                                          "GetSubTree");
-    mapperCall.append(SETTINGS_SERVICE_ROOT);
-    mapperCall.append(depth);
-    mapperCall.append(std::vector<std::string>({SETTINGS_INTERFACE}));
+    using namespace settings;
+    using namespace sdbusplus::xyz::openbmc_project::Common::Error;
+    using namespace sdbusplus::xyz::openbmc_project::Control::Power::server;
 
-    auto mapperResponseMsg = bus.call(mapperCall);
-    if (mapperResponseMsg.is_method_error())
+    auto method =
+        bus.new_method_call(
+                settings.service(settings.powerRestorePolicy,
+                    powerRestoreIntf).c_str(),
+                settings.powerRestorePolicy.c_str(),
+                "org.freedesktop.DBus.Properties",
+                "Get");
+
+    method.append(powerRestoreIntf, "PowerRestorePolicy");
+    auto reply = bus.call(method);
+    if (reply.is_method_error())
     {
-        log<level::ERR>("Error in mapper call");
-        return false;
-    }
-
-    using MapperResponseType = std::map<std::string,
-                               std::map<std::string, std::vector<std::string>>>;
-    MapperResponseType mapperResponse;
-    mapperResponseMsg.read(mapperResponse);
-    if (mapperResponse.empty())
-    {
-        log<level::ERR>("Invalid response from mapper");
-        return false;
-    }
-
-    auto& settingsPath = mapperResponse.begin()->first;
-    auto& service = mapperResponse.begin()->second.begin()->first;
-
-    auto cmdMsg  =  bus.new_method_call(service.c_str(),
-                                        settingsPath.c_str(),
-                                        SYSTEMD_PROPERTY_IFACE,
-                                        "Get");
-    cmdMsg.append(SETTINGS_INTERFACE);
-    cmdMsg.append(SETTINGS_HOST_STATE_RESTORE);
-
-    auto response = bus.call(cmdMsg);
-    if (response.is_method_error())
-    {
-        log<level::ERR>("Error in fetching host state restore settings");
-        return false;
+        log<level::ERR>("Error in PowerRestorePolicy Get");
+        elog<InternalFailure>();
     }
 
     sdbusplus::message::variant<std::string> result;
-    response.read(result);
+    reply.read(result);
+    auto powerPolicy = result.get<std::string>();
 
-    using RestorePolicy = sdbusplus::xyz::openbmc_project::Control::
-         Power::server::RestorePolicy;
-
-    if (RestorePolicy::convertPolicyFromString(result.get<std::string>()) ==
-        RestorePolicy::Policy::Restore)
+    if (RestorePolicy::Policy::Restore ==
+        RestorePolicy::convertPolicyFromString(powerPolicy))
     {
         return true;
     }
