diff --git a/src/communication/sync-logic-handler.cpp b/src/communication/sync-logic-handler.cpp
index 94ac76b..4725c9b 100644
--- a/src/communication/sync-logic-handler.cpp
+++ b/src/communication/sync-logic-handler.cpp
@@ -117,11 +117,6 @@
 const std::string SyncUpdate::NLSR_COMPONENT = "NLSR";
 const std::string SyncUpdate::LSA_COMPONENT = "LSA";
 
-const std::string SyncLogicHandler::NAME_COMPONENT = "name";
-const std::string SyncLogicHandler::ADJACENCY_COMPONENT = "adjacency";
-const std::string SyncLogicHandler::COORDINATE_COMPONENT = "coordinate";
-
-
 template<class T>
 class NullDeleter
 {
@@ -198,22 +193,22 @@
     update.getSequencingManager().writeLog();
 
     try {
-      if (isLsaNew(originRouter, NAME_COMPONENT, update.getNameLsaSeqNo())) {
+      if (isLsaNew(originRouter, NameLsa::TYPE_STRING, update.getNameLsaSeqNo())) {
         _LOG_DEBUG("Received sync update with higher Name LSA sequence number than entry in LSDB");
 
-        expressInterestForLsa(update, NAME_COMPONENT, update.getNameLsaSeqNo());
+        expressInterestForLsa(update, NameLsa::TYPE_STRING, update.getNameLsaSeqNo());
       }
 
-      if (isLsaNew(originRouter, ADJACENCY_COMPONENT, update.getAdjLsaSeqNo())) {
+      if (isLsaNew(originRouter, AdjLsa::TYPE_STRING, update.getAdjLsaSeqNo())) {
         _LOG_DEBUG("Received sync update with higher Adj LSA sequence number than entry in LSDB");
 
-        expressInterestForLsa(update, ADJACENCY_COMPONENT, update.getAdjLsaSeqNo());
+        expressInterestForLsa(update, AdjLsa::TYPE_STRING, update.getAdjLsaSeqNo());
       }
 
-      if (isLsaNew(originRouter, COORDINATE_COMPONENT, update.getCorLsaSeqNo())) {
+      if (isLsaNew(originRouter, CoordinateLsa::TYPE_STRING, update.getCorLsaSeqNo())) {
         _LOG_DEBUG("Received sync update with higher Cor LSA sequence number than entry in LSDB");
 
-        expressInterestForLsa(update, COORDINATE_COMPONENT, update.getCorLsaSeqNo());
+        expressInterestForLsa(update, CoordinateLsa::TYPE_STRING, update.getCorLsaSeqNo());
       }
     }
     catch (std::exception& e) {
@@ -230,15 +225,15 @@
   ndn::Name lsaKey = originRouter;
   lsaKey.append(lsaType);
 
-  if (lsaType == NAME_COMPONENT)
+  if (lsaType == NameLsa::TYPE_STRING)
   {
     return m_lsdb.isNameLsaNew(lsaKey, seqNo);
   }
-  else if (lsaType == ADJACENCY_COMPONENT)
+  else if (lsaType == AdjLsa::TYPE_STRING)
   {
     return m_lsdb.isAdjLsaNew(lsaKey, seqNo);
   }
-  else if (lsaType == COORDINATE_COMPONENT)
+  else if (lsaType == CoordinateLsa::TYPE_STRING)
   {
     return m_lsdb.isCoordinateLsaNew(lsaKey, seqNo);
   }
diff --git a/src/communication/sync-logic-handler.hpp b/src/communication/sync-logic-handler.hpp
index 6a2c443..6f0726c 100644
--- a/src/communication/sync-logic-handler.hpp
+++ b/src/communication/sync-logic-handler.hpp
@@ -97,9 +97,6 @@
 private:
   static const std::string NLSR_COMPONENT;
   static const std::string LSA_COMPONENT;
-  static const std::string NAME_COMPONENT;
-  static const std::string ADJACENCY_COMPONENT;
-  static const std::string COORDINATE_COMPONENT;
 
 };
 
diff --git a/src/lsa.cpp b/src/lsa.cpp
index 99b69a8..8b15741 100644
--- a/src/lsa.cpp
+++ b/src/lsa.cpp
@@ -42,11 +42,15 @@
 
 using namespace std;
 
+const std::string NameLsa::TYPE_STRING = "name";
+const std::string AdjLsa::TYPE_STRING = "adjacency";
+const std::string CoordinateLsa::TYPE_STRING = "coordinate";
+
 const ndn::Name
 NameLsa::getKey() const
 {
   ndn::Name key = m_origRouter;
-  key.append("name");
+  key.append(NameLsa::TYPE_STRING);
   return key;
 }
 
@@ -68,7 +72,7 @@
 NameLsa::getData()
 {
   string nameLsaData;
-  nameLsaData = m_origRouter.toUri() + "|" + "name" + "|"
+  nameLsaData = m_origRouter.toUri() + "|" + NameLsa::TYPE_STRING + "|"
                 + boost::lexical_cast<std::string>(m_lsSeqNo) + "|"
                 + ndn::time::toIsoString(m_expirationTimePoint);
   nameLsaData += "|";
@@ -144,7 +148,7 @@
 CoordinateLsa::getKey() const
 {
   ndn::Name key = m_origRouter;
-  key.append("coordinate");
+  key.append(CoordinateLsa::TYPE_STRING);
   return key;
 }
 
@@ -162,7 +166,7 @@
 {
   string corLsaData;
   corLsaData = m_origRouter.toUri() + "|";
-  corLsaData += "coordinate";
+  corLsaData += CoordinateLsa::TYPE_STRING;
   corLsaData += "|";
   corLsaData += (boost::lexical_cast<std::string>(m_lsSeqNo) + "|");
   corLsaData += (ndn::time::toIsoString(m_expirationTimePoint) + "|");
@@ -228,7 +232,7 @@
 AdjLsa::getKey() const
 {
   ndn::Name key = m_origRouter;
-  key.append("adjacency");
+  key.append(AdjLsa::TYPE_STRING);
   return key;
 }
 
@@ -243,7 +247,7 @@
 AdjLsa::getData()
 {
   string adjLsaData;
-  adjLsaData = m_origRouter.toUri() + "|" + "adjacency" + "|"
+  adjLsaData = m_origRouter.toUri() + "|" + AdjLsa::TYPE_STRING + "|"
                + boost::lexical_cast<std::string>(m_lsSeqNo) + "|"
                + ndn::time::toIsoString(m_expirationTimePoint);
   adjLsaData += "|";
diff --git a/src/lsa.hpp b/src/lsa.hpp
index 2137069..6ba85c9 100644
--- a/src/lsa.hpp
+++ b/src/lsa.hpp
@@ -120,7 +120,7 @@
     : Lsa()
     , m_npl()
   {
-    setLsType("name");
+    setLsType(NameLsa::TYPE_STRING);
   }
 
   NameLsa(const ndn::Name& origR, const std::string& lst, uint32_t lsn,
@@ -159,7 +159,8 @@
 
 private:
   NamePrefixList m_npl;
-
+public:
+  static const std::string TYPE_STRING;
 };
 
 class AdjLsa: public Lsa
@@ -169,7 +170,7 @@
     : Lsa()
     , m_adl()
   {
-    setLsType("adjacency");
+    setLsType(AdjLsa::TYPE_STRING);
   }
 
   AdjLsa(const ndn::Name& origR, const std::string& lst, uint32_t lsn,
@@ -218,6 +219,9 @@
 private:
   uint32_t m_noLink;
   AdjacencyList m_adl;
+
+public:
+  static const std::string TYPE_STRING;
 };
 
 class CoordinateLsa: public Lsa
@@ -228,7 +232,7 @@
     , m_corRad(0)
     , m_corTheta(0)
   {
-    setLsType("coordinate");
+    setLsType(CoordinateLsa::TYPE_STRING);
   }
 
   CoordinateLsa(const ndn::Name& origR, const std::string lst, uint32_t lsn,
@@ -278,6 +282,8 @@
   double m_corRad;
   double m_corTheta;
 
+public:
+  static const std::string TYPE_STRING;
 };
 
 }//namespace nlsr
diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index ce7c706..42f0f16 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -55,7 +55,7 @@
 Lsdb::buildAndInstallOwnNameLsa()
 {
   NameLsa nameLsa(m_nlsr.getConfParameter().getRouterPrefix(),
-                  "name",
+                  NameLsa::TYPE_STRING,
                   m_nlsr.getSequencingManager().getNameLsaSeq() + 1,
                   getLsaExpirationTimePoint(),
                   m_nlsr.getNamePrefixList());
@@ -261,7 +261,7 @@
 Lsdb::buildAndInstallOwnCoordinateLsa()
 {
   CoordinateLsa corLsa(m_nlsr.getConfParameter().getRouterPrefix(),
-                       "coordinate",
+                       CoordinateLsa::TYPE_STRING,
                        m_nlsr.getSequencingManager().getCorLsaSeq() + 1,
                        getLsaExpirationTimePoint(),
                        m_nlsr.getConfParameter().getCorR(),
@@ -443,7 +443,7 @@
       }
       else {
         ndn::Name key = m_nlsr.getConfParameter().getRouterPrefix();
-        key.append("adjacency");
+        key.append(AdjLsa::TYPE_STRING);
         removeAdjLsa(key);
         m_nlsr.getRoutingTable().scheduleRoutingTableCalculation(m_nlsr);
       }
@@ -563,7 +563,7 @@
 Lsdb::buildAndInstallOwnAdjLsa()
 {
   AdjLsa adjLsa(m_nlsr.getConfParameter().getRouterPrefix(),
-                "adjacency",
+                AdjLsa::TYPE_STRING,
                 m_nlsr.getSequencingManager().getAdjLsaSeq() + 1,
                 getLsaExpirationTimePoint(),
                 m_nlsr.getAdjacencyList().getNumOfActiveNeighbor(),
@@ -787,13 +787,13 @@
 
     std::string interestedLsType = interestName[-2].toUri();
 
-    if (interestedLsType == "name") {
+    if (interestedLsType == NameLsa::TYPE_STRING) {
       processInterestForNameLsa(interest, originRouter.append(interestedLsType), seqNo);
     }
-    else if (interestedLsType == "adjacency") {
+    else if (interestedLsType == AdjLsa::TYPE_STRING) {
       processInterestForAdjacencyLsa(interest, originRouter.append(interestedLsType), seqNo);
     }
-    else if (interestedLsType == "coordinate") {
+    else if (interestedLsType == CoordinateLsa::TYPE_STRING) {
       processInterestForCoordinateLsa(interest, originRouter.append(interestedLsType), seqNo);
     }
     else {
@@ -913,13 +913,13 @@
 
     std::string interestedLsType  = dataName[-3].toUri();
 
-    if (interestedLsType == "name") {
+    if (interestedLsType == NameLsa::TYPE_STRING) {
       processContentNameLsa(originRouter.append(interestedLsType), seqNo, dataContent);
     }
-    else if (interestedLsType == "adjacency") {
+    else if (interestedLsType == AdjLsa::TYPE_STRING) {
       processContentAdjacencyLsa(originRouter.append(interestedLsType), seqNo, dataContent);
     }
-    else if (interestedLsType == "coordinate") {
+    else if (interestedLsType == CoordinateLsa::TYPE_STRING) {
       processContentCoordinateLsa(originRouter.append(interestedLsType), seqNo, dataContent);
     }
     else {
@@ -1040,13 +1040,13 @@
 bool
 Lsdb::doesLsaExist(const ndn::Name& key, const std::string& lsType)
 {
-  if (lsType == "name") {
+  if (lsType == NameLsa::TYPE_STRING) {
     return doesNameLsaExist(key);
   }
-  else if (lsType == "adjacency") {
+  else if (lsType == AdjLsa::TYPE_STRING) {
     return doesAdjLsaExist(key);
   }
-  else if (lsType == "coordinate") {
+  else if (lsType == CoordinateLsa::TYPE_STRING) {
     return doesCoordinateLsaExist(key);
   }
   return false;
diff --git a/src/route/name-prefix-table.cpp b/src/route/name-prefix-table.cpp
index d9c63e4..1d8a90c 100644
--- a/src/route/name-prefix-table.cpp
+++ b/src/route/name-prefix-table.cpp
@@ -85,12 +85,12 @@
     ndn::Name destRouter = rte.getDestination();
     (*it).removeRoutingTableEntry(rte);
     if (((*it).getRteListSize() == 0) &&
-        (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/name"),
-                                        std::string("name"))) &&
-        (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/adjacency"),
-                                        std::string("adjacency"))) &&
-        (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/coordinate"),
-                                        std::string("coordinate")))) {
+        (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/" + NameLsa::TYPE_STRING),
+                                        (NameLsa::TYPE_STRING))) &&
+        (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/" + AdjLsa::TYPE_STRING),
+                                        (AdjLsa::TYPE_STRING))) &&
+        (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/" + CoordinateLsa::TYPE_STRING),
+                                        (CoordinateLsa::TYPE_STRING)))) {
       m_table.erase(it);
       m_nlsr.getFib().remove(name);
     }
