diff --git a/ndn-cxx/data.cpp b/ndn-cxx/data.cpp
index 306a09e..a4331a8 100644
--- a/ndn-cxx/data.cpp
+++ b/ndn-cxx/data.cpp
@@ -194,7 +194,7 @@
     NDN_THROW(Error("SignatureInfo element is missing"));
   }
 
-  if (m_signatureValue.empty()) {
+  if (!m_signatureValue.isValid()) {
     NDN_THROW(Error("SignatureValue element is missing"));
   }
 }
diff --git a/ndn-cxx/encoding/block.hpp b/ndn-cxx/encoding/block.hpp
index 51f9f4d..b91e90a 100644
--- a/ndn-cxx/encoding/block.hpp
+++ b/ndn-cxx/encoding/block.hpp
@@ -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-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -182,7 +182,7 @@
   /** @brief Check if the Block is valid
    *
    *  A Block is valid unless it has an invalid TLV-TYPE or is default-constructed.
-   *  In particular, a Block with zero-length TLV-VALUE *is* valid.
+   *  In particular, a Block with zero-length TLV-VALUE *is valid*.
    */
   bool
   isValid() const noexcept
@@ -190,19 +190,6 @@
     return m_type != tlv::Invalid;
   }
 
-  /** @brief Check if the Block is empty
-   *
-   *  A Block is considered empty *iff* it is not valid, i.e., isValid() returns false.
-   *
-   *  @warning Note that an empty Block is *not* the same as a valid but zero-length Block.
-   *  @deprecated Use Block::isValid()
-   */
-  NDN_CXX_NODISCARD bool
-  empty() const noexcept
-  {
-    return !isValid();
-  }
-
   /** @brief Reset the Block to a default-constructed state
    *
    *  Equivalent to `*this = Block()`.
diff --git a/ndn-cxx/encoding/tlv.hpp b/ndn-cxx/encoding/tlv.hpp
index b435d14..63fb172 100644
--- a/ndn-cxx/encoding/tlv.hpp
+++ b/ndn-cxx/encoding/tlv.hpp
@@ -112,9 +112,6 @@
   Any                       = 19,
 };
 
-[[deprecated("use GenericNameComponent")]]
-constexpr int NameComponent = GenericNameComponent;
-
 /** @brief TLV-TYPE numbers for typed name components.
  *  @sa https://redmine.named-data.net/projects/ndn-tlv/wiki/NameComponentType
  */
diff --git a/ndn-cxx/key-locator.hpp b/ndn-cxx/key-locator.hpp
index df12134..a6759b2 100644
--- a/ndn-cxx/key-locator.hpp
+++ b/ndn-cxx/key-locator.hpp
@@ -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-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -35,19 +35,6 @@
     using tlv::Error::Error;
   };
 
-  enum
-#ifndef DOXYGEN
-  [[deprecated]] // apparently doxygen can't handle this attribute on enums
-#endif
-  Type {
-    /// KeyLocator is empty
-    KeyLocator_None = tlv::Invalid,
-    /// KeyLocator contains a Name
-    KeyLocator_Name = tlv::Name,
-    /// KeyLocator contains a KeyDigest
-    KeyLocator_KeyDigest = tlv::KeyDigest,
-  };
-
 public: // constructors
   /** \brief Construct an empty KeyLocator.
    *  \post `empty() == true`
diff --git a/ndn-cxx/name-component.hpp b/ndn-cxx/name-component.hpp
index da8cdda..1022727 100644
--- a/ndn-cxx/name-component.hpp
+++ b/ndn-cxx/name-component.hpp
@@ -317,13 +317,6 @@
   bool
   isByteOffset() const;
 
-  /// @deprecated use isByteOffset
-  bool
-  isSegmentOffset() const
-  {
-    return isByteOffset();
-  }
-
   /**
    * @brief Check if the component is a timestamp per NDN naming conventions
    * @sa https://named-data.net/publications/techreports/ndn-tr-22-2-ndn-memo-naming-conventions/
@@ -392,13 +385,6 @@
   uint64_t
   toByteOffset() const;
 
-  /// @deprecated use toByteOffset
-  uint64_t
-  toSegmentOffset() const
-  {
-    return toByteOffset();
-  }
-
   /**
    * @brief Interpret as timestamp component using NDN naming conventions
    *
@@ -474,13 +460,6 @@
   static Component
   fromByteOffset(uint64_t offset);
 
-  /// @deprecated use fromByteOffset
-  static Component
-  fromSegmentOffset(uint64_t offset)
-  {
-    return fromByteOffset(offset);
-  }
-
   /**
    * @brief Create sequence number component using NDN naming conventions
    *
diff --git a/ndn-cxx/name.hpp b/ndn-cxx/name.hpp
index d1c9c8d..5b9268a 100644
--- a/ndn-cxx/name.hpp
+++ b/ndn-cxx/name.hpp
@@ -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-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -428,13 +428,6 @@
     return append(Component::fromByteOffset(offset));
   }
 
-  /// @deprecated use appendByteOffset
-  Name&
-  appendSegmentOffset(uint64_t offset)
-  {
-    return appendByteOffset(offset);
-  }
-
   /** @brief Append a timestamp component
    *  @param timestamp the timestamp to append; if nullopt, the current system time is used
    *  @return a reference to this name, to allow chaining
diff --git a/tests/unit/encoding/block.t.cpp b/tests/unit/encoding/block.t.cpp
index f6b245e..fea4714 100644
--- a/tests/unit/encoding/block.t.cpp
+++ b/tests/unit/encoding/block.t.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-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -49,7 +49,6 @@
   Block b;
 
   BOOST_CHECK_EQUAL(b.isValid(), false);
-  BOOST_CHECK_EQUAL(b.empty(), true);
   BOOST_CHECK_EQUAL(b.type(), tlv::Invalid);
   BOOST_CHECK_EQUAL(b.hasValue(), false);
   BOOST_CHECK_EQUAL(b.value_size(), 0);
diff --git a/tests/unit/name-component.t.cpp b/tests/unit/name-component.t.cpp
index 7abec36..10663bf 100644
--- a/tests/unit/name-component.t.cpp
+++ b/tests/unit/name-component.t.cpp
@@ -402,23 +402,6 @@
   }
 };
 
-class SegmentOffsetMarker
-{
-public:
-  using ConventionRev = ConventionMarker;
-
-  ConventionTest<uint64_t>
-  operator()() const
-  {
-    return {&Component::fromSegmentOffset,
-            bind(&Component::toSegmentOffset, _1),
-            bind(&Name::appendSegmentOffset, _1, _2),
-            Name("/%FB%00%01%86%A0"),
-            100000,
-            bind(&Component::isSegmentOffset, _1)};
-  }
-};
-
 class ByteOffsetTyped
 {
 public:
@@ -542,7 +525,6 @@
   NumberWithMarker,
   SegmentMarker,
   SegmentTyped,
-  SegmentOffsetMarker,
   ByteOffsetTyped,
   VersionMarker,
   VersionTyped,
diff --git a/tests/unit/name.t.cpp b/tests/unit/name.t.cpp
index 21ecc00..165668b 100644
--- a/tests/unit/name.t.cpp
+++ b/tests/unit/name.t.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-2020 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -320,15 +320,12 @@
   BOOST_REQUIRE_NO_THROW(number = name.appendSegment(30923).at(-1).toSegment());
   BOOST_CHECK_EQUAL(number, 30923);
 
-  BOOST_REQUIRE_NO_THROW(number = name.appendSegmentOffset(589).at(-1).toSegmentOffset());
-  BOOST_CHECK_EQUAL(number, 589);
-
   BOOST_REQUIRE_NO_THROW(number = name.appendVersion().at(-1).toVersion());
 
   BOOST_REQUIRE_NO_THROW(number = name.appendVersion(25912).at(-1).toVersion());
   BOOST_CHECK_EQUAL(number, 25912);
 
-  const time::system_clock::TimePoint tp = time::system_clock::now();
+  const auto tp = time::system_clock::now();
   time::system_clock::TimePoint tp2;
   BOOST_REQUIRE_NO_THROW(tp2 = name.appendTimestamp(tp).at(-1).toTimestamp());
   BOOST_CHECK_LE(time::abs(tp2 - tp), 1_us);
