diff --git a/install_helpers/infoedit/README.md b/install_helpers/infoedit/README.md
deleted file mode 100644
index df8a0e5..0000000
--- a/install_helpers/infoedit/README.md
+++ /dev/null
@@ -1,90 +0,0 @@
-A tool used to edit NFD configuration files
-===========================================
-
-This tool is majorly developed for use in NFD integration tests.  However, it can also used to
-edit any INFO-formatted files.
-
-Each invocation of `infoedit` tool performs exactly one edit and the file is modified in place.
-To perform multiple edits, `infoedit` tool should be invoked multiple times on the same file.
-
-## Usage ##
-
-    infoedit [-f file] [-s|d|a|r path] [-v value]
-
-OPTIONS:
-
-* `-f file`: specifies a file to edit
-* `-s path`: specifies a property-tree path to modify
-* `-v value`: used with -s path, sets the value at the path
-* `-d path`: deletes all subtrees matching the path
-* `-a path`: adds a subtree at the path; the subtree is read from stdin
-* `-r path`: replaces a subtree at the path; equivalent to -d path followed by -a path
-
-## Sample command lines ##
-
-    ./infoedit -f nfd.conf -s general.user -v ndn.user
-    ./infoedit -f nfd.conf -s tables.strategy_choice./site -v /localhost/nfd/strategy/broadcast
-    ./infoedit -f nfd.conf -d tables.strategy_choice./
-    ./infoedit -f nfd.conf -d authorizations
-    ./infoedit -f nfd.conf -a rib.localhost_security <<<EOT
-      trust-anchor
-      {
-        type any
-      }
-      EOT
-
-### nfd.conf used in above sample ###
-
-    ; comment1
-
-    general ; comment2
-    {
-        user user ; comment3
-        group group
-    }
-
-    tables
-    {
-        strategy_choice
-        {
-            / /localhost/nfd/strategy/best-route
-            /site /localhost/nfd/strategy/broadcast
-        }
-    }
-
-    authorizations
-    {
-        authorize
-        {
-            certfile file1.cert
-        }
-        authorize
-        {
-            certfile file2.cert
-        }
-    }
-
-### nfd.conf after carrying out all commands in above sample ###
-
-    general
-    {
-        user ndn.user
-        group group
-    }
-    tables
-    {
-        strategy_choice
-        {
-            /site /localhost/nfd/strategy/broadcast
-        }
-    }
-    rib
-    {
-        localhost_security
-        {
-            trust-anchor
-            {
-                type any
-            }
-        }
-    }
\ No newline at end of file
diff --git a/install_helpers/infoedit/infoedit.cpp b/install_helpers/infoedit/infoedit.cpp
deleted file mode 100644
index 958b54f..0000000
--- a/install_helpers/infoedit/infoedit.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright 2015, Regents of the University of California.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
- * file except in compliance with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-#include "infoedit.hpp"
-#include <iostream>
-#include <boost/program_options/options_description.hpp>
-#include <boost/program_options/variables_map.hpp>
-#include <boost/program_options/parsers.hpp>
-
-namespace infoedit {
-
-void
-InfoEditor::load(const std::string& fileName)
-{
-  std::ifstream input(fileName);
-  if (!input.good() || !input.is_open()) {
-    throw Error("Failed to open configuration file for parsing");
-  }
-
-  try {
-    boost::property_tree::info_parser::read_info(input, m_info);
-  }
-  catch (boost::property_tree::info_parser::info_parser_error& error) {
-    std::stringstream msg;
-    msg << "Failed to parse configuration file";
-    msg << " " << error.message() << " line " << error.line();
-    throw Error(msg.str());
-  }
-
-  input.close();
-}
-
-InfoEditor&
-InfoEditor::modify(const std::string& section, const std::string& value)
-{
-  m_info.put(section.c_str(), value.c_str());
-  return *this;
-}
-
-InfoEditor&
-InfoEditor::remove(const std::string& section)
-{
-  std::size_t pos = section.find_last_of(".");
-  if (pos == std::string::npos) {
-    m_info.erase(section.c_str());
-  }
-  else {
-    boost::optional<boost::property_tree::ptree&> child =
-      m_info.get_child_optional(section.substr(0, pos));
-    if (child) {
-      child->erase(section.substr(pos + 1));
-    }
-  }
-
-  return *this;
-}
-
-InfoEditor&
-InfoEditor::insert(const std::string& section, std::istream& stream)
-{
-  boost::property_tree::ptree pt;
-  read_info(stream, pt);
-
-  m_info.add_child(section.c_str(), pt);
-
-  return *this;
-}
-
-void
-InfoEditor::save(const std::string& fileName)
-{
-  std::ofstream output(fileName);
-  write_info(output, m_info);
-  output.close();
-}
-
-int
-main(int argc, char** argv)
-{
-  std::string configFile;
-  std::string sectionPath;
-  std::string value;
-
-  namespace po = boost::program_options;
-  po::options_description description("Usage\n"
-                                      "  infoedit [-f file] [-s|d|a|r path] [-v value]\n"
-                                      "Options");
-
-  description.add_options()
-    ("help,h",    "print this help message")
-    ("file,f",    po::value<std::string>(&configFile), "the file to edit")
-    ("section,s", po::value<std::string>(&sectionPath), "the section to modify")
-    ("value,v",   po::value<std::string>(&value), "the value used to modify some section")
-    ("delete,d",  po::value<std::string>(&sectionPath), "the sub tree to delete")
-    ("add,a",     po::value<std::string>(&sectionPath), "adds a sub tree")
-    ("replace,r", po::value<std::string>(&sectionPath), "replace the sub tree")
-    ;
-
-  po::variables_map vm;
-  try {
-      po::store(po::command_line_parser(argc, argv).options(description).run(), vm);
-      po::notify(vm);
-  }
-  catch (const std::exception& e) {
-    std::cerr << "ERROR: " << e.what()
-              << "\n"
-              << description;
-    return 1;
-  }
-
-  if (vm.count("help") > 0) {
-    std::cout << description;
-    return 0;
-  }
-
-  if (vm.count("file") == 0) {
-    std::cerr << "ERROR: the file to edit should be specified"
-              << "\n"
-              << description;
-    return 1;
-  }
-
-  InfoEditor editor;
-  try {
-    editor.load(configFile);
-  }
-  catch (const std::exception& e) {
-    std::cerr << "ERROR: " << e.what() << std::endl;
-    return 1;
-  }
-
-  try {
-    if (vm.count("section") > 0) {
-      if (vm.count("value") == 0) {
-        std::cerr << "ERROR: value must be specified" << std::endl;
-        return 1;
-      }
-
-      editor.modify(sectionPath, value);
-    }
-
-    if (vm.count("delete") > 0) {
-      editor.remove(sectionPath);
-    }
-
-    if (vm.count("add") > 0) {
-      editor.insert(sectionPath, std::cin);
-    }
-
-    if (vm.count("replace") > 0) {
-      editor.remove(sectionPath).insert(sectionPath, std::cin);
-    }
-  }
-  catch (...) {
-    return 1;
-  }
-
-  try {
-    editor.save(configFile);
-  }
-  catch (...) {
-    return 1;
-  }
-
-  return 0;
-}
-
-} // namespace infoedit
-
-int
-main(int argc, char** argv)
-{
-  return infoedit::main(argc, argv);
-}
diff --git a/install_helpers/infoedit/infoedit.hpp b/install_helpers/infoedit/infoedit.hpp
deleted file mode 100644
index 6217c03..0000000
--- a/install_helpers/infoedit/infoedit.hpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright 2015, Regents of the University of California.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
- * file except in compliance with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-#ifndef INTEGRATION_TESTS_INSTALL_HELPERS_INFOEDIT_INFOEDIT_HPP
-#define INTEGRATION_TESTS_INSTALL_HELPERS_INFOEDIT_INFOEDIT_HPP
-
-#include <fstream>
-#include <iostream>
-#include <boost/property_tree/ptree.hpp>
-#include <boost/property_tree/info_parser.hpp>
-
-namespace infoedit {
-
-class InfoEditor
-{
-public:
-  class Error : public std::runtime_error
-  {
-  public:
-    Error(const std::string& what)
-      : std::runtime_error(what)
-    {
-    }
-  };
-
-public:
-  void
-  load(const std::string& fileName);
-
-  InfoEditor&
-  modify(const std::string& section, const std::string& value);
-
-  InfoEditor&
-  remove(const std::string& section);
-
-  InfoEditor&
-  insert(const std::string& section, std::istream& stream);
-
-  void
-  save(const std::string& fileName);
-
-private:
-  boost::property_tree::ptree m_info;
-};
-
-} // namespace infoedit
-
-#endif // INTEGRATION_TESTS_INSTALL_HELPERS_INFOEDIT_INFOEDIT_HPP
diff --git a/install_helpers/install_NFD.py b/install_helpers/install_NFD.py
index cf70d03..830644d 100644
--- a/install_helpers/install_NFD.py
+++ b/install_helpers/install_NFD.py
@@ -5,7 +5,7 @@
 def run():
     print "\nINSTALLING NFD"
     print "**************"
-    os.system("git clone https://github.com/named-data/NFD --depth 1")
+    os.system("git clone --depth 1 https://github.com/named-data/NFD")
     os.chdir("NFD")
     os.system("./waf distclean")
     os.system("git submodule init && git submodule update")
diff --git a/install_helpers/install_infoedit.py b/install_helpers/install_infoedit.py
index 737f923..ba8624b 100644
--- a/install_helpers/install_infoedit.py
+++ b/install_helpers/install_infoedit.py
@@ -4,13 +4,9 @@
 # Install infoedit
 def run():
     print "\nINSTALLING infoedit"
-    print "***********************"
-    helper_path = os.path.dirname(os.path.realpath(__file__))
-    cwd_path = os.getcwd()
-    #print helper_path
-    #print cwd_path
-    os.chdir(helper_path)
+    print "**************"
+    os.system("git clone --depth 1 https://github.com/NDN-Routing/infoedit.git")
     os.chdir("infoedit")
-    os.system("g++ -o infoedit -std=c++0x infoedit.cpp $(pkg-config --cflags --libs libndn-cxx)")
-    os.system("sudo mv infoedit /usr/local/bin/")
-    os.chdir(cwd_path)
+    os.system("make")
+    os.system("sudo make install")
+    os.chdir("..")
diff --git a/install_helpers/install_ndncxx.py b/install_helpers/install_ndncxx.py
index 94850be..54fac0d 100644
--- a/install_helpers/install_ndncxx.py
+++ b/install_helpers/install_ndncxx.py
@@ -5,7 +5,7 @@
 def run():
     print "\nINSTALLING ndn-cxx"
     print "**********************"
-    os.system("git clone https://github.com/named-data/ndn-cxx --depth 1")
+    os.system("git clone --depth 1 https://github.com/named-data/ndn-cxx")
     os.chdir("ndn-cxx")
     os.system("./waf distclean")
     os.system("./waf configure")
diff --git a/install_helpers/install_ndntools.py b/install_helpers/install_ndntools.py
index cf49556..9147a2b 100644
--- a/install_helpers/install_ndntools.py
+++ b/install_helpers/install_ndntools.py
@@ -5,7 +5,7 @@
 def run():
     print "\nINSTALLING ndn-tools"
     print "***********************"
-    os.system("git clone https://github.com/named-data/ndn-tools --depth 1")
+    os.system("git clone --depth 1 https://github.com/named-data/ndn-tools")
     os.chdir("ndn-tools")
     os.system("./waf distclean")
     os.system("./waf configure")
diff --git a/install_helpers/install_ndntraffic.py b/install_helpers/install_ndntraffic.py
index 3203dce..0969f15 100644
--- a/install_helpers/install_ndntraffic.py
+++ b/install_helpers/install_ndntraffic.py
@@ -5,7 +5,7 @@
 def run():
     print "\nINSTALLING ndn-traffic-generator"
     print "********************************"
-    os.system("git clone https://github.com/named-data/ndn-traffic-generator --depth 1")
+    os.system("git clone --depth 1 https://github.com/named-data/ndn-traffic-generator")
     os.chdir("ndn-traffic-generator")
     os.system("./waf distclean")
     os.system("./waf configure")
diff --git a/install_helpers/install_repo.py b/install_helpers/install_repo.py
index 10e2dff..1307724 100644
--- a/install_helpers/install_repo.py
+++ b/install_helpers/install_repo.py
@@ -5,7 +5,7 @@
 def run():
     print "\nINSTALLING repo-ng"
     print "***********************"
-    os.system("git clone https://github.com/named-data/repo-ng --depth 1")
+    os.system("git clone --depth 1 https://github.com/named-data/repo-ng")
     os.chdir("repo-ng")
     os.system("./waf distclean")
     os.system("./waf configure")
