diff --git a/src/clients/response.cpp b/src/clients/response.cpp
index 8aba4ba..3cc719b 100644
--- a/src/clients/response.cpp
+++ b/src/clients/response.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -26,7 +26,7 @@
 Response::Response()
   : m_ndnsType(NDNS_RAW)
   , m_freshnessPeriod(DEFAULT_RR_FRESHNESS_PERIOD)
-  , m_appContent(dataBlock(ndn::tlv::Content, reinterpret_cast<const uint8_t*>(0), 0))
+  , m_appContent(makeBinaryBlock(ndn::tlv::Content, reinterpret_cast<const uint8_t*>(0), 0))
 {
 }
 
@@ -35,7 +35,7 @@
   , m_queryType(queryType)
   , m_ndnsType(NDNS_RAW)
   , m_freshnessPeriod(DEFAULT_RR_FRESHNESS_PERIOD)
-  , m_appContent(dataBlock(ndn::tlv::Content, reinterpret_cast<const uint8_t*>(0), 0))
+  , m_appContent(makeBinaryBlock(ndn::tlv::Content, reinterpret_cast<const uint8_t*>(0), 0))
 {
 }
 
@@ -45,7 +45,7 @@
 {
   if (m_ndnsType == NDNS_RAW) {
     // Raw application content
-    return prependBlock(block, m_appContent);
+    return block.prependBlock(m_appContent);
   }
 
   // Content :: = CONTENT-TYPE TLV-LENGTH
@@ -54,7 +54,7 @@
   size_t totalLength = 0;
   for (std::vector<Block>::const_reverse_iterator iter = m_rrs.rbegin();
        iter != m_rrs.rend(); ++iter) {
-    totalLength += prependBlock(block, *iter);
+    totalLength += block.prependBlock(*iter);
   }
 
   totalLength += block.prependVarNumber(totalLength);
@@ -145,7 +145,7 @@
   info.setFreshnessPeriod(m_freshnessPeriod);
 
   if (m_ndnsType != NDNS_RAW) {
-    info.addAppMetaInfo(nonNegativeIntegerBlock(ndns::tlv::NdnsType, m_ndnsType));
+    info.addAppMetaInfo(makeNonNegativeIntegerBlock(ndns::tlv::NdnsType, m_ndnsType));
     data->setContent(this->wireEncode());
   }
   else {
@@ -167,7 +167,7 @@
 Response&
 Response::addRr(const std::string& rr)
 {
-  return this->addRr(dataBlock(ndns::tlv::RrData, rr.c_str(), rr.size()));
+  return this->addRr(makeBinaryBlock(ndns::tlv::RrData, rr.c_str(), rr.size()));
 }
 
 bool
diff --git a/src/daemon/name-server.cpp b/src/daemon/name-server.cpp
index 7411697..3170f79 100644
--- a/src/daemon/name-server.cpp
+++ b/src/daemon/name-server.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -104,7 +104,7 @@
   }
   else {
     // no record, construct NACK
-    Block block = nonNegativeIntegerBlock(::ndn::ndns::tlv::NdnsType, NDNS_NACK);
+    Block block = makeNonNegativeIntegerBlock(tlv::NdnsType, NDNS_NACK);
     MetaInfo info;
     info.addAppMetaInfo(block);
     info.setFreshnessPeriod(this->getContentFreshness());
@@ -169,7 +169,7 @@
   rrset.setLabel(re.rrLabel);
   rrset.setType(re.rrType);
 
-  Block ndnsType = nonNegativeIntegerBlock(::ndn::ndns::tlv::NdnsType, NDNS_RESP);
+  Block ndnsType = makeNonNegativeIntegerBlock(::ndn::ndns::tlv::NdnsType, NDNS_RESP);
   MetaInfo info;
   info.addAppMetaInfo(ndnsType);
   info.setFreshnessPeriod(this->getContentFreshness());
@@ -187,13 +187,13 @@
         rrset.setVersion(newVersion);
         rrset.setData(data->wireEncode());
         m_dbMgr.update(rrset);
-        blk.push_back(nonNegativeIntegerBlock(ndn::ndns::tlv::UpdateReturnCode, UPDATE_OK));
+        blk.push_back(makeNonNegativeIntegerBlock(ndn::ndns::tlv::UpdateReturnCode, UPDATE_OK));
         blk.encode(); // must
         answer->setContent(blk);
         NDNS_LOG_TRACE("replace old record and answer update with UPDATE_OK");
       }
       else {
-        blk.push_back(nonNegativeIntegerBlock(ndn::ndns::tlv::UpdateReturnCode, UPDATE_FAILURE));
+        blk.push_back(makeNonNegativeIntegerBlock(ndn::ndns::tlv::UpdateReturnCode, UPDATE_FAILURE));
         blk.encode();
         answer->setContent(blk);
         NDNS_LOG_TRACE("answer update with UPDATE_FAILURE");
@@ -205,14 +205,14 @@
       rrset.setData(data->wireEncode());
       rrset.setTtl(m_zone.getTtl());
       m_dbMgr.insert(rrset);
-      blk.push_back(nonNegativeIntegerBlock(ndn::ndns::tlv::UpdateReturnCode, UPDATE_OK));
+      blk.push_back(makeNonNegativeIntegerBlock(ndn::ndns::tlv::UpdateReturnCode, UPDATE_OK));
       blk.encode();
       answer->setContent(blk);
       NDNS_LOG_TRACE("insert new record and answer update with UPDATE_OK");
     }
   }
   catch (std::exception& e) {
-    blk.push_back(nonNegativeIntegerBlock(ndn::ndns::tlv::UpdateReturnCode, UPDATE_FAILURE));
+    blk.push_back(makeNonNegativeIntegerBlock(ndn::ndns::tlv::UpdateReturnCode, UPDATE_FAILURE));
     blk.encode(); // must
     answer->setContent(blk);
     NDNS_LOG_INFO("Error processing the update: " << e.what()
diff --git a/src/mgmt/management-tool.cpp b/src/mgmt/management-tool.cpp
index 6fe2311..ed7af04 100644
--- a/src/mgmt/management-tool.cpp
+++ b/src/mgmt/management-tool.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -265,7 +265,7 @@
 
   //set content according to ndns type
   if (ndnsType == NDNS_RAW) {
-    Block tmp = ndn::dataBlock(ndn::tlv::Content, contents[0].c_str(), contents[0].length());
+    Block tmp = makeBinaryBlock(ndn::tlv::Content, contents[0].c_str(), contents[0].length());
     re.setAppContent(tmp);
   }
   else if (ndnsType != NDNS_AUTH) {
diff --git a/tests/unit/clients/response.cpp b/tests/unit/clients/response.cpp
index 76798db..7332c35 100644
--- a/tests/unit/clients/response.cpp
+++ b/tests/unit/clients/response.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -50,7 +50,7 @@
   BOOST_CHECK_EQUAL(r.getQueryType(), qType);
 
   const std::string DATA1("some fake content");
-  r.setAppContent(dataBlock(ndn::tlv::Content, DATA1.c_str(), DATA1.size()));
+  r.setAppContent(makeBinaryBlock(ndn::tlv::Content, DATA1.c_str(), DATA1.size()));
 
   //const Block& block = r.wireEncode();
   shared_ptr<Data> data = r.toData();
@@ -66,10 +66,10 @@
   r4.setNdnsType(NDNS_RESP);
 
   std::string str = "Just try it";
-  Block s = dataBlock(ndns::tlv::RrData, str.c_str(), str.size());
+  Block s = makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size());
   r4.addRr(s);
   str = "Go to Hell";
-  // Block s2 = dataBlock(ndns::tlv::RrData, str.c_str(), str.size());
+  // Block s2 = makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size());
   r4.addRr(str);
 
   BOOST_CHECK_NE(r2, r4);
diff --git a/tests/unit/daemon/db-mgr.cpp b/tests/unit/daemon/db-mgr.cpp
index be728d6..4b628b3 100644
--- a/tests/unit/daemon/db-mgr.cpp
+++ b/tests/unit/daemon/db-mgr.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -97,7 +97,7 @@
   rrset1.setTtl(time::seconds(4600));
 
   static const std::string DATA1 = "SOME DATA";
-  rrset1.setData(dataBlock(ndn::tlv::Content, DATA1.c_str(), DATA1.size()));
+  rrset1.setData(makeBinaryBlock(ndn::tlv::Content, DATA1.c_str(), DATA1.size()));
 
   BOOST_CHECK_EQUAL(rrset1.getId(), 0);
   BOOST_CHECK_NO_THROW(session.insert(rrset1));
@@ -125,7 +125,7 @@
 
   rrset1.setVersion(name::Component::fromVersion(890));
   static const std::string DATA2 = "ANOTHER DATA";
-  rrset1.setData(dataBlock(ndn::tlv::Content, DATA2.c_str(), DATA2.size()));
+  rrset1.setData(makeBinaryBlock(ndn::tlv::Content, DATA2.c_str(), DATA2.size()));
 
   BOOST_CHECK_NO_THROW(session.update(rrset1));
 
@@ -217,7 +217,7 @@
   rrset1.setTtl(time::seconds(4600));
 
   static const std::string DATA1 = "SOME DATA";
-  rrset1.setData(dataBlock(ndn::tlv::Content, DATA1.data(), DATA1.size()));
+  rrset1.setData(makeBinaryBlock(ndn::tlv::Content, DATA1.data(), DATA1.size()));
   session.insert(rrset1);
 
   Rrset rrset2(&zone);
@@ -226,7 +226,7 @@
   rrset2.setVersion(name::Component::fromVersion(232));
   rrset2.setTtl(time::seconds(2100));
   std::string data2 = "host1.net";
-  rrset2.setData(dataBlock(ndn::tlv::Content, data2.c_str(), data2.size()));
+  rrset2.setData(makeBinaryBlock(ndn::tlv::Content, data2.c_str(), data2.size()));
   session.insert(rrset2);
 
   std::vector<Rrset> vec = session.findRrsets(zone);
diff --git a/tests/unit/daemon/name-server.cpp b/tests/unit/daemon/name-server.cpp
index 8944759..6a9be97 100644
--- a/tests/unit/daemon/name-server.cpp
+++ b/tests/unit/daemon/name-server.cpp
@@ -170,9 +170,9 @@
   re.setNdnsType(NDNS_RESP);
 
   std::string str = "ns1.ndnsim.net";
-  re.addRr(dataBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
   str = "ns2.ndnsim.net";
-  re.addRr(dataBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
 
   shared_ptr<Data> data = re.toData();
   m_keyChain.sign(*data, m_certName);
@@ -222,9 +222,9 @@
   re.setNdnsType(NDNS_RESP);
 
   std::string str = "ns1.ndnsim.net";
-  re.addRr(dataBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
   str = "ns2.ndnsim.net";
-  re.addRr(dataBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
 
   shared_ptr<Data> data = re.toData();
   m_keyChain.sign(*data, m_certName);
@@ -298,9 +298,9 @@
   re.setNdnsType(NDNS_RESP);
 
   std::string str = "ns1.ndnsim.net";
-  re.addRr(dataBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
   str = "ns2.ndnsim.net";
-  re.addRr(dataBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
 
   shared_ptr<Data> data = re.toData();
   m_keyChain.sign(*data, dskCert->getName());
@@ -401,9 +401,9 @@
   re.setNdnsType(NDNS_RESP);
 
   std::string str = "ns1.ndnsim.net";
-  re.addRr(dataBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
   str = "ns2.ndnsim.net";
-  re.addRr(dataBlock(ndns::tlv::RrData, str.c_str(), str.size()));
+  re.addRr(makeBinaryBlock(ndns::tlv::RrData, str.c_str(), str.size()));
 
   shared_ptr<Data> data = re.toData();
   m_keyChain.sign(*data, dskCert->getName());
diff --git a/tests/unit/database-test-data.cpp b/tests/unit/database-test-data.cpp
index df43338..077d09b 100644
--- a/tests/unit/database-test-data.cpp
+++ b/tests/unit/database-test-data.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -132,7 +132,7 @@
 
   if (msg.size() > 0) {
     if (type == label::CERT_RR_TYPE)
-      re.setAppContent(dataBlock(ndn::tlv::Content, msg.c_str(), msg.size()));
+      re.setAppContent(makeBinaryBlock(ndn::tlv::Content, msg.c_str(), msg.size()));
     else
       re.addRr(msg);
   }
diff --git a/tests/unit/mgmt/management-tool.cpp b/tests/unit/mgmt/management-tool.cpp
index 54ad7d2..ed8e02b 100644
--- a/tests/unit/mgmt/management-tool.cpp
+++ b/tests/unit/mgmt/management-tool.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -802,7 +802,7 @@
   re2.setRrType(name::Component("USER-DEFINED"));
   re2.setNdnsType(NDNS_RAW);
   re2.setVersion(name::Component::fromVersion(1234567));
-  re2.setAppContent(dataBlock(ndn::tlv::Content, "Hello", sizeof("Hello")));
+  re2.setAppContent(makeBinaryBlock(ndn::tlv::Content, "Hello", sizeof("Hello")));
   shared_ptr<Data> data2 = re2.toData();
   m_keyChain.sign(*data2, otherDsk);
   ndn::io::save(*data2, output);
diff --git a/tools/ndns-update.cpp b/tools/ndns-update.cpp
index 10bab42..a99aeb3 100644
--- a/tools/ndns-update.cpp
+++ b/tools/ndns-update.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -335,7 +335,7 @@
       re.setNdnsType(ndnsType);
 
       for (const auto& content : contents) {
-        re.addRr(ndn::dataBlock(ndn::ndns::tlv::RrData, content.c_str(), content.size()));
+        re.addRr(makeBinaryBlock(ndns::tlv::RrData, content.c_str(), content.size()));
 
         // re.addRr(content);
       }
