diff --git a/daemon/main.cpp b/daemon/main.cpp
index f80a4bd..8abdba6 100644
--- a/daemon/main.cpp
+++ b/daemon/main.cpp
@@ -12,6 +12,7 @@
 #include "mgmt/face-manager.hpp"
 #include "mgmt/local-control-header-manager.hpp"
 #include "mgmt/strategy-choice-manager.hpp"
+#include "mgmt/status-server.hpp"
 #include "mgmt/config-file.hpp"
 
 #include <boost/filesystem.hpp>
@@ -32,6 +33,7 @@
 static FaceManager* g_faceManager;
 static LocalControlHeaderManager* g_localControlHeaderManager;
 static StrategyChoiceManager* g_strategyChoiceManager;
+static StatusServer* g_statusServer;
 static shared_ptr<InternalFace> g_internalFace;
 
 
@@ -42,7 +44,7 @@
     "%s --help\n\tshow this help and exit\n"
     "%s "
        "[--config /path/to/nfd.conf]\n"
-      "\trun forwarding daemon\n"
+       "\trun forwarding daemon\n"
        "\t--config <configuration file>]: path to configuration file\n"
     "\n",
     programName, programName
@@ -55,12 +57,12 @@
   g_options.m_showUsage = false;
   g_options.m_config = DEFAULT_CONFIG_FILE;
 
-  while (1) {
+  while (true) {
     int option_index = 0;
     static ::option long_options[] = {
-      { "help"          , no_argument      , 0, 0 },
-      { "config"        , required_argument, 0, 0 },
-      { 0               , 0                , 0, 0 }
+      { "help"   , no_argument      , 0, 0 },
+      { "config" , required_argument, 0, 0 },
+      { 0        , 0                , 0, 0 }
     };
     int c = getopt_long_only(argc, argv, "", long_options, &option_index);
     if (c == -1) break;
@@ -88,10 +90,8 @@
   ConfigFile config;
 
   g_internalFace = make_shared<InternalFace>();
-  g_forwarder->addFace(g_internalFace);
-
   g_internalFace->getValidator().setConfigFile(config);
-
+  g_forwarder->addFace(g_internalFace);
 
   g_fibManager = new FibManager(g_forwarder->getFib(),
                                 bind(&Forwarder::getFace, g_forwarder, _1),
@@ -107,6 +107,8 @@
   g_strategyChoiceManager = new StrategyChoiceManager(g_forwarder->getStrategyChoice(),
                                                       g_internalFace);
 
+  g_statusServer = new StatusServer(g_internalFace, *g_forwarder);
+
   config.parse(g_options.m_config, true);
   config.parse(g_options.m_config, false);
 
@@ -117,17 +119,17 @@
 int
 main(int argc, char** argv)
 {
-  try {
-    bool isCommandLineValid = parseCommandLine(argc, argv);
-    if (!isCommandLineValid) {
-      usage(argv[0]);
-      return 1;
-    }
-    if (g_options.m_showUsage) {
-      usage(argv[0]);
-      return 0;
-    }
+  bool isCommandLineValid = parseCommandLine(argc, argv);
+  if (!isCommandLineValid) {
+    usage(argv[0]);
+    return 1;
+  }
+  if (g_options.m_showUsage) {
+    usage(argv[0]);
+    return 0;
+  }
 
+  try {
     g_forwarder = new Forwarder();
     initializeMgmt();
 
@@ -138,15 +140,18 @@
   //   NFD_LOG_ERROR("Error: " << error.what());
   //   NFD_LOG_ERROR("You should either specify --config option or copy sample configuration into "
   //                 << DEFAULT_CONFIG_FILE);
-  } catch(boost::filesystem::filesystem_error& error) {
-    if (error.code() == boost::system::errc::permission_denied) {
-      NFD_LOG_ERROR("Error: Permissions denied for " << error.path1());
+  }
+  catch (boost::filesystem::filesystem_error& e) {
+    if (e.code() == boost::system::errc::permission_denied) {
+      NFD_LOG_ERROR("Error: Permissions denied for " << e.path1());
       NFD_LOG_ERROR(argv[0] << " should be run as superuser");
-    } else {
-      NFD_LOG_ERROR("Error: " << error.what());
     }
-  } catch(std::exception& exception) {
-    NFD_LOG_ERROR("Error: " << exception.what());
+    else {
+      NFD_LOG_ERROR("Error: " << e.what());
+    }
+  }
+  catch (std::exception& e) {
+    NFD_LOG_ERROR("Error: " << e.what());
     return 1;
   }
 
@@ -160,3 +165,4 @@
 {
   return nfd::main(argc, argv);
 }
+
