diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index f2e0aaf..5c98ed8 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -61,15 +61,18 @@
   }
 }
 
-int32_t
-AdjacencyList::updateAdjacentStatus(const ndn::Name& adjName, int32_t s)
+bool
+AdjacencyList::updateAdjacentStatus(const ndn::Name& adjName, Adjacent::Status s)
 {
   std::list<Adjacent>::iterator it = find(adjName);
+
   if (it == m_adjList.end()) {
-    return -1;
+    return false;
   }
-  (*it).setStatus(s);
-  return 0;
+  else {
+    it->setStatus(s);
+    return true;
+  }
 }
 
 Adjacent
@@ -163,22 +166,25 @@
   return (*it).getInterestTimedOutNo();
 }
 
-uint32_t
+Adjacent::Status
 AdjacencyList::getStatusOfNeighbor(const ndn::Name& neighbor)
 {
   std::list<Adjacent>::iterator it = find(neighbor);
+
   if (it == m_adjList.end()) {
-    return -1;
+    return Adjacent::STATUS_UNKNOWN;
   }
-  return (*it).getStatus();
+  else {
+    return it->getStatus();
+  }
 }
 
 void
-AdjacencyList::setStatusOfNeighbor(const ndn::Name& neighbor, int32_t status)
+AdjacencyList::setStatusOfNeighbor(const ndn::Name& neighbor, Adjacent::Status status)
 {
   std::list<Adjacent>::iterator it = find(neighbor);
   if (it != m_adjList.end()) {
-    (*it).setStatus(status);
+    it->setStatus(status);
   }
 }
 
@@ -192,9 +198,9 @@
 AdjacencyList::isAdjLsaBuildable(Nlsr& pnlsr)
 {
   uint32_t nbrCount = 0;
-  for (std::list<Adjacent>::iterator it = m_adjList.begin();
-       it != m_adjList.end() ; it++) {
-    if (((*it).getStatus() == 1)) {
+  for (std::list<Adjacent>::iterator it = m_adjList.begin(); it != m_adjList.end() ; it++) {
+
+    if (it->getStatus() == Adjacent::STATUS_ACTIVE) {
       nbrCount++;
     }
     else {
@@ -214,9 +220,9 @@
 AdjacencyList::getNumOfActiveNeighbor()
 {
   int32_t actNbrCount = 0;
-  for (std::list<Adjacent>::iterator it = m_adjList.begin();
-       it != m_adjList.end(); it++) {
-    if (((*it).getStatus() == 1)) {
+  for (std::list<Adjacent>::iterator it = m_adjList.begin(); it != m_adjList.end(); it++) {
+
+    if (it->getStatus() == Adjacent::STATUS_ACTIVE) {
       actNbrCount++;
     }
   }
diff --git a/src/adjacency-list.hpp b/src/adjacency-list.hpp
index 320dc40..76c9e5f 100644
--- a/src/adjacency-list.hpp
+++ b/src/adjacency-list.hpp
@@ -42,8 +42,8 @@
   int32_t
   insert(Adjacent& adjacent);
 
-  int32_t
-  updateAdjacentStatus(const ndn::Name& adjName, int32_t s);
+  bool
+  updateAdjacentStatus(const ndn::Name& adjName, Adjacent::Status s);
 
   int32_t
   updateAdjacentLinkCost(const ndn::Name& adjName, double lc);
@@ -60,11 +60,11 @@
   int32_t
   getTimedOutInterestCount(const ndn::Name& neighbor);
 
-  uint32_t
+  Adjacent::Status
   getStatusOfNeighbor(const ndn::Name& neighbor);
 
   void
-  setStatusOfNeighbor(const ndn::Name& neighbor, int32_t status);
+  setStatusOfNeighbor(const ndn::Name& neighbor, Adjacent::Status status);
 
   void
   setTimedOutInterestCount(const ndn::Name& neighbor, uint32_t count);
diff --git a/src/adjacent.cpp b/src/adjacent.cpp
index f551686..b0a9058 100644
--- a/src/adjacent.cpp
+++ b/src/adjacent.cpp
@@ -41,7 +41,7 @@
     : m_name()
     , m_connectingFaceUri()
     , m_linkCost(DEFAULT_LINK_COST)
-    , m_status(ADJACENT_STATUS_INACTIVE)
+    , m_status(STATUS_INACTIVE)
     , m_interestTimedOutNo(0)
     , m_faceId(0)
 {
@@ -51,14 +51,14 @@
     : m_name(an)
     , m_connectingFaceUri()
     , m_linkCost(DEFAULT_LINK_COST)
-    , m_status(ADJACENT_STATUS_INACTIVE)
+    , m_status(STATUS_INACTIVE)
     , m_interestTimedOutNo(0)
     , m_faceId(0)
   {
   }
 
 Adjacent::Adjacent(const ndn::Name& an, const std::string& cfu,  double lc,
-          uint32_t s, uint32_t iton, uint64_t faceId)
+                   Status s, uint32_t iton, uint64_t faceId)
     : m_name(an)
     , m_connectingFaceUri(cfu)
     , m_linkCost(lc)
diff --git a/src/adjacent.hpp b/src/adjacent.hpp
index 967265f..d12d553 100644
--- a/src/adjacent.hpp
+++ b/src/adjacent.hpp
@@ -30,21 +30,23 @@
 
 namespace nlsr {
 
-enum {
-  ADJACENT_STATUS_INACTIVE = 0,
-  ADJACENT_STATUS_ACTIVE = 1
-};
-
 class Adjacent
 {
 
 public:
+  enum Status
+  {
+    STATUS_UNKNOWN = -1,
+    STATUS_INACTIVE = 0,
+    STATUS_ACTIVE = 1
+  };
+
   Adjacent();
 
   Adjacent(const ndn::Name& an);
 
   Adjacent(const ndn::Name& an, const std::string& cfu,  double lc,
-          uint32_t s, uint32_t iton, uint64_t faceId);
+           Status s, uint32_t iton, uint64_t faceId);
 
   const ndn::Name&
   getName() const
@@ -83,14 +85,14 @@
     m_linkCost = lc;
   }
 
-  uint32_t
+  Status
   getStatus() const
   {
     return m_status;
   }
 
   void
-  setStatus(uint32_t s)
+  setStatus(Status s)
   {
     m_status = s;
   }
@@ -150,7 +152,7 @@
   ndn::Name m_name;
   std::string m_connectingFaceUri;
   double m_linkCost;
-  uint32_t m_status;
+  Status m_status;
   uint32_t m_interestTimedOutNo;
   uint64_t m_faceId;
 };
diff --git a/src/conf-file-processor.cpp b/src/conf-file-processor.cpp
index 726d2af..45890d1 100644
--- a/src/conf-file-processor.cpp
+++ b/src/conf-file-processor.cpp
@@ -338,7 +338,7 @@
                                                        Adjacent::DEFAULT_LINK_COST);
         ndn::Name neighborName(name);
         if (!neighborName.empty()) {
-          Adjacent adj(name, faceUri, linkCost, ADJACENT_STATUS_INACTIVE, 0, 0);
+          Adjacent adj(name, faceUri, linkCost, Adjacent::STATUS_INACTIVE, 0, 0);
           m_nlsr.getAdjacencyList().insert(adj);
         }
         else {
diff --git a/src/hello-protocol.cpp b/src/hello-protocol.cpp
index 98ab9cd..764c7d3 100644
--- a/src/hello-protocol.cpp
+++ b/src/hello-protocol.cpp
@@ -102,7 +102,7 @@
     _LOG_DEBUG("Sending out data for name: " << interest.getName());
     m_nlsr.getNlsrFace().put(*data);
     Adjacent *adjacent = m_nlsr.getAdjacencyList().findAdjacent(neighbor);
-    if (adjacent->getStatus() == 0) {
+    if (adjacent->getStatus() == Adjacent::STATUS_INACTIVE) {
       if(adjacent->getFaceId() != 0){
         /* interest name: /<neighbor>/NLSR/INFO/<router> */
         ndn::Name interestName(neighbor);
@@ -132,7 +132,9 @@
   ndn::Name neighbor = interestName.getPrefix(-3);
   _LOG_DEBUG("Neighbor: " << neighbor);
   m_nlsr.getAdjacencyList().incrementTimedOutInterestCount(neighbor);
-  int status = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
+
+  Adjacent::Status status = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
+
   uint32_t infoIntTimedOutCount =
     m_nlsr.getAdjacencyList().getTimedOutInterestCount(neighbor);
   _LOG_DEBUG("Status: " << status);
@@ -146,9 +148,9 @@
     expressInterest(interestName,
                     m_nlsr.getConfParameter().getInterestResendTime());
   }
-  else if ((status == 1) &&
+  else if ((status == Adjacent::STATUS_ACTIVE) &&
            (infoIntTimedOutCount == m_nlsr.getConfParameter().getInterestRetryNumber())) {
-    m_nlsr.getAdjacencyList().setStatusOfNeighbor(neighbor, 0);
+    m_nlsr.getAdjacencyList().setStatusOfNeighbor(neighbor, Adjacent::STATUS_INACTIVE);
     m_nlsr.incrementAdjBuildCount();
     if (m_nlsr.getIsBuildAdjLsaSheduled() == false) {
       _LOG_DEBUG("Scheduling scheduledAdjLsaBuild");
@@ -184,10 +186,12 @@
   _LOG_DEBUG("Data validation successful for INFO(name): " << dataName);
   if (dataName.get(-3).toUri() == INFO_COMPONENT) {
     ndn::Name neighbor = dataName.getPrefix(-4);
-    int oldStatus = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
-    m_nlsr.getAdjacencyList().setStatusOfNeighbor(neighbor, 1);
+
+    Adjacent::Status oldStatus = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
+    m_nlsr.getAdjacencyList().setStatusOfNeighbor(neighbor, Adjacent::STATUS_ACTIVE);
     m_nlsr.getAdjacencyList().setTimedOutInterestCount(neighbor, 0);
-    int newStatus = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
+    Adjacent::Status newStatus = m_nlsr.getAdjacencyList().getStatusOfNeighbor(neighbor);
+
     _LOG_DEBUG("Neighbor : " << neighbor);
     _LOG_DEBUG("Old Status: " << oldStatus << " New Status: " << newStatus);
     // change in Adjacency list
@@ -272,12 +276,12 @@
   Adjacent *adjacent = m_nlsr.getAdjacencyList().findAdjacent(name);
   if (adjacent != 0) {
     adjacent->setInterestTimedOutNo(adjacent->getInterestTimedOutNo() + 1);
-    int status = adjacent->getStatus();
+    Adjacent::Status status = adjacent->getStatus();
     uint32_t infoIntTimedOutCount = adjacent->getInterestTimedOutNo();
 
     if (infoIntTimedOutCount == m_nlsr.getConfParameter().getInterestRetryNumber()) {
-      if ( status == 1) {
-        adjacent->setStatus(0);
+      if (status == Adjacent::STATUS_ACTIVE) {
+        adjacent->setStatus(Adjacent::STATUS_INACTIVE);
       }
       m_nlsr.incrementAdjBuildCount();
       if (m_nlsr.getIsBuildAdjLsaSheduled() == false) {
diff --git a/src/lsa.cpp b/src/lsa.cpp
index 854d89f..9fa7421 100644
--- a/src/lsa.cpp
+++ b/src/lsa.cpp
@@ -218,7 +218,7 @@
   m_noLink = nl;
   std::list<Adjacent> al = adl.getAdjList();
   for (std::list<Adjacent>::iterator it = al.begin(); it != al.end(); it++) {
-    if ((*it).getStatus() == 1) {
+    if (it->getStatus() == Adjacent::STATUS_ACTIVE) {
       addAdjacent((*it));
     }
   }
@@ -286,7 +286,7 @@
       ndn::Name adjName(*tok_iter++);
       std::string connectingFaceUri(*tok_iter++);
       double linkCost = boost::lexical_cast<double>(*tok_iter++);
-      Adjacent adjacent(adjName, connectingFaceUri, linkCost, 0, 0, 0);
+      Adjacent adjacent(adjName, connectingFaceUri, linkCost, Adjacent::STATUS_INACTIVE, 0, 0);
       addAdjacent(adjacent);
     }
     catch (std::exception& e) {
