diff --git a/control/manager.cpp b/control/manager.cpp
index 360239c..543d42f 100644
--- a/control/manager.cpp
+++ b/control/manager.cpp
@@ -13,18 +13,23 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "config.h"
+
+#include "manager.hpp"
+
+#include "sdbusplus.hpp"
+#include "utility.hpp"
+
+#include <unistd.h>
+
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/log.hpp>
+#include <sdbusplus/bus.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
+
 #include <algorithm>
 #include <experimental/filesystem>
-#include <sdbusplus/bus.hpp>
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog.hpp>
-#include <phosphor-logging/elog-errors.hpp>
-#include <xyz/openbmc_project/Common/error.hpp>
-#include <unistd.h>
-#include "config.h"
-#include "manager.hpp"
-#include "utility.hpp"
-#include "sdbusplus.hpp"
 
 namespace phosphor
 {
@@ -36,8 +41,8 @@
 using namespace phosphor::logging;
 namespace fs = std::experimental::filesystem;
 
-constexpr auto SYSTEMD_SERVICE   = "org.freedesktop.systemd1";
-constexpr auto SYSTEMD_OBJ_PATH  = "/org/freedesktop/systemd1";
+constexpr auto SYSTEMD_SERVICE = "org.freedesktop.systemd1";
+constexpr auto SYSTEMD_OBJ_PATH = "/org/freedesktop/systemd1";
 constexpr auto SYSTEMD_INTERFACE = "org.freedesktop.systemd1.Manager";
 constexpr auto FAN_CONTROL_READY_TARGET = "obmc-fan-control-ready@0.target";
 
@@ -62,10 +67,9 @@
         if (type.compare("getProperty") == 0)
         {
             auto propertyValue = util::SDBusPlus::getProperty<decltype(value)>(
-                    bus,
-                    std::get<propertyPathPos>(p),
-                    std::get<propertyInterfacePos>(p),
-                    std::get<propertyNamePos>(p));
+                bus, std::get<propertyPathPos>(p),
+                std::get<propertyInterfacePos>(p),
+                std::get<propertyNamePos>(p));
 
             if (value != propertyValue)
             {
@@ -76,29 +80,26 @@
     return true;
 }
 
-
-//Note: Future code will check 'mode' before starting control algorithm
-Manager::Manager(sdbusplus::bus::bus& bus,
-                 const sdeventplus::Event& event,
+// Note: Future code will check 'mode' before starting control algorithm
+Manager::Manager(sdbusplus::bus::bus& bus, const sdeventplus::Event& event,
                  Mode mode) :
     _bus(bus),
     _objMgr(bus, CONTROL_OBJPATH)
 {
-    //Create the appropriate Zone objects based on the
-    //actual system configuration.
+    // Create the appropriate Zone objects based on the
+    // actual system configuration.
 
-    //Find the 1 ZoneGroup that meets all of its conditions
+    // Find the 1 ZoneGroup that meets all of its conditions
     for (auto& group : _zoneLayouts)
     {
         auto& conditions = std::get<conditionListPos>(group);
 
         if (std::all_of(conditions.begin(), conditions.end(),
-                        [&bus](const auto& condition)
+                        [&bus](const auto& condition) {
+                            return checkCondition(bus, condition);
+                        }))
         {
-            return checkCondition(bus, condition);
-        }))
-        {
-            //Create a Zone object for each zone in this group
+            // Create a Zone object for each zone in this group
             auto& zones = std::get<zoneListPos>(group);
 
             for (auto& z : zones)
@@ -106,11 +107,8 @@
                 fs::path path{CONTROL_OBJPATH};
                 path /= std::to_string(std::get<zoneNumPos>(z));
                 _zones.emplace(std::get<zoneNumPos>(z),
-                               std::make_unique<Zone>(mode,
-                                                      _bus,
-                                                      path.string(),
-                                                      event,
-                                                      z));
+                               std::make_unique<Zone>(mode, _bus, path.string(),
+                                                      event, z));
             }
 
             break;
@@ -123,7 +121,6 @@
     }
 }
 
-
 void Manager::doInit()
 {
     for (auto& z : _zones)
@@ -137,14 +134,9 @@
         delay = sleep(delay);
     }
 
-    util::SDBusPlus::callMethod(
-            _bus,
-            SYSTEMD_SERVICE,
-            SYSTEMD_OBJ_PATH,
-            SYSTEMD_INTERFACE,
-            "StartUnit",
-            FAN_CONTROL_READY_TARGET,
-            "replace");
+    util::SDBusPlus::callMethod(_bus, SYSTEMD_SERVICE, SYSTEMD_OBJ_PATH,
+                                SYSTEMD_INTERFACE, "StartUnit",
+                                FAN_CONTROL_READY_TARGET, "replace");
 }
 
 } // namespace control
