diff --git a/ndn-cxx/mgmt/nfd/control-command.cpp b/ndn-cxx/mgmt/nfd/control-command.cpp
index 794856d..cc6fa13 100644
--- a/ndn-cxx/mgmt/nfd/control-command.cpp
+++ b/ndn-cxx/mgmt/nfd/control-command.cpp
@@ -63,7 +63,7 @@
   return Name(commandPrefix)
          .append(m_module)
          .append(m_verb)
-         .append(tlv::GenericNameComponent, parameters.wireEncode());
+         .append(parameters.wireEncode());
 }
 
 ControlCommand::FieldValidator::FieldValidator()
diff --git a/ndn-cxx/mgmt/nfd/status-dataset.cpp b/ndn-cxx/mgmt/nfd/status-dataset.cpp
index 616f16e..005d1e5 100644
--- a/ndn-cxx/mgmt/nfd/status-dataset.cpp
+++ b/ndn-cxx/mgmt/nfd/status-dataset.cpp
@@ -113,7 +113,7 @@
 void
 FaceQueryDataset::addParameters(Name& name) const
 {
-  name.append(tlv::GenericNameComponent, m_filter.wireEncode());
+  name.append(m_filter.wireEncode());
 }
 
 ChannelDataset::ChannelDataset()
diff --git a/ndn-cxx/name.hpp b/ndn-cxx/name.hpp
index 2f72503..98a9d7d 100644
--- a/ndn-cxx/name.hpp
+++ b/ndn-cxx/name.hpp
@@ -17,10 +17,6 @@
  * <http://www.gnu.org/licenses/>.
  *
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- *
- * @author Jeff Thompson <jefft0@remap.ucla.edu>
- * @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
- * @author Zhenkai Zhu <http://irl.cs.ucla.edu/~zhenkai/>
  */
 
 #ifndef NDN_CXX_NAME_HPP
@@ -303,6 +299,16 @@
   }
 
   /**
+   * @brief Append a GenericNameComponent, copying the TLV-VALUE from @p value.
+   * @return a reference to this name, to allow chaining.
+   */
+  Name&
+  append(span<const uint8_t> value)
+  {
+    return append(Component(tlv::GenericNameComponent, value));
+  }
+
+  /**
    * @brief Append a NameComponent of TLV-TYPE @p type, copying @p count bytes at @p value as TLV-VALUE.
    * @return a reference to this name, to allow chaining.
    * @deprecated Use append(uint32_t, span<const uint8_t>)
@@ -311,19 +317,19 @@
   Name&
   append(uint32_t type, const uint8_t* value, size_t count)
   {
-    return append(Component(type, make_span(value, count)));
+    return append(type, make_span(value, count));
   }
 
   /**
    * @brief Append a GenericNameComponent, copying @p count bytes at @p value as TLV-VALUE.
    * @return a reference to this name, to allow chaining.
-   * @deprecated Use append(uint32_t, span<const uint8_t>) or append(const Component&)
+   * @deprecated Use append(span<const uint8_t>)
    */
-  [[deprecated]]
+  [[deprecated("use the overload that takes a span<>")]]
   Name&
   append(const uint8_t* value, size_t count)
   {
-    return append(Component(make_span(value, count)));
+    return append(make_span(value, count));
   }
 
   /** @brief Append a NameComponent of TLV-TYPE @p type, copying TLV-VALUE from a range.
@@ -352,7 +358,7 @@
   Name&
   append(Iterator first, Iterator last)
   {
-    return append(Component(first, last));
+    return append(Component(tlv::GenericNameComponent, first, last));
   }
 
   /** @brief Append a GenericNameComponent, copying TLV-VALUE from a null-terminated string.
@@ -524,8 +530,9 @@
                                                         std::char_traits<char>::length(keyword)}));
   }
 
-  /** @brief Append a component
-   *  @note This makes push_back an alias of append, giving Name a similar API as STL vector.
+  /**
+   * @brief Append a component.
+   * @note This makes push_back an alias of append, giving Name a similar API as `std::vector`.
    */
   template<class T>
   void
@@ -534,16 +541,18 @@
     append(component);
   }
 
-  /** @brief Erase the component at the specified index.
-   *  @param i zero-based index of the component to replace;
-   *           if negative, it is interpreted as offset from the end of the name
-   *  @warning No bounds checking is performed, using an out-of-range index is undefined behavior.
+  /**
+   * @brief Erase the component at the specified index.
+   * @param i zero-based index of the component to erase;
+   *          if negative, it is interpreted as offset from the end of the name
+   * @warning No bounds checking is performed, using an out-of-range index is undefined behavior.
    */
   void
   erase(ssize_t i);
 
-  /** @brief Remove all components.
-   *  @post `empty() == true`
+  /**
+   * @brief Remove all components.
+   * @post `empty() == true`
    */
   void
   clear();
diff --git a/ndn-cxx/security/key-chain.cpp b/ndn-cxx/security/key-chain.cpp
index 2cc22ed..f00a505 100644
--- a/ndn-cxx/security/key-chain.cpp
+++ b/ndn-cxx/security/key-chain.cpp
@@ -473,12 +473,12 @@
 
     // We encode in Data format because this is the format used prior to Packet Specification v0.3
     const auto& sigInfoBlock = sigInfo.wireEncode(SignatureInfo::Type::Data);
-    signedName.append(sigInfoBlock.begin(), sigInfoBlock.end()); // SignatureInfo
+    signedName.append(sigInfoBlock); // SignatureInfo
 
     Block sigValue(tlv::SignatureValue,
                    sign({signedName.wireEncode().value_bytes()}, keyName, params.getDigestAlgorithm()));
     sigValue.encode();
-    signedName.append(sigValue.begin(), sigValue.end()); // SignatureValue
+    signedName.append(sigValue); // 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 2c8c7f7..b9cc84d 100644
--- a/tests/unit/mgmt/nfd/status-dataset.t.cpp
+++ b/tests/unit/mgmt/nfd/status-dataset.t.cpp
@@ -301,7 +301,7 @@
   this->advanceClocks(500_ms);
 
   Name prefix("/localhost/nfd/faces/query");
-  prefix.append(filter.wireEncode().begin(), filter.wireEncode().end());
+  prefix.append(filter.wireEncode());
   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().begin(), filter.wireEncode().end());
+  prefix.append(filter.wireEncode());
   FaceStatus payload;
   payload.setFaceId(14022);
   this->sendDataset(prefix, payload);
diff --git a/tests/unit/name-component.t.cpp b/tests/unit/name-component.t.cpp
index 2743514..bd0a553 100644
--- a/tests/unit/name-component.t.cpp
+++ b/tests/unit/name-component.t.cpp
@@ -271,78 +271,63 @@
 
 BOOST_AUTO_TEST_SUITE_END() // Decode
 
-BOOST_AUTO_TEST_CASE(Compare)
+BOOST_AUTO_TEST_CASE(ConstructFromSpan)
 {
-  const std::vector<Component> comps = {
-    Component("0120 0000000000000000000000000000000000000000000000000000000000000000"_block),
-    Component("0120 0000000000000000000000000000000000000000000000000000000000000001"_block),
-    Component("0120 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"_block),
-    Component("0220 0000000000000000000000000000000000000000000000000000000000000000"_block),
-    Component("0220 0000000000000000000000000000000000000000000000000000000000000001"_block),
-    Component("0220 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"_block),
-    Component(0x03),
-    Component("0301 44"_block),
-    Component("0301 46"_block),
-    Component("0302 4141"_block),
-    Component(),
-    Component("D"),
-    Component("F"),
-    Component("AA"),
-    Component(0x53B2),
-    Component("FD53B201 44"_block),
-    Component("FD53B201 46"_block),
-    Component("FD53B202 4141"_block),
-  };
+  const uint8_t arr[] = {1, 2, 3};
+  Component c1(arr);
+  BOOST_TEST(c1.wireEncode() == "0803010203"_block);
+  Component c2(128, arr);
+  BOOST_TEST(c2.wireEncode() == "8003010203"_block);
 
-  for (size_t i = 0; i < comps.size(); ++i) {
-    for (size_t j = 0; j < comps.size(); ++j) {
-      Component lhs = comps[i];
-      Component rhs = comps[j];
-      BOOST_CHECK_EQUAL(lhs == rhs, i == j);
-      BOOST_CHECK_EQUAL(lhs != rhs, i != j);
-      BOOST_CHECK_EQUAL(lhs <  rhs, i <  j);
-      BOOST_CHECK_EQUAL(lhs <= rhs, i <= j);
-      BOOST_CHECK_EQUAL(lhs >  rhs, i >  j);
-      BOOST_CHECK_EQUAL(lhs >= rhs, i >= j);
-    }
-  }
+  const std::vector<uint8_t> vec = {4, 5, 6};
+  Component c3(vec);
+  BOOST_TEST(c3.wireEncode() == "0803040506"_block);
+  Component c4(128, vec);
+  BOOST_TEST(c4.wireEncode() == "8003040506"_block);
+
+  Component c5(128, {7, 8});
+  BOOST_TEST(c5.wireEncode() == "80020708"_block);
+
+  const Block b("090109"_block);
+  Component c6(128, b);
+  BOOST_TEST(c6.wireEncode() == "8003090109"_block);
 }
 
-BOOST_AUTO_TEST_SUITE(CreateFromIterators) // Bug 2490
+BOOST_AUTO_TEST_SUITE(ConstructFromIterators) // Bug 2490
 
 using ContainerTypes = boost::mpl::vector<std::vector<uint8_t>,
                                           std::list<uint8_t>,
                                           std::vector<int8_t>,
                                           std::list<int8_t>>;
 
-BOOST_AUTO_TEST_CASE_TEMPLATE(ZeroOctet, T, ContainerTypes)
+BOOST_AUTO_TEST_CASE_TEMPLATE(ZeroOctets, T, ContainerTypes)
 {
   T bytes;
   Component c(bytes.begin(), bytes.end());
-  BOOST_CHECK_EQUAL(c.type(), tlv::GenericNameComponent);
-  BOOST_CHECK_EQUAL(c.value_size(), 0);
-  BOOST_CHECK_EQUAL(c.size(), 2);
+  BOOST_TEST(c.type() == tlv::GenericNameComponent);
+  BOOST_TEST(c.value_size() == 0);
+  BOOST_TEST(c.size() == 2);
 }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(OneOctet, T, ContainerTypes)
 {
   T bytes{1};
-  Component c(0x09, bytes.begin(), bytes.end());
-  BOOST_CHECK_EQUAL(c.type(), 0x09);
-  BOOST_CHECK_EQUAL(c.value_size(), 1);
-  BOOST_CHECK_EQUAL(c.size(), 3);
+  Component c(9, bytes.begin(), bytes.end());
+  BOOST_TEST(c.type() == 0x09);
+  BOOST_TEST(c.value_size() == 1);
+  BOOST_TEST(c.size() == 3);
 }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(FourOctets, T, ContainerTypes)
 {
   T bytes{1, 2, 3, 4};
   Component c(0xFCEC, bytes.begin(), bytes.end());
-  BOOST_CHECK_EQUAL(c.type(), 0xFCEC);
-  BOOST_CHECK_EQUAL(c.value_size(), 4);
-  BOOST_CHECK_EQUAL(c.size(), 8);
+  BOOST_TEST(c.type() == 0xFCEC);
+  BOOST_TEST(c.value_size() == 4);
+  BOOST_TEST(c.size() == 8);
 }
 
-BOOST_AUTO_TEST_SUITE_END() // CreateFromIterators
+BOOST_AUTO_TEST_SUITE_END() // ConstructFromIterators
 
 BOOST_AUTO_TEST_SUITE(NamingConvention)
 
@@ -585,6 +570,43 @@
 
 BOOST_AUTO_TEST_SUITE_END() // NamingConvention
 
+BOOST_AUTO_TEST_CASE(Compare)
+{
+  const std::vector<Component> comps = {
+    Component("0120 0000000000000000000000000000000000000000000000000000000000000000"_block),
+    Component("0120 0000000000000000000000000000000000000000000000000000000000000001"_block),
+    Component("0120 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"_block),
+    Component("0220 0000000000000000000000000000000000000000000000000000000000000000"_block),
+    Component("0220 0000000000000000000000000000000000000000000000000000000000000001"_block),
+    Component("0220 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"_block),
+    Component(0x03),
+    Component("0301 44"_block),
+    Component("0301 46"_block),
+    Component("0302 4141"_block),
+    Component(),
+    Component("D"),
+    Component("F"),
+    Component("AA"),
+    Component(0x53B2),
+    Component("FD53B201 44"_block),
+    Component("FD53B201 46"_block),
+    Component("FD53B202 4141"_block),
+  };
+
+  for (size_t i = 0; i < comps.size(); ++i) {
+    for (size_t j = 0; j < comps.size(); ++j) {
+      const auto& lhs = comps[i];
+      const auto& rhs = comps[j];
+      BOOST_CHECK_EQUAL(lhs == rhs, i == j);
+      BOOST_CHECK_EQUAL(lhs != rhs, i != j);
+      BOOST_CHECK_EQUAL(lhs <  rhs, i <  j);
+      BOOST_CHECK_EQUAL(lhs <= rhs, i <= j);
+      BOOST_CHECK_EQUAL(lhs >  rhs, i >  j);
+      BOOST_CHECK_EQUAL(lhs >= rhs, i >= j);
+    }
+  }
+}
+
 BOOST_AUTO_TEST_SUITE_END() // TestNameComponent
 
 } // namespace tests
diff --git a/tests/unit/name.t.cpp b/tests/unit/name.t.cpp
index 45149cb..bfddb4f 100644
--- a/tests/unit/name.t.cpp
+++ b/tests/unit/name.t.cpp
@@ -239,17 +239,18 @@
   name.append(25042, {'P', '3'});
   BOOST_CHECK_EQUAL(name.wireEncode(), "070C 0804456D6964 FD61D2025033"_block);
 
-  name.append(Component(make_span<uint8_t>({'.'})));
+  const uint8_t arr[] = {'.'};
+  name.append(arr);
   BOOST_CHECK_EQUAL(name.wireEncode(), "070F 0804456D6964 FD61D2025033 08012E"_block);
 
-  const std::vector<uint8_t> v1{0x28, 0xF0, 0xA3, 0x6B};
-  name.append(16, v1.begin(), v1.end());
+  const std::vector<uint8_t> vec{0x28, 0xF0, 0xA3, 0x6B};
+  name.append(16, vec.begin(), vec.end());
   BOOST_CHECK_EQUAL(name.wireEncode(), "0715 0804456D6964 FD61D2025033 08012E 100428F0A36B"_block);
 
   name.clear();
   BOOST_CHECK_EQUAL(name.wireEncode(), "0700"_block);
 
-  name.append(v1.begin(), v1.end());
+  name.append(vec.begin(), vec.end());
   BOOST_CHECK_EQUAL(name.wireEncode(), "0706 080428F0A36B"_block);
 
   name.append("xKh");
