diff --git a/src/main.cpp b/src/main.cpp
index a381737..93595c6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -19,39 +19,27 @@
  * NLSR, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  **/
 
-#include <ndn-cxx/util/scheduler.hpp>
-
-#include "conf-file-processor.hpp"
-#include "logger.hpp"
-#include "nlsr.hpp"
+#include "nlsr-runner.hpp"
 #include "version.hpp"
 
-// boost needs to be included after ndn-cxx, otherwise there will be conflict with _1, _2, ...
-#include <boost/asio.hpp>
-#include <boost/cstdint.hpp>
-
-namespace nlsr {
-
 int
 main(int32_t argc, char** argv)
 {
-  boost::asio::io_service ioService;
-  ndn::Scheduler scheduler(ioService);
-  ndn::Face face(ioService);
-
-  Nlsr nlsr(ioService, scheduler, face);
+  using namespace nlsr;
 
   std::string programName(argv[0]);
-  nlsr.setConfFileName("nlsr.conf");
+
+  std::string configFileName = "nlsr.conf";
+  bool isDaemonProcess = false;
+
   int32_t opt;
   while ((opt = getopt(argc, argv, "df:hV")) != -1) {
-    switch (opt)
-      {
+    switch (opt) {
       case 'f':
-        nlsr.setConfFileName(optarg);
+        configFileName = optarg;
         break;
       case 'd':
-        nlsr.setIsDaemonProcess(true);
+        isDaemonProcess = true;
         break;
       case 'V':
         std::cout << NLSR_VERSION_BUILD_STRING << std::endl;
@@ -59,47 +47,20 @@
         break;
       case 'h':
       default:
-        nlsr.usage(programName);
+        NlsrRunner::printUsage(programName);
         return EXIT_FAILURE;
-      }
+    }
   }
 
-  ConfFileProcessor cfp(nlsr, nlsr.getConfFileName());
-  if (!cfp.processConfFile()) {
-    std::cerr << "Error in configuration file processing! Exiting from NLSR" << std::endl;
+  NlsrRunner runner(configFileName, isDaemonProcess);
+
+  try {
+    runner.run();
+  }
+  catch (const std::exception& e) {
+    std::cerr << e.what() << std::endl;
     return EXIT_FAILURE;
   }
 
-  if (nlsr.getConfParameter().isLog4CxxConfAvailable()) {
-    INIT_LOG4CXX(nlsr.getConfParameter().getLog4CxxConfPath());
-  }
-  else {
-    INIT_LOGGERS(nlsr.getConfParameter().getLogDir(), nlsr.getConfParameter().getLogLevel());
-  }
-
-  INIT_LOGGER("Main");
-
-  nlsr.initialize();
-  if (nlsr.getIsSetDaemonProcess()) {
-    nlsr.daemonize();
-  }
-  try {
-    nlsr.startEventLoop();
-  }
-  catch (std::exception& e) {
-    _LOG_FATAL("ERROR: " << e.what());
-    std::cerr << "ERROR: " << e.what() << std::endl;
-
-    nlsr.getFib().clean();
-    nlsr.destroyFaces();
-  }
   return EXIT_SUCCESS;
 }
-
-} // namespace nlsr
-
-int
-main(int32_t argc, char** argv)
-{
-  return nlsr::main(argc, argv);
-}
\ No newline at end of file
