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);
         }
     }
 }
