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
 
