diff --git a/src/fetch-task-db.cpp b/src/fetch-task-db.cpp
index 912f063..e753f95 100644
--- a/src/fetch-task-db.cpp
+++ b/src/fetch-task-db.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016, Regents of the University of California.
+ * Copyright (c) 2013-2017, Regents of the University of California.
  *
  * This file is part of ChronoShare, a decentralized file sharing application over NDN.
  *
@@ -17,15 +17,16 @@
  *
  * See AUTHORS.md for complete list of ChronoShare authors and contributors.
  */
+
 #include "fetch-task-db.hpp"
 #include "db-helper.hpp"
 
-using namespace std;
-using namespace boost;
-using namespace Ndnx;
+namespace ndn {
+namespace chronoshare {
+
 namespace fs = boost::filesystem;
 
-const string INIT_DATABASE = "\
+const std::string INIT_DATABASE = "\
 CREATE TABLE IF NOT EXISTS                                      \n\
   Task(                                                         \n\
     deviceName  BLOB NOT NULL,                                  \n\
@@ -45,14 +46,12 @@
 
   int res = sqlite3_open((actualFolder / tag).c_str(), &m_db);
   if (res != SQLITE_OK) {
-    BOOST_THROW_EXCEPTION(
-      Error::Db() << errmsg_info_str("Cannot open database: " + (actualFolder / tag).string()));
+    BOOST_THROW_EXCEPTION(Error("Cannot open database: " + (actualFolder / tag).string()));
   }
 
   char* errmsg = 0;
   res = sqlite3_exec(m_db, INIT_DATABASE.c_str(), NULL, NULL, &errmsg);
   if (res != SQLITE_OK && errmsg != 0) {
-    // _LOG_TRACE ("Init \"error\": " << errmsg);
     sqlite3_free(errmsg);
   }
   else {
@@ -73,12 +72,13 @@
 {
   sqlite3_stmt* stmt;
   sqlite3_prepare_v2(m_db,
-                     "INSERT OR IGNORE INTO Task (deviceName, baseName, minSeqNo, maxSeqNo, priority) VALUES (?, ?, ?, ?, ?)",
+                     "INSERT OR IGNORE INTO Task(deviceName, baseName, minSeqNo, maxSeqNo, priority) VALUES(?, ?, ?, ?, ?)",
                      -1, &stmt, 0);
-  CcnxCharbufPtr deviceBuf = CcnxCharbufPtr(deviceName);
-  CcnxCharbufPtr baseBuf = CcnxCharbufPtr(baseName);
-  sqlite3_bind_blob(stmt, 1, deviceBuf->buf(), deviceBuf->length(), SQLITE_STATIC);
-  sqlite3_bind_blob(stmt, 2, baseBuf->buf(), baseBuf->length(), SQLITE_STATIC);
+
+  sqlite3_bind_blob(stmt, 1, deviceName.wireEncode().wire(), deviceName.wireEncode().size(),
+                    SQLITE_STATIC);
+  sqlite3_bind_blob(stmt, 2, baseName.wireEncode().wire(), baseName.wireEncode().size(),
+                    SQLITE_STATIC);
   sqlite3_bind_int64(stmt, 3, minSeqNo);
   sqlite3_bind_int64(stmt, 4, maxSeqNo);
   sqlite3_bind_int(stmt, 5, priority);
@@ -94,10 +94,12 @@
 {
   sqlite3_stmt* stmt;
   sqlite3_prepare_v2(m_db, "DELETE FROM Task WHERE deviceName = ? AND baseName = ?;", -1, &stmt, 0);
-  NdnxCharbufPtr deviceBuf = NdnxCharbufPtr(deviceName);
-  NdnxCharbufPtr baseBuf = NdnxCharbufPtr(baseName);
-  sqlite3_bind_blob(stmt, 1, deviceBuf->buf(), deviceBuf->length(), SQLITE_STATIC);
-  sqlite3_bind_blob(stmt, 2, baseBuf->buf(), baseBuf->length(), SQLITE_STATIC);
+
+  sqlite3_bind_blob(stmt, 1, deviceName.wireEncode().wire(), deviceName.wireEncode().size(),
+                    SQLITE_STATIC);
+  sqlite3_bind_blob(stmt, 2, baseName.wireEncode().wire(), baseName.wireEncode().size(),
+                    SQLITE_STATIC);
+
   int res = sqlite3_step(stmt);
   if (res == SQLITE_OK) {
   }
@@ -110,8 +112,10 @@
   sqlite3_stmt* stmt;
   sqlite3_prepare_v2(m_db, "SELECT * FROM Task;", -1, &stmt, 0);
   while (sqlite3_step(stmt) == SQLITE_ROW) {
-    Name deviceName(sqlite3_column_blob(stmt, 0), sqlite3_column_bytes(stmt, 0));
-    Name baseName(sqlite3_column_blob(stmt, 1), sqlite3_column_bytes(stmt, 1));
+    Name deviceName(Block(sqlite3_column_blob(stmt, 0), sqlite3_column_bytes(stmt, 0)));
+    Name baseName(Block(sqlite3_column_blob(stmt, 1), sqlite3_column_bytes(stmt, 1)));
+
+    std::cout << "deviceName: " << deviceName << " baseName: " << baseName << std::endl;
     uint64_t minSeqNo = sqlite3_column_int64(stmt, 2);
     uint64_t maxSeqNo = sqlite3_column_int64(stmt, 3);
     int priority = sqlite3_column_int(stmt, 4);
@@ -120,3 +124,6 @@
 
   sqlite3_finalize(stmt);
 }
+
+} // namespace chronoshare
+} // namespace ndn
