diff --git a/bmc/main.cpp b/bmc/main.cpp
index 5282831..031871f 100644
--- a/bmc/main.cpp
+++ b/bmc/main.cpp
@@ -136,8 +136,8 @@
 
     for (auto& config : configsFromJson)
     {
-        supportedFirmware.push_back(
-            std::move(HandlerPack(config.blobId, std::move(config.handler))));
+        supportedFirmware.emplace_back(config.blobId,
+                                       std::move(config.handler));
         actionPacks[config.blobId] = std::move(config.actions);
 
         std::fprintf(stderr, "config loaded: %s\n", config.blobId.c_str());
diff --git a/bmc/test/firmware_canhandle_unittest.cpp b/bmc/test/firmware_canhandle_unittest.cpp
index 861503c..7df4bb8 100644
--- a/bmc/test/firmware_canhandle_unittest.cpp
+++ b/bmc/test/firmware_canhandle_unittest.cpp
@@ -25,12 +25,9 @@
     ImageHandlerMock imageMock;
 
     std::vector<HandlerPack> blobs;
-    blobs.push_back(std::move(
-        HandlerPack(hashBlobId, std::make_unique<ImageHandlerMock>())));
-    blobs.push_back(
-        std::move(HandlerPack("asdf", std::make_unique<ImageHandlerMock>())));
-    blobs.push_back(
-        std::move(HandlerPack("bcdf", std::make_unique<ImageHandlerMock>())));
+    blobs.emplace_back(hashBlobId, std::make_unique<ImageHandlerMock>());
+    blobs.emplace_back("asdf", std::make_unique<ImageHandlerMock>());
+    blobs.emplace_back("bcdf", std::make_unique<ImageHandlerMock>());
 
     std::vector<DataHandlerPack> data;
     data.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
diff --git a/bmc/test/firmware_commit_unittest.cpp b/bmc/test/firmware_commit_unittest.cpp
index 846aa4f..e1635e9 100644
--- a/bmc/test/firmware_commit_unittest.cpp
+++ b/bmc/test/firmware_commit_unittest.cpp
@@ -33,11 +33,11 @@
         std::unique_ptr<ImageHandlerInterface> image =
             std::make_unique<ImageHandlerMock>();
         imageMock1 = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(std::move(HandlerPack(hashBlobId, std::move(image))));
+        blobs.emplace_back(hashBlobId, std::move(image));
 
         image = std::make_unique<ImageHandlerMock>();
         imageMock2 = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(std::move(HandlerPack("asdf", std::move(image))));
+        blobs.emplace_back("asdf", std::move(image));
 
         data.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
     }
diff --git a/bmc/test/firmware_handler_unittest.cpp b/bmc/test/firmware_handler_unittest.cpp
index b886a01..50d6b80 100644
--- a/bmc/test/firmware_handler_unittest.cpp
+++ b/bmc/test/firmware_handler_unittest.cpp
@@ -31,10 +31,8 @@
     ImageHandlerMock imageMock;
 
     std::vector<HandlerPack> blobs;
-    blobs.push_back(std::move(
-        HandlerPack(hashBlobId, std::make_unique<ImageHandlerMock>())));
-    blobs.push_back(
-        std::move(HandlerPack("asdf", std::make_unique<ImageHandlerMock>())));
+    blobs.emplace_back(hashBlobId, std::make_unique<ImageHandlerMock>());
+    blobs.emplace_back("asdf", std::make_unique<ImageHandlerMock>());
 
     auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
         std::move(blobs), std::move(std::vector<DataHandlerPack>()),
@@ -50,10 +48,8 @@
     data.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
 
     std::vector<HandlerPack> blobs;
-    blobs.push_back(
-        std::move(HandlerPack("asdf", std::make_unique<ImageHandlerMock>())));
-    blobs.push_back(std::move(
-        HandlerPack(hashBlobId, std::make_unique<ImageHandlerMock>())));
+    blobs.emplace_back("asdf", std::make_unique<ImageHandlerMock>());
+    blobs.emplace_back(hashBlobId, std::make_unique<ImageHandlerMock>());
 
     ActionMap emptyMap;
 
@@ -73,8 +69,7 @@
      * -- tested in a different test.
      */
     std::vector<HandlerPack> blobs;
-    blobs.push_back(std::move(
-        HandlerPack(hashBlobId, std::make_unique<ImageHandlerMock>())));
+    blobs.emplace_back(hashBlobId, std::make_unique<ImageHandlerMock>());
 
     auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
         std::move(blobs), std::move(data), std::move(CreateActionMap("asdf")));
@@ -82,10 +77,8 @@
 
     /* Add second firmware and it'll now work. */
     std::vector<HandlerPack> blobs2;
-    blobs2.push_back(std::move(
-        HandlerPack(hashBlobId, std::make_unique<ImageHandlerMock>())));
-    blobs2.push_back(
-        std::move(HandlerPack("asdf", std::make_unique<ImageHandlerMock>())));
+    blobs2.emplace_back(hashBlobId, std::make_unique<ImageHandlerMock>());
+    blobs2.emplace_back("asdf", std::make_unique<ImageHandlerMock>());
 
     std::vector<DataHandlerPack> data2;
     data2.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
@@ -105,18 +98,15 @@
 
     /* This works fine only if you also pass in the hash handler. */
     std::vector<HandlerPack> blobs;
-    blobs.push_back(
-        std::move(HandlerPack("asdf", std::make_unique<ImageHandlerMock>())));
+    blobs.emplace_back("asdf", std::make_unique<ImageHandlerMock>());
 
     auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
         std::move(blobs), std::move(data), std::move(CreateActionMap("asdf")));
     EXPECT_EQ(handler, nullptr);
 
     std::vector<HandlerPack> blobs2;
-    blobs2.push_back(
-        std::move(HandlerPack("asdf", std::make_unique<ImageHandlerMock>())));
-    blobs2.push_back(std::move(
-        HandlerPack(hashBlobId, std::make_unique<ImageHandlerMock>())));
+    blobs2.emplace_back("asdf", std::make_unique<ImageHandlerMock>());
+    blobs2.emplace_back(hashBlobId, std::make_unique<ImageHandlerMock>());
 
     std::vector<DataHandlerPack> data2;
     data2.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
diff --git a/bmc/test/firmware_multiplebundle_unittest.cpp b/bmc/test/firmware_multiplebundle_unittest.cpp
index ae7924f..20c63a9 100644
--- a/bmc/test/firmware_multiplebundle_unittest.cpp
+++ b/bmc/test/firmware_multiplebundle_unittest.cpp
@@ -33,16 +33,15 @@
         std::unique_ptr<ImageHandlerInterface> image =
             std::make_unique<ImageHandlerMock>();
         hashImageMock = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(std::move(HandlerPack(hashBlobId, std::move(image))));
+        blobs.emplace_back(hashBlobId, std::move(image));
 
         image = std::make_unique<ImageHandlerMock>();
         staticImageMock = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(
-            std::move(HandlerPack(staticLayoutBlobId, std::move(image))));
+        blobs.emplace_back(staticLayoutBlobId, std::move(image));
 
         image = std::make_unique<ImageHandlerMock>();
         biosImageMock = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(std::move(HandlerPack(biosBlobId, std::move(image))));
+        blobs.emplace_back(biosBlobId, std::move(image));
 
         std::unique_ptr<TriggerableActionInterface> bmcPrepareMock =
             std::make_unique<TriggerMock>();
diff --git a/bmc/test/firmware_open_unittest.cpp b/bmc/test/firmware_open_unittest.cpp
index ba0ac87..1eff8d3 100644
--- a/bmc/test/firmware_open_unittest.cpp
+++ b/bmc/test/firmware_open_unittest.cpp
@@ -26,10 +26,8 @@
     data.emplace_back(FirmwareFlags::UpdateFlags::lpc, nullptr);
 
     std::vector<HandlerPack> blobs;
-    blobs.push_back(std::move(
-        HandlerPack(hashBlobId, std::make_unique<ImageHandlerMock>())));
-    blobs.push_back(
-        std::move(HandlerPack("asdf", std::make_unique<ImageHandlerMock>())));
+    blobs.emplace_back(hashBlobId, std::make_unique<ImageHandlerMock>());
+    blobs.emplace_back("asdf", std::make_unique<ImageHandlerMock>());
 
     auto handler = FirmwareBlobHandler::CreateFirmwareBlobHandler(
         std::move(blobs), std::move(data), std::move(CreateActionMap("asdf")));
diff --git a/bmc/test/firmware_stat_unittest.cpp b/bmc/test/firmware_stat_unittest.cpp
index 86075bb..567472d 100644
--- a/bmc/test/firmware_stat_unittest.cpp
+++ b/bmc/test/firmware_stat_unittest.cpp
@@ -26,10 +26,8 @@
      */
 
     std::vector<HandlerPack> blobs;
-    blobs.push_back(std::move(
-        HandlerPack(hashBlobId, std::make_unique<ImageHandlerMock>())));
-    blobs.push_back(
-        std::move(HandlerPack("asdf", std::make_unique<ImageHandlerMock>())));
+    blobs.emplace_back(hashBlobId, std::make_unique<ImageHandlerMock>());
+    blobs.emplace_back("asdf", std::make_unique<ImageHandlerMock>());
 
     std::vector<DataHandlerPack> data;
     data.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
diff --git a/bmc/test/firmware_state_notyetstarted_tarball_unittest.cpp b/bmc/test/firmware_state_notyetstarted_tarball_unittest.cpp
index 32e05ef..e666395 100644
--- a/bmc/test/firmware_state_notyetstarted_tarball_unittest.cpp
+++ b/bmc/test/firmware_state_notyetstarted_tarball_unittest.cpp
@@ -26,12 +26,11 @@
         std::unique_ptr<ImageHandlerInterface> image =
             std::make_unique<ImageHandlerMock>();
         hashImageMock = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(std::move(HandlerPack(hashBlobId, std::move(image))));
+        blobs.emplace_back(hashBlobId, std::move(image));
 
         image = std::make_unique<ImageHandlerMock>();
         imageMock = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(
-            std::move(HandlerPack(ubiTarballBlobId, std::move(image))));
+        blobs.emplace_back(ubiTarballBlobId, std::move(image));
 
         std::unique_ptr<TriggerableActionInterface> verifyMock =
             std::make_unique<TriggerMock>();
diff --git a/bmc/test/firmware_unittest.hpp b/bmc/test/firmware_unittest.hpp
index 2b97d01..de41cd4 100644
--- a/bmc/test/firmware_unittest.hpp
+++ b/bmc/test/firmware_unittest.hpp
@@ -32,12 +32,11 @@
         std::unique_ptr<ImageHandlerInterface> image =
             std::make_unique<ImageHandlerMock>();
         hashImageMock = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(std::move(HandlerPack(hashBlobId, std::move(image))));
+        blobs.emplace_back(hashBlobId, std::move(image));
 
         image = std::make_unique<ImageHandlerMock>();
         imageMock2 = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(
-            std::move(HandlerPack(staticLayoutBlobId, std::move(image))));
+        blobs.emplace_back(staticLayoutBlobId, std::move(image));
 
         std::unique_ptr<TriggerableActionInterface> prepareMock =
             std::make_unique<TriggerMock>();
@@ -205,11 +204,11 @@
         std::unique_ptr<ImageHandlerInterface> image =
             std::make_unique<ImageHandlerMock>();
         hashImageMock = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(std::move(HandlerPack(hashBlobId, std::move(image))));
+        blobs.emplace_back(hashBlobId, std::move(image));
 
         image = std::make_unique<ImageHandlerMock>();
         imageMock = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(std::move(HandlerPack("asdf", std::move(image))));
+        blobs.emplace_back("asdf", std::move(image));
 
         std::vector<DataHandlerPack> data;
         data.emplace_back(FirmwareFlags::UpdateFlags::ipmi, nullptr);
@@ -233,11 +232,11 @@
         std::unique_ptr<ImageHandlerInterface> image =
             std::make_unique<ImageHandlerMock>();
         hashImageMock = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(std::move(HandlerPack(hashBlobId, std::move(image))));
+        blobs.emplace_back(hashBlobId, std::move(image));
 
         image = std::make_unique<ImageHandlerMock>();
         imageMock = reinterpret_cast<ImageHandlerMock*>(image.get());
-        blobs.push_back(std::move(HandlerPack("asdf", std::move(image))));
+        blobs.emplace_back("asdf", std::move(image));
 
         auto dataMockInstance = std::make_unique<DataHandlerMock>();
         dataMock = dataMockInstance.get();
