diff --git a/host-bmc/host_pdr_handler.cpp b/host-bmc/host_pdr_handler.cpp
index 2f65dd6..868e82d 100644
--- a/host-bmc/host_pdr_handler.cpp
+++ b/host-bmc/host_pdr_handler.cpp
@@ -90,13 +90,11 @@
     const std::string& eventsJsonsDir, pldm_entity_association_tree* entityTree,
     pldm_entity_association_tree* bmcEntityTree,
     pldm::InstanceIdDb& instanceIdDb,
-    pldm::requester::Handler<pldm::requester::Request>* handler,
-    pldm::responder::oem_platform::Handler* oemPlatformHandler) :
+    pldm::requester::Handler<pldm::requester::Request>* handler) :
     mctp_fd(mctp_fd),
     mctp_eid(mctp_eid), event(event), repo(repo),
     stateSensorHandler(eventsJsonsDir), entityTree(entityTree),
     bmcEntityTree(bmcEntityTree), instanceIdDb(instanceIdDb), handler(handler),
-    oemPlatformHandler(oemPlatformHandler),
     entityMaps(parseEntityMap(ENTITY_MAP_JSON))
 {
     mergedHostParents = false;
diff --git a/host-bmc/host_pdr_handler.hpp b/host-bmc/host_pdr_handler.hpp
index 0755a25..bc08c2d 100644
--- a/host-bmc/host_pdr_handler.hpp
+++ b/host-bmc/host_pdr_handler.hpp
@@ -95,8 +95,7 @@
         pldm_entity_association_tree* entityTree,
         pldm_entity_association_tree* bmcEntityTree,
         pldm::InstanceIdDb& instanceIdDb,
-        pldm::requester::Handler<pldm::requester::Request>* handler,
-        pldm::responder::oem_platform::Handler* oemPlatformHandler);
+        pldm::requester::Handler<pldm::requester::Request>* handler);
 
     /** @brief fetch PDRs from host firmware. See @class.
      *  @param[in] recordHandles - list of record handles pointing to host's
@@ -171,6 +170,16 @@
      */
     bool isHostUp();
 
+    /* @brief Method to set the oem platform handler in host pdr handler class
+     *
+     * @param[in] handler - oem platform handler
+     */
+    inline void
+        setOemPlatformHandler(pldm::responder::oem_platform::Handler* handler)
+    {
+        oemPlatformHandler = handler;
+    }
+
     /** @brief map that captures various terminus information **/
     TLPDRMap tlPDRInfo;
 
@@ -326,7 +335,7 @@
     std::vector<responder::pdr_utils::FruRecordDataFormat> fruRecordData;
 
     /** @OEM platform handler */
-    pldm::responder::oem_platform::Handler* oemPlatformHandler;
+    pldm::responder::oem_platform::Handler* oemPlatformHandler = nullptr;
 
     /** @brief entityID and entity name is only loaded once
      */
diff --git a/libpldmresponder/base.hpp b/libpldmresponder/base.hpp
index 7ccac27..ad41299 100644
--- a/libpldmresponder/base.hpp
+++ b/libpldmresponder/base.hpp
@@ -20,10 +20,7 @@
 class Handler : public CmdHandler
 {
   public:
-    Handler(sdeventplus::Event& event,
-            pldm::responder::oem_platform::Handler* oemPlatformHandler) :
-        event(event),
-        oemPlatformHandler(oemPlatformHandler)
+    Handler(sdeventplus::Event& event) : event(event)
     {
         handlers.emplace(
             PLDM_GET_PLDM_TYPES,
@@ -87,6 +84,16 @@
      */
     Response getTID(const pldm_msg* request, size_t payloadLength);
 
+    /* @brief Method to set the oem platform handler in base handler class
+     *
+     * @param[in] handler - oem platform handler
+     */
+    inline void
+        setOemPlatformHandler(pldm::responder::oem_platform::Handler* handler)
+    {
+        oemPlatformHandler = handler;
+    }
+
   private:
     /** @brief reference of main event loop of pldmd, primarily used to schedule
      *  work
@@ -94,7 +101,7 @@
     sdeventplus::Event& event;
 
     /** @brief OEM platform handler */
-    pldm::responder::oem_platform::Handler* oemPlatformHandler;
+    pldm::responder::oem_platform::Handler* oemPlatformHandler = nullptr;
 
     /** @brief sdeventplus event source */
     std::unique_ptr<sdeventplus::source::Defer> survEvent;
diff --git a/libpldmresponder/fru.hpp b/libpldmresponder/fru.hpp
index 40a1517..a0757e6 100644
--- a/libpldmresponder/fru.hpp
+++ b/libpldmresponder/fru.hpp
@@ -66,11 +66,9 @@
     FruImpl(const std::string& configPath,
             const std::filesystem::path& fruMasterJsonPath, pldm_pdr* pdrRepo,
             pldm_entity_association_tree* entityTree,
-            pldm_entity_association_tree* bmcEntityTree,
-            pldm::responder::oem_fru::Handler* oemFruHandler) :
+            pldm_entity_association_tree* bmcEntityTree) :
         parser(configPath, fruMasterJsonPath),
-        pdrRepo(pdrRepo), entityTree(entityTree), bmcEntityTree(bmcEntityTree),
-        oemFruHandler(oemFruHandler)
+        pdrRepo(pdrRepo), entityTree(entityTree), bmcEntityTree(bmcEntityTree)
     {}
 
     /** @brief Total length of the FRU table in bytes, this includes the pad
@@ -201,6 +199,15 @@
      */
     int setFRUTable(const std::vector<uint8_t>& fruData);
 
+    /* @brief Method to set the oem platform handler in fru handler class
+     *
+     * @param[in] handler - oem fru handler
+     */
+    inline void setOemFruHandler(pldm::responder::oem_fru::Handler* handler)
+    {
+        oemFruHandler = handler;
+    }
+
   private:
     uint16_t nextRSI()
     {
@@ -224,7 +231,7 @@
     pldm_pdr* pdrRepo;
     pldm_entity_association_tree* entityTree;
     pldm_entity_association_tree* bmcEntityTree;
-    pldm::responder::oem_fru::Handler* oemFruHandler;
+    pldm::responder::oem_fru::Handler* oemFruHandler = nullptr;
     dbus::ObjectValueTree objects;
 
     std::map<dbus::ObjectPath, pldm_entity_node*> objToEntityNode{};
@@ -255,10 +262,8 @@
     Handler(const std::string& configPath,
             const std::filesystem::path& fruMasterJsonPath, pldm_pdr* pdrRepo,
             pldm_entity_association_tree* entityTree,
-            pldm_entity_association_tree* bmcEntityTree,
-            pldm::responder::oem_fru::Handler* oemFruHandler) :
-        impl(configPath, fruMasterJsonPath, pdrRepo, entityTree, bmcEntityTree,
-             oemFruHandler)
+            pldm_entity_association_tree* bmcEntityTree) :
+        impl(configPath, fruMasterJsonPath, pdrRepo, entityTree, bmcEntityTree)
     {
         handlers.emplace(
             PLDM_GET_FRU_RECORD_TABLE_METADATA,
@@ -340,6 +345,15 @@
      */
     Response setFRURecordTable(const pldm_msg* request, size_t payloadLength);
 
+    /* @brief Method to set the oem platform handler in fru handler class
+     *
+     * @param[in] handler - oem fru handler
+     */
+    void setOemFruHandler(pldm::responder::oem_fru::Handler* handler)
+    {
+        impl.setOemFruHandler(handler);
+    }
+
     using Table = std::vector<uint8_t>;
 
   private:
diff --git a/libpldmresponder/platform.hpp b/libpldmresponder/platform.hpp
index 89eca61..b045d84 100644
--- a/libpldmresponder/platform.hpp
+++ b/libpldmresponder/platform.hpp
@@ -54,7 +54,6 @@
             pldm_pdr* repo, HostPDRHandler* hostPDRHandler,
             pldm::state_sensor::DbusToPLDMEvent* dbusToPLDMEventHandler,
             fru::Handler* fruHandler,
-            pldm::responder::oem_platform::Handler* oemPlatformHandler,
             pldm::responder::platform_config::Handler* platformConfigHandler,
             pldm::requester::Handler<pldm::requester::Request>* handler,
             sdeventplus::Event& event, bool buildPDRLazily = false,
@@ -63,10 +62,9 @@
         instanceIdDb(instanceIdDb), pdrRepo(repo),
         hostPDRHandler(hostPDRHandler),
         dbusToPLDMEventHandler(dbusToPLDMEventHandler), fruHandler(fruHandler),
-        dBusIntf(dBusIntf), oemPlatformHandler(oemPlatformHandler),
-        platformConfigHandler(platformConfigHandler), handler(handler),
-        event(event), pdrJsonDir(pdrJsonDir), pdrCreated(false),
-        pdrJsonsDir({pdrJsonDir})
+        dBusIntf(dBusIntf), platformConfigHandler(platformConfigHandler),
+        handler(handler), event(event), pdrJsonDir(pdrJsonDir),
+        pdrCreated(false), pdrJsonsDir({pdrJsonDir})
     {
         if (!buildPDRLazily)
         {
@@ -211,6 +209,16 @@
      */
     EventMap eventHandlers;
 
+    /* @brief Method to set the oem platform handler in platform handler class
+     *
+     * @param[in] handler - oem platform handler
+     */
+    inline void
+        setOemPlatformHandler(pldm::responder::oem_platform::Handler* handler)
+    {
+        oemPlatformHandler = handler;
+    }
+
     /** @brief Handler for GetPDR
      *
      *  @param[in] request - Request message payload
@@ -500,7 +508,7 @@
     pldm::state_sensor::DbusToPLDMEvent* dbusToPLDMEventHandler;
     fru::Handler* fruHandler;
     const pldm::utils::DBusHandler* dBusIntf;
-    pldm::responder::oem_platform::Handler* oemPlatformHandler;
+    pldm::responder::oem_platform::Handler* oemPlatformHandler = nullptr;
     pldm::responder::platform_config::Handler* platformConfigHandler;
     pldm::requester::Handler<pldm::requester::Request>* handler;
     sdeventplus::Event& event;
diff --git a/libpldmresponder/test/libpldmresponder_base_test.cpp b/libpldmresponder/test/libpldmresponder_base_test.cpp
index b1ca89d..0387209 100644
--- a/libpldmresponder/test/libpldmresponder_base_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_base_test.cpp
@@ -28,7 +28,7 @@
     auto request = reinterpret_cast<pldm_msg*>(requestPayload.data());
     // payload length will be 0 in this case
     size_t requestPayloadLength = 0;
-    base::Handler handler(event, nullptr);
+    base::Handler handler(event);
     auto response = handler.getPLDMTypes(request, requestPayloadLength);
     // Need to support OEM type.
     auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
@@ -45,7 +45,7 @@
         requestPayload{};
     auto request = reinterpret_cast<pldm_msg*>(requestPayload.data());
     size_t requestPayloadLength = requestPayload.size() - sizeof(pldm_msg_hdr);
-    base::Handler handler(event, nullptr);
+    base::Handler handler(event);
     auto response = handler.getPLDMCommands(request, requestPayloadLength);
     auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
     uint8_t* payload_ptr = responsePtr->payload;
@@ -62,7 +62,7 @@
 
     request->payload[0] = 0xFF;
     size_t requestPayloadLength = requestPayload.size() - sizeof(pldm_msg_hdr);
-    base::Handler handler(event, nullptr);
+    base::Handler handler(event);
     auto response = handler.getPLDMCommands(request, requestPayloadLength);
     auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
     uint8_t* payload_ptr = responsePtr->payload;
@@ -87,7 +87,7 @@
 
     ASSERT_EQ(0, rc);
 
-    base::Handler handler(event, nullptr);
+    base::Handler handler(event);
     auto response = handler.getPLDMVersion(request, requestPayloadLength);
     auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
 
@@ -118,7 +118,7 @@
 
     ASSERT_EQ(0, rc);
 
-    base::Handler handler(event, nullptr);
+    base::Handler handler(event);
     auto response = handler.getPLDMVersion(request, requestPayloadLength - 1);
     auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
 
@@ -143,7 +143,8 @@
     auto request = reinterpret_cast<pldm_msg*>(requestPayload.data());
     size_t requestPayloadLength = 0;
 
-    base::Handler handler(event, nullptr);
+    base::Handler handler(event);
+    handler.setOemPlatformHandler(nullptr);
     auto response = handler.getTID(request, requestPayloadLength);
 
     auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
diff --git a/libpldmresponder/test/libpldmresponder_fru_test.cpp b/libpldmresponder/test/libpldmresponder_fru_test.cpp
index 2d7b7ec..d654fca 100644
--- a/libpldmresponder/test/libpldmresponder_fru_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_fru_test.cpp
@@ -117,7 +117,7 @@
 
     pldm::responder::FruImpl mockedFruHandler(
         FRU_JSONS_DIR, "./fru_jsons/fru_master/fru_master.json", pdrRepo.get(),
-        entityTree.get(), bmcEntityTree.get(), nullptr);
+        entityTree.get(), bmcEntityTree.get());
 
     pldm_entity systemEntity{0x2d01, 1, 0};
     pldm_entity chassisEntity{0x2d, 1, 1};
@@ -170,7 +170,7 @@
     InterfaceMap iface = {{"xyz.openbmc_project.Inventory.Item.Chassis", {}}};
     pldm::responder::FruImpl mockedFruHandler(
         FRU_JSONS_DIR, "./fru_jsons/fru_master/fru_master.json", pdrRepo.get(),
-        entityTree.get(), bmcEntityTree.get(), nullptr);
+        entityTree.get(), bmcEntityTree.get());
 
     // Good path
     auto entityPtr = mockedFruHandler.getEntityByObjectPath(iface);
diff --git a/libpldmresponder/test/libpldmresponder_pdr_effecter_test.cpp b/libpldmresponder/test/libpldmresponder_pdr_effecter_test.cpp
index ce34434..6ef74b7 100644
--- a/libpldmresponder/test/libpldmresponder_pdr_effecter_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_pdr_effecter_test.cpp
@@ -32,7 +32,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_STATE_EFFECTER_PDR);
 
@@ -133,7 +133,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_NUMERIC_EFFECTER_PDR);
 
@@ -181,7 +181,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_STATE_EFFECTER_PDR);
 
@@ -204,7 +204,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     uint16_t entityType = 33;
     uint16_t entityInstance = 0;
     uint16_t containerId = 0;
diff --git a/libpldmresponder/test/libpldmresponder_pdr_sensor_test.cpp b/libpldmresponder/test/libpldmresponder_pdr_sensor_test.cpp
index 92da066..ae1ed3a 100644
--- a/libpldmresponder/test/libpldmresponder_pdr_sensor_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_pdr_sensor_test.cpp
@@ -36,7 +36,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_sensor/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     handler.getPDR(req, requestPayloadLength);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_STATE_SENSOR_PDR);
@@ -88,7 +88,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_sensor/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     handler.getPDR(req, requestPayloadLength);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_STATE_SENSOR_PDR);
diff --git a/libpldmresponder/test/libpldmresponder_platform_test.cpp b/libpldmresponder/test/libpldmresponder_platform_test.cpp
index 35da05a..63e26e2 100644
--- a/libpldmresponder/test/libpldmresponder_platform_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_platform_test.cpp
@@ -43,7 +43,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     pdrRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo repo(pdrRepo);
     ASSERT_EQ(repo.empty(), false);
     auto response = handler.getPDR(req, requestPayloadLength);
@@ -82,7 +82,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     pdrRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo repo(pdrRepo);
     ASSERT_EQ(repo.empty(), false);
     auto response = handler.getPDR(req, requestPayloadLength);
@@ -115,7 +115,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     pdrRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo repo(pdrRepo);
     ASSERT_EQ(repo.empty(), false);
     auto response = handler.getPDR(req, requestPayloadLength);
@@ -146,7 +146,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     pdrRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo repo(pdrRepo);
     ASSERT_EQ(repo.empty(), false);
     auto response = handler.getPDR(req, requestPayloadLength);
@@ -179,7 +179,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     pdrRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo repo(pdrRepo);
     ASSERT_EQ(repo.empty(), false);
     auto response = handler.getPDR(req, requestPayloadLength);
@@ -240,7 +240,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     handler.getPDR(req, requestPayloadLength);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_STATE_EFFECTER_PDR);
@@ -288,7 +288,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     handler.getPDR(req, requestPayloadLength);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_STATE_EFFECTER_PDR);
@@ -335,7 +335,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, numericEffecterPDRs, PLDM_NUMERIC_EFFECTER_PDR);
 
@@ -379,7 +379,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, numericEffecterPDRs, PLDM_NUMERIC_EFFECTER_PDR);
 
@@ -416,7 +416,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, numericEffecterPDRs, PLDM_NUMERIC_EFFECTER_PDR);
 
@@ -493,7 +493,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_effecter/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, numericEffecterPDRs, PLDM_NUMERIC_EFFECTER_PDR);
 
@@ -750,7 +750,7 @@
     MockdBusHandler mockedUtils;
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "", inPDRRepo, nullptr, nullptr,
-                    nullptr, nullptr, nullptr, nullptr, event);
+                    nullptr, nullptr, nullptr, event);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_TERMINUS_LOCATOR_PDR);
 
@@ -796,7 +796,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_sensor/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_STATE_SENSOR_PDR);
     pdr_utils::PdrEntry e;
@@ -846,7 +846,7 @@
     auto event = sdeventplus::Event::get_default();
     Handler handler(&mockedUtils, 0, nullptr, "./pdr_jsons/state_sensor/good",
                     inPDRRepo, nullptr, nullptr, nullptr, nullptr, nullptr,
-                    nullptr, event);
+                    event);
     Repo inRepo(inPDRRepo);
     getRepoByType(inRepo, outRepo, PLDM_STATE_SENSOR_PDR);
     pdr_utils::PdrEntry e;
diff --git a/pldmd/oem_ibm.hpp b/pldmd/oem_ibm.hpp
new file mode 100644
index 0000000..82f3699
--- /dev/null
+++ b/pldmd/oem_ibm.hpp
@@ -0,0 +1,182 @@
+#pragma once
+
+#include "libpldm/pdr.h"
+
+#include "../oem/ibm/libpldmresponder/file_io.hpp"
+#include "../oem/ibm/libpldmresponder/fru_oem_ibm.hpp"
+#include "../oem/ibm/libpldmresponder/oem_ibm_handler.hpp"
+#include "common/utils.hpp"
+#include "dbus_impl_requester.hpp"
+#include "host-bmc/dbus_to_event_handler.hpp"
+#include "invoker.hpp"
+#include "libpldmresponder/fru.hpp"
+#include "requester/request.hpp"
+
+namespace pldm
+{
+namespace oem_ibm
+{
+
+using namespace pldm::state_sensor;
+using namespace pldm::dbus_api;
+
+/**
+ * @class OemIBM
+ *
+ * @brief class for creating all the OEM IBM handlers
+ *
+ *  Only in case of OEM_IBM this class object will be instantiated
+ */
+class OemIBM
+{
+  public:
+    OemIBM() = delete;
+    OemIBM(const Pdr&) = delete;
+    OemIBM& operator=(const OemIBM&) = delete;
+    OemIBM(OemIBM&&) = delete;
+    OemIBM& operator=(OemIBM&&) = delete;
+
+  public:
+    /** Constructs OemIBM object
+     *
+     * @param[in] dBusIntf - D-Bus handler
+     * @param[in] mctp_fd - fd of MCTP communications socket
+     * @param[in] mctp_eid - MCTP EID of remote host firmware
+     * @param[in] repo - pointer to BMC's primary PDR repo
+     * @param[in] instanceIdDb - pointer to an InstanceIdDb object
+     * @param[in] event - sd_event handler
+     * @param[in] invoker - invoker handler
+     * @param[in] hostPDRHandler - hostPDRHandler handler
+     * @param[in] platformHandler - platformHandler handler
+     * @param[in] fruHandler - fruHandler handler
+     * @param[in] baseHandler - baseHandler handler
+     * @param[in] reqHandler - reqHandler handler
+     */
+    explicit OemIBM(
+        const pldm::utils::DBusHandler* dBusIntf, int mctp_fd, uint8_t mctp_eid,
+        pldm_pdr* repo, pldm::InstanceIdDb& instanceIdDb,
+        sdeventplus::Event& event, Invoker& invoker,
+        HostPDRHandler* hostPDRHandler, platform::Handler* platformHandler,
+        fru::Handler* fruHandler, base::Handler* baseHandler,
+        pldm::requester::Handler<pldm::requester::Request>* reqHandler) :
+        dBusIntf(dBusIntf),
+        mctp_fd(mctp_fd), mctp_eid(mctp_eid), repo(repo),
+        instanceIdDb(instanceIdDb), event(event), invoker(invoker),
+        reqHandler(reqHandler)
+    {
+        createOemFruHandler();
+        fruHandler->setOemFruHandler(oemFruHandler.get());
+
+        createOemIbmFruHandler();
+        oemIbmFruHandler->setIBMFruHandler(fruHandler);
+
+        createCodeUpdate();
+        createOemPlatformHandler();
+        codeUpdate->setOemPlatformHandler(oemPlatformHandler.get());
+        hostPDRHandler->setOemPlatformHandler(oemPlatformHandler.get());
+        platformHandler->setOemPlatformHandler(oemPlatformHandler.get());
+        baseHandler->setOemPlatformHandler(oemPlatformHandler.get());
+
+        createOemIbmPlatformHandler();
+        oemIbmPlatformHandler->setPlatformHandler(platformHandler);
+
+        registerHandler();
+    }
+
+  private:
+    /** @brief Method for creating codeUpdate handler */
+    void createCodeUpdate()
+    {
+        codeUpdate = std::make_unique<pldm::responder::CodeUpdate>(dBusIntf);
+        codeUpdate->clearDirPath(LID_STAGING_DIR);
+    }
+
+    /** @brief Method for creating oemPlatformHandler
+     *
+     *  This method also assigns the oemPlatformHandler to the below
+     *  different handlers.
+     */
+    void createOemPlatformHandler()
+    {
+        oemPlatformHandler = std::make_unique<oem_ibm_platform::Handler>(
+            dBusIntf, codeUpdate.get(), mctp_fd, mctp_eid, instanceIdDb, event,
+            reqHandler);
+    }
+
+    /** @brief Method for creating oemIbmPlatformHandler */
+    void createOemIbmPlatformHandler()
+    {
+        oemIbmPlatformHandler =
+            dynamic_cast<pldm::responder::oem_ibm_platform::Handler*>(
+                oemPlatformHandler.get());
+    }
+
+    /** @brief Method for creating oemFruHandler */
+    void createOemFruHandler()
+    {
+        oemFruHandler = std::make_unique<oem_ibm_fru::Handler>(repo);
+    }
+
+    /** @brief Method for creating oemIbmFruHandler */
+    void createOemIbmFruHandler()
+    {
+        oemIbmFruHandler = dynamic_cast<pldm::responder::oem_ibm_fru::Handler*>(
+            oemFruHandler.get());
+    }
+
+    /** @brief Method for registering PLDM OEM handler */
+    void registerHandler()
+    {
+        invoker.registerHandler(
+            PLDM_OEM, std::make_unique<pldm::responder::oem_ibm::Handler>(
+                          oemPlatformHandler.get(), mctp_fd, mctp_eid,
+                          &instanceIdDb, reqHandler));
+    }
+
+  private:
+    /** @brief D-Bus handler */
+    const pldm::utils::DBusHandler* dBusIntf;
+
+    /** @brief fd of MCTP communications socket */
+    int mctp_fd;
+
+    /** @brief MCTP EID of remote host firmware */
+    uint8_t mctp_eid;
+
+    /** @brief pointer to BMC's primary PDR repo */
+    pldm_pdr* repo;
+
+    /** @brief reference to an Instance ID database object, used to obtain PLDM
+     * instance IDs
+     */
+    pldm::InstanceIdDb& instanceIdDb;
+
+    /** @brief reference of main event loop of pldmd, primarily used to schedule
+     *  work
+     */
+    sdeventplus::Event& event;
+
+    /** @brief Object to the invoker class*/
+    Invoker& invoker;
+
+    /** @brief pointer to the requester class*/
+    requester::Handler<requester::Request>* reqHandler;
+
+    /** @brief pointer to the oem_ibm_handler class*/
+    std::unique_ptr<oem_platform::Handler> oemPlatformHandler{};
+
+    /** @brief pointer to the oem_ibm_fru class*/
+    std::unique_ptr<oem_fru::Handler> oemFruHandler{};
+
+    /** @brief pointer to the CodeUpdate class*/
+    std::unique_ptr<pldm::responder::CodeUpdate> codeUpdate{};
+
+    /** @brief oem IBM Platform handler*/
+    pldm::responder::oem_ibm_platform::Handler* oemIbmPlatformHandler = nullptr;
+
+    /** @brief oem IBM Fru handler*/
+    pldm::responder::oem_ibm_fru::Handler* oemIbmFruHandler = nullptr;
+};
+
+} // namespace oem_ibm
+} // namespace pldm
diff --git a/pldmd/pldmd.cpp b/pldmd/pldmd.cpp
index 1030c8e..102458f 100644
--- a/pldmd/pldmd.cpp
+++ b/pldmd/pldmd.cpp
@@ -60,9 +60,7 @@
 #endif
 
 #ifdef OEM_IBM
-#include "libpldmresponder/file_io.hpp"
-#include "libpldmresponder/fru_oem_ibm.hpp"
-#include "libpldmresponder/oem_ibm_handler.hpp"
+#include "oem_ibm.hpp"
 #endif
 
 constexpr uint8_t MCTP_MSG_TYPE_PLDM = 1;
@@ -232,31 +230,16 @@
         hostEffecterParser;
     std::unique_ptr<DbusToPLDMEvent> dbusToPLDMEventHandler;
     DBusHandler dbusHandler;
-    std::unique_ptr<oem_platform::Handler> oemPlatformHandler{};
     std::unique_ptr<platform_config::Handler> platformConfigHandler{};
     platformConfigHandler = std::make_unique<platform_config::Handler>();
-    std::unique_ptr<oem_fru::Handler> oemFruHandler{};
 
-#ifdef OEM_IBM
-    std::unique_ptr<pldm::responder::CodeUpdate> codeUpdate =
-        std::make_unique<pldm::responder::CodeUpdate>(&dbusHandler);
-    codeUpdate->clearDirPath(LID_STAGING_DIR);
-    oemPlatformHandler = std::make_unique<oem_ibm_platform::Handler>(
-        &dbusHandler, codeUpdate.get(), pldmTransport.getEventSource(), hostEID,
-        instanceIdDb, event, &reqHandler);
-    codeUpdate->setOemPlatformHandler(oemPlatformHandler.get());
-    oemFruHandler = std::make_unique<oem_ibm_fru::Handler>(pdrRepo.get());
-    invoker.registerHandler(PLDM_OEM, std::make_unique<oem_ibm::Handler>(
-                                          oemPlatformHandler.get(),
-                                          pldmTransport.getEventSource(),
-                                          hostEID, &instanceIdDb, &reqHandler));
-#endif
     if (hostEID)
     {
         hostPDRHandler = std::make_shared<HostPDRHandler>(
             pldmTransport.getEventSource(), hostEID, event, pdrRepo.get(),
             EVENTS_JSONS_DIR, entityTree.get(), bmcEntityTree.get(),
-            instanceIdDb, &reqHandler, oemPlatformHandler.get());
+            instanceIdDb, &reqHandler);
+
         // HostFirmware interface needs access to hostPDR to know if host
         // is running
         dbusImplHost.setHostPdrObj(hostPDRHandler);
@@ -268,13 +251,10 @@
         dbusToPLDMEventHandler = std::make_unique<DbusToPLDMEvent>(
             pldmTransport.getEventSource(), hostEID, instanceIdDb, &reqHandler);
     }
-    auto biosHandler = std::make_unique<bios::Handler>(
-        pldmTransport.getEventSource(), hostEID, &instanceIdDb, &reqHandler,
-        platformConfigHandler.get(), requestPLDMServiceName);
 
     auto fruHandler = std::make_unique<fru::Handler>(
         FRU_JSONS_DIR, FRU_MASTER_JSON, pdrRepo.get(), entityTree.get(),
-        bmcEntityTree.get(), oemFruHandler.get());
+        bmcEntityTree.get());
 
     // FRU table is built lazily when a FRU command or Get PDR command is
     // handled. To enable building FRU table, the FRU handler is passed to the
@@ -282,25 +262,27 @@
     auto platformHandler = std::make_unique<platform::Handler>(
         &dbusHandler, hostEID, &instanceIdDb, PDR_JSONS_DIR, pdrRepo.get(),
         hostPDRHandler.get(), dbusToPLDMEventHandler.get(), fruHandler.get(),
-        oemPlatformHandler.get(), platformConfigHandler.get(), &reqHandler,
-        event, true);
-#ifdef OEM_IBM
-    pldm::responder::oem_ibm_platform::Handler* oemIbmPlatformHandler =
-        dynamic_cast<pldm::responder::oem_ibm_platform::Handler*>(
-            oemPlatformHandler.get());
-    oemIbmPlatformHandler->setPlatformHandler(platformHandler.get());
+        platformConfigHandler.get(), &reqHandler, event, true);
 
-    pldm::responder::oem_ibm_fru::Handler* oemIbmFruHandler =
-        dynamic_cast<pldm::responder::oem_ibm_fru::Handler*>(
-            oemFruHandler.get());
-    oemIbmFruHandler->setIBMFruHandler(fruHandler.get());
+    auto biosHandler = std::make_unique<bios::Handler>(
+        pldmTransport.getEventSource(), hostEID, &instanceIdDb, &reqHandler,
+        platformConfigHandler.get(), requestPLDMServiceName);
+
+    auto baseHandler = std::make_unique<base::Handler>(event);
+
+#ifdef OEM_IBM
+    pldm::oem_ibm::OemIBM oemIBM(&dbusHandler, pldmTransport.getEventSource(),
+                                 hostEID, pdrRepo.get(), instanceIdDb, event,
+                                 invoker, hostPDRHandler.get(),
+                                 platformHandler.get(), fruHandler.get(),
+                                 baseHandler.get(), &reqHandler);
 #endif
 
     invoker.registerHandler(PLDM_BIOS, std::move(biosHandler));
     invoker.registerHandler(PLDM_PLATFORM, std::move(platformHandler));
-    invoker.registerHandler(PLDM_BASE, std::make_unique<base::Handler>(
-                                           event, oemPlatformHandler.get()));
     invoker.registerHandler(PLDM_FRU, std::move(fruHandler));
+    invoker.registerHandler(PLDM_BASE, std::move(baseHandler));
+
     dbus_api::Pdr dbusImplPdr(bus, "/xyz/openbmc_project/pldm", pdrRepo.get());
     sdbusplus::xyz::openbmc_project::PLDM::server::Event dbusImplEvent(
         bus, "/xyz/openbmc_project/pldm");
