diff --git a/gui/chronosharegui.cpp b/gui/chronosharegui.cpp
index 1464cae..ccc0c6e 100644
--- a/gui/chronosharegui.cpp
+++ b/gui/chronosharegui.cpp
@@ -19,26 +19,26 @@
  */
 
 #include "chronosharegui.hpp"
-#include "core/chronoshare-config.hpp"
+#include "core/logging.hpp"
 
-#include "ccnx-wrapper.hpp"
-#include "logging.hpp"
 #include <QDesktopServices>
 #include <QDir>
 #include <QFileInfo>
 #include <QValidator>
 
-#include <boost/make_shared.hpp>
+#include <thread>
 
-using namespace boost;
-using namespace Ndnx;
+namespace ndn {
+namespace chronoshare {
 
-static const string HTTP_SERVER_ADDRESS = "localhost";
-static const string HTTP_SERVER_PORT = "9001";
+namespace fs = boost::filesystem;
+
+static const std::string HTTP_SERVER_ADDRESS = "localhost";
+static const std::string HTTP_SERVER_PORT = "9001";
 #ifdef _DEBUG
-static const string DOC_ROOT = "gui/html";
+static const std::string DOC_ROOT = "gui/html";
 #else
-static const string DOC_ROOT = ":/html";
+static const std::string DOC_ROOT = ":/html";
 #endif
 static const QString ICON_BIG_FILE(":/images/chronoshare-big.png");
 static const QString ICON_TRAY_FILE(":/images/" TRAY_ICON);
@@ -47,12 +47,7 @@
 
 ChronoShareGui::ChronoShareGui(QWidget* parent)
   : QDialog(parent)
-  , m_watcher(0)
-  , m_dispatcher(0)
   , m_httpServer(0)
-#ifdef ADHOC_SUPPORTED
-  , m_executor(1)
-#endif
 #ifdef SPARKLE_SUPPORTED
   , m_autoUpdate(
       new SparkleAutoUpdate(tr("http://irl.cs.ucla.edu/~zhenkai/chronoshare_dist/chronoshare.xml")))
@@ -61,7 +56,7 @@
   setWindowTitle("Settings");
   setMinimumWidth(600);
 
-  labelUsername = new QLabel("Username (hint: /<username>)");
+  labelUsername = new QLabel("Username(hint: /<username>)");
   labelSharedFolder = new QLabel("Shared Folder Name");
   labelSharedFolderPath = new QLabel("Shared Folder Path");
 
@@ -88,7 +83,7 @@
 
   connect(button, SIGNAL(clicked()), this, SLOT(changeSettings()));
 
-  mainLayout = new QVBoxLayout; //vertically
+  mainLayout = new QVBoxLayout; // vertically
   mainLayout->addWidget(labelUsername);
   mainLayout->addWidget(editUsername);
   mainLayout->addWidget(labelSharedFolder);
@@ -131,10 +126,6 @@
       startBackend();
     }
   }
-
-#ifdef ADHOC_SUPPORTED
-  m_executor.start();
-#endif
 }
 
 void
@@ -152,20 +143,27 @@
     }
 
     _LOG_DEBUG("Restarting Dispatcher and FileWatcher for the new location or new username");
-    delete m_watcher; // stop filewatching ASAP
-    delete m_dispatcher; // stop dispatcher ASAP, but after watcher (to prevent triggering callbacks on deleted object)
+    m_watcher.reset();    // stop filewatching ASAP
+    m_dispatcher.reset(); // stop dispatcher ASAP, but after watcher(to prevent triggering callbacks
+                          // on deleted object)
   }
 
-  filesystem::path realPathToFolder(m_dirPath.toStdString());
+  fs::path realPathToFolder(m_dirPath.toStdString());
   realPathToFolder /= m_sharedFolderName.toStdString();
 
-  m_dispatcher = new Dispatcher(m_username.toStdString(), m_sharedFolderName.toStdString(),
-                                realPathToFolder, make_shared<CcnxWrapper>());
+  std::cout << "m_dispatcher username:" << m_username.toStdString()
+            << " m_sharedFolderName:" << m_sharedFolderName.toStdString()
+            << " realPathToFolder: " << realPathToFolder << std::endl;
+
+  m_ioService.reset(new boost::asio::io_service());
+  m_face.reset(new Face(*m_ioService));
+  m_dispatcher.reset(new Dispatcher(m_username.toStdString(), m_sharedFolderName.toStdString(),
+                                    realPathToFolder, *m_face));
 
   // Alex: this **must** be here, otherwise m_dirPath will be uninitialized
-  m_watcher = new FsWatcher(realPathToFolder.string().c_str(),
-                            bind(&Dispatcher::Did_LocalFile_AddOrModify, m_dispatcher, _1),
-                            bind(&Dispatcher::Did_LocalFile_Delete, m_dispatcher, _1));
+  m_watcher.reset(new FsWatcher(*m_ioService, realPathToFolder.string().c_str(),
+                                bind(&Dispatcher::Did_LocalFile_AddOrModify, m_dispatcher.get(), _1),
+                                bind(&Dispatcher::Did_LocalFile_Delete, m_dispatcher.get(), _1)));
 
   if (m_httpServer != 0) {
     // no need to restart webserver if it already exists
@@ -176,7 +174,7 @@
   if (indexHtmlInfo.exists()) {
     try {
       m_httpServer = new http::server::server(HTTP_SERVER_ADDRESS, HTTP_SERVER_PORT, DOC_ROOT);
-      m_httpServerThread = boost::thread(&http::server::server::run, m_httpServer);
+      m_httpServerThread = std::thread(&http::server::server::run, m_httpServer);
     }
     catch (std::exception& e) {
       _LOG_ERROR("Start http server failed");
@@ -185,8 +183,8 @@
       msgBox.setText("WARNING: Cannot start http server!");
       msgBox.setIcon(QMessageBox::Warning);
       msgBox.setInformativeText(
-        QString(
-          "Starting http server failed. You will not be able to check history from web brower. Exception caused: %1")
+        QString("Starting http server failed. You will not be able to check history from web "
+                "brower. Exception caused: %1")
           .arg(e.what()));
       msgBox.setStandardButtons(QMessageBox::Ok);
       msgBox.exec();
@@ -199,12 +197,12 @@
 
 ChronoShareGui::~ChronoShareGui()
 {
-#ifdef ADHOC_SUPPORTED
-  m_executor.shutdown();
-#endif
+  // stop filewatching ASAP
+  m_watcher.reset();
 
-  delete m_watcher; // stop filewatching ASAP
-  delete m_dispatcher; // stop dispatcher ASAP, but after watcher (to prevent triggering callbacks on deleted object)
+  // stop dispatcher ASAP, but after watcher to prevent triggering callbacks on the deleted object
+  m_dispatcher.reset();
+
   if (m_httpServer != 0) {
     m_httpServer->handle_stop();
     m_httpServerThread.join();
@@ -214,7 +212,7 @@
   // cleanup
   delete m_trayIcon;
   delete m_trayIconMenu;
-#ifdef ADHOC_SUPPORTED
+#ifdef D_ADHOC_SUPPORTED
   delete m_wifiAction;
 #endif
 #ifdef SPARKLE_SUPPORTED
@@ -233,6 +231,10 @@
   delete button;
   delete label;
   delete mainLayout;
+
+  // to avoid `private field 'm_checkForUpdates' is not used` warning/error
+  (void)(m_checkForUpdates);
+  (void)(m_wifiAction);
 }
 
 void
@@ -289,14 +291,6 @@
   m_changeFolder = new QAction(tr("&Change Folder"), this);
   connect(m_changeFolder, SIGNAL(triggered()), this, SLOT(openFileDialog()));
 
-#ifdef ADHOC_SUPPORTED
-  // create "AdHoc Wifi" action
-  m_wifiAction = new QAction(tr("Enable AdHoc &WiFI"), m_trayIconMenu);
-  m_wifiAction->setChecked(false);
-  m_wifiAction->setCheckable(true);
-  connect(m_wifiAction, SIGNAL(toggled(bool)), this, SLOT(onAdHocChange(bool)));
-#endif
-
 #ifdef SPARKLE_SUPPORTED
   m_checkForUpdates = new QAction(tr("Check For Updates"), this);
   connect(m_checkForUpdates, SIGNAL(triggered()), this, SLOT(onCheckForUpdates()));
@@ -326,11 +320,6 @@
   m_trayIconMenu->addAction(m_checkForUpdates);
 #endif
 
-#ifdef ADHOC_SUPPORTED
-  m_trayIconMenu->addSeparator();
-  m_trayIconMenu->addAction(m_wifiAction);
-#endif
-
   m_trayIconMenu->addSeparator();
   m_trayIconMenu->addAction(m_quitProgram);
 
@@ -346,41 +335,6 @@
 }
 
 void
-ChronoShareGui::onAdHocChange(bool state)
-{
-#ifdef ADHOC_SUPPORTED
-  if (m_wifiAction->isChecked()) {
-    QMessageBox msgBox;
-    msgBox.setText("WARNING: your WiFi will be disconnected");
-    msgBox.setIcon(QMessageBox::Warning);
-    msgBox.setInformativeText(
-      "AdHoc WiFi will disconnect your current WiFi.\n  Are you sure that you are OK with that?");
-    msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
-    msgBox.setDefaultButton(QMessageBox::Cancel);
-    int ret = msgBox.exec();
-
-    if (ret == QMessageBox::Cancel) {
-      m_wifiAction->setChecked(false);
-    }
-    else {
-      m_wifiAction->setText(tr("Disable AdHoc WiFI"));
-
-      // create adhoc
-      m_executor.execute(Adhoc::CreateAdhoc);
-    }
-  }
-  else {
-    m_wifiAction->setText(tr("Enable AdHoc WiFI"));
-
-    // disable adhoc
-    m_executor.execute(Adhoc::DestroyAdhoc);
-
-    // a trick in DestroyAdhoc ensures that WiFi will be reconnected to a default WiFi
-  }
-#endif
-}
-
-void
 ChronoShareGui::onCheckForUpdates()
 {
 #ifdef SPARKLE_SUPPORTED
@@ -400,7 +354,7 @@
 void
 ChronoShareGui::openSharedFolder()
 {
-  filesystem::path realPathToFolder(m_dirPath.toStdString());
+  fs::path realPathToFolder(m_dirPath.toStdString());
   realPathToFolder /= m_sharedFolderName.toStdString();
   QString path = QDir::toNativeSeparators(realPathToFolder.string().c_str());
   QDesktopServices::openUrl(QUrl("file:///" + path));
@@ -440,7 +394,7 @@
     args << "end tell";
     QProcess::startDetached("osascript", args);
 #else
-    // too bad qt couldn't do highlighting for Linux (or Mac)
+    // too bad qt couldn't do highlighting for Linux(or Mac)
     QDesktopServices::openUrl(QUrl("file:///" + pAction->toolTip()));
 #endif
   }
@@ -452,15 +406,14 @@
   for (int i = 0; i < 5; i++) {
     m_fileActions[i]->setVisible(false);
   }
-  m_dispatcher->LookupRecentFileActions(boost::bind(&ChronoShareGui::checkFileAction, this, _1, _2,
-                                                    _3),
+  m_dispatcher->LookupRecentFileActions(std::bind(&ChronoShareGui::checkFileAction, this, _1, _2, _3),
                                         5);
 }
 
 void
 ChronoShareGui::checkFileAction(const std::string& filename, int action, int index)
 {
-  filesystem::path realPathToFolder(m_dirPath.toStdString());
+  fs::path realPathToFolder(m_dirPath.toStdString());
   realPathToFolder /= m_sharedFolderName.toStdString();
   realPathToFolder /= filename;
   QString fullPath = realPathToFolder.string().c_str();
@@ -606,7 +559,7 @@
   // QSettings settings(m_settingsFilePath, QSettings::NativeFormat);
   QSettings settings(QSettings::NativeFormat, QSettings::UserScope, "irl.cs.ucla.edu", "ChronoShare");
 
-  // _LOG_DEBUG (lexical_cast<string> (settings.allKeys()));
+  // _LOG_DEBUG(lexical_cast<string>(settings.allKeys()));
 
   if (settings.contains("username")) {
     m_username = settings.value("username", "admin").toString();
@@ -660,14 +613,15 @@
   if (m_username.isNull() || m_username == "" || m_sharedFolderName.isNull() ||
       m_sharedFolderName == "") {
     openMessageBox("ChronoShare is not active",
-                   "Username and/or shared folder name are not set.\n\n To activate ChronoShare, open Settings menu and configure your username and shared folder name");
+                   "Username and/or shared folder name are not set.\n\n To activate ChronoShare, "
+                   "open Settings menu and configure your username and shared folder name");
   }
 
   this->hide();
   event->ignore(); // don't let the event propagate to the base class
 }
 
-#if WAF
-#include "chronosharegui.cpp.moc"
+} // namespace chronoshare
+} // namespace ndn
+
 #include "chronosharegui.moc"
-#endif
