diff --git a/manager/group.cpp b/manager/group.cpp
index 33c64f6..d728f2b 100644
--- a/manager/group.cpp
+++ b/manager/group.cpp
@@ -2,6 +2,8 @@
 
 #include "group.hpp"
 
+#include "ledlayout.hpp"
+
 #include <sdbusplus/message.hpp>
 namespace phosphor
 {
@@ -28,8 +30,8 @@
     }
 
     // Introducing these to enable gtest.
-    Manager::group ledsAssert{};
-    Manager::group ledsDeAssert{};
+    ActionSet ledsAssert{};
+    ActionSet ledsDeAssert{};
 
     // Group management is handled by Manager. The populated leds* sets are not
     // really used by production code. They are there to enable gtest for
diff --git a/manager/json-parser.hpp b/manager/json-parser.hpp
index 06fb096..e8819ef 100644
--- a/manager/json-parser.hpp
+++ b/manager/json-parser.hpp
@@ -15,8 +15,6 @@
 namespace fs = std::filesystem;
 
 using Json = nlohmann::json;
-using LedAction = std::set<phosphor::led::Layout::LedAction>;
-using LedMap = std::unordered_map<std::string, LedAction>;
 
 // Priority for a particular LED needs to stay SAME across all groups
 // phosphor::led::Layout::Action can only be one of `Blink` and `On`
@@ -101,11 +99,11 @@
 
 /** @brief Load JSON config and return led map (JSON version 1)
  *
- *  @return LedMap - Generated an std::unordered_map of LedAction
+ *  @return phosphor::led::GroupMap
  */
-const LedMap loadJsonConfigV1(const Json& json)
+const phosphor::led::GroupMap loadJsonConfigV1(const Json& json)
 {
-    LedMap ledMap{};
+    phosphor::led::GroupMap ledMap{};
     PriorityMap priorityMap{};
 
     // define the default JSON as empty
@@ -119,7 +117,7 @@
         auto objpath = tmpPath.string();
         auto members = entry.value("members", empty);
 
-        LedAction ledActions{};
+        phosphor::led::ActionSet ledActions{};
         for (const auto& member : members)
         {
             auto name = member.value("Name", "");
@@ -149,9 +147,9 @@
 
 /** @brief Load JSON config and return led map
  *
- *  @return LedMap - Generated an std::unordered_map of LedAction
+ *  @return phosphor::led::GroupMap
  */
-const LedMap loadJsonConfig(const fs::path& path)
+const phosphor::led::GroupMap loadJsonConfig(const fs::path& path)
 {
     auto json = readJson(path);
 
@@ -167,18 +165,18 @@
             throw std::runtime_error("Unsupported version");
     }
 
-    return LedMap{};
+    return phosphor::led::GroupMap{};
 }
 
 /** @brief Get led map from LED groups JSON config
  *
  *  @param[in] config - Path to the JSON config.
- *  @return LedMap - Generated an std::unordered_map of LedAction
+ *  @return phosphor::led::GroupMap
  *
  *  @note if config is an empty string, daemon will interrogate dbus for
  *        compatible strings.
  */
-const LedMap getSystemLedMap(fs::path config)
+const phosphor::led::GroupMap getSystemLedMap(fs::path config)
 {
     if (config.empty())
     {
diff --git a/manager/lamptest/lamptest.cpp b/manager/lamptest/lamptest.cpp
index 2c93333..99d0318 100644
--- a/manager/lamptest/lamptest.cpp
+++ b/manager/lamptest/lamptest.cpp
@@ -11,8 +11,8 @@
 
 using Json = nlohmann::json;
 
-bool LampTest::processLEDUpdates(const Manager::group& ledsAssert,
-                                 const Manager::group& ledsDeAssert)
+bool LampTest::processLEDUpdates(const ActionSet& ledsAssert,
+                                 const ActionSet& ledsDeAssert)
 {
     // If the physical LED status is updated during the lamp test, it should be
     // saved to Queue, and the queue will be processed after the lamp test is
@@ -232,7 +232,7 @@
 void LampTest::restorePhysicalLedStates()
 {
     // restore physical LEDs states before lamp test
-    Manager::group ledsDeAssert{};
+    ActionSet ledsDeAssert{};
     manager.driveLEDs(physicalLEDStatesPriorToLampTest, ledsDeAssert);
     physicalLEDStatesPriorToLampTest.clear();
 
diff --git a/manager/lamptest/lamptest.hpp b/manager/lamptest/lamptest.hpp
index d69667a..30d6eb2 100644
--- a/manager/lamptest/lamptest.hpp
+++ b/manager/lamptest/lamptest.hpp
@@ -64,8 +64,8 @@
      *
      *  @return Is running lamp test, true running
      */
-    bool processLEDUpdates(const Manager::group& ledsAssert,
-                           const Manager::group& ledsDeAssert);
+    bool processLEDUpdates(const ActionSet& ledsAssert,
+                           const ActionSet& ledsDeAssert);
 
   private:
     /** @brief Timer used for LEDs lamp test period */
@@ -84,14 +84,13 @@
     std::vector<std::string> physicalLEDPaths;
 
     /** @brief Queue to save LED states during lamp test */
-    std::queue<std::pair<Manager::group, Manager::group>>
-        updatedLEDsDuringLampTest;
+    std::queue<std::pair<ActionSet, ActionSet>> updatedLEDsDuringLampTest;
 
     /** @brief Get state of the lamp test operation */
     bool isLampTestRunning{false};
 
     /** @brief Physical LED states prior to lamp test */
-    Manager::group physicalLEDStatesPriorToLampTest;
+    ActionSet physicalLEDStatesPriorToLampTest;
 
     /** @brief Vector of names of physical LEDs, whose changes will be forcibly
      *         updated even during lamp test. */
diff --git a/manager/led-main.cpp b/manager/led-main.cpp
index 8861a64..a6f8f82 100644
--- a/manager/led-main.cpp
+++ b/manager/led-main.cpp
@@ -1,12 +1,12 @@
 #include "config.h"
 
 #include "group.hpp"
+#include "ledlayout.hpp"
 #ifdef LED_USE_JSON
 #include "json-parser.hpp"
 #else
 #include "led-gen.hpp"
 #endif
-#include "ledlayout.hpp"
 #include "manager.hpp"
 #include "serialize.hpp"
 #include "utils.hpp"
@@ -69,14 +69,11 @@
 #endif
 
     /** Now create so many dbus objects as there are groups */
-    std::ranges::transform(
-        systemLedMap, std::back_inserter(groups),
-        [&bus, &manager, &serialize](
-            const std::pair<std::string,
-                            std::set<phosphor::led::Layout::LedAction>>& grp) {
-            return std::make_unique<phosphor::led::Group>(bus, grp.first,
-                                                          manager, serialize);
-        });
+    std::ranges::transform(systemLedMap, std::back_inserter(groups),
+                           [&bus, &manager, &serialize](auto& grp) {
+                               return std::make_unique<phosphor::led::Group>(
+                                   bus, grp.first, manager, serialize);
+                           });
 
     // Attach the bus to sd_event to service user requests
     bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
diff --git a/manager/ledlayout.hpp b/manager/ledlayout.hpp
index 3424606..7fc896d 100644
--- a/manager/ledlayout.hpp
+++ b/manager/ledlayout.hpp
@@ -49,5 +49,9 @@
     }
 };
 } // namespace Layout
+
+using ActionSet = std::set<Layout::LedAction>;
+using GroupMap = std::unordered_map<std::string, ActionSet>;
+
 } // namespace led
 } // namespace phosphor
diff --git a/manager/manager.cpp b/manager/manager.cpp
index 998f22d..12f507a 100644
--- a/manager/manager.cpp
+++ b/manager/manager.cpp
@@ -16,7 +16,7 @@
 
 // Assert -or- De-assert
 bool Manager::setGroupState(const std::string& path, bool assert,
-                            group& ledsAssert, group& ledsDeAssert)
+                            ActionSet& ledsAssert, ActionSet& ledsDeAssert)
 {
     if (assert)
     {
@@ -30,8 +30,8 @@
         }
     }
 
-    // This will contain the union of what's already in the asserted group
-    group desiredState{};
+    // This will contain the union of what's already in the asserted ActionSet
+    ActionSet desiredState{};
     for (const auto& grp : assertedGroups)
     {
         desiredState.insert(grp->cbegin(), grp->cend());
@@ -39,7 +39,7 @@
 
     // Find difference between Combined and Desired to identify
     // which LEDs are getting altered
-    group transient{};
+    ActionSet transient{};
     std::set_difference(combinedState.begin(), combinedState.end(),
                         desiredState.begin(), desiredState.end(),
                         std::inserter(transient, transient.begin()), ledComp);
@@ -47,7 +47,7 @@
     {
         // Find common LEDs between transient and Desired to know if some LEDs
         // are changing state and not really getting DeAsserted
-        group ledsTransient{};
+        ActionSet ledsTransient{};
         std::set_intersection(
             transient.begin(), transient.end(), desiredState.begin(),
             desiredState.end(),
@@ -79,7 +79,7 @@
 
     // Now LEDs that are to be Asserted. These could either be fresh asserts
     // -or- change between [On]<-->[Blink]
-    group temp{};
+    ActionSet temp{};
     std::unique_copy(desiredState.begin(), desiredState.end(),
                      std::inserter(temp, temp.begin()), ledEqual);
     if (temp.size())
@@ -100,13 +100,14 @@
 }
 
 void Manager::setLampTestCallBack(
-    std::function<bool(group& ledsAssert, group& ledsDeAssert)> callBack)
+    std::function<bool(ActionSet& ledsAssert, ActionSet& ledsDeAssert)>
+        callBack)
 {
     lampTestCallBack = callBack;
 }
 
 /** @brief Run through the map and apply action on the LEDs */
-void Manager::driveLEDs(group& ledsAssert, group& ledsDeAssert)
+void Manager::driveLEDs(ActionSet& ledsAssert, ActionSet& ledsDeAssert)
 {
 #ifdef USE_LAMP_TEST
     // Use the lampTestCallBack method and trigger the callback method in the
diff --git a/manager/manager.hpp b/manager/manager.hpp
index 88875d1..2fbc7f2 100644
--- a/manager/manager.hpp
+++ b/manager/manager.hpp
@@ -68,18 +68,15 @@
         return left.name == right.name;
     }
 
-    using group = std::set<phosphor::led::Layout::LedAction>;
-    using LedLayout = std::unordered_map<std::string, group>;
-
     /** @brief static global map constructed at compile time */
-    const LedLayout& ledMap;
+    const GroupMap& ledMap;
 
     /** @brief Refer the user supplied LED layout and sdbusplus handler
      *
      *  @param [in] bus       - sdbusplus handler
-     *  @param [in] LedLayout - LEDs group layout
+     *  @param [in] GroupMap - LEDs group layout
      */
-    Manager(sdbusplus::bus::bus& bus, const LedLayout& ledLayout) :
+    Manager(sdbusplus::bus::bus& bus, const GroupMap& ledLayout) :
         ledMap(ledLayout), bus(bus)
     {
         // Nothing here
@@ -95,8 +92,8 @@
      *
      *  @return                   -  Success or exception thrown
      */
-    bool setGroupState(const std::string& path, bool assert, group& ledsAssert,
-                       group& ledsDeAssert);
+    bool setGroupState(const std::string& path, bool assert,
+                       ActionSet& ledsAssert, ActionSet& ledsDeAssert);
 
     /** @brief Finds the set of LEDs to operate on and executes action
      *
@@ -106,7 +103,7 @@
      *
      *  @return: None
      */
-    void driveLEDs(group& ledsAssert, group& ledsDeAssert);
+    void driveLEDs(ActionSet& ledsAssert, ActionSet& ledsDeAssert);
 
     /** @brief Chooses appropriate action to be triggered on physical LED
      *  and calls into function that applies the actual action.
@@ -124,7 +121,8 @@
      *  @param[in]  callBack   -  Custom callback when enabled lamp test
      */
     void setLampTestCallBack(
-        std::function<bool(group& ledsAssert, group& ledsDeAssert)> callBack);
+        std::function<bool(ActionSet& ledsAssert, ActionSet& ledsDeAssert)>
+            callBack);
 
   private:
     /** @brief sdbusplus handler */
@@ -137,18 +135,18 @@
     DBusHandler dBusHandler;
 
     /** @brief Pointers to groups that are in asserted state */
-    std::set<const group*> assertedGroups;
+    std::set<const ActionSet*> assertedGroups;
 
     /** @brief Contains the highest priority actions for all
      *         asserted LEDs.
      */
-    group currentState;
+    ActionSet currentState;
 
     /** @brief Contains the set of all actions for asserted LEDs */
-    group combinedState;
+    ActionSet combinedState;
 
     /** @brief Custom callback when enabled lamp test */
-    std::function<bool(group& ledsAssert, group& ledsDeAssert)>
+    std::function<bool(ActionSet& ledsAssert, ActionSet& ledsDeAssert)>
         lampTestCallBack;
 
     /** @brief Returns action string based on enum
