diff --git a/bmc/version-handler/version_handler.hpp b/bmc/version-handler/version_handler.hpp
index 336a869..ad380b8 100644
--- a/bmc/version-handler/version_handler.hpp
+++ b/bmc/version-handler/version_handler.hpp
@@ -6,77 +6,32 @@
 
 #include <blobs-ipmid/blobs.hpp>
 
-#include <algorithm>
 #include <cstdint>
 #include <map>
 #include <memory>
 #include <string>
 #include <unordered_map>
 #include <vector>
+
 namespace ipmi_flash
 {
-struct VersionActionPack
-{
-  public:
-    VersionActionPack(std::unique_ptr<TriggerableActionInterface> openAction) :
-        onOpen(std::move(openAction)){};
-    VersionActionPack() = default;
-    /** Only file operation action supported currently */
-    std::unique_ptr<TriggerableActionInterface> onOpen;
-};
-
-/*
- * All the information associated with a version blob
- */
-struct VersionInfoPack
-{
-  public:
-    VersionInfoPack(const std::string& blobId,
-                    std::unique_ptr<VersionActionPack> actionPackIn,
-                    std::unique_ptr<ImageHandlerInterface> imageHandler) :
-        blobId(blobId),
-        actionPack(std::move(actionPackIn)),
-        imageHandler(std::move(imageHandler)),
-        blobState(static_cast<blobs::StateFlags>(0)){};
-    VersionInfoPack() = default;
-
-    std::string blobId;
-    std::unique_ptr<VersionActionPack> actionPack;
-    std::unique_ptr<ImageHandlerInterface> imageHandler;
-    blobs::StateFlags blobState;
-};
-
-/* convenience alias: the key (std::string) is blobId, same as
- * VersionInfoPack.blobId */
-using VersionInfoMap = std::unordered_map<std::string, VersionInfoPack>;
 
 class VersionBlobHandler : public blobs::GenericBlobInterface
 {
   public:
-    /**
-     * Factory to create a BlobHandler for use by phosphor-ipmi-blobs
-     *
-     * @param[in] versionMap - blob names to VersionInfoPack which contains
-     * triggers, file handlers, state and blobID.
-     *
-     * @returns a unique_ptr to a GenericBlobInterface which is used by
-     * phosphor-ipmi-blobs. The underlying implementation (VersionBlobHandler)
-     * implements all the blob operations for the blobs owned by
-     * VersionBlobHandler.
-     */
-    static std::unique_ptr<blobs::GenericBlobInterface>
-        create(VersionInfoMap&& versionMap);
+    struct ActionPack
+    {
+        /** Only file operation action supported currently */
+        std::unique_ptr<TriggerableActionInterface> onOpen;
+    };
+
     /**
      * Create a VersionBlobHandler.
      *
-     * @param[in] blobs - list of blobs_ids to support
-     * @param[in] actions - a map of blobId to VersionInfoPack
+     * @param[in] configs - list of blob configurations to support
      */
-    VersionBlobHandler(std::vector<std::string>&& blobs,
-                       VersionInfoMap&& handlerMap) :
-        blobIds(blobs),
-        versionInfoMap(std::move(handlerMap))
-    {}
+    VersionBlobHandler(std::vector<HandlerConfig<ActionPack>>&& configs);
+
     ~VersionBlobHandler() = default;
     VersionBlobHandler(const VersionBlobHandler&) = delete;
     VersionBlobHandler& operator=(const VersionBlobHandler&) = delete;
@@ -111,8 +66,15 @@
     bool cleanup(uint16_t session);
 
   private:
-    std::vector<std::string> blobIds;
-    VersionInfoMap versionInfoMap;
+    struct BlobInfo
+    {
+        std::string blobId;
+        std::unique_ptr<ActionPack> actions;
+        std::unique_ptr<ImageHandlerInterface> handler;
+        blobs::StateFlags blobState = static_cast<blobs::StateFlags>(0);
+    };
+
+    std::unordered_map<std::string, BlobInfo> blobInfoMap;
     std::unordered_map<uint16_t, std::string> sessionToBlob;
 };
 } // namespace ipmi_flash
