diff --git a/power-sequencer/argument.cpp b/power-sequencer/argument.cpp
index 4e80c53..5325256 100644
--- a/power-sequencer/argument.cpp
+++ b/power-sequencer/argument.cpp
@@ -13,10 +13,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "argument.hpp"
+
+#include <algorithm>
 #include <iostream>
 #include <iterator>
-#include <algorithm>
-#include "argument.hpp"
 
 namespace witherspoon
 {
@@ -37,11 +38,10 @@
     std::cerr << std::flush;
 }
 
-const option ArgumentParser::options[] =
-{
-    {"action",   required_argument, NULL, 'a'},
+const option ArgumentParser::options[] = {
+    {"action", required_argument, NULL, 'a'},
     {"interval", required_argument, NULL, 'i'},
-    {"help",     no_argument,       NULL, 'h'},
+    {"help", no_argument, NULL, 'h'},
     {0, 0, 0, 0},
 };
 
@@ -86,5 +86,5 @@
 const std::string ArgumentParser::trueString = "true";
 const std::string ArgumentParser::emptyString = "";
 
-}
-}
+} // namespace power
+} // namespace witherspoon
diff --git a/power-sequencer/main.cpp b/power-sequencer/main.cpp
index e383fc1..3e1ca52 100644
--- a/power-sequencer/main.cpp
+++ b/power-sequencer/main.cpp
@@ -13,15 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <chrono>
-#include <iostream>
-#include <phosphor-logging/log.hpp>
-#include <sdeventplus/event.hpp>
 #include "argument.hpp"
 #include "pgood_monitor.hpp"
 #include "runtime_monitor.hpp"
 #include "ucd90160.hpp"
 
+#include <chrono>
+#include <iostream>
+#include <phosphor-logging/log.hpp>
+#include <sdeventplus/event.hpp>
+
 using namespace witherspoon::power;
 using namespace phosphor::logging;
 
@@ -46,7 +47,7 @@
 
     std::chrono::milliseconds interval{i};
 
-	auto event = sdeventplus::Event::get_default();
+    auto event = sdeventplus::Event::get_default();
     auto bus = sdbusplus::bus::new_default();
     bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
 
@@ -56,17 +57,17 @@
 
     if (action == "pgood-monitor")
     {
-        //If PGOOD doesn't turn on within a certain
-        //time, analyze the device for errors
-        monitor = std::make_unique<PGOODMonitor>(
-                std::move(device), bus, event, interval);
+        // If PGOOD doesn't turn on within a certain
+        // time, analyze the device for errors
+        monitor = std::make_unique<PGOODMonitor>(std::move(device), bus, event,
+                                                 interval);
     }
-    else //runtime-monitor
+    else // runtime-monitor
     {
-        //Continuously monitor this device both by polling
-        //and on 'power lost' signals.
-        monitor = std::make_unique<RuntimeMonitor>(
-                std::move(device), bus, event, interval);
+        // Continuously monitor this device both by polling
+        // and on 'power lost' signals.
+        monitor = std::make_unique<RuntimeMonitor>(std::move(device), bus,
+                                                   event, interval);
     }
 
     return monitor->run();
diff --git a/power-sequencer/pgood_monitor.cpp b/power-sequencer/pgood_monitor.cpp
index 29382c9..98c3faa 100644
--- a/power-sequencer/pgood_monitor.cpp
+++ b/power-sequencer/pgood_monitor.cpp
@@ -13,13 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <phosphor-logging/log.hpp>
-#include <org/open_power/Witherspoon/Fault/error.hpp>
 #include "config.h"
-#include "elog-errors.hpp"
+
 #include "pgood_monitor.hpp"
+
+#include "elog-errors.hpp"
 #include "utility.hpp"
 
+#include <org/open_power/Witherspoon/Fault/error.hpp>
+#include <phosphor-logging/log.hpp>
+
 namespace witherspoon
 {
 namespace power
@@ -37,26 +40,16 @@
     int32_t state = 0;
     int32_t pgood = 0;
 
-    auto service = util::getService(POWER_OBJ_PATH,
-            POWER_INTERFACE,
-            bus);
+    auto service = util::getService(POWER_OBJ_PATH, POWER_INTERFACE, bus);
 
-    util::getProperty<int32_t>(POWER_INTERFACE,
-            "pgood",
-            POWER_OBJ_PATH,
-            service,
-            bus,
-            pgood);
+    util::getProperty<int32_t>(POWER_INTERFACE, "pgood", POWER_OBJ_PATH,
+                               service, bus, pgood);
 
-    //When state = 1, system was switched on
-    util::getProperty<int32_t>(POWER_INTERFACE,
-            "state",
-            POWER_OBJ_PATH,
-            service,
-            bus,
-            state);
+    // When state = 1, system was switched on
+    util::getProperty<int32_t>(POWER_INTERFACE, "state", POWER_OBJ_PATH,
+                               service, bus, state);
 
-    //On but no PGOOD
+    // On but no PGOOD
     if (state && !pgood)
     {
         pending = true;
@@ -65,13 +58,12 @@
     return pending;
 }
 
-
 void PGOODMonitor::analyze()
 {
-    //Timer callback.
-    //The timer expired before it was stopped.
-    //If PGOOD is still pending (it should be),
-    //then there is a real failure.
+    // Timer callback.
+    // The timer expired before it was stopped.
+    // If PGOOD is still pending (it should be),
+    // then there is a real failure.
 
     if (pgoodPending())
     {
@@ -81,18 +73,18 @@
         report<PowerOnFailure>();
     }
 
-    //The pgood-wait service (with a longer timeout)
-    //will handle powering off the system.
+    // The pgood-wait service (with a longer timeout)
+    // will handle powering off the system.
     timer.get_event().exit(EXIT_SUCCESS);
 }
 
 void PGOODMonitor::propertyChanged()
 {
-    //Multiple properties could have changed here.
-    //Keep things simple and just recheck the important ones.
+    // Multiple properties could have changed here.
+    // Keep things simple and just recheck the important ones.
     if (!pgoodPending())
     {
-        //PGOOD is on, or system is off, so we are done.
+        // PGOOD is on, or system is off, so we are done.
         timer.get_event().exit(EXIT_SUCCESS);
     }
 }
@@ -100,11 +92,10 @@
 void PGOODMonitor::startListening()
 {
     match = std::make_unique<sdbusplus::bus::match_t>(
-            bus,
-            sdbusplus::bus::match::rules::propertiesChanged(
-                POWER_OBJ_PATH,
-                POWER_INTERFACE),
-            [this](auto& msg){this->propertyChanged();});
+        bus,
+        sdbusplus::bus::match::rules::propertiesChanged(POWER_OBJ_PATH,
+                                                        POWER_INTERFACE),
+        [this](auto& msg) { this->propertyChanged(); });
 }
 
 int PGOODMonitor::run()
@@ -113,9 +104,9 @@
     {
         startListening();
 
-        //If PGOOD came up before we got here, we're done.
-        //Otherwise if PGOOD doesn't get asserted before
-        //the timer expires, it's a failure.
+        // If PGOOD came up before we got here, we're done.
+        // Otherwise if PGOOD doesn't get asserted before
+        // the timer expires, it's a failure.
         if (!pgoodPending())
         {
             return EXIT_SUCCESS;
@@ -129,10 +120,9 @@
         log<level::ERR>("Unexpected failure prevented PGOOD checking");
     }
 
-    //Letting the service fail won't help anything, so don't do it.
+    // Letting the service fail won't help anything, so don't do it.
     return EXIT_SUCCESS;
 }
 
-
-}
-}
+} // namespace power
+} // namespace witherspoon
diff --git a/power-sequencer/pgood_monitor.hpp b/power-sequencer/pgood_monitor.hpp
index ec8e05e..7dbabf9 100644
--- a/power-sequencer/pgood_monitor.hpp
+++ b/power-sequencer/pgood_monitor.hpp
@@ -1,10 +1,11 @@
 #pragma once
 
+#include "device.hpp"
+#include "device_monitor.hpp"
+
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server.hpp>
 #include <sdeventplus/event.hpp>
-#include "device.hpp"
-#include "device_monitor.hpp"
 
 namespace witherspoon
 {
@@ -25,88 +26,85 @@
  */
 class PGOODMonitor : public DeviceMonitor
 {
-    public:
+  public:
+    PGOODMonitor() = delete;
+    ~PGOODMonitor() = default;
+    PGOODMonitor(const PGOODMonitor&) = delete;
+    PGOODMonitor& operator=(const PGOODMonitor&) = delete;
+    PGOODMonitor(PGOODMonitor&&) = delete;
+    PGOODMonitor& operator=(PGOODMonitor&&) = delete;
 
-        PGOODMonitor() = delete;
-        ~PGOODMonitor() = default;
-        PGOODMonitor(const PGOODMonitor&) = delete;
-        PGOODMonitor& operator=(const PGOODMonitor&) = delete;
-        PGOODMonitor(PGOODMonitor&&) = delete;
-        PGOODMonitor& operator=(PGOODMonitor&&) = delete;
+    /**
+     * Constructor
+     *
+     * @param[in] d - the device to monitor
+     * @param[in] b - D-Bus bus object
+     * @param[in] e - event object
+     * @param[in] t - time to allow PGOOD to come up
+     */
+    PGOODMonitor(std::unique_ptr<witherspoon::power::Device>&& d,
+                 sdbusplus::bus::bus& b, const sdeventplus::Event& e,
+                 std::chrono::milliseconds& t) :
+        DeviceMonitor(std::move(d), e, t),
+        bus(b)
+    {
+    }
 
-        /**
-         * Constructor
-         *
-         * @param[in] d - the device to monitor
-         * @param[in] b - D-Bus bus object
-         * @param[in] e - event object
-         * @param[in] t - time to allow PGOOD to come up
-         */
-        PGOODMonitor(std::unique_ptr<witherspoon::power::Device>&& d,
-                sdbusplus::bus::bus& b,
-                const sdeventplus::Event& e,
-                std::chrono::milliseconds& t) :
-            DeviceMonitor(std::move(d), e, t),
-            bus(b)
-        {
-        }
+    /**
+     * Analyzes the power sequencer for fails and then
+     * notifies the event loop that it can exit.
+     *
+     * The timer callback.
+     */
+    void analyze() override;
 
-        /**
-         * Analyzes the power sequencer for fails and then
-         * notifies the event loop that it can exit.
-         *
-         * The timer callback.
-         */
-        void analyze() override;
+    /**
+     * Waits a specified amount of time for PGOOD to
+     * come on, and if it fails to come on in that time
+     * it will analyze the power sequencer for faults.
+     *
+     * It will exit after either PGOOD is asserted or
+     * the device is analyzed for faults.
+     *
+     * @return - the return value from sd_event_loop()
+     */
+    int run() override;
 
-        /**
-         * Waits a specified amount of time for PGOOD to
-         * come on, and if it fails to come on in that time
-         * it will analyze the power sequencer for faults.
-         *
-         * It will exit after either PGOOD is asserted or
-         * the device is analyzed for faults.
-         *
-         * @return - the return value from sd_event_loop()
-         */
-        int run() override;
+  private:
+    /**
+     * Enables the properties changed signal callback
+     * on the power object so we can tell when PGOOD
+     * comes on.
+     */
+    void startListening();
 
-    private:
+    /**
+     * The callback function for the properties changed
+     * signal.
+     */
+    void propertyChanged();
 
-        /**
-         * Enables the properties changed signal callback
-         * on the power object so we can tell when PGOOD
-         * comes on.
-         */
-        void startListening();
+    /**
+     * Returns true if the system has been turned on
+     * but PGOOD isn't up yet.
+     */
+    bool pgoodPending();
 
-        /**
-         * The callback function for the properties changed
-         * signal.
-         */
-        void propertyChanged();
+    /**
+     * Used to break out of the event loop in run()
+     */
+    void exitEventLoop();
 
-        /**
-         * Returns true if the system has been turned on
-         * but PGOOD isn't up yet.
-         */
-        bool pgoodPending();
+    /**
+     * The D-Bus object
+     */
+    sdbusplus::bus::bus& bus;
 
-        /**
-         * Used to break out of the event loop in run()
-         */
-        void exitEventLoop();
-
-        /**
-         * The D-Bus object
-         */
-        sdbusplus::bus::bus& bus;
-
-        /**
-         * The match object for the properties changed signal
-         */
-        std::unique_ptr<sdbusplus::bus::match_t> match;
+    /**
+     * The match object for the properties changed signal
+     */
+    std::unique_ptr<sdbusplus::bus::match_t> match;
 };
 
-}
-}
+} // namespace power
+} // namespace witherspoon
diff --git a/power-sequencer/runtime_monitor.cpp b/power-sequencer/runtime_monitor.cpp
index 514ba8f..5d17eb9 100644
--- a/power-sequencer/runtime_monitor.cpp
+++ b/power-sequencer/runtime_monitor.cpp
@@ -13,12 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "config.h"
+
+#include "runtime_monitor.hpp"
+
+#include "elog-errors.hpp"
+#include "utility.hpp"
+
 #include <org/open_power/Witherspoon/Fault/error.hpp>
 #include <phosphor-logging/log.hpp>
-#include "config.h"
-#include "elog-errors.hpp"
-#include "runtime_monitor.hpp"
-#include "utility.hpp"
 
 namespace witherspoon
 {
@@ -48,18 +51,18 @@
 #ifdef UCD90160_DEVICE_ACCESS
         device->onFailure();
 #endif
-        //Note: This application only runs when the system has
-        //power, so it will be killed by systemd sometime shortly
-        //after this power off is issued.
+        // Note: This application only runs when the system has
+        // power, so it will be killed by systemd sometime shortly
+        // after this power off is issued.
 
         util::powerOff<Shutdown>(bus);
     }
     catch (std::exception& e)
     {
-        //No need to crash
+        // No need to crash
         log<level::ERR>(e.what());
     }
 }
 
-}
-}
+} // namespace power
+} // namespace witherspoon
diff --git a/power-sequencer/runtime_monitor.hpp b/power-sequencer/runtime_monitor.hpp
index fb3dcb1..934aef1 100644
--- a/power-sequencer/runtime_monitor.hpp
+++ b/power-sequencer/runtime_monitor.hpp
@@ -1,10 +1,11 @@
 #pragma once
 
+#include "device.hpp"
+#include "device_monitor.hpp"
+
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server.hpp>
 #include <sdeventplus/event.hpp>
-#include "device.hpp"
-#include "device_monitor.hpp"
 
 namespace witherspoon
 {
@@ -31,83 +32,76 @@
  */
 class RuntimeMonitor : public DeviceMonitor
 {
-    public:
+  public:
+    RuntimeMonitor() = delete;
+    ~RuntimeMonitor() = default;
+    RuntimeMonitor(const RuntimeMonitor&) = delete;
+    RuntimeMonitor& operator=(const RuntimeMonitor&) = delete;
+    RuntimeMonitor(RuntimeMonitor&&) = delete;
+    RuntimeMonitor& operator=(RuntimeMonitor&&) = delete;
 
-        RuntimeMonitor() = delete;
-        ~RuntimeMonitor() = default;
-        RuntimeMonitor(const RuntimeMonitor&) = delete;
-        RuntimeMonitor& operator=(const RuntimeMonitor&) = delete;
-        RuntimeMonitor(RuntimeMonitor&&) = delete;
-        RuntimeMonitor& operator=(RuntimeMonitor&&) = delete;
+    /**
+     * Constructor
+     *
+     * @param[in] d - the device to monitor
+     * @param[in] b - D-Bus bus object
+     * @param[in] e - event object
+     * @param[in] i - poll interval
+     */
+    RuntimeMonitor(std::unique_ptr<witherspoon::power::Device>&& d,
+                   sdbusplus::bus::bus& b, const sdeventplus::Event& e,
+                   std::chrono::milliseconds& i) :
+        DeviceMonitor(std::move(d), e, i),
+        bus(b), match(bus, getMatchString(),
+                      std::bind(std::mem_fn(&RuntimeMonitor::onPowerLost), this,
+                                std::placeholders::_1))
+    {
+    }
 
-        /**
-         * Constructor
-         *
-         * @param[in] d - the device to monitor
-         * @param[in] b - D-Bus bus object
-         * @param[in] e - event object
-         * @param[in] i - poll interval
-         */
-        RuntimeMonitor(std::unique_ptr<witherspoon::power::Device>&& d,
-                sdbusplus::bus::bus& b,
-                const sdeventplus::Event& e,
-                std::chrono::milliseconds& i) :
-            DeviceMonitor(std::move(d), e, i),
-            bus(b),
-            match(bus,
-                  getMatchString(),
-                  std::bind(std::mem_fn(&RuntimeMonitor::onPowerLost),
-                            this, std::placeholders::_1))
-        {
-        }
+    /**
+     * Clears faults and then runs DeviceMonitor::run to
+     * call Device::analyze() on an ongoing interval.
+     *
+     * @return the return value from sd_event_loop()
+     */
+    int run() override;
 
-        /**
-         * Clears faults and then runs DeviceMonitor::run to
-         * call Device::analyze() on an ongoing interval.
-         *
-         * @return the return value from sd_event_loop()
-         */
-        int run() override;
+  private:
+    /**
+     * The PowerLost signal handler.
+     *
+     * After doing an analysis, will issue a power off
+     * as some device has a power fault and needs to be
+     * properly shut down.
+     *
+     * @param[in] msg - D-Bus message for callback
+     */
+    void onPowerLost(sdbusplus::message::message& msg);
 
-    private:
+    /**
+     * Returns the match string for the PowerLost signal
+     */
+    std::string getMatchString()
+    {
+        using namespace sdbusplus::bus::match::rules;
 
-        /**
-         * The PowerLost signal handler.
-         *
-         * After doing an analysis, will issue a power off
-         * as some device has a power fault and needs to be
-         * properly shut down.
-         *
-         * @param[in] msg - D-Bus message for callback
-         */
-        void onPowerLost(sdbusplus::message::message& msg);
+        std::string s = type::signal() + path("/org/openbmc/control/power0") +
+                        interface("org.openbmc.control.Power") +
+                        member("PowerLost");
 
-        /**
-         * Returns the match string for the PowerLost signal
-         */
-        std::string getMatchString()
-        {
-            using namespace sdbusplus::bus::match::rules;
+        return s;
+    }
 
-            std::string s =
-                type::signal() +
-                path("/org/openbmc/control/power0") +
-                interface("org.openbmc.control.Power") +
-                member("PowerLost");
+    /**
+     * The D-Bus object
+     */
+    sdbusplus::bus::bus& bus;
 
-            return s;
-        }
-
-        /**
-         * The D-Bus object
-         */
-        sdbusplus::bus::bus& bus;
-
-        /**
-         * Match object for PowerLost signals
-         */
-        sdbusplus::bus::match_t match;
+    /**
+     * Match object for PowerLost signals
+     */
+    sdbusplus::bus::match_t match;
 };
 
-}
-}
+} // namespace power
+} // namespace witherspoon
diff --git a/power-sequencer/types.hpp b/power-sequencer/types.hpp
index c473828..fcb30e3 100644
--- a/power-sequencer/types.hpp
+++ b/power-sequencer/types.hpp
@@ -34,8 +34,8 @@
  */
 enum class optionFlags
 {
-    none             = 0,
-    shutdownOnFault  = 1
+    none = 0,
+    shutdownOnFault = 1
 };
 
 constexpr auto gpioNumField = 0;
@@ -51,8 +51,8 @@
 
 using ErrorFunction = std::function<void(UCD90160&, const std::string&)>;
 
-using GPIOGroup = std::tuple<
-        std::string, gpio::Value, ErrorFunction, optionFlags, GPIODefinitions>;
+using GPIOGroup = std::tuple<std::string, gpio::Value, ErrorFunction,
+                             optionFlags, GPIODefinitions>;
 
 using GPIOAnalysis = std::map<extraAnalysisType, GPIOGroup>;
 
@@ -62,8 +62,8 @@
 constexpr auto pollField = 3;
 constexpr auto extraAnalysisField = 4;
 
-using GPIConfig = std::tuple<
-        size_t, size_t, std::string, bool, extraAnalysisType>;
+using GPIConfig =
+    std::tuple<size_t, size_t, std::string, bool, extraAnalysisType>;
 
 using GPIConfigs = std::vector<GPIConfig>;
 
@@ -74,12 +74,12 @@
 constexpr auto gpiConfigField = 2;
 constexpr auto gpioAnalysisField = 3;
 
-using DeviceDefinition = std::tuple<
-        std::string, RailNames, GPIConfigs, GPIOAnalysis>;
+using DeviceDefinition =
+    std::tuple<std::string, RailNames, GPIConfigs, GPIOAnalysis>;
 
-//Maps a device instance to its definition
+// Maps a device instance to its definition
 using DeviceMap = std::map<size_t, DeviceDefinition>;
 
-}
-}
-}
+} // namespace ucd90160
+} // namespace power
+} // namespace witherspoon
diff --git a/power-sequencer/ucd90160.cpp b/power-sequencer/ucd90160.cpp
index bc1177c..08b8a7d 100644
--- a/power-sequencer/ucd90160.cpp
+++ b/power-sequencer/ucd90160.cpp
@@ -13,16 +13,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "ucd90160.hpp"
+
+#include "names_values.hpp"
+#include "utility.hpp"
+
+#include <elog-errors.hpp>
 #include <map>
 #include <memory>
+#include <org/open_power/Witherspoon/Fault/error.hpp>
 #include <phosphor-logging/elog.hpp>
 #include <phosphor-logging/log.hpp>
-#include <elog-errors.hpp>
-#include <org/open_power/Witherspoon/Fault/error.hpp>
 #include <xyz/openbmc_project/Common/Device/error.hpp>
-#include "names_values.hpp"
-#include "ucd90160.hpp"
-#include "utility.hpp"
 
 namespace witherspoon
 {
@@ -44,19 +46,14 @@
 using namespace pmbus;
 using namespace phosphor::logging;
 
-namespace device_error = sdbusplus::xyz::openbmc_project::
-        Common::Device::Error;
-namespace power_error = sdbusplus::org::open_power::
-        Witherspoon::Fault::Error;
+namespace device_error = sdbusplus::xyz::openbmc_project::Common::Device::Error;
+namespace power_error = sdbusplus::org::open_power::Witherspoon::Fault::Error;
 
 UCD90160::UCD90160(size_t instance, sdbusplus::bus::bus& bus) :
-        Device(DEVICE_NAME, instance),
-        interface(std::get<ucd90160::pathField>(
-                          deviceMap.find(instance)->second),
-                  DRIVER_NAME,
-                  instance),
-        gpioDevice(findGPIODevice(interface.path())),
-        bus(bus)
+    Device(DEVICE_NAME, instance),
+    interface(std::get<ucd90160::pathField>(deviceMap.find(instance)->second),
+              DRIVER_NAME, instance),
+    gpioDevice(findGPIODevice(interface.path())), bus(bus)
 {
 }
 
@@ -68,8 +65,8 @@
 
         auto pgoodError = checkPGOODFaults(false);
 
-        //Not a voltage or PGOOD fault, but we know something
-        //failed so still create an error log.
+        // Not a voltage or PGOOD fault, but we know something
+        // failed so still create an error log.
         if (!voutError && !pgoodError)
         {
             createPowerFaultLog();
@@ -89,8 +86,8 @@
 {
     try
     {
-        //Note: Voltage faults are always fatal, so they just
-        //need to be analyzed in onFailure().
+        // Note: Voltage faults are always fatal, so they just
+        // need to be analyzed in onFailure().
 
         checkPGOODFaults(true);
     }
@@ -119,8 +116,8 @@
     bool errorCreated = false;
     auto statusWord = readStatusWord();
 
-    //The status_word register has a summary bit to tell us
-    //if each page even needs to be checked
+    // The status_word register has a summary bit to tell us
+    // if each page even needs to be checked
     if (!(statusWord & status_word::VOUT_FAULT))
     {
         return errorCreated;
@@ -136,20 +133,20 @@
         auto statusVout = interface.insertPageNum(STATUS_VOUT, page);
         uint8_t vout = interface.read(statusVout, Type::Debug);
 
-        //If any bits are on log them, though some are just
-        //warnings so they won't cause errors
+        // If any bits are on log them, though some are just
+        // warnings so they won't cause errors
         if (vout)
         {
             log<level::INFO>("A voltage rail has bits on in STATUS_VOUT",
-                    entry("STATUS_VOUT=0x%X", vout),
-                    entry("PAGE=%d", page));
+                             entry("STATUS_VOUT=0x%X", vout),
+                             entry("PAGE=%d", page));
         }
 
-        //Log errors if any non-warning bits on
+        // Log errors if any non-warning bits on
         if (vout & ~status_vout::WARNING_MASK)
         {
             auto& railNames = std::get<ucd90160::railNamesField>(
-                    deviceMap.find(getInstance())->second);
+                deviceMap.find(getInstance())->second);
             auto railName = railNames.at(page);
 
             util::NamesValues nv;
@@ -165,13 +162,12 @@
                 commit<device_error::ReadFailure>();
             }
 
-            using metadata = org::open_power::Witherspoon::Fault::
-                    PowerSequencerVoltageFault;
+            using metadata =
+                org::open_power::Witherspoon::Fault::PowerSequencerVoltageFault;
 
             report<power_error::PowerSequencerVoltageFault>(
-                    metadata::RAIL(page),
-                    metadata::RAIL_NAME(railName.c_str()),
-                    metadata::RAW_STATUS(nv.get().c_str()));
+                metadata::RAIL(page), metadata::RAIL_NAME(railName.c_str()),
+                metadata::RAW_STATUS(nv.get().c_str()));
 
             setVoutFaultLogged(page);
             errorCreated = true;
@@ -185,43 +181,41 @@
 {
     bool errorCreated = false;
 
-    //While PGOOD faults could show up in MFR_STATUS (and we could then
-    //check the summary bit in STATUS_WORD first), they are edge triggered,
-    //and as the device driver sends a clear faults command every time we
-    //do a read, we will never see them.  So, we'll have to just read the
-    //real time GPI status GPIO.
+    // While PGOOD faults could show up in MFR_STATUS (and we could then
+    // check the summary bit in STATUS_WORD first), they are edge triggered,
+    // and as the device driver sends a clear faults command every time we
+    // do a read, we will never see them.  So, we'll have to just read the
+    // real time GPI status GPIO.
 
-    //Check only the GPIs configured on this system.
+    // Check only the GPIs configured on this system.
     auto& gpiConfigs = std::get<ucd90160::gpiConfigField>(
-            deviceMap.find(getInstance())->second);
+        deviceMap.find(getInstance())->second);
 
     for (const auto& gpiConfig : gpiConfigs)
     {
         auto gpiNum = std::get<ucd90160::gpiNumField>(gpiConfig);
         auto doPoll = std::get<ucd90160::pollField>(gpiConfig);
 
-        //Can skip this one if there is already an error on this input,
-        //or we are polling and these inputs don't need to be polled
+        // Can skip this one if there is already an error on this input,
+        // or we are polling and these inputs don't need to be polled
         //(because errors on them are fatal).
         if (isPGOODFaultLogged(gpiNum) || (polling && !doPoll))
         {
             continue;
         }
 
-        //The real time status is read via the pin ID
+        // The real time status is read via the pin ID
         auto pinID = std::get<ucd90160::pinIDField>(gpiConfig);
         auto gpio = gpios.find(pinID);
         Value gpiStatus;
 
         try
         {
-            //The first time through, create the GPIO objects
+            // The first time through, create the GPIO objects
             if (gpio == gpios.end())
             {
-                gpios.emplace(
-                        pinID,
-                        std::make_unique<GPIO>(
-                                gpioDevice, pinID, Direction::input));
+                gpios.emplace(pinID, std::make_unique<GPIO>(gpioDevice, pinID,
+                                                            Direction::input));
                 gpio = gpios.find(pinID);
             }
 
@@ -239,9 +233,9 @@
 
         if (gpiStatus == Value::low)
         {
-            //There may be some extra analysis we can do to narrow the
-            //error down further.  Note that finding an error here won't
-            //prevent us from checking this GPI again.
+            // There may be some extra analysis we can do to narrow the
+            // error down further.  Note that finding an error here won't
+            // prevent us from checking this GPI again.
             errorCreated = doExtraAnalysis(gpiConfig);
 
             if (errorCreated)
@@ -266,13 +260,13 @@
                 commit<device_error::ReadFailure>();
             }
 
-            using metadata =  org::open_power::Witherspoon::Fault::
-                    PowerSequencerPGOODFault;
+            using metadata =
+                org::open_power::Witherspoon::Fault::PowerSequencerPGOODFault;
 
             report<power_error::PowerSequencerPGOODFault>(
-                    metadata::INPUT_NUM(gpiNum),
-                    metadata::INPUT_NAME(gpiName.c_str()),
-                    metadata::RAW_STATUS(nv.get().c_str()));
+                metadata::INPUT_NUM(gpiNum),
+                metadata::INPUT_NAME(gpiName.c_str()),
+                metadata::RAW_STATUS(nv.get().c_str()));
 
             setPGOODFaultLogged(gpiNum);
             errorCreated = true;
@@ -297,26 +291,25 @@
         commit<device_error::ReadFailure>();
     }
 
-    using metadata = org::open_power::Witherspoon::Fault::
-        PowerSequencerFault;
+    using metadata = org::open_power::Witherspoon::Fault::PowerSequencerFault;
 
     report<power_error::PowerSequencerFault>(
-            metadata::RAW_STATUS(nv.get().c_str()));
+        metadata::RAW_STATUS(nv.get().c_str()));
 }
 
 fs::path UCD90160::findGPIODevice(const fs::path& path)
 {
     fs::path gpioDevicePath;
 
-    //In the driver directory, look for a subdirectory
-    //named gpiochipX, where X is some number.  Then
-    //we'll access the GPIO at /dev/gpiochipX.
+    // In the driver directory, look for a subdirectory
+    // named gpiochipX, where X is some number.  Then
+    // we'll access the GPIO at /dev/gpiochipX.
     if (fs::is_directory(path))
     {
         for (auto& f : fs::directory_iterator(path))
         {
             if (f.path().filename().string().find("gpiochip") !=
-                    std::string::npos)
+                std::string::npos)
             {
                 gpioDevicePath = "/dev" / f.path().filename();
                 break;
@@ -327,7 +320,7 @@
     if (gpioDevicePath.empty())
     {
         log<level::ERR>("Could not find GPIO device path",
-                entry("BASE_PATH=%s", path.c_str()));
+                        entry("BASE_PATH=%s", path.c_str()));
     }
 
     return gpioDevicePath;
@@ -342,7 +335,7 @@
         return false;
     }
 
-    //Currently the only extra analysis to do is to check other GPIOs.
+    // Currently the only extra analysis to do is to check other GPIOs.
     return doGPIOAnalysis(type);
 }
 
@@ -352,7 +345,7 @@
     bool shutdown = false;
 
     const auto& analysisConfig = std::get<ucd90160::gpioAnalysisField>(
-            deviceMap.find(getInstance())->second);
+        deviceMap.find(getInstance())->second);
 
     auto gpioConfig = analysisConfig.find(type);
     if (gpioConfig == analysisConfig.end())
@@ -360,19 +353,16 @@
         return errorFound;
     }
 
-    auto path = std::get<ucd90160::gpioDevicePathField>(
-            gpioConfig->second);
+    auto path = std::get<ucd90160::gpioDevicePathField>(gpioConfig->second);
 
-    //The /dev/gpiochipX device
+    // The /dev/gpiochipX device
     auto device = findGPIODevice(path);
 
-    //The GPIO value of the fault condition
-    auto polarity = std::get<ucd90160::gpioPolarityField>(
-            gpioConfig->second);
+    // The GPIO value of the fault condition
+    auto polarity = std::get<ucd90160::gpioPolarityField>(gpioConfig->second);
 
-    //The GPIOs to check
-    auto& gpios = std::get<ucd90160::gpioDefinitionField>(
-            gpioConfig->second);
+    // The GPIOs to check
+    auto& gpios = std::get<ucd90160::gpioDefinitionField>(gpioConfig->second);
 
     for (const auto& gpio : gpios)
     {
@@ -380,8 +370,7 @@
 
         try
         {
-            GPIO g{device,
-                   std::get<ucd90160::gpioNumField>(gpio),
+            GPIO g{device, std::get<ucd90160::gpioNumField>(gpio),
                    Direction::input};
 
             value = g.read();
@@ -390,10 +379,10 @@
         {
             if (!gpioAccessError)
             {
-                //GPIO only throws InternalErrors - not worth committing.
+                // GPIO only throws InternalErrors - not worth committing.
                 log<level::ERR>(
-                        "GPIO read failed while analyzing a power fault",
-                        entry("CHIP_PATH=%s", path.c_str()));
+                    "GPIO read failed while analyzing a power fault",
+                    entry("CHIP_PATH=%s", path.c_str()));
 
                 gpioAccessError = true;
             }
@@ -413,21 +402,21 @@
                 continue;
             }
 
-            //Look up and call the error creation function
-            auto logError = std::get<ucd90160::errorFunctionField>(
-                    gpioConfig->second);
+            // Look up and call the error creation function
+            auto logError =
+                std::get<ucd90160::errorFunctionField>(gpioConfig->second);
 
             logError(*this, part);
 
-            //Save the part callout so we don't call it out again
+            // Save the part callout so we don't call it out again
             setPartCallout(callout);
 
-            //Some errors (like overtemps) require a shutdown
+            // Some errors (like overtemps) require a shutdown
             auto actions = static_cast<uint32_t>(
-                    std::get<ucd90160::optionFlagsField>(gpioConfig->second));
+                std::get<ucd90160::optionFlagsField>(gpioConfig->second));
 
             if (actions & static_cast<decltype(actions)>(
-                        ucd90160::optionFlags::shutdownOnFault))
+                              ucd90160::optionFlags::shutdownOnFault))
             {
                 shutdown = true;
             }
@@ -436,7 +425,7 @@
 
     if (shutdown)
     {
-        //Will be replaced with a GPU specific error in a future commit
+        // Will be replaced with a GPU specific error in a future commit
         util::powerOff<power_error::Shutdown>(bus);
     }
 
@@ -461,8 +450,8 @@
     using metadata = org::open_power::Witherspoon::Fault::GPUPowerFault;
 
     report<power_error::GPUPowerFault>(
-            metadata::RAW_STATUS(nv.get().c_str()),
-            metadata::CALLOUT_INVENTORY_PATH(callout.c_str()));
+        metadata::RAW_STATUS(nv.get().c_str()),
+        metadata::CALLOUT_INVENTORY_PATH(callout.c_str()));
 }
 
 void UCD90160::gpuOverTempError(const std::string& callout)
@@ -483,9 +472,9 @@
     using metadata = org::open_power::Witherspoon::Fault::GPUOverTemp;
 
     report<power_error::GPUOverTemp>(
-            metadata::RAW_STATUS(nv.get().c_str()),
-            metadata::CALLOUT_INVENTORY_PATH(callout.c_str()));
+        metadata::RAW_STATUS(nv.get().c_str()),
+        metadata::CALLOUT_INVENTORY_PATH(callout.c_str()));
 }
 
-}
-}
+} // namespace power
+} // namespace witherspoon
diff --git a/power-sequencer/ucd90160.hpp b/power-sequencer/ucd90160.hpp
index f14a99e..6213c26 100644
--- a/power-sequencer/ucd90160.hpp
+++ b/power-sequencer/ucd90160.hpp
@@ -1,23 +1,23 @@
 #pragma once
 
+#include "device.hpp"
+#include "gpio.hpp"
+#include "pmbus.hpp"
+#include "types.hpp"
+
 #include <algorithm>
 #include <experimental/filesystem>
 #include <map>
 #include <sdbusplus/bus.hpp>
 #include <vector>
-#include "device.hpp"
-#include "gpio.hpp"
-#include "pmbus.hpp"
-#include "types.hpp"
 
 namespace witherspoon
 {
 namespace power
 {
 
-//Error type, callout
-using PartCallout =
-        std::tuple<ucd90160::extraAnalysisType, std::string>;
+// Error type, callout
+using PartCallout = std::tuple<ucd90160::extraAnalysisType, std::string>;
 
 /**
  * @class UCD90160
@@ -28,284 +28,279 @@
  */
 class UCD90160 : public Device
 {
-    public:
+  public:
+    UCD90160() = delete;
+    ~UCD90160() = default;
+    UCD90160(const UCD90160&) = delete;
+    UCD90160& operator=(const UCD90160&) = delete;
+    UCD90160(UCD90160&&) = default;
+    UCD90160& operator=(UCD90160&&) = default;
 
-        UCD90160() = delete;
-        ~UCD90160() = default;
-        UCD90160(const UCD90160&) = delete;
-        UCD90160& operator=(const UCD90160&) = delete;
-        UCD90160(UCD90160&&) = default;
-        UCD90160& operator=(UCD90160&&) = default;
+    /**
+     * Constructor
+     *
+     * @param[in] instance - the device instance number
+     * @param[in] bus - D-Bus bus object
+     */
+    UCD90160(size_t instance, sdbusplus::bus::bus& bus);
 
-        /**
-         * Constructor
-         *
-         * @param[in] instance - the device instance number
-         * @param[in] bus - D-Bus bus object
-         */
-        UCD90160(size_t instance, sdbusplus::bus::bus& bus);
+    /**
+     * Analyzes the device for errors when the device is
+     * known to be in an error state.  A log will be created.
+     */
+    void onFailure() override;
 
-        /**
-         * Analyzes the device for errors when the device is
-         * known to be in an error state.  A log will be created.
-         */
-        void onFailure() override;
+    /**
+     * Checks the device for errors and only creates a log
+     * if one is found.
+     */
+    void analyze() override;
 
-        /**
-         * Checks the device for errors and only creates a log
-         * if one is found.
-         */
-        void analyze() override;
+    /**
+     * Clears faults in the device
+     */
+    void clearFaults() override
+    {
+    }
 
-        /**
-         * Clears faults in the device
-         */
-        void clearFaults() override
-        {
-        }
+  private:
+    /**
+     * Reports an error for a GPU PGOOD failure
+     *
+     * @param[in] callout - the GPU callout string
+     */
+    void gpuPGOODError(const std::string& callout);
 
-    private:
+    /**
+     * Reports an error for a GPU OverTemp failure
+     *
+     * @param[in] callout - the GPU callout string
+     */
+    void gpuOverTempError(const std::string& callout);
 
-        /**
-         * Reports an error for a GPU PGOOD failure
-         *
-         * @param[in] callout - the GPU callout string
-         */
-        void gpuPGOODError(const std::string& callout);
+    /**
+     * Given the device path for a chip, find its gpiochip
+     * path
+     *
+     * @param[in] path - device path, like
+     *                   /sys/devices/.../i2c-11/11-0064
+     *
+     * @return fs::path - The gpiochip path, like
+     *                   /dev/gpiochip1
+     */
+    static std::experimental::filesystem::path
+        findGPIODevice(const std::experimental::filesystem::path& path);
 
-        /**
-         * Reports an error for a GPU OverTemp failure
-         *
-         * @param[in] callout - the GPU callout string
-         */
-        void gpuOverTempError(const std::string& callout);
+    /**
+     * Checks for VOUT faults on the device.
+     *
+     * This device can monitor voltages of its dependent
+     * devices, and VOUT faults are voltage faults
+     * on these devices.
+     *
+     * @return bool - true if an error log was created
+     */
+    bool checkVOUTFaults();
 
-        /**
-         * Given the device path for a chip, find its gpiochip
-         * path
-         *
-         * @param[in] path - device path, like
-         *                   /sys/devices/.../i2c-11/11-0064
-         *
-         * @return fs::path - The gpiochip path, like
-         *                   /dev/gpiochip1
-         */
-        static std::experimental::filesystem::path findGPIODevice(
-                const std::experimental::filesystem::path& path);
+    /**
+     * Checks for PGOOD faults on the device.
+     *
+     * This device can monitor the PGOOD signals of its dependent
+     * devices, and this check will look for faults of
+     * those PGOODs.
+     *
+     * @param[in] polling - If this is running while polling for errors,
+     *                      as opposing to analyzing a fail condition.
+     *
+     * @return bool - true if an error log was created
+     */
+    bool checkPGOODFaults(bool polling);
 
-        /**
-         * Checks for VOUT faults on the device.
-         *
-         * This device can monitor voltages of its dependent
-         * devices, and VOUT faults are voltage faults
-         * on these devices.
-         *
-         * @return bool - true if an error log was created
-         */
-        bool checkVOUTFaults();
+    /**
+     * Creates an error log when the device has an error
+     * but it isn't a PGOOD or voltage failure.
+     */
+    void createPowerFaultLog();
 
-        /**
-         * Checks for PGOOD faults on the device.
-         *
-         * This device can monitor the PGOOD signals of its dependent
-         * devices, and this check will look for faults of
-         * those PGOODs.
-         *
-         * @param[in] polling - If this is running while polling for errors,
-         *                      as opposing to analyzing a fail condition.
-         *
-         * @return bool - true if an error log was created
-         */
-         bool checkPGOODFaults(bool polling);
+    /**
+     * Reads the status_word register
+     *
+     * @return uint16_t - the register contents
+     */
+    uint16_t readStatusWord();
 
-        /**
-         * Creates an error log when the device has an error
-         * but it isn't a PGOOD or voltage failure.
-         */
-        void createPowerFaultLog();
+    /**
+     * Reads the mfr_status register
+     *
+     * @return uint32_t - the register contents
+     */
+    uint32_t readMFRStatus();
 
-        /**
-         * Reads the status_word register
-         *
-         * @return uint16_t - the register contents
-         */
-        uint16_t readStatusWord();
+    /**
+     * Does any additional fault analysis based on the
+     * value of the extraAnalysisType field in the GPIOConfig
+     * entry.
+     *
+     * Used to get better callouts.
+     *
+     * @param[in] config - the GPIOConfig entry to use
+     *
+     * @return bool - true if a HW error was found, false else
+     */
+    bool doExtraAnalysis(const ucd90160::GPIConfig& config);
 
-        /**
-         * Reads the mfr_status register
-         *
-         * @return uint32_t - the register contents
-         */
-        uint32_t readMFRStatus();
+    /**
+     * Does additional fault analysis using GPIOs to
+     * specifically identify the failing part.
+     *
+     * Used when there are too many PGOOD inputs for
+     * the UCD90160 to handle, so just a summary bit
+     * is wired into the chip, and then the specific
+     * fault GPIOs are off of a different GPIO device,
+     * like an IO expander.
+     *
+     * @param[in] type - the type of analysis to do
+     *
+     * @return bool - true if a HW error was found, false else
+     */
+    bool doGPIOAnalysis(ucd90160::extraAnalysisType type);
 
-        /**
-         * Does any additional fault analysis based on the
-         * value of the extraAnalysisType field in the GPIOConfig
-         * entry.
-         *
-         * Used to get better callouts.
-         *
-         * @param[in] config - the GPIOConfig entry to use
-         *
-         * @return bool - true if a HW error was found, false else
-         */
-        bool doExtraAnalysis(const ucd90160::GPIConfig& config);
+    /**
+     * Says if we've already logged a Vout fault
+     *
+     * The policy is only 1 of the same error will
+     * be logged for the duration of a class instance.
+     *
+     * @param[in] page - the page to check
+     *
+     * @return bool - if we've already logged a fault against
+     *                this page
+     */
+    inline bool isVoutFaultLogged(uint32_t page) const
+    {
+        return std::find(voutErrors.begin(), voutErrors.end(), page) !=
+               voutErrors.end();
+    }
 
-        /**
-         * Does additional fault analysis using GPIOs to
-         * specifically identify the failing part.
-         *
-         * Used when there are too many PGOOD inputs for
-         * the UCD90160 to handle, so just a summary bit
-         * is wired into the chip, and then the specific
-         * fault GPIOs are off of a different GPIO device,
-         * like an IO expander.
-         *
-         * @param[in] type - the type of analysis to do
-         *
-         * @return bool - true if a HW error was found, false else
-         */
-        bool doGPIOAnalysis(ucd90160::extraAnalysisType type);
+    /**
+     * Saves that a Vout fault has been logged
+     *
+     * @param[in] page - the page the error was logged against
+     */
+    inline void setVoutFaultLogged(uint32_t page)
+    {
+        voutErrors.push_back(page);
+    }
 
-        /**
-         * Says if we've already logged a Vout fault
-         *
-         * The policy is only 1 of the same error will
-         * be logged for the duration of a class instance.
-         *
-         * @param[in] page - the page to check
-         *
-         * @return bool - if we've already logged a fault against
-         *                this page
-         */
-        inline bool isVoutFaultLogged(uint32_t page) const
-        {
-            return std::find(voutErrors.begin(),
-                             voutErrors.end(),
-                             page) != voutErrors.end();
-        }
+    /**
+     * Says if we've already logged a PGOOD fault
+     *
+     * The policy is only 1 of the same errors will
+     * be logged for the duration of a class instance.
+     *
+     * @param[in] input - the input to check
+     *
+     * @return bool - if we've already logged a fault against
+     *                this input
+     */
+    inline bool isPGOODFaultLogged(uint32_t input) const
+    {
+        return std::find(pgoodErrors.begin(), pgoodErrors.end(), input) !=
+               pgoodErrors.end();
+    }
 
-        /**
-         * Saves that a Vout fault has been logged
-         *
-         * @param[in] page - the page the error was logged against
-         */
-        inline void setVoutFaultLogged(uint32_t page)
-        {
-            voutErrors.push_back(page);
-        }
+    /**
+     * Says if we've already logged a specific fault
+     * against a specific part
+     *
+     * @param[in] callout - error type and name tuple
+     *
+     * @return bool - if we've already logged this fault
+     *                against this part
+     */
+    inline bool isPartCalledOut(const PartCallout& callout) const
+    {
+        return std::find(callouts.begin(), callouts.end(), callout) !=
+               callouts.end();
+    }
 
-        /**
-         * Says if we've already logged a PGOOD fault
-         *
-         * The policy is only 1 of the same errors will
-         * be logged for the duration of a class instance.
-         *
-         * @param[in] input - the input to check
-         *
-         * @return bool - if we've already logged a fault against
-         *                this input
-         */
-        inline bool isPGOODFaultLogged(uint32_t input) const
-        {
-            return std::find(pgoodErrors.begin(),
-                             pgoodErrors.end(),
-                             input) != pgoodErrors.end();
-        }
+    /**
+     * Saves that a PGOOD fault has been logged
+     *
+     * @param[in] input - the input the error was logged against
+     */
+    inline void setPGOODFaultLogged(uint32_t input)
+    {
+        pgoodErrors.push_back(input);
+    }
 
-        /**
-         * Says if we've already logged a specific fault
-         * against a specific part
-         *
-         * @param[in] callout - error type and name tuple
-         *
-         * @return bool - if we've already logged this fault
-         *                against this part
-         */
-        inline bool isPartCalledOut(const PartCallout& callout) const
-        {
-            return std::find(callouts.begin(),
-                             callouts.end(),
-                             callout) != callouts.end();
-        }
+    /**
+     * Saves that a specific fault on a specific part has been done
+     *
+     * @param[in] callout - error type and name tuple
+     */
+    inline void setPartCallout(const PartCallout& callout)
+    {
+        callouts.push_back(callout);
+    }
 
-        /**
-         * Saves that a PGOOD fault has been logged
-         *
-         * @param[in] input - the input the error was logged against
-         */
-        inline void setPGOODFaultLogged(uint32_t input)
-        {
-            pgoodErrors.push_back(input);
-        }
+    /**
+     * List of pages that Vout errors have
+     * already been logged against
+     */
+    std::vector<uint32_t> voutErrors;
 
-        /**
-         * Saves that a specific fault on a specific part has been done
-         *
-         * @param[in] callout - error type and name tuple
-         */
-        inline void setPartCallout(const PartCallout& callout)
-        {
-            callouts.push_back(callout);
-        }
+    /**
+     * List of inputs that PGOOD errors have
+     * already been logged against
+     */
+    std::vector<uint32_t> pgoodErrors;
 
-        /**
-         * List of pages that Vout errors have
-         * already been logged against
-         */
-        std::vector<uint32_t> voutErrors;
+    /**
+     * List of callouts that already been done
+     */
+    std::vector<PartCallout> callouts;
 
-        /**
-         * List of inputs that PGOOD errors have
-         * already been logged against
-         */
-        std::vector<uint32_t> pgoodErrors;
+    /**
+     * The read/write interface to this hardware
+     */
+    pmbus::PMBus interface;
 
-        /**
-         * List of callouts that already been done
-         */
-        std::vector<PartCallout> callouts;
+    /**
+     * A map of GPI pin IDs to the GPIO object
+     * used to access them
+     */
+    std::map<size_t, std::unique_ptr<gpio::GPIO>> gpios;
 
-        /**
-         * The read/write interface to this hardware
-         */
-        pmbus::PMBus interface;
+    /**
+     * Keeps track of device access errors to avoid repeatedly
+     * logging errors for bad hardware
+     */
+    bool accessError = false;
 
-        /**
-         * A map of GPI pin IDs to the GPIO object
-         * used to access them
-         */
-        std::map<size_t, std::unique_ptr<gpio::GPIO>> gpios;
+    /**
+     * Keeps track of GPIO access errors when doing the in depth
+     * PGOOD fault analysis to avoid repeatedly logging errors
+     * for bad hardware
+     */
+    bool gpioAccessError = false;
 
-        /**
-         * Keeps track of device access errors to avoid repeatedly
-         * logging errors for bad hardware
-         */
-        bool accessError = false;
+    /**
+     * The path to the GPIO device used to read
+     * the GPI (PGOOD) status
+     */
+    std::experimental::filesystem::path gpioDevice;
 
-        /**
-         * Keeps track of GPIO access errors when doing the in depth
-         * PGOOD fault analysis to avoid repeatedly logging errors
-         * for bad hardware
-         */
-        bool gpioAccessError = false;
+    /**
+     * The D-Bus bus object
+     */
+    sdbusplus::bus::bus& bus;
 
-        /**
-         * The path to the GPIO device used to read
-         * the GPI (PGOOD) status
-         */
-        std::experimental::filesystem::path gpioDevice;
-
-        /**
-         * The D-Bus bus object
-         */
-        sdbusplus::bus::bus& bus;
-
-        /**
-         * Map of device instance to the instance specific data
-         */
-        static const ucd90160::DeviceMap deviceMap;
+    /**
+     * Map of device instance to the instance specific data
+     */
+    static const ucd90160::DeviceMap deviceMap;
 };
 
-}
-}
+} // namespace power
+} // namespace witherspoon
diff --git a/power-sequencer/ucd90160_defs.cpp b/power-sequencer/ucd90160_defs.cpp
index 5696061..d271f4b 100644
--- a/power-sequencer/ucd90160_defs.cpp
+++ b/power-sequencer/ucd90160_defs.cpp
@@ -15,7 +15,7 @@
  */
 #include "ucd90160.hpp"
 
-//Separated out to facilitate possible future generation of file.
+// Separated out to facilitate possible future generation of file.
 
 namespace witherspoon
 {
@@ -25,96 +25,71 @@
 using namespace ucd90160;
 using namespace std::string_literals;
 
-const DeviceMap UCD90160::deviceMap
-{
-    {0, DeviceDefinition{
-            "/sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c@1e78a000/"
-                "1e78a400.i2c-bus/i2c-11/11-0064",
+const DeviceMap UCD90160::deviceMap{
+    {0,
+     DeviceDefinition{
+         "/sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c@1e78a000/"
+         "1e78a400.i2c-bus/i2c-11/11-0064",
 
-            RailNames{
-                "5.0VCS"s,
-                "12.0V"s,
-                "3.3V"s,
-                "1.8V"s,
-                "1.1V"s,
-                "1.0V"s,
-                "0.9V"s,
-                "VDN-A"s,
-                "VDN-B"s,
-                "AVDD"s,
-                "VIO-A"s,
-                "VIO-B"s,
-                "VDD-A"s,
-                "VDD-B"s,
-                "VCS-A"s,
-                "VCS-B"s
-            },
+         RailNames{"5.0VCS"s, "12.0V"s, "3.3V"s, "1.8V"s, "1.1V"s, "1.0V"s,
+                   "0.9V"s, "VDN-A"s, "VDN-B"s, "AVDD"s, "VIO-A"s, "VIO-B"s,
+                   "VDD-A"s, "VDD-B"s, "VCS-A"s, "VCS-B"s},
 
-            GPIConfigs{
-                GPIConfig{1, 8,  "PGOOD_5P0V"s, false,
-                          extraAnalysisType::none},
-                GPIConfig{2, 9,  "MEM_GOOD0"s, false,
-                          extraAnalysisType::none},
-                GPIConfig{3, 10, "MEM_GOOD1"s, false,
-                          extraAnalysisType::none},
-                GPIConfig{4, 14, "GPU_PGOOD"s, false,
-                          extraAnalysisType::gpuPGOOD},
-                GPIConfig{5, 17, "GPU_TH_OVERT"s, true,
-                          extraAnalysisType::gpuOverTemp},
-                GPIConfig{6, 11, "SOFTWARE_PGOOD"s, false,
-                          extraAnalysisType::none}
-            },
+         GPIConfigs{
+             GPIConfig{1, 8, "PGOOD_5P0V"s, false, extraAnalysisType::none},
+             GPIConfig{2, 9, "MEM_GOOD0"s, false, extraAnalysisType::none},
+             GPIConfig{3, 10, "MEM_GOOD1"s, false, extraAnalysisType::none},
+             GPIConfig{4, 14, "GPU_PGOOD"s, false, extraAnalysisType::gpuPGOOD},
+             GPIConfig{5, 17, "GPU_TH_OVERT"s, true,
+                       extraAnalysisType::gpuOverTemp},
+             GPIConfig{6, 11, "SOFTWARE_PGOOD"s, false,
+                       extraAnalysisType::none}},
 
-            GPIOAnalysis{
-                {extraAnalysisType::gpuPGOOD,
-                    GPIOGroup{
-                        "/sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c@"
-                        "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060",
-                        gpio::Value::low,
-                        [](auto& ucd, const auto& callout)
-                                { ucd.gpuPGOODError(callout); },
-                        optionFlags::none,
-                        GPIODefinitions{
-                            GPIODefinition{8,
-                                "/system/chassis/motherboard/gv100card0"s},
-                            GPIODefinition{9,
-                                "/system/chassis/motherboard/gv100card1"s},
-                            GPIODefinition{10,
-                                "/system/chassis/motherboard/gv100card2"s},
-                            GPIODefinition{11,
-                                "/system/chassis/motherboard/gv100card3"s},
-                            GPIODefinition{12,
-                                "/system/chassis/motherboard/gv100card4"s},
-                            GPIODefinition{13,
-                                "/system/chassis/motherboard/gv100card5"s}}
-                    }},
+         GPIOAnalysis{
+             {extraAnalysisType::gpuPGOOD,
+              GPIOGroup{
+                  "/sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c@"
+                  "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060",
+                  gpio::Value::low,
+                  [](auto& ucd, const auto& callout) {
+                      ucd.gpuPGOODError(callout);
+                  },
+                  optionFlags::none,
+                  GPIODefinitions{
+                      GPIODefinition{8,
+                                     "/system/chassis/motherboard/gv100card0"s},
+                      GPIODefinition{9,
+                                     "/system/chassis/motherboard/gv100card1"s},
+                      GPIODefinition{10,
+                                     "/system/chassis/motherboard/gv100card2"s},
+                      GPIODefinition{11,
+                                     "/system/chassis/motherboard/gv100card3"s},
+                      GPIODefinition{12,
+                                     "/system/chassis/motherboard/gv100card4"s},
+                      GPIODefinition{
+                          13, "/system/chassis/motherboard/gv100card5"s}}}},
 
-                {extraAnalysisType::gpuOverTemp,
-                    GPIOGroup{
-                        "/sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c@"
-                        "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060",
-                        gpio::Value::low,
-                        [](auto& ucd, const auto& callout)
-                                { ucd.gpuOverTempError(callout); },
-                        optionFlags::shutdownOnFault,
-                        GPIODefinitions{
-                            GPIODefinition{2,
-                                "/system/chassis/motherboard/gv100card0"s},
-                            GPIODefinition{3,
-                                "/system/chassis/motherboard/gv100card1"s},
-                            GPIODefinition{4,
-                                "/system/chassis/motherboard/gv100card2"s},
-                            GPIODefinition{5,
-                                "/system/chassis/motherboard/gv100card3"s},
-                            GPIODefinition{6,
-                                "/system/chassis/motherboard/gv100card4"s},
-                            GPIODefinition{7,
-                                "/system/chassis/motherboard/gv100card5"s}}
-                    }}
-            }
-        }
-    }
-};
+             {extraAnalysisType::gpuOverTemp,
+              GPIOGroup{
+                  "/sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c@"
+                  "1e78a000/1e78a400.i2c-bus/i2c-11/11-0060",
+                  gpio::Value::low,
+                  [](auto& ucd,
+                     const auto& callout) { ucd.gpuOverTempError(callout); },
+                  optionFlags::shutdownOnFault,
+                  GPIODefinitions{
+                      GPIODefinition{2,
+                                     "/system/chassis/motherboard/gv100card0"s},
+                      GPIODefinition{3,
+                                     "/system/chassis/motherboard/gv100card1"s},
+                      GPIODefinition{4,
+                                     "/system/chassis/motherboard/gv100card2"s},
+                      GPIODefinition{5,
+                                     "/system/chassis/motherboard/gv100card3"s},
+                      GPIODefinition{6,
+                                     "/system/chassis/motherboard/gv100card4"s},
+                      GPIODefinition{
+                          7, "/system/chassis/motherboard/gv100card5"s}}}}}}}};
 
-}
-}
+} // namespace power
+} // namespace witherspoon
