diff --git a/tools/ndnsec/main.cpp b/tools/ndnsec/main.cpp
index 4dc7ee0..6a2572a 100644
--- a/tools/ndnsec/main.cpp
+++ b/tools/ndnsec/main.cpp
@@ -17,101 +17,70 @@
  * <http://www.gnu.org/licenses/>.
  *
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- *
- * @author Yingdi Yu <http://irl.cs.ucla.edu/~yingdi/>
  */
 
+#include "ndnsec.hpp"
+#include "util.hpp"
 #include "version.hpp"
 
-#include "security/v1/key-chain.hpp"
-#include "security/v1/certificate-subject-description.hpp"
-#include "security/v1/secured-bag.hpp"
-
-#include "util.hpp"
-#include "list.hpp"
-#include "get-default.hpp"
-#include "set-default.hpp"
-#include "key-gen.hpp"
-#include "dsk-gen.hpp"
-#include "sign-req.hpp"
-#include "cert-gen.hpp"
-#include "cert-revoke.hpp"
-#include "cert-dump.hpp"
-#include "cert-install.hpp"
-#include "export.hpp"
-#include "import.hpp"
-#include "delete.hpp"
-#include "set-acl.hpp"
-#include "unlock-tpm.hpp"
-#include "op-tool.hpp"
-
-using namespace ndn;
-using namespace ndn::security;
-using namespace ndn::security::v1;
-
-std::string ndnsec_helper("\
-  help         Show all commands.\n\
-  version      Show version and exit.\n\
-  list         Display information in PublicInfo.\n\
-  get-default  Get default setting info.\n\
-  set-default  Configure default setting.\n\
-  key-gen      Generate a Key-Signing-Key for an identity.\n\
-  dsk-gen      Generate a Data-Signing-Key for an identity.\n\
-  sign-req     Generate a certificate signing request.\n\
-  cert-gen     Generate an identity certificate.\n\
-  cert-revoke  Revoke an identity certificate.\n\
-  cert-dump    Dump a certificate from PublicInfo.\n\
-  cert-install Install a certificate into PublicInfo.\n\
-  delete       Delete identity/key/certificate.\n\
-  export       Export an identity package.\n\
-  import       Import an identity package.\n\
-  set-acl      Configure ACL of a private key.\n\
-  unlock-tpm   Unlock Tpm.\n\
-  op-tool      Operator tool.\n\
-");
+std::string ndnsec_helper = R"STR(
+  help         Show all commands
+  version      Show version and exit
+  list         Display information in PublicInfo
+  get-default  Get default setting info
+  set-default  Configure default setting
+  key-gen      Generate a Key-Signing-Key for an identity
+  dsk-gen      Generate a Data-Signing-Key for an identity
+  sign-req     Generate a certificate signing request
+  cert-gen     Generate an identity certificate
+  cert-revoke  Revoke an identity certificate
+  cert-dump    Dump a certificate from PublicInfo
+  cert-install Install a certificate into PublicInfo
+  delete       Delete identity/key/certificate
+  export       Export an identity package
+  import       Import an identity package
+  set-acl      Configure ACL of a private key
+  unlock-tpm   Unlock Tpm
+)STR";
 
 int
 main(int argc, char** argv)
 {
-  if (argc < 2)
-    {
+  if (argc < 2) {
+    std::cerr << ndnsec_helper << std::endl;
+    return 1;
+  }
+
+  using namespace ndn::ndnsec;
+
+  std::string command(argv[1]);
+  try {
+    if (command == "help")              { std::cout << ndnsec_helper << std::endl; }
+    else if (command == "version")      { std::cout << NDN_CXX_VERSION_BUILD_STRING << std::endl; }
+    else if (command == "list")         { return ndnsec_list(argc - 1, argv + 1); }
+    else if (command == "get-default")  { return ndnsec_get_default(argc - 1, argv + 1); }
+    else if (command == "set-default")  { return ndnsec_set_default(argc - 1, argv + 1); }
+    else if (command == "key-gen")      { return ndnsec_key_gen(argc - 1, argv + 1); }
+    else if (command == "dsk-gen")      { return ndnsec_dsk_gen(argc - 1, argv + 1); }
+    else if (command == "sign-req")     { return ndnsec_sign_req(argc - 1, argv + 1); }
+    else if (command == "cert-gen")     { return ndnsec_cert_gen(argc - 1, argv + 1); }
+    else if (command == "cert-revoke")  { return ndnsec_cert_revoke(argc - 1, argv + 1); }
+    else if (command == "cert-dump")    { return ndnsec_cert_dump(argc - 1, argv + 1); }
+    else if (command == "cert-install") { return ndnsec_cert_install(argc - 1, argv + 1); }
+    else if (command == "delete")       { return ndnsec_delete(argc - 1, argv + 1); }
+    else if (command == "export")       { return ndnsec_export(argc - 1, argv + 1); }
+    else if (command == "import")       { return ndnsec_import(argc - 1, argv + 1); }
+    else if (command == "set-acl")      { return ndnsec_set_acl(argc - 1, argv + 1); }
+    else if (command == "unlock-tpm")   { return ndnsec_unlock_tpm(argc - 1, argv + 1); }
+    else {
       std::cerr << ndnsec_helper << std::endl;
       return 1;
     }
-
-  std::string command(argv[1]);
-
-  try
-    {
-      if (command == "help")              { std::cout << ndnsec_helper << std::endl; }
-      else if (command == "version")      { std::cout << NDN_CXX_VERSION_BUILD_STRING
-                                                      << std::endl; }
-      else if (command == "list")         { return ndnsec_list(argc - 1, argv + 1); }
-      else if (command == "get-default")  { return ndnsec_get_default(argc - 1, argv + 1); }
-      else if (command == "set-default")  { return ndnsec_set_default(argc - 1, argv + 1); }
-      else if (command == "key-gen")      { return ndnsec_key_gen(argc - 1, argv + 1); }
-      else if (command == "dsk-gen")      { return ndnsec_dsk_gen(argc - 1, argv + 1); }
-      else if (command == "sign-req")     { return ndnsec_sign_req(argc - 1, argv + 1); }
-      else if (command == "cert-gen")     { return ndnsec_cert_gen(argc - 1, argv + 1); }
-      else if (command == "cert-revoke")  { return ndnsec_cert_revoke(argc - 1, argv + 1); }
-      else if (command == "cert-dump")    { return ndnsec_cert_dump(argc - 1, argv + 1); }
-      else if (command == "cert-install") { return ndnsec_cert_install(argc - 1, argv + 1); }
-      else if (command == "delete")       { return ndnsec_delete(argc - 1, argv + 1); }
-      else if (command == "export")       { return ndnsec_export(argc - 1, argv + 1); }
-      else if (command == "import")       { return ndnsec_import(argc - 1, argv + 1); }
-      else if (command == "set-acl")      { return ndnsec_set_acl(argc - 1, argv + 1); }
-      else if (command == "unlock-tpm")   { return ndnsec_unlock_tpm(argc - 1, argv + 1); }
-      else if (command == "op-tool")      { return ndnsec_op_tool(argc - 1, argv + 1); }
-      else {
-        std::cerr << ndnsec_helper << std::endl;
-        return 1;
-      }
-    }
-  catch (const std::runtime_error& e)
-    {
-      std::cerr << "ERROR: " << e.what() << std::endl;
-      return 1;
-    }
+  }
+  catch (const std::runtime_error& e) {
+    std::cerr << "ERROR: " << e.what() << std::endl;
+    return 1;
+  }
 
   return 0;
 }
