diff --git a/health_metric.cpp b/health_metric.cpp
index e29954a..31de153 100644
--- a/health_metric.cpp
+++ b/health_metric.cpp
@@ -12,8 +12,8 @@
 
 using association_t = std::tuple<std::string, std::string, std::string>;
 
-auto HealthMetric::getPath(phosphor::health::metric::Type type,
-                           std::string name, SubType subType) -> std::string
+auto HealthMetric::getPath(MType type, std::string name, SubType subType)
+    -> std::string
 {
     std::string path;
     switch (subType)
@@ -53,7 +53,7 @@
         }
         case SubType::NA:
         {
-            if (type == phosphor::health::metric::Type::storage)
+            if (type == MType::storage)
             {
                 static constexpr auto nameDelimiter = "_";
                 auto storageType = name.substr(
@@ -105,12 +105,12 @@
     }
     ValueIntf::value(std::numeric_limits<double>::quiet_NaN(), true);
 
-    using bound_map_t = std::map<ThresholdIntf::Bound, double>;
-    std::map<ThresholdIntf::Type, bound_map_t> thresholds;
+    using bound_map_t = std::map<Bound, double>;
+    std::map<Type, bound_map_t> thresholds;
     for (const auto& [key, value] : config.thresholds)
     {
-        auto type = std::get<ThresholdIntf::Type>(key);
-        auto bound = std::get<ThresholdIntf::Bound>(key);
+        auto type = std::get<Type>(key);
+        auto bound = std::get<Bound>(key);
         auto threshold = thresholds.find(type);
         if (threshold == thresholds.end())
         {
@@ -147,8 +147,7 @@
     }
 }
 
-void HealthMetric::checkThreshold(ThresholdIntf::Type type,
-                                  ThresholdIntf::Bound bound, MValue value)
+void HealthMetric::checkThreshold(Type type, Bound bound, MValue value)
 {
     auto threshold = std::make_tuple(type, bound);
     auto thresholds = ThresholdIntf::value();
@@ -197,14 +196,11 @@
 {
     if (!ThresholdIntf::value().empty())
     {
-        for (auto type :
-             {ThresholdIntf::Type::HardShutdown,
-              ThresholdIntf::Type::SoftShutdown,
-              ThresholdIntf::Type::PerformanceLoss,
-              ThresholdIntf::Type::Critical, ThresholdIntf::Type::Warning})
+        for (auto type : {Type::HardShutdown, Type::SoftShutdown,
+                          Type::PerformanceLoss, Type::Critical, Type::Warning})
         {
-            checkThreshold(type, ThresholdIntf::Bound::Lower, value);
-            checkThreshold(type, ThresholdIntf::Bound::Upper, value);
+            checkThreshold(type, Bound::Lower, value);
+            checkThreshold(type, Bound::Upper, value);
         }
     }
 }
diff --git a/health_metric.hpp b/health_metric.hpp
index 8d3dee4..9584953 100644
--- a/health_metric.hpp
+++ b/health_metric.hpp
@@ -25,7 +25,6 @@
 using BmcIntf = sdbusplus::xyz::openbmc_project::Inventory::Item::server::Bmc;
 using MetricIntf =
     sdbusplus::server::object_t<ValueIntf, ThresholdIntf, AssociationIntf>;
-using MType = phosphor::health::metric::Type;
 
 struct MValue
 {
@@ -38,6 +37,8 @@
 class HealthMetric : public MetricIntf
 {
   public:
+    using MType = phosphor::health::metric::Type;
+
     HealthMetric() = delete;
     HealthMetric(const HealthMetric&) = delete;
     HealthMetric(HealthMetric&&) = delete;
@@ -62,13 +63,11 @@
     /** @brief Init properties for the health metric object */
     void initProperties();
     /** @brief Check specified threshold for the given value */
-    void checkThreshold(ThresholdIntf::Type type, ThresholdIntf::Bound bound,
-                        MValue value);
+    void checkThreshold(Type type, Bound bound, MValue value);
     /** @brief Check all thresholds for the given value */
     void checkThresholds(MValue value);
     /** @brief Get the object path for the given type, name and subtype */
-    auto getPath(phosphor::health::metric::Type type, std::string name,
-                 SubType subType) -> std::string;
+    auto getPath(MType type, std::string name, SubType subType) -> std::string;
     /** @brief D-Bus bus connection */
     sdbusplus::bus_t& bus;
     /** @brief Metric type */
