diff --git a/mainapp.cpp b/mainapp.cpp
index 72277d1..c61fa85 100644
--- a/mainapp.cpp
+++ b/mainapp.cpp
@@ -36,19 +36,18 @@
     exit(EXIT_FAILURE);
 }
 
-void printActionTargets(
-    const std::map<Watchdog::Action, std::string>& actionTargets)
+void printActionTargetMap(const Watchdog::ActionTargetMap& actionTargetMap)
 {
     std::cerr << "Action Targets:\n";
-    for (const auto& actionTarget : actionTargets)
+    for (const auto& [action, target] : actionTargetMap)
     {
-        std::cerr << "  " << convertForMessage(actionTarget.first) << " -> "
-                  << actionTarget.second << "\n";
+        std::cerr << "  " << convertForMessage(action) << " -> " << target
+                  << "\n";
     }
     std::cerr << std::flush;
 }
 
-int main(int argc, char** argv)
+int main(int argc, char* argv[])
 {
     using namespace phosphor::logging;
     using InternalFailure =
@@ -97,13 +96,13 @@
     {
         exitWithError("Multiple targets specified.", argv);
     }
-    std::map<Watchdog::Action, Watchdog::TargetName> actionTargets;
+    Watchdog::ActionTargetMap actionTargetMap;
     if (!targetParam.empty())
     {
         auto target = targetParam.back();
-        actionTargets[Watchdog::Action::HardReset] = target;
-        actionTargets[Watchdog::Action::PowerOff] = target;
-        actionTargets[Watchdog::Action::PowerCycle] = target;
+        actionTargetMap[Watchdog::Action::HardReset] = target;
+        actionTargetMap[Watchdog::Action::PowerOff] = target;
+        actionTargetMap[Watchdog::Action::PowerCycle] = target;
     }
 
     // Parse out the action_target arguments. We allow one target to map
@@ -132,9 +131,9 @@
             exitWithError("Bad action specified.", argv);
         }
 
-        actionTargets[action] = std::move(value);
+        actionTargetMap[action] = std::move(value);
     }
-    printActionTargets(actionTargets);
+    printActionTargetMap(actionTargetMap);
 
     // Parse out the fallback settings for the watchdog. Note that we require
     // both of the fallback arguments to do anything here, but having a fallback
@@ -213,7 +212,7 @@
     try
     {
         // Create a watchdog object
-        Watchdog watchdog(bus, path.c_str(), eventP, std::move(actionTargets),
+        Watchdog watchdog(bus, path.c_str(), eventP, std::move(actionTargetMap),
                           std::move(fallback));
 
         // Claim the bus
diff --git a/test/watchdog_test.cpp b/test/watchdog_test.cpp
index f24d45e..49890da 100644
--- a/test/watchdog_test.cpp
+++ b/test/watchdog_test.cpp
@@ -191,9 +191,8 @@
         .action = Watchdog::Action::PowerOff,
         .interval = static_cast<uint64_t>(fallbackIntervalMs),
     };
-    std::map<Watchdog::Action, Watchdog::TargetName> emptyActionTargets;
     wdog = std::make_unique<Watchdog>(bus, TEST_PATH, eventP,
-                                      std::move(emptyActionTargets),
+                                      Watchdog::ActionTargetMap(),
                                       std::move(fallback));
     EXPECT_EQ(primaryInterval, milliseconds(wdog->interval(primaryIntervalMs)));
     EXPECT_FALSE(wdog->enabled());
@@ -275,9 +274,8 @@
         .interval = static_cast<uint64_t>(fallbackIntervalMs),
         .always = false,
     };
-    std::map<Watchdog::Action, Watchdog::TargetName> emptyActionTargets;
     wdog = std::make_unique<Watchdog>(bus, TEST_PATH, eventP,
-                                      std::move(emptyActionTargets),
+                                      Watchdog::ActionTargetMap(),
                                       std::move(fallback));
     EXPECT_EQ(primaryInterval, milliseconds(wdog->interval(primaryIntervalMs)));
     EXPECT_FALSE(wdog->enabled());
@@ -330,9 +328,8 @@
         .interval = static_cast<uint64_t>(fallbackIntervalMs),
         .always = true,
     };
-    std::map<Watchdog::Action, Watchdog::TargetName> emptyActionTargets;
     wdog = std::make_unique<Watchdog>(bus, TEST_PATH, eventP,
-                                      std::move(emptyActionTargets),
+                                      Watchdog::ActionTargetMap(),
                                       std::move(fallback));
     EXPECT_EQ(primaryInterval, milliseconds(wdog->interval(primaryIntervalMs)));
     EXPECT_FALSE(wdog->enabled());
diff --git a/watchdog.cpp b/watchdog.cpp
index 9e7ec23..9301fb0 100644
--- a/watchdog.cpp
+++ b/watchdog.cpp
@@ -112,8 +112,8 @@
         action = fallback->action;
     }
 
-    auto target = actionTargets.find(action);
-    if (target == actionTargets.end())
+    auto target = actionTargetMap.find(action);
+    if (target == actionTargetMap.end())
     {
         log<level::INFO>("watchdog: Timed out with no target",
                          entry("ACTION=%s", convertForMessage(action).c_str()));
diff --git a/watchdog.hpp b/watchdog.hpp
index efa413a..c9821db 100644
--- a/watchdog.hpp
+++ b/watchdog.hpp
@@ -3,10 +3,10 @@
 #include "timer.hpp"
 
 #include <functional>
-#include <map>
 #include <optional>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
+#include <unordered_map>
 #include <utility>
 #include <xyz/openbmc_project/State/Watchdog/server.hpp>
 
@@ -14,6 +14,7 @@
 {
 namespace watchdog
 {
+
 namespace Base = sdbusplus::xyz::openbmc_project::State::server;
 using WatchdogInherits = sdbusplus::server::object::object<Base::Watchdog>;
 
@@ -36,6 +37,11 @@
      */
     using TargetName = std::string;
 
+    /** @brief Type used to store the mapping of a Watchdog timeout
+     *         action to a systemd target.
+     */
+    using ActionTargetMap = std::unordered_map<Action, TargetName>;
+
     /** @brief Type used to specify the parameters of a fallback watchdog
      */
     struct Fallback
@@ -47,18 +53,17 @@
 
     /** @brief Constructs the Watchdog object
      *
-     *  @param[in] bus            - DBus bus to attach to.
-     *  @param[in] objPath        - Object path to attach to.
-     *  @param[in] event          - reference to sd_event unique pointer
-     *  @param[in] actionTargets  - map of systemd targets called on timeout
+     *  @param[in] bus             - DBus bus to attach to.
+     *  @param[in] objPath         - Object path to attach to.
+     *  @param[in] event           - reference to sd_event unique pointer
+     *  @param[in] actionTargetMap - map of systemd targets called on timeout
      *  @param[in] fallback
      */
     Watchdog(sdbusplus::bus::bus& bus, const char* objPath, EventPtr& event,
-             std::map<Action, TargetName>&& actionTargets =
-                 std::map<Action, TargetName>(),
+             ActionTargetMap&& actionTargetMap = {},
              std::optional<Fallback>&& fallback = std::nullopt) :
         WatchdogInherits(bus, objPath),
-        bus(bus), actionTargets(std::move(actionTargets)),
+        bus(bus), actionTargetMap(std::move(actionTargetMap)),
         fallback(std::move(fallback)),
         timer(event, std::bind(&Watchdog::timeOutHandler, this))
     {
@@ -127,7 +132,7 @@
     sdbusplus::bus::bus& bus;
 
     /** @brief Map of systemd units to be started when the timer expires */
-    std::map<Action, TargetName> actionTargets;
+    ActionTargetMap actionTargetMap;
 
     /** @brief Fallback timer options */
     std::optional<Fallback> fallback;
