diff --git a/fan_speed.hpp b/fan_speed.hpp
index 9b4ad63..96d408e 100644
--- a/fan_speed.hpp
+++ b/fan_speed.hpp
@@ -1,11 +1,11 @@
 #pragma once
 
-#include <memory>
-
 #include "hwmonio.hpp"
 #include "interface.hpp"
 #include "sysfs.hpp"
 
+#include <memory>
+
 namespace hwmon
 {
 
@@ -17,56 +17,50 @@
  */
 class FanSpeed : public FanSpeedObject
 {
-    public:
+  public:
+    /**
+     * @brief Constructs FanSpeed Object
+     *
+     * @param[in] io -  HwmonIO(instance path) (ex /sys/class/hwmon/hwmon1)
+     * @param[in] devPath - The /sys/devices sysfs path
+     * @param[in] id - The hwmon id
+     * @param[in] bus - Dbus bus object
+     * @param[in] objPath - Dbus object path
+     * @param[in] defer - Dbus object registration defer
+     * @param[in] target - initial target speed value
+     */
+    FanSpeed(std::unique_ptr<hwmonio::HwmonIOInterface> io,
+             const std::string& devPath, const std::string& id,
+             sdbusplus::bus::bus& bus, const char* objPath, bool defer,
+             uint64_t target) :
+        FanSpeedObject(bus, objPath, defer),
+        id(id), ioAccess(std::move(io)), devPath(devPath)
+    {
+        FanSpeedObject::target(target);
+    }
 
-        /**
-         * @brief Constructs FanSpeed Object
-         *
-         * @param[in] io -  HwmonIO(instance path) (ex /sys/class/hwmon/hwmon1)
-         * @param[in] devPath - The /sys/devices sysfs path
-         * @param[in] id - The hwmon id
-         * @param[in] bus - Dbus bus object
-         * @param[in] objPath - Dbus object path
-         * @param[in] defer - Dbus object registration defer
-         * @param[in] target - initial target speed value
-         */
-        FanSpeed(std::unique_ptr<hwmonio::HwmonIOInterface> io,
-                 const std::string& devPath,
-                 const std::string& id,
-                 sdbusplus::bus::bus& bus,
-                 const char* objPath,
-                 bool defer,
-                 uint64_t target) : FanSpeedObject(bus, objPath, defer),
-                    id(id),
-                    ioAccess(std::move(io)),
-                    devPath(devPath)
-        {
-            FanSpeedObject::target(target);
-        }
+    /**
+     * @brief Set the value of target
+     *
+     * @return Value of target
+     */
+    uint64_t target(uint64_t value) override;
 
-        /**
-         * @brief Set the value of target
-         *
-         * @return Value of target
-         */
-        uint64_t target(uint64_t value) override;
+    /**
+     * @brief Writes the pwm_enable sysfs entry if the
+     *        env var with the value to write is present
+     */
+    void enable();
 
-        /**
-         * @brief Writes the pwm_enable sysfs entry if the
-         *        env var with the value to write is present
-         */
-        void enable();
-
-    private:
-        /** @brief hwmon type */
-        static constexpr auto type = "fan";
-        /** @brief hwmon id */
-        std::string id;
-        /** @brief Hwmon sysfs access. */
-        std::unique_ptr<hwmonio::HwmonIOInterface> ioAccess;
-        /** @brief Physical device path. */
-        std::string devPath;
-
+  private:
+    /** @brief hwmon type */
+    static constexpr auto type = "fan";
+    /** @brief hwmon id */
+    std::string id;
+    /** @brief Hwmon sysfs access. */
+    std::unique_ptr<hwmonio::HwmonIOInterface> ioAccess;
+    /** @brief Physical device path. */
+    std::string devPath;
 };
 
 } // namespace hwmon
