diff --git a/tools/ndn-autoconfig.cpp b/tools/ndn-autoconfig.cpp
index 77470c5..fdd8ba9 100644
--- a/tools/ndn-autoconfig.cpp
+++ b/tools/ndn-autoconfig.cpp
@@ -25,16 +25,16 @@
 
 #include "version.hpp"
 
-#include "core/face-uri.hpp"
-
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/management/nfd-controller.hpp>
 #include <ndn-cxx/management/nfd-face-status.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/encoding/buffer-stream.hpp>
+#include <ndn-cxx/util/face-uri.hpp>
 
 #include <boost/lexical_cast.hpp>
+#include <boost/noncopyable.hpp>
 
 #include <sys/types.h>
 #include <netinet/in.h>
@@ -59,7 +59,7 @@
             << std::endl;
 }
 
-class NdnAutoconfig
+class NdnAutoconfig : boost::noncopyable
 {
 public:
   union QueryAnswer
@@ -149,7 +149,7 @@
 
         nfd::FaceStatus faceStatus(block);
 
-        ::nfd::FaceUri uri(faceStatus.getRemoteUri());
+        ndn::util::FaceUri uri(faceStatus.getRemoteUri());
         if (uri.getScheme() == "udp4") {
           namespace ip = boost::asio::ip;
           boost::system::error_code ec;
diff --git a/tools/nfd-autoreg.cpp b/tools/nfd-autoreg.cpp
index 43862a6..0ad6841 100644
--- a/tools/nfd-autoreg.cpp
+++ b/tools/nfd-autoreg.cpp
@@ -27,6 +27,7 @@
 #include <ndn-cxx/name.hpp>
 
 #include <ndn-cxx/security/key-chain.hpp>
+#include <ndn-cxx/util/face-uri.hpp>
 #include <ndn-cxx/management/nfd-controller.hpp>
 #include <ndn-cxx/management/nfd-face-monitor.hpp>
 #include <ndn-cxx/management/nfd-face-status.hpp>
@@ -37,17 +38,19 @@
 #include <boost/program_options/parsers.hpp>
 
 #include "version.hpp"
-#include "core/face-uri.hpp"
 #include "core/network.hpp"
 
-namespace po = boost::program_options;
-
-namespace nfd {
-
 using namespace ndn::nfd;
 using ndn::Face;
 using ndn::KeyChain;
 using ndn::nfd::FaceEventNotification;
+using ndn::util::FaceUri;
+using ::nfd::Network;
+
+namespace ndn {
+namespace nfd_autoreg {
+
+namespace po = boost::program_options;
 
 class AutoregServer : boost::noncopyable
 {
@@ -250,17 +253,14 @@
     uint64_t currentSegment = data.getName().get(-1).toSegment();
 
     const name::Component& finalBlockId = data.getMetaInfo().getFinalBlockId();
-    if (finalBlockId.empty() ||
-        finalBlockId.toSegment() > currentSegment)
-      {
-        m_face.expressInterest(data.getName().getPrefix(-1).appendSegment(currentSegment+1),
-                               bind(&AutoregServer::fetchFaceStatusSegments, this, _2, buffer),
-                               ndn::OnTimeout());
-      }
-    else
-      {
-        return processFaceStatusDataset(buffer);
-      }
+    if (finalBlockId.empty() || finalBlockId.toSegment() > currentSegment) {
+      m_face.expressInterest(data.getName().getPrefix(-1).appendSegment(currentSegment + 1),
+                             bind(&AutoregServer::fetchFaceStatusSegments, this, _2, buffer),
+                             ndn::OnTimeout());
+    }
+    else {
+      return processFaceStatusDataset(buffer);
+    }
   }
 
   void
@@ -389,11 +389,12 @@
   std::vector<Network> m_blackList;
 };
 
-} // namespace nfd
+} // namespace nfd_autoreg
+} // namespace ndn
 
 int
 main(int argc, char* argv[])
 {
-  nfd::AutoregServer server;
+  ndn::nfd_autoreg::AutoregServer server;
   return server.main(argc, argv);
 }
