diff --git a/tools/chunks/catchunks/ndncatchunks.cpp b/tools/chunks/catchunks/ndncatchunks.cpp
index 92d5401..1405b23 100644
--- a/tools/chunks/catchunks/ndncatchunks.cpp
+++ b/tools/chunks/catchunks/ndncatchunks.cpp
@@ -29,14 +29,14 @@
  * @author Chavoosh Ghasemi
  */
 
-#include "aimd-statistics-collector.hpp"
-#include "aimd-rtt-estimator.hpp"
 #include "consumer.hpp"
 #include "discover-version-fixed.hpp"
 #include "discover-version-realtime.hpp"
-#include "pipeline-interests-aimd.hpp"
-#include "pipeline-interests-fixed-window.hpp"
 #include "options.hpp"
+#include "pipeline-interests-adaptive.hpp"
+#include "pipeline-interests-fixed.hpp"
+#include "rtt-estimator.hpp"
+#include "statistics-collector.hpp"
 #include "core/version.hpp"
 
 #include <fstream>
@@ -93,44 +93,41 @@
                         "size of the Interest pipeline")
     ;
 
-  po::options_description aimdPipeDesc("AIMD pipeline options");
-  aimdPipeDesc.add_options()
-    ("aimd-debug-cwnd", po::value<std::string>(&cwndPath),
-                        "log file for AIMD cwnd statistics")
-    ("aimd-debug-rtt", po::value<std::string>(&rttPath),
-                       "log file for AIMD rtt statistics")
-    ("aimd-disable-cwa", po::bool_switch(&disableCwa),
-                         "disable Conservative Window Adaptation, "
-                         "i.e. reduce window on each congestion event (timeout or congestion mark) "
-                         "instead of at most once per RTT")
-    ("aimd-ignore-cong-marks",  po::bool_switch(&ignoreCongMarks),
-                                "disable reaction to congestion marks, "
-                                "the default is to decrease the window after receiving a congestion mark")
-    ("aimd-reset-cwnd-to-init", po::bool_switch(&resetCwndToInit),
-                                "reset cwnd to initial cwnd when loss event occurs, default is "
-                                "resetting to ssthresh")
-    ("aimd-initial-cwnd",       po::value<int>(&initCwnd)->default_value(initCwnd),
-                                "initial cwnd")
-    ("aimd-initial-ssthresh",   po::value<int>(&initSsthresh),
-                                "initial slow start threshold (defaults to infinity)")
-    ("aimd-aistep",    po::value<double>(&aiStep)->default_value(aiStep),
-                       "additive-increase step")
-    ("aimd-mdcoef",    po::value<double>(&mdCoef)->default_value(mdCoef),
-                       "multiplicative-decrease coefficient")
-    ("aimd-rto-alpha", po::value<double>(&alpha)->default_value(alpha),
-                       "alpha value for rto calculation")
-    ("aimd-rto-beta",  po::value<double>(&beta)->default_value(beta),
-                       "beta value for rto calculation")
-    ("aimd-rto-k",     po::value<int>(&k)->default_value(k),
-                       "k value for rto calculation")
-    ("aimd-rto-min",   po::value<double>(&minRto)->default_value(minRto),
-                       "min rto value in milliseconds")
-    ("aimd-rto-max",   po::value<double>(&maxRto)->default_value(maxRto),
-                       "max rto value in milliseconds")
+  po::options_description adaptivePipeDesc("Adaptive pipeline options (AIMD)");
+  adaptivePipeDesc.add_options()
+    ("log-cwnd", po::value<std::string>(&cwndPath), "log file for cwnd statistics")
+    ("log-rtt", po::value<std::string>(&rttPath), "log file for rtt statistics")
+    ("disable-cwa", po::bool_switch(&disableCwa),
+                    "disable Conservative Window Adaptation, "
+                    "i.e. reduce window on each congestion event (timeout or congestion mark) "
+                    "instead of at most once per RTT")
+    ("ignore-marks", po::bool_switch(&ignoreCongMarks),
+                     "ignore congestion marks, "
+                     "the default is to decrease the window after receiving a congestion mark")
+    ("reset-cwnd-to-init", po::bool_switch(&resetCwndToInit),
+                           "reset cwnd to initial value after loss/mark, default is "
+                           "resetting to ssthresh")
+    ("init-cwnd",       po::value<int>(&initCwnd)->default_value(initCwnd), "initial cwnd")
+    ("init-ssthresh",   po::value<int>(&initSsthresh),
+                        "initial slow start threshold (defaults to infinity)")
+    ("aistep",    po::value<double>(&aiStep)->default_value(aiStep),
+                  "additive-increase step")
+    ("mdcoef",    po::value<double>(&mdCoef)->default_value(mdCoef),
+                  "multiplicative-decrease coefficient")
+    ("rto-alpha", po::value<double>(&alpha)->default_value(alpha),
+                  "alpha value for rto calculation")
+    ("rto-beta",  po::value<double>(&beta)->default_value(beta),
+                  "beta value for rto calculation")
+    ("rto-k",     po::value<int>(&k)->default_value(k),
+                  "k value for rto calculation")
+    ("min-rto",   po::value<double>(&minRto)->default_value(minRto),
+                  "minimum rto value in milliseconds")
+    ("max-rto",   po::value<double>(&maxRto)->default_value(maxRto),
+                  "maximum rto value in milliseconds")
     ;
 
   po::options_description visibleDesc;
-  visibleDesc.add(basicDesc).add(realDiscoveryDesc).add(fixedPipeDesc).add(aimdPipeDesc);
+  visibleDesc.add(basicDesc).add(realDiscoveryDesc).add(fixedPipeDesc).add(adaptivePipeDesc);
 
   po::options_description hiddenDesc;
   hiddenDesc.add_options()
@@ -224,28 +221,28 @@
     }
 
     unique_ptr<PipelineInterests> pipeline;
-    unique_ptr<aimd::StatisticsCollector> statsCollector;
-    unique_ptr<aimd::RttEstimator> rttEstimator;
+    unique_ptr<StatisticsCollector> statsCollector;
+    unique_ptr<RttEstimator> rttEstimator;
     std::ofstream statsFileCwnd;
     std::ofstream statsFileRtt;
 
     if (pipelineType == "fixed") {
-      PipelineInterestsFixedWindow::Options optionsPipeline(options);
+      PipelineInterestsFixed::Options optionsPipeline(options);
       optionsPipeline.maxPipelineSize = maxPipelineSize;
-      pipeline = make_unique<PipelineInterestsFixedWindow>(face, optionsPipeline);
+      pipeline = make_unique<PipelineInterestsFixed>(face, optionsPipeline);
     }
     else if (pipelineType == "aimd") {
-      aimd::RttEstimator::Options optionsRttEst;
+      RttEstimator::Options optionsRttEst;
       optionsRttEst.isVerbose = options.isVerbose;
       optionsRttEst.alpha = alpha;
       optionsRttEst.beta = beta;
       optionsRttEst.k = k;
-      optionsRttEst.minRto = aimd::Milliseconds(minRto);
-      optionsRttEst.maxRto = aimd::Milliseconds(maxRto);
+      optionsRttEst.minRto = Milliseconds(minRto);
+      optionsRttEst.maxRto = Milliseconds(maxRto);
 
-      rttEstimator = make_unique<aimd::RttEstimator>(optionsRttEst);
+      rttEstimator = make_unique<RttEstimator>(optionsRttEst);
 
-      PipelineInterestsAimd::Options optionsPipeline(options);
+      PipelineInterestsAdaptive::Options optionsPipeline(options);
       optionsPipeline.disableCwa = disableCwa;
       optionsPipeline.resetCwndToInit = resetCwndToInit;
       optionsPipeline.initCwnd = static_cast<double>(initCwnd);
@@ -254,7 +251,7 @@
       optionsPipeline.mdCoef = mdCoef;
       optionsPipeline.ignoreCongMarks = ignoreCongMarks;
 
-      auto aimdPipeline = make_unique<PipelineInterestsAimd>(face, *rttEstimator, optionsPipeline);
+      auto adaptivePipeline = make_unique<PipelineInterestsAdaptive>(face, *rttEstimator, optionsPipeline);
 
       if (!cwndPath.empty() || !rttPath.empty()) {
         if (!cwndPath.empty()) {
@@ -271,11 +268,11 @@
             return 4;
           }
         }
-        statsCollector = make_unique<aimd::StatisticsCollector>(*aimdPipeline, *rttEstimator,
-                                                                statsFileCwnd, statsFileRtt);
+        statsCollector = make_unique<StatisticsCollector>(*adaptivePipeline, *rttEstimator,
+                                                          statsFileCwnd, statsFileRtt);
       }
 
-      pipeline = std::move(aimdPipeline);
+      pipeline = std::move(adaptivePipeline);
     }
     else {
       std::cerr << "ERROR: Interest pipeline type not valid" << std::endl;
diff --git a/tools/chunks/catchunks/pipeline-interests-aimd.cpp b/tools/chunks/catchunks/pipeline-interests-adaptive.cpp
similarity index 89%
rename from tools/chunks/catchunks/pipeline-interests-aimd.cpp
rename to tools/chunks/catchunks/pipeline-interests-adaptive.cpp
index b802e34..7e394ef 100644
--- a/tools/chunks/catchunks/pipeline-interests-aimd.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-adaptive.cpp
@@ -23,22 +23,23 @@
  * @author Shuo Yang
  * @author Weiwei Liu
  * @author Chavoosh Ghasemi
+ * @author Klaus Schneider
  */
 
-#include "pipeline-interests-aimd.hpp"
+#include "pipeline-interests-adaptive.hpp"
 #include "data-fetcher.hpp"
 
 #include <cmath>
 #include <iomanip>
 
+
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
-constexpr double PipelineInterestsAimd::MIN_SSTHRESH;
+constexpr double PipelineInterestsAdaptive::MIN_SSTHRESH;
 
-PipelineInterestsAimd::PipelineInterestsAimd(Face& face, RttEstimator& rttEstimator,
-                                             const Options& options)
+PipelineInterestsAdaptive::PipelineInterestsAdaptive(Face& face, RttEstimator& rttEstimator,
+                                                     const Options& options)
   : PipelineInterests(face)
   , m_options(options)
   , m_rttEstimator(rttEstimator)
@@ -64,13 +65,13 @@
   }
 }
 
-PipelineInterestsAimd::~PipelineInterestsAimd()
+PipelineInterestsAdaptive::~PipelineInterestsAdaptive()
 {
   cancel();
 }
 
 void
-PipelineInterestsAimd::doRun()
+PipelineInterestsAdaptive::doRun()
 {
   if (allSegmentsReceived()) {
     cancel();
@@ -87,14 +88,14 @@
 }
 
 void
-PipelineInterestsAimd::doCancel()
+PipelineInterestsAdaptive::doCancel()
 {
   m_checkRtoEvent.cancel();
   m_segmentInfo.clear();
 }
 
 void
-PipelineInterestsAimd::checkRto()
+PipelineInterestsAdaptive::checkRto()
 {
   if (isStopping())
     return;
@@ -123,7 +124,7 @@
 }
 
 void
-PipelineInterestsAimd::sendInterest(uint64_t segNo, bool isRetransmission)
+PipelineInterestsAdaptive::sendInterest(uint64_t segNo, bool isRetransmission)
 {
   if (isStopping())
     return;
@@ -165,9 +166,9 @@
 
   SegmentInfo& segInfo = m_segmentInfo[segNo];
   segInfo.interestHdl = m_face.expressInterest(interest,
-                                               bind(&PipelineInterestsAimd::handleData, this, _1, _2),
-                                               bind(&PipelineInterestsAimd::handleNack, this, _1, _2),
-                                               bind(&PipelineInterestsAimd::handleLifetimeExpiration, this, _1));
+                                               bind(&PipelineInterestsAdaptive::handleData, this, _1, _2),
+                                               bind(&PipelineInterestsAdaptive::handleNack, this, _1, _2),
+                                               bind(&PipelineInterestsAdaptive::handleLifetimeExpiration, this, _1));
   segInfo.timeSent = time::steady_clock::now();
   segInfo.rto = m_rttEstimator.getEstimatedRto();
 
@@ -185,7 +186,7 @@
 }
 
 void
-PipelineInterestsAimd::schedulePackets()
+PipelineInterestsAdaptive::schedulePackets()
 {
   BOOST_ASSERT(m_nInFlight >= 0);
   auto availableWindowSize = static_cast<int64_t>(m_cwnd) - m_nInFlight;
@@ -209,7 +210,7 @@
 }
 
 void
-PipelineInterestsAimd::handleData(const Interest& interest, const Data& data)
+PipelineInterestsAdaptive::handleData(const Interest& interest, const Data& data)
 {
   if (isStopping())
     return;
@@ -305,7 +306,7 @@
 }
 
 void
-PipelineInterestsAimd::handleNack(const Interest& interest, const lp::Nack& nack)
+PipelineInterestsAdaptive::handleNack(const Interest& interest, const lp::Nack& nack)
 {
   if (isStopping())
     return;
@@ -334,7 +335,7 @@
 }
 
 void
-PipelineInterestsAimd::handleLifetimeExpiration(const Interest& interest)
+PipelineInterestsAdaptive::handleLifetimeExpiration(const Interest& interest)
 {
   if (isStopping())
     return;
@@ -346,7 +347,7 @@
 }
 
 void
-PipelineInterestsAimd::recordTimeout()
+PipelineInterestsAdaptive::recordTimeout()
 {
   if (m_options.disableCwa || m_highData > m_recPoint) {
     // react to only one timeout per RTT (conservative window adaptation)
@@ -364,7 +365,7 @@
 }
 
 void
-PipelineInterestsAimd::enqueueForRetransmission(uint64_t segNo)
+PipelineInterestsAdaptive::enqueueForRetransmission(uint64_t segNo)
 {
   BOOST_ASSERT(m_nInFlight > 0);
   m_nInFlight--;
@@ -373,7 +374,7 @@
 }
 
 void
-PipelineInterestsAimd::handleFail(uint64_t segNo, const std::string& reason)
+PipelineInterestsAdaptive::handleFail(uint64_t segNo, const std::string& reason)
 {
   if (isStopping())
     return;
@@ -399,7 +400,7 @@
 }
 
 void
-PipelineInterestsAimd::increaseWindow()
+PipelineInterestsAdaptive::increaseWindow()
 {
   if (m_cwnd < m_ssthresh) {
     m_cwnd += m_options.aiStep; // additive increase
@@ -412,7 +413,7 @@
 }
 
 void
-PipelineInterestsAimd::decreaseWindow()
+PipelineInterestsAdaptive::decreaseWindow()
 {
   // please refer to RFC 5681, Section 3.1 for the rationale behind it
   m_ssthresh = std::max(MIN_SSTHRESH, m_cwnd * m_options.mdCoef); // multiplicative decrease
@@ -422,7 +423,7 @@
 }
 
 void
-PipelineInterestsAimd::cancelInFlightSegmentsGreaterThan(uint64_t segNo)
+PipelineInterestsAdaptive::cancelInFlightSegmentsGreaterThan(uint64_t segNo)
 {
   for (auto it = m_segmentInfo.begin(); it != m_segmentInfo.end();) {
     // cancel fetching all segments that follow
@@ -437,7 +438,7 @@
 }
 
 void
-PipelineInterestsAimd::printSummary() const
+PipelineInterestsAdaptive::printSummary() const
 {
   PipelineInterests::printSummary();
   std::cerr << "Congestion marks: " << m_nCongMarks << " (caused " << m_nMarkDecr << " window decreases)\n"
@@ -477,9 +478,9 @@
 }
 
 std::ostream&
-operator<<(std::ostream& os, const PipelineInterestsAimdOptions& options)
+operator<<(std::ostream& os, const PipelineInterestsAdaptiveOptions& options)
 {
-  os << "AIMD pipeline parameters:\n"
+  os << "Adaptive pipeline parameters:\n"
      << "\tInitial congestion window size = " << options.initCwnd << "\n"
      << "\tInitial slow start threshold = " << options.initSsthresh << "\n"
      << "\tAdditive increase step = " << options.aiStep << "\n"
@@ -493,6 +494,5 @@
   return os;
 }
 
-} // namespace aimd
 } // namespace chunks
 } // namespace ndn
diff --git a/tools/chunks/catchunks/pipeline-interests-aimd.hpp b/tools/chunks/catchunks/pipeline-interests-adaptive.hpp
similarity index 84%
rename from tools/chunks/catchunks/pipeline-interests-aimd.hpp
rename to tools/chunks/catchunks/pipeline-interests-adaptive.hpp
index 4ef21ac..b65a2c3 100644
--- a/tools/chunks/catchunks/pipeline-interests-aimd.hpp
+++ b/tools/chunks/catchunks/pipeline-interests-adaptive.hpp
@@ -23,13 +23,14 @@
  * @author Shuo Yang
  * @author Weiwei Liu
  * @author Chavoosh Ghasemi
+ * @author Klaus Schneider
  */
 
-#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_AIMD_HPP
-#define NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_AIMD_HPP
+#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_ADAPTIVE_HPP
+#define NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_ADAPTIVE_HPP
 
 #include "options.hpp"
-#include "aimd-rtt-estimator.hpp"
+#include "rtt-estimator.hpp"
 #include "pipeline-interests.hpp"
 
 #include <queue>
@@ -37,13 +38,12 @@
 
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
-class PipelineInterestsAimdOptions : public Options
+class PipelineInterestsAdaptiveOptions : public Options
 {
 public:
   explicit
-  PipelineInterestsAimdOptions(const Options& options = Options())
+  PipelineInterestsAdaptiveOptions(const Options& options = Options())
     : Options(options)
   {
   }
@@ -85,7 +85,7 @@
 /**
  * @brief Service for retrieving Data via an Interest pipeline
  *
- * Retrieves all segmented Data under the specified prefix by maintaining a dynamic AIMD
+ * Retrieves all segmented Data under the specified prefix by maintaining a dynamic
  * congestion window combined with a Conservative Loss Adaptation algorithm. For details,
  * please refer to the description in section "Interest pipeline types in ndncatchunks" of
  * tools/chunks/README.md
@@ -93,22 +93,22 @@
  * Provides retrieved Data on arrival with no ordering guarantees. Data is delivered to the
  * PipelineInterests' user via callback immediately upon arrival.
  */
-class PipelineInterestsAimd : public PipelineInterests
+class PipelineInterestsAdaptive : public PipelineInterests
 {
 public:
-  typedef PipelineInterestsAimdOptions Options;
+  typedef PipelineInterestsAdaptiveOptions Options;
 
 public:
   /**
-   * @brief create a PipelineInterestsAimd service
+   * @brief create a PipelineInterestsAdaptive service
    *
    * Configures the pipelining service without specifying the retrieval namespace. After this
    * configuration the method run must be called to start the Pipeline.
    */
-  PipelineInterestsAimd(Face& face, RttEstimator& rttEstimator,
-                        const Options& options = Options());
+  PipelineInterestsAdaptive(Face& face, RttEstimator& rttEstimator,
+                            const Options& options = Options());
 
-  ~PipelineInterestsAimd() final;
+  ~PipelineInterestsAdaptive() final;
 
   /**
    * @brief Signals when cwnd changes
@@ -116,14 +116,15 @@
    * The callback function should be: void(Milliseconds age, double cwnd) where age is the
    * duration since pipeline starts, and cwnd is the new congestion window size (in segments).
    */
-  signal::Signal<PipelineInterestsAimd, Milliseconds, double> afterCwndChange;
+  signal::Signal<PipelineInterestsAdaptive, Milliseconds, double> afterCwndChange;
 
 private:
   /**
    * @brief fetch all the segments between 0 and lastSegment of the specified prefix
    *
-   * Starts the pipeline with an AIMD algorithm to control the window size. The pipeline will
-   * fetch every segment until the last segment is successfully received or an error occurs.
+   * Starts the pipeline with an adaptive window algorithm to control the window size.
+   * The pipeline will fetch every segment until the last segment is successfully received
+   * or an error occurs.
    */
   void
   doRun() final;
@@ -169,13 +170,13 @@
   handleFail(uint64_t segNo, const std::string& reason);
 
   /**
-   * @brief increase congestion window size based on AIMD scheme
+   * @brief increase congestion window size
    */
   void
   increaseWindow();
 
   /**
-   * @brief decrease congestion window size based on AIMD scheme
+   * @brief decrease congestion window size
    */
   void
   decreaseWindow();
@@ -225,13 +226,10 @@
 };
 
 std::ostream&
-operator<<(std::ostream& os, const PipelineInterestsAimdOptions& options);
+operator<<(std::ostream& os, const PipelineInterestsAdaptiveOptions& options);
 
-} // namespace aimd
-
-using aimd::PipelineInterestsAimd;
 
 } // namespace chunks
 } // namespace ndn
 
-#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_AIMD_HPP
+#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_ADAPTIVE_HPP
diff --git a/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp b/tools/chunks/catchunks/pipeline-interests-fixed.cpp
similarity index 87%
rename from tools/chunks/catchunks/pipeline-interests-fixed-window.cpp
rename to tools/chunks/catchunks/pipeline-interests-fixed.cpp
index 1794310..6df6d27 100644
--- a/tools/chunks/catchunks/pipeline-interests-fixed-window.cpp
+++ b/tools/chunks/catchunks/pipeline-interests-fixed.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2018, Regents of the University of California,
+ * Copyright (c) 2016-2019, Regents of the University of California,
  *                          Colorado State University,
  *                          University Pierre & Marie Curie, Sorbonne University.
  *
@@ -27,13 +27,13 @@
  * @author Chavoosh Ghasemi
  */
 
-#include "pipeline-interests-fixed-window.hpp"
+#include "pipeline-interests-fixed.hpp"
 #include "data-fetcher.hpp"
 
 namespace ndn {
 namespace chunks {
 
-PipelineInterestsFixedWindow::PipelineInterestsFixedWindow(Face& face, const Options& options)
+PipelineInterestsFixed::PipelineInterestsFixed(Face& face, const Options& options)
   : PipelineInterests(face)
   , m_options(options)
   , m_hasFailure(false)
@@ -41,13 +41,13 @@
   m_segmentFetchers.resize(m_options.maxPipelineSize);
 }
 
-PipelineInterestsFixedWindow::~PipelineInterestsFixedWindow()
+PipelineInterestsFixed::~PipelineInterestsFixed()
 {
   cancel();
 }
 
 void
-PipelineInterestsFixedWindow::doRun()
+PipelineInterestsFixed::doRun()
 {
   // if the FinalBlockId is unknown, this could potentially request non-existent segments
   for (size_t nRequestedSegments = 0;
@@ -60,7 +60,7 @@
 }
 
 bool
-PipelineInterestsFixedWindow::fetchNextSegment(std::size_t pipeNo)
+PipelineInterestsFixed::fetchNextSegment(std::size_t pipeNo)
 {
   if (isStopping())
     return false;
@@ -86,9 +86,9 @@
   auto fetcher = DataFetcher::fetch(m_face, interest,
                                     m_options.maxRetriesOnTimeoutOrNack,
                                     m_options.maxRetriesOnTimeoutOrNack,
-                                    bind(&PipelineInterestsFixedWindow::handleData, this, _1, _2, pipeNo),
-                                    bind(&PipelineInterestsFixedWindow::handleFail, this, _2, pipeNo),
-                                    bind(&PipelineInterestsFixedWindow::handleFail, this, _2, pipeNo),
+                                    bind(&PipelineInterestsFixed::handleData, this, _1, _2, pipeNo),
+                                    bind(&PipelineInterestsFixed::handleFail, this, _2, pipeNo),
+                                    bind(&PipelineInterestsFixed::handleFail, this, _2, pipeNo),
                                     m_options.isVerbose);
 
   BOOST_ASSERT(!m_segmentFetchers[pipeNo].first || !m_segmentFetchers[pipeNo].first->isRunning());
@@ -98,7 +98,7 @@
 }
 
 void
-PipelineInterestsFixedWindow::doCancel()
+PipelineInterestsFixed::doCancel()
 {
   for (auto& fetcher : m_segmentFetchers) {
     if (fetcher.first)
@@ -109,7 +109,7 @@
 }
 
 void
-PipelineInterestsFixedWindow::handleData(const Interest& interest, const Data& data, size_t pipeNo)
+PipelineInterestsFixed::handleData(const Interest& interest, const Data& data, size_t pipeNo)
 {
   if (isStopping())
     return;
@@ -150,7 +150,7 @@
   }
 }
 
-void PipelineInterestsFixedWindow::handleFail(const std::string& reason, std::size_t pipeNo)
+void PipelineInterestsFixed::handleFail(const std::string& reason, std::size_t pipeNo)
 {
   if (isStopping())
     return;
diff --git a/tools/chunks/catchunks/pipeline-interests-fixed-window.hpp b/tools/chunks/catchunks/pipeline-interests-fixed.hpp
similarity index 81%
rename from tools/chunks/catchunks/pipeline-interests-fixed-window.hpp
rename to tools/chunks/catchunks/pipeline-interests-fixed.hpp
index 22f1a4b..d7fd95d 100644
--- a/tools/chunks/catchunks/pipeline-interests-fixed-window.hpp
+++ b/tools/chunks/catchunks/pipeline-interests-fixed.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2017,  Regents of the University of California,
+ * Copyright (c) 2016-2019,  Regents of the University of California,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University.
  *
@@ -27,8 +27,8 @@
  * @author Chavoosh Ghasemi
  */
 
-#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_WINDOW_HPP
-#define NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_WINDOW_HPP
+#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_HPP
+#define NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_HPP
 
 #include "options.hpp"
 #include "pipeline-interests.hpp"
@@ -38,11 +38,11 @@
 
 class DataFetcher;
 
-class PipelineInterestsFixedWindowOptions : public Options
+class PipelineInterestsFixedOptions : public Options
 {
 public:
   explicit
-  PipelineInterestsFixedWindowOptions(const Options& options = Options())
+  PipelineInterestsFixedOptions(const Options& options = Options())
     : Options(options)
     , maxPipelineSize(1)
   {
@@ -62,22 +62,22 @@
  * No guarantees are made as to the order in which segments are fetched or callbacks are invoked,
  * i.e. out-of-order delivery is possible.
  */
-class PipelineInterestsFixedWindow : public PipelineInterests
+class PipelineInterestsFixed : public PipelineInterests
 {
 public:
-  typedef PipelineInterestsFixedWindowOptions Options;
+  typedef PipelineInterestsFixedOptions Options;
 
 public:
   /**
-   * @brief create a PipelineInterestsFixedWindow service
+   * @brief create a PipelineInterestsFixed service
    *
    * Configures the pipelining service without specifying the retrieval namespace. After this
    * configuration the method run must be called to start the Pipeline.
    */
   explicit
-  PipelineInterestsFixedWindow(Face& face, const Options& options = Options());
+  PipelineInterestsFixed(Face& face, const Options& options = Options());
 
-  ~PipelineInterestsFixedWindow() final;
+  ~PipelineInterestsFixed() final;
 
 private:
   /**
@@ -120,4 +120,4 @@
 } // namespace chunks
 } // namespace ndn
 
-#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_WINDOW_HPP
+#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_PIPELINE_INTERESTS_FIXED_HPP
diff --git a/tools/chunks/catchunks/aimd-rtt-estimator.cpp b/tools/chunks/catchunks/rtt-estimator.cpp
similarity index 95%
rename from tools/chunks/catchunks/aimd-rtt-estimator.cpp
rename to tools/chunks/catchunks/rtt-estimator.cpp
index 2e1852f..fd3a592 100644
--- a/tools/chunks/catchunks/aimd-rtt-estimator.cpp
+++ b/tools/chunks/catchunks/rtt-estimator.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2016-2018, Arizona Board of Regents.
+ * Copyright (c) 2016-2019, Arizona Board of Regents.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -23,13 +23,12 @@
  * @author Chavoosh Ghasemi
  */
 
-#include "aimd-rtt-estimator.hpp"
+#include "rtt-estimator.hpp"
 
 #include <cmath>
 
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
 RttEstimator::RttEstimator(const Options& options)
   : m_options(options)
@@ -93,6 +92,5 @@
   return os;
 }
 
-} // namespace aimd
 } // namespace chunks
 } // namespace ndn
diff --git a/tools/chunks/catchunks/aimd-rtt-estimator.hpp b/tools/chunks/catchunks/rtt-estimator.hpp
similarity index 93%
rename from tools/chunks/catchunks/aimd-rtt-estimator.hpp
rename to tools/chunks/catchunks/rtt-estimator.hpp
index d7d1aca..6f10326 100644
--- a/tools/chunks/catchunks/aimd-rtt-estimator.hpp
+++ b/tools/chunks/catchunks/rtt-estimator.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018,  Arizona Board of Regents.
+ * Copyright (c) 2016-2019,  Arizona Board of Regents.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -22,14 +22,13 @@
  * @author Chavoosh Ghasemi
  */
 
-#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_RTT_ESTIMATOR_HPP
-#define NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_RTT_ESTIMATOR_HPP
+#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_RTT_ESTIMATOR_HPP
+#define NDN_TOOLS_CHUNKS_CATCHUNKS_RTT_ESTIMATOR_HPP
 
 #include "core/common.hpp"
 
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
 typedef time::duration<double, time::milliseconds::period> Milliseconds;
 
@@ -161,8 +160,7 @@
 std::ostream&
 operator<<(std::ostream& os, const RttEstimator::Options& options);
 
-} // namespace aimd
 } // namespace chunks
 } // namespace ndn
 
-#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_RTT_ESTIMATOR_HPP
+#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_RTT_ESTIMATOR_HPP
diff --git a/tools/chunks/catchunks/aimd-statistics-collector.cpp b/tools/chunks/catchunks/statistics-collector.cpp
similarity index 81%
rename from tools/chunks/catchunks/aimd-statistics-collector.cpp
rename to tools/chunks/catchunks/statistics-collector.cpp
index 9462b4f..44c342c 100644
--- a/tools/chunks/catchunks/aimd-statistics-collector.cpp
+++ b/tools/chunks/catchunks/statistics-collector.cpp
@@ -1,7 +1,7 @@
-/**
- * Copyright (c) 2016,  Regents of the University of California,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University.
+/*
+ * Copyright (c) 2016-2019,  Regents of the University of California,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -22,13 +22,12 @@
  * @author Weiwei Liu
  */
 
-#include "aimd-statistics-collector.hpp"
+#include "statistics-collector.hpp"
 
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
-StatisticsCollector::StatisticsCollector(PipelineInterestsAimd& pipeline, RttEstimator& rttEstimator,
+StatisticsCollector::StatisticsCollector(PipelineInterestsAdaptive& pipeline, RttEstimator& rttEstimator,
                                          std::ostream& osCwnd, std::ostream& osRtt)
   : m_osCwnd(osCwnd)
   , m_osRtt(osRtt)
@@ -49,6 +48,5 @@
     });
 }
 
-} // namespace aimd
 } // namespace chunks
 } // namespace ndn
\ No newline at end of file
diff --git a/tools/chunks/catchunks/aimd-statistics-collector.hpp b/tools/chunks/catchunks/statistics-collector.hpp
similarity index 65%
rename from tools/chunks/catchunks/aimd-statistics-collector.hpp
rename to tools/chunks/catchunks/statistics-collector.hpp
index 3e11a38..cd71018 100644
--- a/tools/chunks/catchunks/aimd-statistics-collector.hpp
+++ b/tools/chunks/catchunks/statistics-collector.hpp
@@ -1,7 +1,7 @@
-/**
- * Copyright (c) 2016,  Regents of the University of California,
- *                      Colorado State University,
- *                      University Pierre & Marie Curie, Sorbonne University.
+/*
+ * Copyright (c) 2016-2019,  Regents of the University of California,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -22,23 +22,22 @@
  * @author Weiwei Liu
  */
 
-#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_STATISTICS_COLLECTOR_HPP
-#define NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_STATISTICS_COLLECTOR_HPP
+#ifndef NDN_TOOLS_CHUNKS_CATCHUNKS_STATISTICS_COLLECTOR_HPP
+#define NDN_TOOLS_CHUNKS_CATCHUNKS_STATISTICS_COLLECTOR_HPP
 
-#include "pipeline-interests-aimd.hpp"
-#include "aimd-rtt-estimator.hpp"
+#include "pipeline-interests-adaptive.hpp"
+#include "rtt-estimator.hpp"
 
 namespace ndn {
 namespace chunks {
-namespace aimd {
 
 /**
- * @brief Statistics collector for AIMD pipeline
+ * @brief Statistics collector for Adaptive pipelines
  */
 class StatisticsCollector : noncopyable
 {
 public:
-  StatisticsCollector(PipelineInterestsAimd& pipeline, RttEstimator& rttEstimator,
+  StatisticsCollector(PipelineInterestsAdaptive& pipeline, RttEstimator& rttEstimator,
                       std::ostream& osCwnd, std::ostream& osRtt);
 
 private:
@@ -46,8 +45,7 @@
   std::ostream& m_osRtt;
 };
 
-} // namespace aimd
 } // namespace chunks
 } // namespace ndn
 
-#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_AIMD_STATISTICS_COLLECTOR_HPP
+#endif // NDN_TOOLS_CHUNKS_CATCHUNKS_STATISTICS_COLLECTOR_HPP
