diff --git a/include/ADCSensor.hpp b/include/ADCSensor.hpp
index 2397093..fd248da 100644
--- a/include/ADCSensor.hpp
+++ b/include/ADCSensor.hpp
@@ -7,17 +7,17 @@
 class ADCSensor : public Sensor
 {
   public:
-    ADCSensor(const std::string &path,
-              sdbusplus::asio::object_server &objectServer,
-              std::shared_ptr<sdbusplus::asio::connection> &conn,
-              boost::asio::io_service &io, const std::string &sensorName,
-              std::vector<thresholds::Threshold> &&thresholds,
+    ADCSensor(const std::string& path,
+              sdbusplus::asio::object_server& objectServer,
+              std::shared_ptr<sdbusplus::asio::connection>& conn,
+              boost::asio::io_service& io, const std::string& sensorName,
+              std::vector<thresholds::Threshold>&& thresholds,
               const double scaleFactor, PowerState readState,
-              const std::string &sensorConfiguration);
+              const std::string& sensorConfiguration);
     ~ADCSensor();
 
   private:
-    sdbusplus::asio::object_server &objServer;
+    sdbusplus::asio::object_server& objServer;
     boost::asio::posix::stream_descriptor inputDev;
     boost::asio::deadline_timer waitTimer;
     boost::asio::streambuf readBuf;
@@ -25,6 +25,6 @@
     double scaleFactor;
     PowerState readState;
     void setupRead(void);
-    void handleResponse(const boost::system::error_code &err);
+    void handleResponse(const boost::system::error_code& err);
     void checkThresholds(void) override;
 };
diff --git a/include/CPUSensor.hpp b/include/CPUSensor.hpp
index 10c1f4e..a38c84e 100644
--- a/include/CPUSensor.hpp
+++ b/include/CPUSensor.hpp
@@ -7,23 +7,23 @@
 class CPUSensor : public Sensor
 {
   public:
-    CPUSensor(const std::string &path, const std::string &objectType,
-              sdbusplus::asio::object_server &objectServer,
-              std::shared_ptr<sdbusplus::asio::connection> &conn,
-              boost::asio::io_service &io, const std::string &fanName,
-              std::vector<thresholds::Threshold> &&thresholds,
-              const std::string &configuration);
+    CPUSensor(const std::string& path, const std::string& objectType,
+              sdbusplus::asio::object_server& objectServer,
+              std::shared_ptr<sdbusplus::asio::connection>& conn,
+              boost::asio::io_service& io, const std::string& fanName,
+              std::vector<thresholds::Threshold>&& thresholds,
+              const std::string& configuration);
     ~CPUSensor();
     static constexpr unsigned int sensorScaleFactor = 1000;
     static constexpr unsigned int sensorPollMs = 1000;
 
   private:
-    sdbusplus::asio::object_server &objServer;
+    sdbusplus::asio::object_server& objServer;
     boost::asio::posix::stream_descriptor inputDev;
     boost::asio::deadline_timer waitTimer;
     boost::asio::streambuf readBuf;
     int errCount;
     void setupRead(void);
-    void handleResponse(const boost::system::error_code &err);
+    void handleResponse(const boost::system::error_code& err);
     void checkThresholds(void) override;
 };
diff --git a/include/ExitAirTempSensor.hpp b/include/ExitAirTempSensor.hpp
index bd8b675..e06c20d 100644
--- a/include/ExitAirTempSensor.hpp
+++ b/include/ExitAirTempSensor.hpp
@@ -18,14 +18,14 @@
 
     std::shared_ptr<ExitAirTempSensor> parent;
 
-    CFMSensor(std::shared_ptr<sdbusplus::asio::connection> &conn,
-              const std::string &name, const std::string &sensorConfiguration,
-              sdbusplus::asio::object_server &objectServer,
-              std::vector<thresholds::Threshold> &&thresholds,
-              std::shared_ptr<ExitAirTempSensor> &parent);
+    CFMSensor(std::shared_ptr<sdbusplus::asio::connection>& conn,
+              const std::string& name, const std::string& sensorConfiguration,
+              sdbusplus::asio::object_server& objectServer,
+              std::vector<thresholds::Threshold>&& thresholds,
+              std::shared_ptr<ExitAirTempSensor>& parent);
     ~CFMSensor();
 
-    bool calculate(double &);
+    bool calculate(double&);
     void updateReading(void);
     void checkThresholds(void) override;
 
@@ -35,8 +35,8 @@
     boost::container::flat_map<std::string, std::pair<double, double>>
         tachRanges;
     std::shared_ptr<sdbusplus::asio::connection> dbusConnection;
-    sdbusplus::asio::object_server &objServer;
-    void addTachRanges(const std::string &serviceName, const std::string &path);
+    sdbusplus::asio::object_server& objServer;
+    void addTachRanges(const std::string& serviceName, const std::string& path);
 };
 
 struct ExitAirTempSensor : public Sensor
@@ -54,11 +54,11 @@
     boost::container::flat_map<std::string, double> powerReadings;
 
     std::vector<std::unique_ptr<CFMSensor>> cfmSensors;
-    ExitAirTempSensor(std::shared_ptr<sdbusplus::asio::connection> &conn,
-                      const std::string &name,
-                      const std::string &sensorConfiguration,
-                      sdbusplus::asio::object_server &objectServer,
-                      std::vector<thresholds::Threshold> &&thresholds);
+    ExitAirTempSensor(std::shared_ptr<sdbusplus::asio::connection>& conn,
+                      const std::string& name,
+                      const std::string& sensorConfiguration,
+                      sdbusplus::asio::object_server& objectServer,
+                      std::vector<thresholds::Threshold>&& thresholds);
     ~ExitAirTempSensor();
 
     void checkThresholds(void) override;
@@ -73,6 +73,6 @@
     std::shared_ptr<sdbusplus::asio::connection> dbusConnection;
     std::chrono::time_point<std::chrono::system_clock> lastTime;
     double getTotalCFM(void);
-    bool calculate(double &val);
+    bool calculate(double& val);
     void setupMatches(void);
 };
diff --git a/include/HwmonTempSensor.hpp b/include/HwmonTempSensor.hpp
index 3e582ab..9343576 100644
--- a/include/HwmonTempSensor.hpp
+++ b/include/HwmonTempSensor.hpp
@@ -7,21 +7,21 @@
 class HwmonTempSensor : public Sensor
 {
   public:
-    HwmonTempSensor(const std::string &path, const std::string &objectType,
-                    sdbusplus::asio::object_server &objectServer,
-                    std::shared_ptr<sdbusplus::asio::connection> &conn,
-                    boost::asio::io_service &io, const std::string &fanName,
-                    std::vector<thresholds::Threshold> &&thresholds,
-                    const std::string &sensorConfiguration);
+    HwmonTempSensor(const std::string& path, const std::string& objectType,
+                    sdbusplus::asio::object_server& objectServer,
+                    std::shared_ptr<sdbusplus::asio::connection>& conn,
+                    boost::asio::io_service& io, const std::string& fanName,
+                    std::vector<thresholds::Threshold>&& thresholds,
+                    const std::string& sensorConfiguration);
     ~HwmonTempSensor();
 
   private:
-    sdbusplus::asio::object_server &objServer;
+    sdbusplus::asio::object_server& objServer;
     boost::asio::posix::stream_descriptor inputDev;
     boost::asio::deadline_timer waitTimer;
     boost::asio::streambuf readBuf;
     int errCount;
     void setupRead(void);
-    void handleResponse(const boost::system::error_code &err);
+    void handleResponse(const boost::system::error_code& err);
     void checkThresholds(void) override;
 };
\ No newline at end of file
diff --git a/include/IpmbSensor.hpp b/include/IpmbSensor.hpp
index d5b0290..b6bfa32 100644
--- a/include/IpmbSensor.hpp
+++ b/include/IpmbSensor.hpp
@@ -17,11 +17,11 @@
 
 struct IpmbSensor : public Sensor
 {
-    IpmbSensor(std::shared_ptr<sdbusplus::asio::connection> &conn,
-               boost::asio::io_service &io, const std::string &name,
-               const std::string &sensorConfiguration,
-               sdbusplus::asio::object_server &objectServer,
-               std::vector<thresholds::Threshold> &&thresholds,
+    IpmbSensor(std::shared_ptr<sdbusplus::asio::connection>& conn,
+               boost::asio::io_service& io, const std::string& name,
+               const std::string& sensorConfiguration,
+               sdbusplus::asio::object_server& objectServer,
+               std::vector<thresholds::Threshold>&& thresholds,
                uint8_t deviceAddress);
     ~IpmbSensor();
 
@@ -43,7 +43,7 @@
     PowerState readState = PowerState::on;
 
   private:
-    sdbusplus::asio::object_server &objectServer;
+    sdbusplus::asio::object_server& objectServer;
     std::shared_ptr<sdbusplus::asio::connection> dbusConnection;
     boost::asio::deadline_timer waitTimer;
 };
\ No newline at end of file
diff --git a/include/TachSensor.hpp b/include/TachSensor.hpp
index 9fc50a6..1e01859 100644
--- a/include/TachSensor.hpp
+++ b/include/TachSensor.hpp
@@ -6,13 +6,13 @@
 #include <sdbusplus/asio/object_server.hpp>
 #include <sensor.hpp>
 
-constexpr const char *gpioPath = "/sys/class/gpio/";
+constexpr const char* gpioPath = "/sys/class/gpio/";
 class PresenceSensor
 {
 
   public:
     PresenceSensor(const size_t index, bool inverted,
-                   boost::asio::io_service &io);
+                   boost::asio::io_service& io);
     ~PresenceSensor();
 
     void monitorPresence(void);
@@ -29,35 +29,35 @@
 class RedundancySensor
 {
   public:
-    RedundancySensor(size_t count, const std::vector<std::string> &children,
-                     sdbusplus::asio::object_server &objectServer);
+    RedundancySensor(size_t count, const std::vector<std::string>& children,
+                     sdbusplus::asio::object_server& objectServer);
     ~RedundancySensor();
 
-    void update(const std::string &name, bool failed);
+    void update(const std::string& name, bool failed);
 
   private:
     size_t count;
     std::shared_ptr<sdbusplus::asio::dbus_interface> iface;
-    sdbusplus::asio::object_server &objectServer;
+    sdbusplus::asio::object_server& objectServer;
     boost::container::flat_map<std::string, bool> statuses;
 };
 
 class TachSensor : public Sensor
 {
   public:
-    TachSensor(const std::string &path, const std::string &objectType,
-               sdbusplus::asio::object_server &objectServer,
-               std::shared_ptr<sdbusplus::asio::connection> &conn,
-               std::unique_ptr<PresenceSensor> &&presence,
-               const std::shared_ptr<RedundancySensor> &redundancy,
-               boost::asio::io_service &io, const std::string &fanName,
-               std::vector<thresholds::Threshold> &&thresholds,
-               const std::string &sensorConfiguration,
-               const std::pair<size_t, size_t> &limits);
+    TachSensor(const std::string& path, const std::string& objectType,
+               sdbusplus::asio::object_server& objectServer,
+               std::shared_ptr<sdbusplus::asio::connection>& conn,
+               std::unique_ptr<PresenceSensor>&& presence,
+               const std::shared_ptr<RedundancySensor>& redundancy,
+               boost::asio::io_service& io, const std::string& fanName,
+               std::vector<thresholds::Threshold>&& thresholds,
+               const std::string& sensorConfiguration,
+               const std::pair<size_t, size_t>& limits);
     ~TachSensor();
 
   private:
-    sdbusplus::asio::object_server &objServer;
+    sdbusplus::asio::object_server& objServer;
     std::shared_ptr<RedundancySensor> redundancy;
     std::unique_ptr<PresenceSensor> presence;
     boost::asio::posix::stream_descriptor inputDev;
@@ -65,6 +65,6 @@
     boost::asio::streambuf readBuf;
     int errCount;
     void setupRead(void);
-    void handleResponse(const boost::system::error_code &err);
+    void handleResponse(const boost::system::error_code& err);
     void checkThresholds(void) override;
 };
diff --git a/include/Thresholds.hpp b/include/Thresholds.hpp
index 3f9aa79..8bcc4fa 100644
--- a/include/Thresholds.hpp
+++ b/include/Thresholds.hpp
@@ -17,7 +17,7 @@
 };
 struct Threshold
 {
-    Threshold(const Level &lev, const Direction &dir, const double &val,
+    Threshold(const Level& lev, const Direction& dir, const double& val,
               bool write = true) :
         level(lev),
         direction(dir), value(val), writeable(write)
@@ -31,25 +31,25 @@
 };
 
 bool parseThresholdsFromConfig(
-    const SensorData &sensorData,
-    std::vector<thresholds::Threshold> &thresholdVector,
-    const std::string *matchLabel = nullptr);
+    const SensorData& sensorData,
+    std::vector<thresholds::Threshold>& thresholdVector,
+    const std::string* matchLabel = nullptr);
 
-bool parseThresholdsFromAttr(std::vector<thresholds::Threshold> &thresholds,
-                             const std::string &inputPath,
-                             const double &scaleFactor);
+bool parseThresholdsFromAttr(std::vector<thresholds::Threshold>& thresholds,
+                             const std::string& inputPath,
+                             const double& scaleFactor);
 bool hasCriticalInterface(
-    const std::vector<thresholds::Threshold> &thresholdVector);
+    const std::vector<thresholds::Threshold>& thresholdVector);
 
 bool hasWarningInterface(
-    const std::vector<thresholds::Threshold> &thresholdVector);
+    const std::vector<thresholds::Threshold>& thresholdVector);
 
-void persistThreshold(const std::string &baseInterface, const std::string &path,
-                      const thresholds::Threshold &threshold,
-                      std::shared_ptr<sdbusplus::asio::connection> &conn);
+void persistThreshold(const std::string& baseInterface, const std::string& path,
+                      const thresholds::Threshold& threshold,
+                      std::shared_ptr<sdbusplus::asio::connection>& conn);
 
 // returns false if a critical threshold has been crossed, true otherwise
-bool checkThresholds(Sensor *sensor);
-void assertThresholds(Sensor *sensor, thresholds::Level level,
+bool checkThresholds(Sensor* sensor);
+void assertThresholds(Sensor* sensor, thresholds::Level level,
                       thresholds::Direction direction, bool assert);
 } // namespace thresholds
diff --git a/include/VariantVisitors.hpp b/include/VariantVisitors.hpp
index 7b23977..6549a32 100644
--- a/include/VariantVisitors.hpp
+++ b/include/VariantVisitors.hpp
@@ -22,7 +22,8 @@
 struct VariantToFloatVisitor
 {
 
-    template <typename T> float operator()(const T &t) const
+    template <typename T>
+    float operator()(const T& t) const
     {
         if constexpr (std::is_arithmetic_v<T>)
         {
@@ -34,7 +35,8 @@
 
 struct VariantToIntVisitor
 {
-    template <typename T> int operator()(const T &t) const
+    template <typename T>
+    int operator()(const T& t) const
     {
         if constexpr (std::is_arithmetic_v<T>)
         {
@@ -46,7 +48,8 @@
 
 struct VariantToUnsignedIntVisitor
 {
-    template <typename T> unsigned int operator()(const T &t) const
+    template <typename T>
+    unsigned int operator()(const T& t) const
     {
         if constexpr (std::is_arithmetic_v<T>)
         {
@@ -58,7 +61,8 @@
 
 struct VariantToStringVisitor
 {
-    template <typename T> std::string operator()(const T &t) const
+    template <typename T>
+    std::string operator()(const T& t) const
     {
         if constexpr (std::is_same_v<T, std::string>)
         {
@@ -74,7 +78,8 @@
 
 struct VariantToDoubleVisitor
 {
-    template <typename T> double operator()(const T &t) const
+    template <typename T>
+    double operator()(const T& t) const
     {
         if constexpr (std::is_arithmetic_v<T>)
         {
diff --git a/include/sensor.hpp b/include/sensor.hpp
index 73e44d2..de790c8 100644
--- a/include/sensor.hpp
+++ b/include/sensor.hpp
@@ -6,9 +6,9 @@
 constexpr size_t sensorFailedPollTimeMs = 5000;
 struct Sensor
 {
-    Sensor(const std::string &name, const std::string &path,
-           std::vector<thresholds::Threshold> &&thresholdData,
-           const std::string &configurationPath, const std::string &objectType,
+    Sensor(const std::string& name, const std::string& path,
+           std::vector<thresholds::Threshold>&& thresholdData,
+           const std::string& configurationPath, const std::string& objectType,
            const double max, const double min) :
         name(name),
         path(path), thresholds(std::move(thresholdData)),
@@ -32,7 +32,7 @@
     bool overridenState = false;
     bool internalSet = false;
 
-    int setSensorValue(const double &newValue, double &oldValue)
+    int setSensorValue(const double& newValue, double& oldValue)
     {
         if (internalSet)
         {
@@ -46,16 +46,16 @@
     }
 
     void
-        setInitialProperties(std::shared_ptr<sdbusplus::asio::connection> &conn)
+        setInitialProperties(std::shared_ptr<sdbusplus::asio::connection>& conn)
     {
         sensorInterface->register_property("MaxValue", maxValue);
         sensorInterface->register_property("MinValue", minValue);
         sensorInterface->register_property(
-            "Value", value, [&](const double &newValue, double &oldValue) {
+            "Value", value, [&](const double& newValue, double& oldValue) {
                 return setSensorValue(newValue, oldValue);
             });
 
-        for (auto &threshold : thresholds)
+        for (auto& threshold : thresholds)
         {
             std::shared_ptr<sdbusplus::asio::dbus_interface> iface;
             std::string level;
@@ -101,7 +101,7 @@
             }
             iface->register_property(
                 level, threshold.value,
-                [&](const double &request, double &oldValue) {
+                [&](const double& request, double& oldValue) {
                     oldValue = request; // todo, just let the config do this?
                     threshold.value = request;
                     thresholds::persistThreshold(configurationPath, objectType,
@@ -127,7 +127,7 @@
         }
     }
 
-    void updateValue(const double &newValue)
+    void updateValue(const double& newValue)
     {
         // Indicate that it is internal set call
         internalSet = true;
