diff --git a/ndn-cxx/mgmt/nfd/control-command.cpp b/ndn-cxx/mgmt/nfd/control-command.cpp
index 691e872..df3c95b 100644
--- a/ndn-cxx/mgmt/nfd/control-command.cpp
+++ b/ndn-cxx/mgmt/nfd/control-command.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2020 Regents of the University of California.
+ * Copyright (c) 2013-2021 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -60,10 +60,11 @@
 {
   this->validateRequest(parameters);
 
-  Name name = commandPrefix;
-  name.append(m_module).append(m_verb);
-  name.append(parameters.wireEncode());
-  return name;
+  const auto& paramBlock = parameters.wireEncode();
+  return Name(commandPrefix)
+         .append(m_module)
+         .append(m_verb)
+         .append(paramBlock.begin(), paramBlock.end());
 }
 
 ControlCommand::FieldValidator::FieldValidator()
@@ -75,7 +76,7 @@
 void
 ControlCommand::FieldValidator::validate(const ControlParameters& parameters) const
 {
-  const std::vector<bool>& presentFields = parameters.getPresentFields();
+  const auto& presentFields = parameters.getPresentFields();
 
   for (size_t i = 0; i < CONTROL_PARAMETER_UBOUND; ++i) {
     bool isPresent = presentFields[i];
diff --git a/ndn-cxx/mgmt/nfd/status-dataset.cpp b/ndn-cxx/mgmt/nfd/status-dataset.cpp
index 3d2a3d3..1c550af 100644
--- a/ndn-cxx/mgmt/nfd/status-dataset.cpp
+++ b/ndn-cxx/mgmt/nfd/status-dataset.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2021 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -42,7 +42,7 @@
 }
 
 void
-StatusDataset::addParameters(Name& name) const
+StatusDataset::addParameters(Name&) const
 {
 }
 
@@ -113,7 +113,8 @@
 void
 FaceQueryDataset::addParameters(Name& name) const
 {
-  name.append(m_filter.wireEncode());
+  const auto& filterBlock = m_filter.wireEncode();
+  name.append(filterBlock.begin(), filterBlock.end());
 }
 
 ChannelDataset::ChannelDataset()
diff --git a/ndn-cxx/name.hpp b/ndn-cxx/name.hpp
index a061d65..49a86f9 100644
--- a/ndn-cxx/name.hpp
+++ b/ndn-cxx/name.hpp
@@ -355,7 +355,9 @@
    *  @param value a TLV element. If its TLV-TYPE is tlv::GenericNameComponent, it is
    *               appended as is. Otherwise, it is nested into a GenericNameComponent.
    *  @return a reference to this name, to allow chaining.
+   *  @deprecated
    */
+  [[deprecated]]
   Name&
   append(Block value)
   {
diff --git a/ndn-cxx/security/key-chain.cpp b/ndn-cxx/security/key-chain.cpp
index 0328d0f..9c98c64 100644
--- a/ndn-cxx/security/key-chain.cpp
+++ b/ndn-cxx/security/key-chain.cpp
@@ -474,13 +474,17 @@
   }
   else {
     Name signedName = interest.getName();
+
     // We encode in Data format because this is the format used prior to Packet Specification v0.3
-    signedName.append(sigInfo.wireEncode(SignatureInfo::Type::Data)); // SignatureInfo
+    const auto& sigInfoBlock = sigInfo.wireEncode(SignatureInfo::Type::Data);
+    signedName.append(sigInfoBlock.begin(), sigInfoBlock.end()); // SignatureInfo
+
     Block sigValue(tlv::SignatureValue,
                    sign({{signedName.wireEncode().value(), signedName.wireEncode().value_size()}},
                         keyName, params.getDigestAlgorithm()));
     sigValue.encode();
-    signedName.append(std::move(sigValue)); // SignatureValue
+    signedName.append(sigValue.begin(), sigValue.end()); // SignatureValue
+
     interest.setName(signedName);
   }
 }
diff --git a/tests/unit/mgmt/nfd/status-dataset.t.cpp b/tests/unit/mgmt/nfd/status-dataset.t.cpp
index 44fca44..21fb288 100644
--- a/tests/unit/mgmt/nfd/status-dataset.t.cpp
+++ b/tests/unit/mgmt/nfd/status-dataset.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2020 Regents of the University of California.
+ * Copyright (c) 2013-2021 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -113,7 +113,7 @@
   CommandOptions options;
   options.setTimeout(3000_ms);
   controller.fetch<FaceDataset>(
-    [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
+    [] (auto&&) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback,
     options);
   this->advanceClocks(500_ms);
@@ -128,7 +128,7 @@
 BOOST_AUTO_TEST_CASE(DataHasNoSegment)
 {
   controller.fetch<FaceDataset>(
-    [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
+    [] (auto&&) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback);
   this->advanceClocks(500_ms);
 
@@ -146,7 +146,7 @@
   this->setValidationResult(false);
 
   controller.fetch<FaceDataset>(
-    [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
+    [] (auto&&) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback);
   this->advanceClocks(500_ms);
 
@@ -162,7 +162,7 @@
 BOOST_AUTO_TEST_CASE(Nack)
 {
   controller.fetch<FaceDataset>(
-    [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
+    [] (auto&&) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback);
   this->advanceClocks(500_ms);
 
@@ -177,7 +177,7 @@
 BOOST_AUTO_TEST_CASE(ParseError1)
 {
   controller.fetch<FaceDataset>(
-    [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
+    [] (auto&&) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback);
   this->advanceClocks(500_ms);
 
@@ -192,7 +192,7 @@
 BOOST_AUTO_TEST_CASE(ParseError2)
 {
   controller.fetch<FaceDataset>(
-    [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
+    [] (auto&&) { BOOST_FAIL("fetchDataset should not succeed"); },
     datasetFailCallback);
   this->advanceClocks(500_ms);
 
@@ -232,7 +232,7 @@
   CommandOptions options;
   options.setTimeout(3000_ms);
   controller.fetch<FaceDataset>(
-    [] (const std::vector<FaceStatus>& result) { BOOST_FAIL("fetchDataset should not succeed"); },
+    [] (auto&&) { BOOST_FAIL("fetchDataset should not succeed"); },
     nullptr,
     options);
   BOOST_CHECK_NO_THROW(this->advanceClocks(500_ms, 7));
@@ -301,7 +301,7 @@
   this->advanceClocks(500_ms);
 
   Name prefix("/localhost/nfd/faces/query");
-  prefix.append(filter.wireEncode());
+  prefix.append(filter.wireEncode().begin(), filter.wireEncode().end());
   FaceStatus payload;
   payload.setFaceId(8795);
   this->sendDataset(prefix, payload);
@@ -330,7 +330,7 @@
   this->advanceClocks(500_ms);
 
   Name prefix("/localhost/nfd/faces/query");
-  prefix.append(filter.wireEncode());
+  prefix.append(filter.wireEncode().begin(), filter.wireEncode().end());
   FaceStatus payload;
   payload.setFaceId(14022);
   this->sendDataset(prefix, payload);
