diff --git a/src/file-manifest.cpp b/src/file-manifest.cpp
index 2e6dcd2..6310b20 100644
--- a/src/file-manifest.cpp
+++ b/src/file-manifest.cpp
@@ -65,7 +65,7 @@
                                               manifestPrefix.toUri() + " and "     +
                                               full_path.toUri()));
   }
-  ndn::Name manifestName = "/NTORRENT/";
+  ndn::Name manifestName = "/ndn/multicast/NTORRENT/";
   // Rebuild the name to be the suffix from the matching component
   for (auto it = (name_component_iter.base() - 1); full_path.end() != it; ++it) {
     manifestName.append(*it);
@@ -204,7 +204,6 @@
 {
   BOOST_ASSERT(name != m_catalogPrefix);
   BOOST_ASSERT(m_catalogPrefix.isPrefixOf(name));
-  // TODO(msweatt) Change this to use the copy constructor once bug fixed in Name()
   m_catalog.push_back(name.toUri());
 }
 
diff --git a/src/file-manifest.hpp b/src/file-manifest.hpp
index 8366db2..e11b560 100644
--- a/src/file-manifest.hpp
+++ b/src/file-manifest.hpp
@@ -312,7 +312,7 @@
 inline std::string
 FileManifest::file_name() const
 {
-  return name().getSubName(1, name().size() - 2).toUri();
+  return name().getSubName(3, name().size() - 4).toUri();
 }
 
 
diff --git a/src/main.cpp b/src/main.cpp
index c4240d9..2fd441d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -103,7 +103,7 @@
           manifests.insert(manifests.end(), ms.first.begin(), ms.first.end());
         }
         auto torrentPrefix = fs::canonical(dataPath).filename().string();
-        outputPath += torrentPrefix;
+        outputPath += ("/" + torrentPrefix);
         auto torrentPath =  outputPath + "/torrent_files/";
         // write all the torrent segments
         for (const TorrentFile& t : torrentSegments) {
diff --git a/src/torrent-file.cpp b/src/torrent-file.cpp
index 30957bf..e5ef53e 100644
--- a/src/torrent-file.cpp
+++ b/src/torrent-file.cpp
@@ -252,7 +252,7 @@
   Name directoryPathName(directoryPath);
   fs::recursive_directory_iterator directoryPtr(fs::system_complete(directoryPath).string());
 
-  Name commonPrefix("/NTORRENT" +
+  Name commonPrefix("/ndn/multicast/NTORRENT" +
                     directoryPathName.getSubName(directoryPathName.size() - 1).toUri());
 
   Name torrentName(commonPrefix.toUri() + "/torrent-file");
@@ -265,7 +265,7 @@
   }
   size_t manifestFileCounter = 0u;
   for (const auto& fileName : fileNames) {
-    Name manifestPrefix("/NTORRENT" +
+    Name manifestPrefix("/ndn/multicast/NTORRENT" +
                         directoryPathName.getSubName(directoryPathName.size() - 1).toUri());
     std::pair<std::vector<FileManifest>, std::vector<Data>> currentManifestPair =
                                                     FileManifest::generate(fileName,
diff --git a/src/torrent-manager.cpp b/src/torrent-manager.cpp
index 110d90f..892228f 100644
--- a/src/torrent-manager.cpp
+++ b/src/torrent-manager.cpp
@@ -17,6 +17,7 @@
 #include <string>
 #include <unordered_map>
 #include <vector>
+#include <boost/asio/io_service.hpp>
 
 namespace fs = boost::filesystem;
 
@@ -32,7 +33,6 @@
   security::KeyChain key_chain;
   Name currSegmentFullName = initialSegmentName;
   vector<TorrentFile> torrentSegments = IoUtil::load_directory<TorrentFile>(torrentFilePath);
-
   // Starting with the initial segment name, verify the names, loading next name from torrentSegment
   for (auto it = torrentSegments.begin(); it != torrentSegments.end(); ++it) {
     TorrentFile& segment = *it;
@@ -169,10 +169,10 @@
   // figure out the name of the torrent
   Name torrentName;
   if (m_torrentFileName.get(m_torrentFileName.size() - 2).isSequenceNumber()) {
-    torrentName = m_torrentFileName.getSubName(1, m_torrentFileName.size() - 4);
+    torrentName = m_torrentFileName.getSubName(3, m_torrentFileName.size() - 6);
   }
   else {
-    torrentName = m_torrentFileName.getSubName(1, m_torrentFileName.size() - 3);
+    torrentName = m_torrentFileName.getSubName(3, m_torrentFileName.size() - 5);
   }
 
   // TODO(spyros) Get update manager working
@@ -406,7 +406,6 @@
       this->sendInterest();
       if (m_pendingInterests.empty() && m_interestQueue->empty() && !m_seedFlag) {
         shutdown();
-        return;
       }
   };
 
@@ -520,6 +519,12 @@
                            bind(&TorrentManager::onRegisterFailed, this, _1, _2));
 }
 
+void
+TorrentManager::shutdown()
+{
+  m_face->getIoService().stop();
+}
+
 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
 //                                Protected Helpers
 // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
@@ -650,7 +655,6 @@
     this->sendInterest();
     if (m_pendingInterests.empty() && m_interestQueue->empty() && !m_seedFlag) {
       shutdown();
-      return;
     }
   };
 
diff --git a/src/torrent-manager.hpp b/src/torrent-manager.hpp
index 12096c3..8c638dd 100644
--- a/src/torrent-manager.hpp
+++ b/src/torrent-manager.hpp
@@ -341,9 +341,9 @@
   uint64_t                                                            m_sortingCounter;
   // Keychain instance
   shared_ptr<KeyChain>                                                m_keyChain;
-
+  // A collection for all interests that have been sent for which we have not received a response
   std::unordered_set<ndn::Name>                                       m_pendingInterests;
-
+  // A queue to hold all interests for requested data that we have yet to send
   shared_ptr<InterestQueue>                                           m_interestQueue;
   // TODO(spyros) Fix and reintegrate update handler
   // // Update Handler instance
@@ -393,14 +393,6 @@
   return findTorrentFileSegmentToDownload() == nullptr;
 }
 
-inline
-void
-TorrentManager::shutdown()
-{
-  // TODO(msweatt) Consider unregistering all prefix to exit more gracefully
-  m_face->shutdown();
-}
-
 }  // end ntorrent
 }  // end ndn
 
diff --git a/tests/unit-tests/file-manifest.t.cpp b/tests/unit-tests/file-manifest.t.cpp
index 72316f8..f640548 100644
--- a/tests/unit-tests/file-manifest.t.cpp
+++ b/tests/unit-tests/file-manifest.t.cpp
@@ -334,21 +334,21 @@
       bool           d_shouldThrow;
   } DATA [] = {
     // Affirmative tests
-    {1            , TEST_FILE_LEN, "tests/testdata/foo/bar.txt" , "/NTORRENT/foo/", true, false },
-    {10           , 10           , "tests/testdata/foo/bar.txt" , "/NTORRENT/foo/", true, false },
-    {10           , 1            , "tests/testdata/foo/bar.txt" , "/NTORRENT/foo/", true, false },
-    {1            , 10           , "tests/testdata/foo/bar.txt" , "/NTORRENT/foo/", true, false },
-    {1            , 1            , "tests/testdata/foo/bar.txt" , "/NTORRENT/foo/", true, false },
-    {1024         , 1            , "tests/testdata/foo/bar1.txt", "/NTORRENT/foo/", true, false },
-    {1024         , 100          , "tests/testdata/foo/bar1.txt", "/NTORRENT/foo/", true, false },
-    {TEST_FILE_LEN, 1            , "tests/testdata/foo/bar.txt" , "/NTORRENT/foo/", true, false },
+    {1            , TEST_FILE_LEN, "tests/testdata/foo/bar.txt" , "/ndn/multicast/NTORRENT/foo/", true, false },
+    {10           , 10           , "tests/testdata/foo/bar.txt" , "/ndn/multicast/NTORRENT/foo/", true, false },
+    {10           , 1            , "tests/testdata/foo/bar.txt" , "/ndn/multicast/NTORRENT/foo/", true, false },
+    {1            , 10           , "tests/testdata/foo/bar.txt" , "/ndn/multicast/NTORRENT/foo/", true, false },
+    {1            , 1            , "tests/testdata/foo/bar.txt" , "/ndn/multicast/NTORRENT/foo/", true, false },
+    {1024         , 1            , "tests/testdata/foo/bar1.txt", "/ndn/multicast/NTORRENT/foo/", true, false },
+    {1024         , 100          , "tests/testdata/foo/bar1.txt", "/ndn/multicast/NTORRENT/foo/", true, false },
+    {TEST_FILE_LEN, 1            , "tests/testdata/foo/bar.txt" , "/ndn/multicast/NTORRENT/foo/", true, false },
     // Negative tests
     //   non-existent file
-    {128          , 128          , "tests/testdata/foo/fake.txt", "/NTORRENT/foo/", false, true },
+    {128          , 128          , "tests/testdata/foo/fake.txt", "/ndn/multicast/NTORRENT/foo/", false, true },
     // prefix mismatch
-    {128          , 128          , "tests/testdata/foo/bar.txt", "/NTORRENT/bar/",  false, true },
+    {128          , 128          , "tests/testdata/foo/bar.txt", "/ndn/multicast/NTORRENT/bar/",  false, true },
     // scaling test
-    // {10240         , 5120 ,         "tests/testdata/foo/huge_file", "/NTORRENT/foo/", false, false },
+    // {10240         , 5120 ,         "tests/testdata/foo/huge_file", "/ndn/multicast/NTORRENT/foo/", false, false },
     // assertion failures (tests not supported on platforms)
     // {0            , 128          , "tests/testdata/foo/bar.txt", "/NTORRENT/bar/", true },
     // {128          , 0            , "tests/testdata/foo/bar.txt", "/NTORRENT/bar/", true },
diff --git a/tests/unit-tests/torrent-file.t.cpp b/tests/unit-tests/torrent-file.t.cpp
index 4ab3077..d96b1ff 100644
--- a/tests/unit-tests/torrent-file.t.cpp
+++ b/tests/unit-tests/torrent-file.t.cpp
@@ -127,35 +127,35 @@
 BOOST_AUTO_TEST_CASE(CheckGettersSetters)
 {
 
-  TorrentFile file("/NTORRENT/linux15.01/torrent-file/AB2CDA",
-                   "/NTORRENT/linux15.01/torrent-file/segment2/AE321C",
-                   "/NTORRENT/linux15.01",
-                   {"/NTORRENT/linux15.01/file0/1A2B3C4D",
-                   "/NTORRENT/linux15.01/file1/2A3B4C5E"});
+  TorrentFile file("/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA",
+                   "/ndn/multicast/NTORRENT/linux15.01/torrent-file/segment2/AE321C",
+                   "/ndn/multicast/NTORRENT/linux15.01",
+                   {"/ndn/multicast/NTORRENT/linux15.01/file0/1A2B3C4D",
+                   "/ndn/multicast/NTORRENT/linux15.01/file1/2A3B4C5E"});
 
-  BOOST_CHECK_EQUAL(file.getName(), "/NTORRENT/linux15.01/torrent-file/AB2CDA");
+  BOOST_CHECK_EQUAL(file.getName(), "/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA");
   BOOST_CHECK_EQUAL(file.getCatalog().size(), 2);
   BOOST_CHECK_EQUAL(*(file.getTorrentFilePtr()),
-                   "/NTORRENT/linux15.01/torrent-file/segment2/AE321C");
-  BOOST_CHECK_EQUAL(file.getCatalog()[0], "/NTORRENT/linux15.01/file0/1A2B3C4D");
-  BOOST_CHECK_EQUAL(file.getCatalog()[1], "/NTORRENT/linux15.01/file1/2A3B4C5E");
+                   "/ndn/multicast/NTORRENT/linux15.01/torrent-file/segment2/AE321C");
+  BOOST_CHECK_EQUAL(file.getCatalog()[0], "/ndn/multicast/NTORRENT/linux15.01/file0/1A2B3C4D");
+  BOOST_CHECK_EQUAL(file.getCatalog()[1], "/ndn/multicast/NTORRENT/linux15.01/file1/2A3B4C5E");
 
-  TorrentFile file2("/NTORRENT/linux15.01/torrent-file/AB2CDA",
-                    "/NTORRENT/linux15.01",
-                    {"/NTORRENT/linux15.01/file0/1A2B3C4D"});
+  TorrentFile file2("/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA",
+                    "/ndn/multicast/NTORRENT/linux15.01",
+                    {"/ndn/multicast/NTORRENT/linux15.01/file0/1A2B3C4D"});
 
-  BOOST_CHECK_EQUAL(file2.getName(), "/NTORRENT/linux15.01/torrent-file/AB2CDA");
+  BOOST_CHECK_EQUAL(file2.getName(), "/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA");
   BOOST_CHECK(!file2.getTorrentFilePtr());
   BOOST_CHECK_EQUAL(file2.getCatalog().size(), 1);
 }
 
 BOOST_AUTO_TEST_CASE(CheckEncodeDecode)
 {
-  TorrentFile file("/NTORRENT/linux15.01/torrent-file/AB2CDA",
-                   "/NTORRENT/linux15.01/torrent-file/segment2/AE321C",
-                   "/NTORRENT/linux15.01",
-                   {"/NTORRENT/linux15.01/file0/1A2B3C4D",
-                   "/NTORRENT/linux15.01/file1/2A3B4C5E"});
+  TorrentFile file("/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA",
+                   "/ndn/multicast/NTORRENT/linux15.01/torrent-file/segment2/AE321C",
+                   "/ndn/multicast/NTORRENT/linux15.01",
+                   {"/ndn/multicast/NTORRENT/linux15.01/file0/1A2B3C4D",
+                   "/ndn/multicast/NTORRENT/linux15.01/file1/2A3B4C5E"});
 
   file.finalize();
   KeyChain keyChain;
@@ -166,21 +166,21 @@
   TorrentFile file2;
   file2.wireDecode(wire);
 
-  BOOST_CHECK_EQUAL(file2.getName(), "/NTORRENT/linux15.01/torrent-file/AB2CDA");
+  BOOST_CHECK_EQUAL(file2.getName(), "/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA");
   BOOST_CHECK_EQUAL(*(file2.getTorrentFilePtr()),
-                   "/NTORRENT/linux15.01/torrent-file/segment2/AE321C");
+                   "/ndn/multicast/NTORRENT/linux15.01/torrent-file/segment2/AE321C");
   BOOST_CHECK_EQUAL(file2.getCatalog().size(), 2);
-  BOOST_CHECK_EQUAL(file2.getCatalog()[0], "/NTORRENT/linux15.01/file0/1A2B3C4D");
-  BOOST_CHECK_EQUAL(file2.getCatalog()[1], "/NTORRENT/linux15.01/file1/2A3B4C5E");
-  BOOST_CHECK_EQUAL(file2.getCommonPrefix(), "/NTORRENT/linux15.01");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[0], "/ndn/multicast/NTORRENT/linux15.01/file0/1A2B3C4D");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[1], "/ndn/multicast/NTORRENT/linux15.01/file1/2A3B4C5E");
+  BOOST_CHECK_EQUAL(file2.getCommonPrefix(), "/ndn/multicast/NTORRENT/linux15.01");
 }
 
 BOOST_AUTO_TEST_CASE(CheckEncodeDecodeNoTorrentFilePtr)
 {
-  TorrentFile file("/NTORRENT/linux15.01/torrent-file/AB2CDA",
-                   "/NTORRENT/linux15.01",
-                   {"/NTORRENT/linux15.01/file0/1A2B3C4D",
-                   "/NTORRENT/linux15.01/file1/2A3B4C5E"});
+  TorrentFile file("/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA",
+                   "/ndn/multicast/NTORRENT/linux15.01",
+                   {"/ndn/multicast/NTORRENT/linux15.01/file0/1A2B3C4D",
+                   "/ndn/multicast/NTORRENT/linux15.01/file1/2A3B4C5E"});
 
   file.finalize();
   KeyChain keyChain;
@@ -191,16 +191,16 @@
   TorrentFile file2;
   file2.wireDecode(wire);
 
-  BOOST_CHECK_EQUAL(file2.getName(), "/NTORRENT/linux15.01/torrent-file/AB2CDA");
+  BOOST_CHECK_EQUAL(file2.getName(), "/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA");
   BOOST_CHECK(!file2.getTorrentFilePtr());
   BOOST_CHECK_EQUAL(file2.getCatalog().size(), 2);
-  BOOST_CHECK_EQUAL(file2.getCatalog()[0], "/NTORRENT/linux15.01/file0/1A2B3C4D");
-  BOOST_CHECK_EQUAL(file2.getCatalog()[1], "/NTORRENT/linux15.01/file1/2A3B4C5E");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[0], "/ndn/multicast/NTORRENT/linux15.01/file0/1A2B3C4D");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[1], "/ndn/multicast/NTORRENT/linux15.01/file1/2A3B4C5E");
 }
 
 BOOST_AUTO_TEST_CASE(CheckEncodeDecodeEmptyTorrentFile)
 {
-  TorrentFile file("/NTORRENT/linux15.01/torrent-file/AB2CDA",
+  TorrentFile file("/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA",
                   "",
                   {});
 
@@ -219,9 +219,9 @@
 BOOST_AUTO_TEST_CASE(CheckEncodeDecodeEmptyCatalog)
 {
 
-  TorrentFile file("/NTORRENT/linux15.01/torrent-file/AB2CDA",
-                  "/NTORRENT/linux15.01/torrent-file/segment2/AE321C",
-                  "/NTORRENT/linux15.01",
+  TorrentFile file("/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA",
+                  "/ndn/multicast/NTORRENT/linux15.01/torrent-file/segment2/AE321C",
+                  "/ndn/multicast/NTORRENT/linux15.01",
                   {});
 
   file.finalize();
@@ -252,30 +252,30 @@
 
 BOOST_AUTO_TEST_CASE(TestInsertErase)
 {
-  TorrentFile file("/NTORRENT/linux15.01/torrent-file/AB2CDA",
-                   "/NTORRENT/linux15.01/torrent-file/segment2/AE321C",
-                   "/NTORRENT/linux15.01",
-                   {"/NTORRENT/linux15.01/file0/1A2B3C4D",
-                   "/NTORRENT/linux15.01/file1/2A3B4C5E"});
+  TorrentFile file("/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA",
+                   "/ndn/multicast/NTORRENT/linux15.01/torrent-file/segment2/AE321C",
+                   "/ndn/multicast/NTORRENT/linux15.01",
+                   {"/ndn/multicast/NTORRENT/linux15.01/file0/1A2B3C4D",
+                   "/ndn/multicast/NTORRENT/linux15.01/file1/2A3B4C5E"});
 
-  file.erase("/NTORRENT/linux15.01/file0/1A2B3C4D");
-  BOOST_CHECK_EQUAL(file.getCatalog()[0], "/NTORRENT/linux15.01/file1/2A3B4C5E");
+  file.erase("/ndn/multicast/NTORRENT/linux15.01/file0/1A2B3C4D");
+  BOOST_CHECK_EQUAL(file.getCatalog()[0], "/ndn/multicast/NTORRENT/linux15.01/file1/2A3B4C5E");
 
-  file.erase("/NTORRENT/linux15.01/file1/2A3B4C5E");
+  file.erase("/ndn/multicast/NTORRENT/linux15.01/file1/2A3B4C5E");
   BOOST_CHECK_EQUAL(file.getCatalog().size(), 0);
 
-  file.insert("/NTORRENT/linux15.01/file3/AB34C5KA");
+  file.insert("/ndn/multicast/NTORRENT/linux15.01/file3/AB34C5KA");
   BOOST_CHECK_EQUAL(file.getCatalog().size(), 1);
-  BOOST_CHECK_EQUAL(file.getCatalog()[0], "/NTORRENT/linux15.01/file3/AB34C5KA");
+  BOOST_CHECK_EQUAL(file.getCatalog()[0], "/ndn/multicast/NTORRENT/linux15.01/file3/AB34C5KA");
 }
 
 BOOST_AUTO_TEST_CASE(TestInsertAndEncodeTwice)
 {
-  TorrentFile file("/NTORRENT/linux15.01/torrent-file/AB2CDA",
-                   "/NTORRENT/linux15.01/torrent-file/segment2/AE321C",
-                   "/NTORRENT/linux15.01",
-                   {"/NTORRENT/linux15.01/file0/1A2B3C4D",
-                   "/NTORRENT/linux15.01/file1/2A3B4C5E"});
+  TorrentFile file("/ndn/multicast/NTORRENT/linux15.01/torrent-file/AB2CDA",
+                   "/ndn/multicast/NTORRENT/linux15.01/torrent-file/segment2/AE321C",
+                   "/ndn/multicast/NTORRENT/linux15.01",
+                   {"/ndn/multicast/NTORRENT/linux15.01/file0/1A2B3C4D",
+                   "/ndn/multicast/NTORRENT/linux15.01/file1/2A3B4C5E"});
 
   file.finalize();
   KeyChain keyChain;
@@ -286,18 +286,18 @@
   file2.wireDecode(wire);
   BOOST_CHECK_EQUAL(file2.getCatalog().size(), 2);
 
-  file.insert("/NTORRENT/linux15.01/file3/AB34C5KA");
-  file.insert("/NTORRENT/linux15.01/file4/CB24C3GB");
+  file.insert("/ndn/multicast/NTORRENT/linux15.01/file3/AB34C5KA");
+  file.insert("/ndn/multicast/NTORRENT/linux15.01/file4/CB24C3GB");
   file.finalize();
   Block wire2 = file.wireEncode();
 
   file2.wireDecode(wire2);
   BOOST_CHECK_EQUAL(file2.getCatalog().size(), 4);
 
-  BOOST_CHECK_EQUAL(file2.getCatalog()[0], "/NTORRENT/linux15.01/file0/1A2B3C4D");
-  BOOST_CHECK_EQUAL(file2.getCatalog()[1], "/NTORRENT/linux15.01/file1/2A3B4C5E");
-  BOOST_CHECK_EQUAL(file2.getCatalog()[2], "/NTORRENT/linux15.01/file3/AB34C5KA");
-  BOOST_CHECK_EQUAL(file2.getCatalog()[3], "/NTORRENT/linux15.01/file4/CB24C3GB");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[0], "/ndn/multicast/NTORRENT/linux15.01/file0/1A2B3C4D");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[1], "/ndn/multicast/NTORRENT/linux15.01/file1/2A3B4C5E");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[2], "/ndn/multicast/NTORRENT/linux15.01/file3/AB34C5KA");
+  BOOST_CHECK_EQUAL(file2.getCatalog()[3], "/ndn/multicast/NTORRENT/linux15.01/file4/CB24C3GB");
 }
 
 BOOST_AUTO_TEST_SUITE_END()
@@ -387,7 +387,7 @@
         // Verify that each file torrent-file is signed
         BOOST_CHECK_NO_THROW(it->getFullName());
         BOOST_CHECK_EQUAL(it->getCommonPrefix(),
-                          Name("/NTORRENT" +
+                          Name("/ndn/multicast/NTORRENT" +
                                directoryPathName.getSubName(
                                  directoryPathName.size() - 1).toUri()));
         BOOST_CHECK_EQUAL(*it, TorrentFile(it->wireEncode()));
diff --git a/tests/unit-tests/torrent-manager.t.cpp b/tests/unit-tests/torrent-manager.t.cpp
index 11a55ee..8f50a2a 100644
--- a/tests/unit-tests/torrent-manager.t.cpp
+++ b/tests/unit-tests/torrent-manager.t.cpp
@@ -156,9 +156,9 @@
        size_t         d_subManifestSize;
        size_t         d_dataPacketSize;
    } DATA [] = {
-    {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=02c737fd4c6e7de4b4825b089f39700c2dfa8fd2bb2b91f09201e357c4463253", 1024, 1024, 1024},
-     {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=b88c054e87bcbb744726f7eaf79f95459b4fddce2caeb952f263a5ccbbfc9a7c", 128,  128, 128},
-     // {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=76df604f23bdf257d16de588f2941df261951552a5f4435a315f59c3b018a851",   1,    1, 128},
+    {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=9e0410fa477309b40a4ef9cb2bebe70ed2e9fa2defcb584979d768b3f6ced981", 1024, 1024, 1024},
+     {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=5351d424c7893158da35707258635d885725be0aa34321cf2e557afc2b785a76", 128,  128, 128},
+     {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=24ea5e5e3af6a548cc54c0d5b3573ecb18e247f1567a0d586c1d7c131b75181d",   1,  128, 128},
    };
    enum { NUM_DATA = sizeof DATA / sizeof *DATA };
    for (int i = 0; i < NUM_DATA; ++i) {
@@ -230,7 +230,7 @@
 
 BOOST_AUTO_TEST_CASE(CheckInitializeEmpty)
 {
-  TestTorrentManager manager("/NTORRENT/foo/torrent-file/sha256digest=02c737fd4c6e7de4b4825b089f39700c2dfa8fd2bb2b91f09201e357c4463253",
+  TestTorrentManager manager("/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=9e0410fa477309b40a4ef9cb2bebe70ed2e9fa2defcb584979d768b3f6ced981",
                              "tests/testdata/", face);
 
   manager.Initialize();
@@ -253,9 +253,9 @@
        size_t         d_subManifestSize;
        size_t         d_dataPacketSize;
    } DATA [] = {
-    {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=02c737fd4c6e7de4b4825b089f39700c2dfa8fd2bb2b91f09201e357c4463253", 1024, 1024, 1024},
-     {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=b88c054e87bcbb744726f7eaf79f95459b4fddce2caeb952f263a5ccbbfc9a7c", 128,  128, 128},
-     // {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=76df604f23bdf257d16de588f2941df261951552a5f4435a315f59c3b018a851",   1,    1, 128},
+     {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=9e0410fa477309b40a4ef9cb2bebe70ed2e9fa2defcb584979d768b3f6ced981", 1024, 1024, 1024},
+     {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=5351d424c7893158da35707258635d885725be0aa34321cf2e557afc2b785a76", 128,  128, 128},
+     {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=24ea5e5e3af6a548cc54c0d5b3573ecb18e247f1567a0d586c1d7c131b75181d",   1,  128, 128},
    };
    enum { NUM_DATA = sizeof DATA / sizeof *DATA };
    for (int i = 0; i < NUM_DATA; ++i) {
@@ -316,9 +316,9 @@
        size_t         d_subManifestSize;
        size_t         d_dataPacketSize;
    } DATA [] = {
-    {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=02c737fd4c6e7de4b4825b089f39700c2dfa8fd2bb2b91f09201e357c4463253", 1024, 1024, 1024},
-     {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=b88c054e87bcbb744726f7eaf79f95459b4fddce2caeb952f263a5ccbbfc9a7c", 128,  128, 128},
-     // {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=76df604f23bdf257d16de588f2941df261951552a5f4435a315f59c3b018a851",   1,    1, 128},
+    {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=9e0410fa477309b40a4ef9cb2bebe70ed2e9fa2defcb584979d768b3f6ced981", 1024, 1024, 1024},
+     {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=5351d424c7893158da35707258635d885725be0aa34321cf2e557afc2b785a76", 128,  128, 128},
+     {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=24ea5e5e3af6a548cc54c0d5b3573ecb18e247f1567a0d586c1d7c131b75181d",   1,  128, 128},
    };
    enum { NUM_DATA = sizeof DATA / sizeof *DATA };
    for (int i = 0; i < NUM_DATA; ++i) {
@@ -402,7 +402,6 @@
   // get torrent files and manifests
   {
     auto temp = TorrentFile::generate("tests/testdata/foo", 1, 10, 10, false);
-
     torrentSegments = temp.first;
     auto temp1      = temp.second;
     temp1.pop_back(); // remove the manifests for the last file
@@ -412,8 +411,7 @@
       }
     }
   }
-
-  TestTorrentManager manager("/NTORRENT/foo/torrent-file/sha256digest=946b92641d2b87bf4f5913930be20e3789ff5fb5d72739614f93f677d90fbd9d",
+  TestTorrentManager manager("/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=521110d7a60e317e1f36029a414f0d98318f26553720ed50a26479fe4bf982b7",
                              filePath, face);
 
   manager.Initialize();
@@ -466,7 +464,7 @@
     }
   }
 
-  TestTorrentManager manager("/NTORRENT/foo/torrent-file/sha256digest=946b92641d2b87bf4f5913930be20e3789ff5fb5d72739614f93f677d90fbd9d",
+  TestTorrentManager manager("/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=521110d7a60e317e1f36029a414f0d98318f26553720ed50a26479fe4bf982b7",
                              filePath, face);
 
   manager.Initialize();
@@ -528,7 +526,7 @@
 BOOST_AUTO_TEST_CASE(TestDownloadingDataPackets)
 {
   std::string filePath = ".appdata/foo/";
-  TestTorrentManager manager("/NTORRENT/foo/torrent-file/sha256digest=946b92641d2b87bf4f5913930be20e3789ff5fb5d72739614f93f677d90fbd9d",
+  TestTorrentManager manager("/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=521110d7a60e317e1f36029a414f0d98318f26553720ed50a26479fe4bf982b7",
                              filePath, face);
 
   manager.Initialize();
@@ -575,7 +573,7 @@
 BOOST_AUTO_TEST_CASE(TestFindTorrentFileSegmentToDownload1)
 {
   std::string filePath = ".appdata/foo/";
-  TestTorrentManager manager("NTORRENT/test/torrent-file/sha256digest",
+  TestTorrentManager manager("/ndn/multicast/NTORRENT/test/torrent-file/sha256digest",
                              filePath, face);
 
   manager.Initialize();
@@ -583,22 +581,22 @@
   advanceClocks(time::milliseconds(1), 10);
   manager.sendRoutablePrefixResponse();
 
-  TorrentFile t1(Name("NTORRENT/test/torrent-file/sha256digest"),
-                 Name("NTORRENT/test/torrent-file/1/sha256digest"), Name("/test"),
+  TorrentFile t1(Name("/ndn/multicast/NTORRENT/test/torrent-file/sha256digest"),
+                 Name("/ndn/multicast/NTORRENT/test/torrent-file/1/sha256digest"), Name("/test"),
                  { Name("/manifest1") });
   manager.pushTorrentSegment(t1);
 
-  TorrentFile t2(Name("NTORRENT/test/torrent-file/1/sha256digest"),
-                 Name("NTORRENT/test/torrent-file/2/sha256digest"), Name("/test"),
+  TorrentFile t2(Name("/ndn/multicast/NTORRENT/test/torrent-file/1/sha256digest"),
+                 Name("/ndn/multicast/NTORRENT/test/torrent-file/2/sha256digest"), Name("/test"),
                  { Name("/manifest2"), Name("/manifest3") });
   manager.pushTorrentSegment(t2);
 
-  TorrentFile t3(Name("NTORRENT/test/torrent-file/3/sha256digest"),
-                 Name("NTORRENT/test/torrent-file/4/sha256digest"), Name("/test"),
+  TorrentFile t3(Name("/ndn/multicast/NTORRENT/test/torrent-file/3/sha256digest"),
+                 Name("/ndn/multicast/NTORRENT/test/torrent-file/4/sha256digest"), Name("/test"),
                  { Name("/manifest4"), Name("/manifest5") });
   manager.pushTorrentSegment(t3);
 
-  TorrentFile t4(Name("NTORRENT/test/torrent-file/4/sha256digest"), Name("/test"), {});
+  TorrentFile t4(Name("/ndn/multicast/NTORRENT/test/torrent-file/4/sha256digest"), Name("/test"), {});
   manager.pushTorrentSegment(t4);
 
   BOOST_CHECK(!(manager.findTorrentFileSegmentToDownload()));
@@ -621,7 +619,7 @@
 BOOST_AUTO_TEST_CASE(TestFindTorrentFileSegmentToDownload2)
 {
   std::string filePath = ".appdata/foo/";
-  TestTorrentManager manager("NTORRENT/test/torrent-file/0/sha256digest",
+  TestTorrentManager manager("/ndn/multicast/NTORRENT/test/torrent-file/0/sha256digest",
                              filePath, face);
 
   manager.Initialize();
@@ -630,7 +628,7 @@
   manager.sendRoutablePrefixResponse();
 
   BOOST_CHECK_EQUAL(manager.findTorrentFileSegmentToDownload()->toUri(),
-                    "/NTORRENT/test/torrent-file/0/sha256digest");
+                    "/ndn/multicast/NTORRENT/test/torrent-file/0/sha256digest");
 
   fs::remove_all(filePath);
   fs::remove_all(".appdata");
@@ -639,7 +637,7 @@
 BOOST_AUTO_TEST_CASE(TestFindManifestSegmentToDownload1)
 {
   std::string filePath = ".appdata/foo/";
-  TestTorrentManager manager("NTORRENT/test/torrent-file/sha256digest",
+  TestTorrentManager manager("/ndn/multicast/NTORRENT/test/torrent-file/sha256digest",
                              filePath, face);
 
   manager.Initialize();
@@ -647,54 +645,54 @@
   advanceClocks(time::milliseconds(1), 10);
   manager.sendRoutablePrefixResponse();
 
-  Name n1(Name("NTORRENT/test/file0"));
+  Name n1(Name("/ndn/multicast/NTORRENT/test/file0"));
   n1.appendSequenceNumber(0);
 
-  Name n2(Name("NTORRENT/test/file0"));
+  Name n2(Name("/ndn/multicast/NTORRENT/test/file0"));
   n2.appendSequenceNumber(1);
 
-  Name n3(Name("NTORRENT/test/file0"));
+  Name n3(Name("/ndn/multicast/NTORRENT/test/file0"));
   n3.appendSequenceNumber(2);
 
-  Name n4(Name("NTORRENT/test/file0"));
+  Name n4(Name("/ndn/multicast/NTORRENT/test/file0"));
   n4.appendSequenceNumber(3);
 
-  Name n5(Name("NTORRENT/test/file0"));
+  Name n5(Name("/ndn/multicast/NTORRENT/test/file0"));
   n5.appendSequenceNumber(4);
 
-  Name n6(Name("NTORRENT/test1/file0"));
+  Name n6(Name("/ndn/multicast/NTORRENT/test1/file0"));
   n6.appendSequenceNumber(0);
 
-  Name n7(Name("NTORRENT/test1/file0"));
+  Name n7(Name("/ndn/multicast/NTORRENT/test1/file0"));
   n7.appendSequenceNumber(1);
 
   // In theory, this may not be correct, but here let's suck it up for the sake
   // of testing the function correctness
-  Name n8(Name("NTORRENT/test1/file2"));
+  Name n8(Name("/ndn/multicast/NTORRENT/test1/file2"));
   n8.appendSequenceNumber(0);
 
-  Name n9(Name("NTORRENT/test1/file2"));
+  Name n9(Name("/ndn/multicast/NTORRENT/test1/file2"));
   n9.appendSequenceNumber(1);
 
-  FileManifest f1(n1, 50, Name("NTORRENT/test"), {}, make_shared<Name>(n2));
+  FileManifest f1(n1, 50, Name("/ndn/multicast/NTORRENT/test"), {}, make_shared<Name>(n2));
   manager.pushFileManifestSegment(f1);
 
-  FileManifest f2(n2, 50, Name("NTORRENT/test"), {}, make_shared<Name>(n3));
+  FileManifest f2(n2, 50, Name("/ndn/multicast/NTORRENT/test"), {}, make_shared<Name>(n3));
   manager.pushFileManifestSegment(f2);
 
-  FileManifest f3(n3, 50, Name("NTORRENT/test"), {}, make_shared<Name>(n4));
+  FileManifest f3(n3, 50, Name("/ndn/multicast/NTORRENT/test"), {}, make_shared<Name>(n4));
   manager.pushFileManifestSegment(f3);
 
-  FileManifest f4(n4, 50, Name("NTORRENT/test"), {}, make_shared<Name>(n5));
+  FileManifest f4(n4, 50, Name("/ndn/multicast/NTORRENT/test"), {}, make_shared<Name>(n5));
   manager.pushFileManifestSegment(f4);
 
-  FileManifest f5(n6, 50, Name("NTORRENT/test2"), {}, make_shared<Name>(n7));
+  FileManifest f5(n6, 50, Name("/ndn/multicast/NTORRENT/test2"), {}, make_shared<Name>(n7));
   manager.pushFileManifestSegment(f5);
 
-  FileManifest f6(n7, 50, Name("NTORRENT/test2"), {}, {});
+  FileManifest f6(n7, 50, Name("/ndn/multicast/NTORRENT/test2"), {}, {});
   manager.pushFileManifestSegment(f6);
 
-  FileManifest f7(n8, 50, Name("NTORRENT/test3"), {}, make_shared<Name>(n9));
+  FileManifest f7(n8, 50, Name("/ndn/multicast/NTORRENT/test3"), {}, make_shared<Name>(n9));
   manager.pushFileManifestSegment(f7);
 
   BOOST_CHECK_EQUAL(manager.findManifestSegmentToDownload(Name(n2.toUri() + "/sha256digest"))->toUri(), n5.toUri());
@@ -703,7 +701,7 @@
                                                                Name(n5.toUri() + "/sha256digest").toUri());
   BOOST_CHECK(!(manager.findManifestSegmentToDownload(Name(n7.toUri() + "/sha256digest"))));
 
-  Name n10(Name("NTORRENT/test1/file1"));
+  Name n10(Name("/ndn/multicast/NTORRENT/test1/file1"));
   n10.appendSequenceNumber(1);
   n10 = Name(n10.toUri() + "/sha256digest");
 
@@ -751,7 +749,7 @@
     io::save(m, filename.string());
   }
   // Initialize manager
-  TestTorrentManager manager("/NTORRENT/foo/torrent-file/sha256digest=a8a2e98cd943d895b8c4b12a208343bcf9344ce85a6376dc6f5754fe8f4a573e",
+  TestTorrentManager manager("/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=6114e56874fc01bf8f9c40fa652741a895eb922372f1baf039ccea64dacd2152",
                              filePath,
                              face);
 
@@ -854,7 +852,7 @@
     io::save(m, filename.string());
   }
   // Initialize manager
-  TestTorrentManager manager("/NTORRENT/foo/torrent-file/sha256digest=a8a2e98cd943d895b8c4b12a208343bcf9344ce85a6376dc6f5754fe8f4a573e",
+  TestTorrentManager manager("/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=6114e56874fc01bf8f9c40fa652741a895eb922372f1baf039ccea64dacd2152",
                              filePath,
                              face);
 
@@ -874,14 +872,14 @@
   std::vector<bool> v3 = {true, false, false, false, false, false};
   manager.setFileState(manifests[2].getFullName(), make_shared<fs::fstream>(), v3);
 
-  Name p1("NTORRENT/foo/bar1.txt");
+  Name p1("/ndn/multicast/NTORRENT/foo/bar1.txt");
   p1.appendSequenceNumber(0);
   p1.appendSequenceNumber(0);
   p1 = Name(p1.toUri() + "/sha256digest");
 
   BOOST_CHECK(!(manager.hasDataPacket(p1)));
 
-  Name p2("NTORRENT/foo/bar.txt");
+  Name p2("/ndn/multicast/NTORRENT/foo/bar.txt");
   p2.appendSequenceNumber(0);
   p2.appendSequenceNumber(0);
   p2 = Name(p2.toUri() + "/sha256digest");
@@ -898,9 +896,9 @@
        size_t         d_subManifestSize;
        size_t         d_dataPacketSize;
    } DATA [] = {
-    {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=02c737fd4c6e7de4b4825b089f39700c2dfa8fd2bb2b91f09201e357c4463253", 1024, 1024, 1024},
-     {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=b88c054e87bcbb744726f7eaf79f95459b4fddce2caeb952f263a5ccbbfc9a7c", 128,  128, 128},
-     // {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=76df604f23bdf257d16de588f2941df261951552a5f4435a315f59c3b018a851",   1,    1, 128},
+      {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=9e0410fa477309b40a4ef9cb2bebe70ed2e9fa2defcb584979d768b3f6ced981", 1024, 1024, 1024},
+      // {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=5351d424c7893158da35707258635d885725be0aa34321cf2e557afc2b785a76", 128,  128, 128},
+      // {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=24ea5e5e3af6a548cc54c0d5b3573ecb18e247f1567a0d586c1d7c131b75181d",   1,  128, 128},
    };
    enum { NUM_DATA = sizeof DATA / sizeof *DATA };
    for (int i = 0; i < NUM_DATA; ++i) {
@@ -910,56 +908,56 @@
      auto dataPacketSize     = DATA[i].d_dataPacketSize;
      auto subManifestSize    = DATA[i].d_subManifestSize;
 
-    vector<FileManifest> manifests;
-    vector<TorrentFile> torrentSegments;
-    std::string filePath = "tests/testdata/";
-    std::vector<vector<Data>> fileData;
-    // get torrent files and manifests
-    {
+     vector<FileManifest> manifests;
+     vector<TorrentFile> torrentSegments;
+     std::string filePath = "tests/testdata/";
+     std::vector<vector<Data>> fileData;
+     // get torrent files and manifests
+     {
       auto temp = TorrentFile::generate(directoryPath,
                                         namesPerSegment,
                                         subManifestSize,
                                         dataPacketSize,
-                                        false);
+                                        true);
       torrentSegments = temp.first;
       auto temp1      = temp.second;
       for (const auto& ms : temp1) {
         manifests.insert(manifests.end(), ms.first.begin(), ms.first.end());
         fileData.push_back(ms.second);
       }
-    }
-    // write the torrent segments  and manifests to disk
-    std::string dirPath = ".appdata/foo/";
-    boost::filesystem::create_directories(dirPath);
-    std::string torrentPath = dirPath + "torrent_files/";
-    boost::filesystem::create_directory(torrentPath);
-    auto fileNum = 0;
-    for (const auto& t : torrentSegments) {
+     }
+     // write the torrent segments  and manifests to disk
+     std::string dirPath = ".appdata/foo/";
+     boost::filesystem::create_directories(dirPath);
+     std::string torrentPath = dirPath + "torrent_files/";
+     boost::filesystem::create_directory(torrentPath);
+     auto fileNum = 0;
+     for (const auto& t : torrentSegments) {
       fileNum++;
       auto filename = torrentPath + to_string(fileNum);
       io::save(t, filename);
-    }
-    auto manifestPath = dirPath + "manifests/";
-    boost::filesystem::create_directory(manifestPath);
-    for (const auto& m : manifests) {
+     }
+     auto manifestPath = dirPath + "manifests/";
+     boost::filesystem::create_directory(manifestPath);
+     for (const auto& m : manifests) {
       fs::path filename = manifestPath + m.file_name() + "/" + to_string(m.submanifest_number());
       boost::filesystem::create_directories(filename.parent_path());
       io::save(m, filename.string());
-    }
-    // Initialize and verify
-    TestTorrentManager manager(initialSegmentName,
-                               filePath,
-                               face);
+     }
+     // Initialize and verify
+     TestTorrentManager manager(initialSegmentName,
+                                filePath,
+                                face);
 
-    manager.Initialize();
+     manager.Initialize();
 
-    advanceClocks(time::milliseconds(1), 10);
-    manager.sendRoutablePrefixResponse();
+     advanceClocks(time::milliseconds(1), 10);
+     manager.sendRoutablePrefixResponse();
 
-    size_t nData = 0;
-    BOOST_CHECK_EQUAL(0, face->sentData.size());
-    // request all the torrent segments
-    for (const auto& t : torrentSegments) {
+     size_t nData = 0;
+     BOOST_CHECK_EQUAL(0, face->sentData.size());
+     // request all the torrent segments
+     for (const auto& t : torrentSegments) {
       Interest interest(t.getFullName(), time::milliseconds(50));
       face->expressInterest(interest,
                             [&t](const Interest& i, const Data& d) {
@@ -979,54 +977,54 @@
       // check that one piece of data is sent, and it is what was expected
       BOOST_CHECK_EQUAL(++nData, face->sentData.size());
       face->receive(face->sentData[nData - 1]);
-    }
-    // request all the file manifests
-    for (const auto& m : manifests) {
-      Interest interest(m.getFullName(), time::milliseconds(50));
-      face->expressInterest(interest,
-                            [&m](const Interest& i, const Data& d) {
-                              FileManifest m1(d.wireEncode());
-                              BOOST_CHECK(m == d);
-                              BOOST_CHECK(m1 == m);
-                            },
-                             bind([] {
-                               BOOST_FAIL("Unexpected Nack");
-                             }),
-                             bind([] {
-                               BOOST_FAIL("Unexpected timeout");
-                             }));
-      advanceClocks(time::milliseconds(1), 40);
-      face->receive(interest);
-      manager.processEvents(time::milliseconds(-1));
-      // check that one piece of data is sent, and it is what was expected
-      BOOST_CHECK_EQUAL(++nData, face->sentData.size());
-      face->receive(face->sentData[nData - 1]);
-    }
-    // request all the data packets
-    for (const auto& file : fileData) {
-      for (const auto& data : file) {
-      Interest interest(data.getFullName(), time::milliseconds(50));
-      face->expressInterest(interest,
-                            [&data](const Interest& i, const Data& d) {
-                              BOOST_CHECK(data == d);
-                            },
-                             bind([] {
-                               BOOST_FAIL("Unexpected Nack");
-                             }),
-                             bind([] {
-                               BOOST_FAIL("Unexpected timeout");
-                             }));
-        advanceClocks(time::milliseconds(1), 40);
-        face->receive(interest);
-        manager.processEvents(time::milliseconds(-1));
-        // check that one piece of data is sent, and it is what was expected
-        BOOST_CHECK_EQUAL(++nData, face->sentData.size());
-        face->receive(face->sentData[nData - 1]);
-      }
-    }
-    // clean up tests
-    face->sentData.clear();
-    fs::remove_all(".appdata/");
+     }
+     // request all the file manifests
+     for (const auto& m : manifests) {
+       Interest interest(m.getFullName(), time::milliseconds(50));
+       face->expressInterest(interest,
+                             [&m](const Interest& i, const Data& d) {
+                               FileManifest m1(d.wireEncode());
+                               BOOST_CHECK(m == d);
+                               BOOST_CHECK(m1 == m);
+                             },
+                              bind([] {
+                                BOOST_FAIL("Unexpected Nack");
+                              }),
+                              bind([] {
+                                BOOST_FAIL("Unexpected timeout");
+                              }));
+       advanceClocks(time::milliseconds(1), 40);
+       face->receive(interest);
+       manager.processEvents(time::milliseconds(-1));
+       // check that one piece of data is sent, and it is what was expected
+       BOOST_CHECK_EQUAL(++nData, face->sentData.size());
+       face->receive(face->sentData[nData - 1]);
+     }
+     // request all the data packets
+     for (const auto& file : fileData) {
+       for (const auto& data : file) {
+       Interest interest(data.getFullName(), time::milliseconds(50));
+       face->expressInterest(interest,
+                             [&data](const Interest& i, const Data& d) {
+                               BOOST_CHECK(data == d);
+                             },
+                              bind([] {
+                                BOOST_FAIL("Unexpected Nack");
+                              }),
+                              bind([] {
+                                BOOST_FAIL("Unexpected timeout");
+                              }));
+         advanceClocks(time::milliseconds(1), 40);
+         face->receive(interest);
+         manager.processEvents(time::milliseconds(-1));
+         // check that one piece of data is sent, and it is what was expected
+         BOOST_CHECK_EQUAL(++nData, face->sentData.size());
+         face->receive(face->sentData[nData - 1]);
+       }
+     }
+     // clean up tests
+     face->sentData.clear();
+     fs::remove_all(".appdata");
   }
 }
 
@@ -1038,7 +1036,7 @@
   std::vector<Data> data;
   std::string filePath = "tests/testdata/";
   std::string dirPath = ".appdata/foo/";
-  Name initialSegmentName = "/NTORRENT/foo/torrent-file/sha256digest=02c737fd4c6e7de4b4825b089f39700c2dfa8fd2bb2b91f09201e357c4463253";
+  Name initialSegmentName = "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=9e0410fa477309b40a4ef9cb2bebe70ed2e9fa2defcb584979d768b3f6ced981";
   // get torrent files and manifests
   {
     auto temp = TorrentFile::generate("tests/testdata/foo",
@@ -1123,8 +1121,8 @@
       size_t         d_subManifestSize;
       size_t         d_dataPacketSize;
   } DATA [] = {
-    {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=02c737fd4c6e7de4b4825b089f39700c2dfa8fd2bb2b91f09201e357c4463253", 1024, 1024, 1024},
-    {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=b88c054e87bcbb744726f7eaf79f95459b4fddce2caeb952f263a5ccbbfc9a7c", 128,  128, 128},
+    {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=9e0410fa477309b40a4ef9cb2bebe70ed2e9fa2defcb584979d768b3f6ced981", 1024, 1024, 1024},
+    {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=5351d424c7893158da35707258635d885725be0aa34321cf2e557afc2b785a76", 128,  128, 128},
   };
   enum { NUM_DATA = sizeof DATA / sizeof *DATA };
   for (int i = 0; i < NUM_DATA; ++i) {
@@ -1238,8 +1236,8 @@
       size_t         d_subManifestSize;
       size_t         d_dataPacketSize;
   } DATA [] = {
-    {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=02c737fd4c6e7de4b4825b089f39700c2dfa8fd2bb2b91f09201e357c4463253", 1024, 1024, 1024},
-    {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=96d900d6788465f9a7b00191581b004c910d74b3762d141ec0e82173731bc9f4",    1,    1, 1024},
+    {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=9e0410fa477309b40a4ef9cb2bebe70ed2e9fa2defcb584979d768b3f6ced981", 1024, 1024, 1024},
+    // {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=96d900d6788465f9a7b00191581b004c910d74b3762d141ec0e82173731bc9f4",    1,    1, 1024},
   };
   enum { NUM_DATA = sizeof DATA / sizeof *DATA };
   for (int i = 0; i < NUM_DATA; ++i) {
@@ -1324,8 +1322,8 @@
      size_t         d_subManifestSize;
      size_t         d_dataPacketSize;
   } DATA [] = {
-   {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=02c737fd4c6e7de4b4825b089f39700c2dfa8fd2bb2b91f09201e357c4463253", 1024, 1024, 1024},
-   {"tests/testdata/foo", "/NTORRENT/foo/torrent-file/sha256digest=02c737fd4c6e7de4b4825b089f39700c2dfa8fd2bb2b91f09201e357c4463253",     128,  128, 1024},
+   {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=9e0410fa477309b40a4ef9cb2bebe70ed2e9fa2defcb584979d768b3f6ced981", 1024, 1024, 1024},
+   {"tests/testdata/foo", "/ndn/multicast/NTORRENT/foo/torrent-file/sha256digest=9e0410fa477309b40a4ef9cb2bebe70ed2e9fa2defcb584979d768b3f6ced981",     128,  128, 1024},
   };
   enum { NUM_DATA = sizeof DATA / sizeof *DATA };
   for (int i = 0; i < NUM_DATA; ++i) {
