diff --git a/src/fetching-strategy-manager.hpp b/src/fetching-strategy-manager.hpp
index 3963c75..53de939 100644
--- a/src/fetching-strategy-manager.hpp
+++ b/src/fetching-strategy-manager.hpp
@@ -39,7 +39,7 @@
      * @brief Class Destructor
      */
     virtual
-    ~FetchingStrategyManager() = default;
+    ~FetchingStrategyManager();
 
     /**
      * @brief Method called to start the torrent downloading
@@ -87,6 +87,11 @@
     onManifestReceived(const std::vector<Name>& packetNames) = 0;
 };
 
+inline
+FetchingStrategyManager::~FetchingStrategyManager()
+{
+}
+
 } // namespace ntorrent
 } // namespace ndn
 
diff --git a/src/sequential-data-fetcher.cpp b/src/sequential-data-fetcher.cpp
new file mode 100644
index 0000000..971b59f
--- /dev/null
+++ b/src/sequential-data-fetcher.cpp
@@ -0,0 +1,159 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+* Copyright (c) 2016 Regents of the University of California.
+*
+* This file is part of the nTorrent codebase.
+*
+* nTorrent is free software: you can redistribute it and/or modify it under the
+* terms of the GNU Lesser General Public License as published by the Free Software
+* Foundation, either version 3 of the License, or (at your option) any later version.
+*
+* nTorrent is distributed in the hope that it will be useful, but WITHOUT ANY
+* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+*
+* You should have received copies of the GNU General Public License and GNU Lesser
+* General Public License along with nTorrent, e.g., in COPYING.md file. If not, see
+* <http://www.gnu.org/licenses/>.
+*
+* See AUTHORS for complete list of nTorrent authors and contributors.
+*/
+
+#include "sequential-data-fetcher.hpp"
+#include "util/io-util.hpp"
+
+namespace ndn {
+namespace ntorrent {
+
+SequentialDataFetcher::SequentialDataFetcher(const ndn::Name& torrentFileName,
+                                             const std::string& dataPath)
+  : m_dataPath(dataPath)
+  , m_torrentFileName(torrentFileName)
+{
+  m_manager = make_shared<TorrentManager>(m_torrentFileName, m_dataPath);
+}
+
+SequentialDataFetcher::~SequentialDataFetcher()
+{
+}
+
+void
+SequentialDataFetcher::start()
+{
+  m_manager->Initialize();
+  // downloading logic
+  this->implementSequentialLogic();
+}
+
+void
+SequentialDataFetcher::pause()
+{
+  // TODO(Spyros): Implement asyncrhonous pause of the torrent downloading
+  // For now, do nothing...
+  throw(Error("Not implemented yet"));
+}
+
+void
+SequentialDataFetcher::resume()
+{
+  // TODO(Spyros): Implement asyncrhonous re-establishment of the torrent downloading
+  // For now, do nothing...
+  throw(Error("Not implemented yet"));
+}
+
+std::vector<ndn::Name>
+SequentialDataFetcher::downloadTorrentFile()
+{
+  std::vector<ndn::Name> returnedNames;
+  returnedNames = m_manager->downloadTorrentFile(".appdata/torrent_files/");
+  std::cout << "Torrent File Received: "
+            << m_torrentFileName.getSubName(0, m_torrentFileName.size() - 1) << std::endl;
+  return returnedNames;
+}
+
+void
+SequentialDataFetcher::downloadManifestFiles(const std::vector<ndn::Name>& manifestsName)
+{
+  std::vector<ndn::Name> packetsName;
+  for (auto i = manifestsName.begin(); i != manifestsName.end(); i++) {
+    m_manager->download_file_manifest(*i,
+                              ".appdata/manifests/",
+                              bind(&SequentialDataFetcher::onManifestReceived, this, _1),
+                              bind(&SequentialDataFetcher::onDataRetrievalFailure, this, _1, _2));
+  }
+}
+
+void
+SequentialDataFetcher::downloadPackets(const std::vector<ndn::Name>& packetsName)
+{
+  for (auto i = packetsName.begin(); i != packetsName.end(); i++) {
+    m_manager->download_data_packet(*i,
+                              bind(&SequentialDataFetcher::onDataPacketReceived, this, _1),
+                              bind(&SequentialDataFetcher::onDataRetrievalFailure, this, _1, _2));
+  }
+}
+
+void
+SequentialDataFetcher::implementSequentialLogic() {
+  std::vector<ndn::Name> returnedNames;
+  returnedNames = this->downloadTorrentFile();
+  if (returnedNames.empty()) {
+    // we have downloaded the entire torrent (including manifests, data packets, etc..)
+    return;
+  }
+  // check the first returned name whether it is the name of a file manifest or a data packet
+  const Name& nameToCheck = returnedNames[0];
+  if (IoUtil::findType(nameToCheck) == IoUtil::DATA_PACKET) {
+    // In this case, the returned names correspond to data packets
+    this->downloadPackets(returnedNames);
+  }
+  else {
+    // In this case, the returned names correspond to file manifests
+    this->downloadManifestFiles(returnedNames);
+  }
+}
+
+void
+SequentialDataFetcher::onDataPacketReceived(const ndn::Data& data)
+{
+  // Data Packet Received
+  std::cout << "Data Packet Received: " << data.getName();
+}
+
+void
+SequentialDataFetcher::onManifestReceived(const std::vector<Name>& packetNames)
+{
+  std::cout << "Manifest File Received: "
+            << packetNames[0].getSubName(0, packetNames[0].size()- 3) << std::endl;
+  this->downloadPackets(packetNames);
+}
+
+void
+SequentialDataFetcher::onDataRetrievalFailure(const ndn::Interest& interest,
+                                              const std::string& errorCode)
+{
+  std::cerr << "Data Retrieval Failed: " << interest.getName() << std::endl;
+  
+  // Data retrieval failure
+  uint32_t nameType = IoUtil::findType(interest.getName());
+  if (nameType == IoUtil::TORRENT_FILE) {
+    // this should never happen
+    std::cerr << "Torrent File Segment Downloading Failed: " << interest.getName();
+    this->downloadTorrentFile();
+  }
+  else if (nameType == IoUtil::FILE_MANIFEST) {
+    std::cerr << "Manifest File Segment Downloading Failed: " << interest.getName();
+    this->downloadManifestFiles({ interest.getName() });
+  }
+  else if (nameType == IoUtil::DATA_PACKET) {
+    std::cerr << "Data Packet Downloading Failed: " << interest.getName();
+    this->downloadPackets({ interest.getName() });
+  }
+  else {
+    // This should never happen
+    std::cerr << "Unknown Packet Type Downloading Failed: " << interest.getName();
+  }
+}
+
+} // namespace ntorrent
+} // namespace ndn
diff --git a/src/sequential-data-fetcher.hpp b/src/sequential-data-fetcher.hpp
new file mode 100644
index 0000000..ea6ce90
--- /dev/null
+++ b/src/sequential-data-fetcher.hpp
@@ -0,0 +1,104 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+* Copyright (c) 2016 Regents of the University of California.
+*
+* This file is part of the nTorrent codebase.
+*
+* nTorrent is free software: you can redistribute it and/or modify it under the
+* terms of the GNU Lesser General Public License as published by the Free Software
+* Foundation, either version 3 of the License, or (at your option) any later version.
+*
+* nTorrent is distributed in the hope that it will be useful, but WITHOUT ANY
+* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+*
+* You should have received copies of the GNU General Public License and GNU Lesser
+* General Public License along with nTorrent, e.g., in COPYING.md file. If not, see
+* <http://www.gnu.org/licenses/>.
+*
+* See AUTHORS for complete list of nTorrent authors and contributors.
+*/
+
+#ifndef SEQUENTIAL_DATA_FETCHER_HPP
+#define SEQUENTIAL_DATA_FETCHER_HPP
+
+#include "fetching-strategy-manager.hpp"
+#include "torrent-manager.hpp"
+
+#include <ndn-cxx/name.hpp>
+
+namespace ndn {
+namespace ntorrent {
+
+class SequentialDataFetcher : FetchingStrategyManager {
+  public:
+    class Error : public std::runtime_error
+	  {
+  	public:
+  	  explicit
+  	  Error(const std::string& what)
+  	    : std::runtime_error(what)
+  	  {
+  	  }
+  	};
+    /**
+     * @brief Create a new SequentialDataFetcher
+     * @param torrentFileName The name of the torrent file
+     * @param dataPath The path that the manager would look for already stored data packets and
+     *                 will write new data packets
+     */
+    SequentialDataFetcher(const ndn::Name& torrentFileName,
+                          const std::string& dataPath);
+
+    ~SequentialDataFetcher();
+
+    /**
+     * @brief Start the sequential data fetcher
+     */
+    void
+    start();
+
+    /**
+     * @brief Pause the sequential data fetcher
+     */
+    void
+    pause();
+
+    /**
+     * @brief Resume the sequential data fetcher
+     */
+    void
+    resume();
+
+  protected:
+    std::vector<ndn::Name>
+    downloadTorrentFile();
+
+    void
+    downloadManifestFiles(const std::vector<ndn::Name>& manifestsName);
+
+    void
+    downloadPackets(const std::vector<ndn::Name>& packetsName);
+
+    void
+    implementSequentialLogic();
+
+    virtual void
+    onDataPacketReceived(const ndn::Data& data);
+
+    virtual void
+    onDataRetrievalFailure(const ndn::Interest& interest, const std::string& errorCode);
+
+    virtual void
+    onManifestReceived(const std::vector<Name>& packetNames);
+
+  private:
+    std::string m_dataPath;
+    ndn::Name m_torrentFileName;
+    shared_ptr<TorrentManager> m_manager;
+};
+
+} // namespace ntorrent
+} // namespace ndn
+
+#endif // SEQUENTIAL_DATA_FETCHER_HPP
