diff --git a/chassis_state_manager.cpp b/chassis_state_manager.cpp
index 13abbb9..e1a2e0f 100644
--- a/chassis_state_manager.cpp
+++ b/chassis_state_manager.cpp
@@ -149,23 +149,15 @@
 
 }
 
-int Chassis::sysStateChangeSignal(sd_bus_message *msg, void *userData,
-                                  sd_bus_error *retError)
-{
-    return static_cast<Chassis*>(userData)->sysStateChange(msg, retError);
-}
-
-int Chassis::sysStateChange(sd_bus_message* msg,
-                            sd_bus_error* retError)
+int Chassis::sysStateChange(sdbusplus::message::message& msg)
 {
     uint32_t newStateID {};
     sdbusplus::message::object_path newStateObjPath;
     std::string newStateUnit{};
     std::string newStateResult{};
 
-    auto sdPlusMsg = sdbusplus::message::message(msg);
     //Read the msg and populate each variable
-    sdPlusMsg.read(newStateID, newStateObjPath, newStateUnit, newStateResult);
+    msg.read(newStateID, newStateObjPath, newStateUnit, newStateResult);
 
     if((newStateUnit == CHASSIS_STATE_POWEROFF_TGT) &&
        (newStateResult == "done") &&
diff --git a/chassis_state_manager.hpp b/chassis_state_manager.hpp
index 0c6d5a1..132e30e 100644
--- a/chassis_state_manager.hpp
+++ b/chassis_state_manager.hpp
@@ -1,5 +1,6 @@
 #pragma once
 
+#include <functional>
 #include <sdbusplus/bus.hpp>
 #include "xyz/openbmc_project/State/Chassis/server.hpp"
 
@@ -10,13 +11,16 @@
 namespace manager
 {
 
+using ChassisInherit = sdbusplus::server::object::object<
+        sdbusplus::xyz::openbmc_project::State::server::Chassis>;
+namespace sdbusRule = sdbusplus::bus::match::rules;
+
 /** @class Chassis
  *  @brief OpenBMC chassis state management implementation.
  *  @details A concrete implementation for xyz.openbmc_project.State.Chassis
  *  DBus API.
  */
-class Chassis : public sdbusplus::server::object::object<
-                sdbusplus::xyz::openbmc_project::State::server::Chassis>
+class Chassis : public ChassisInherit
 {
     public:
         /** @brief Constructs Chassis State Manager
@@ -32,17 +36,16 @@
         Chassis(sdbusplus::bus::bus& bus,
                 const char* busName,
                 const char* objPath) :
-                sdbusplus::server::object::object<
-                    sdbusplus::xyz::openbmc_project::State::server::Chassis>(
-                            bus, objPath, true),
+                ChassisInherit(bus, objPath, true),
                 bus(bus),
                 systemdSignals(bus,
-                               "type='signal',"
-                               "member='JobRemoved',"
-                               "path='/org/freedesktop/systemd1',"
-                               "interface='org.freedesktop.systemd1.Manager'",
-                                sysStateChangeSignal,
-                                this)
+                               sdbusRule::type::signal() +
+                               sdbusRule::member("JobRemoved") +
+                               sdbusRule::path("/org/freedesktop/systemd1") +
+                               sdbusRule::interface(
+                                    "org.freedesktop.systemd1.Manager"),
+                               std::bind(std::mem_fn(&Chassis::sysStateChange),
+                                         this, std::placeholders::_1))
         {
             subscribeToSystemdSignals();
 
@@ -92,36 +95,21 @@
          **/
         bool stateActive(const std::string& target);
 
-        /** @brief Callback function on systemd state changes
-         *
-         * Will just do a call into the appropriate object for processing
-         *
-         * @param[in]  msg       - Data associated with subscribed signal
-         * @param[in]  userData  - Pointer to this object instance
-         * @param[out] retError  - Not used but required with signal API
-         *
-         */
-        static int sysStateChangeSignal(sd_bus_message* msg,
-                                        void* userData,
-                                        sd_bus_error* retError);
-
         /** @brief Check if systemd state change is relevant to this object
          *
          * Instance specific interface to handle the detected systemd state
          * change
          *
          * @param[in]  msg       - Data associated with subscribed signal
-         * @param[out] retError  - Not used but required with signal API
          *
          */
-        int sysStateChange(sd_bus_message* msg,
-                           sd_bus_error* retError);
+        int sysStateChange(sdbusplus::message::message& msg);
 
         /** @brief Persistent sdbusplus DBus connection. */
         sdbusplus::bus::bus& bus;
 
         /** @brief Used to subscribe to dbus systemd signals **/
-        sdbusplus::server::match::match systemdSignals;
+        sdbusplus::bus::match_t systemdSignals;
 };
 
 } // namespace manager
