diff --git a/src/nlsr_adjacent.cpp b/src/nlsr_adjacent.cpp
index 6b0b1c0..6cc4db0 100644
--- a/src/nlsr_adjacent.cpp
+++ b/src/nlsr_adjacent.cpp
@@ -5,35 +5,38 @@
 
 #include "nlsr_adjacent.hpp"
 
-namespace nlsr {
-
-using namespace std;
-
-Adjacent::Adjacent(const string& an, int cf, double lc, int s, int iton){
-	adjacentName=an;
-	connectingFace=cf;
-	linkCost=lc;
-	status=s;
-	interestTimedOutNo=iton;
-}
-
-bool 
-Adjacent::isAdjacentEqual(Adjacent& adj)
+namespace nlsr
 {
-	return ( adjacentName == adj.getAdjacentName() ) && 
-	       ( connectingFace == adj.getConnectingFace() ) &&
-	       (std::abs(linkCost - adj.getLinkCost()) < 
-	                                    std::numeric_limits<double>::epsilon()) ;
-}
 
-std::ostream&
-operator << (std::ostream &os, Adjacent &adj){
-	cout<<"Adjacent : "<< adj.getAdjacentName()	<< endl;
-	cout<<"Connecting Face: "<<adj.getConnectingFace()<<endl;
-	cout<<"Link Cost: "<<adj.getLinkCost()<<endl;
-	cout<<"Status: "<<adj.getStatus()<<endl;
-	cout<<"Interest Timed out: "<<adj.getInterestTimedOutNo()<<endl;
-	return os;
-}
+    using namespace std;
+
+    Adjacent::Adjacent(const string& an, int cf, double lc, int s, int iton)
+    {
+        adjacentName=an;
+        connectingFace=cf;
+        linkCost=lc;
+        status=s;
+        interestTimedOutNo=iton;
+    }
+
+    bool
+    Adjacent::isAdjacentEqual(Adjacent& adj)
+    {
+        return ( adjacentName == adj.getAdjacentName() ) &&
+               ( connectingFace == adj.getConnectingFace() ) &&
+               (std::abs(linkCost - adj.getLinkCost()) <
+                std::numeric_limits<double>::epsilon()) ;
+    }
+
+    std::ostream&
+    operator << (std::ostream &os, Adjacent &adj)
+    {
+        cout<<"Adjacent : "<< adj.getAdjacentName()	<< endl;
+        cout<<"Connecting Face: "<<adj.getConnectingFace()<<endl;
+        cout<<"Link Cost: "<<adj.getLinkCost()<<endl;
+        cout<<"Status: "<<adj.getStatus()<<endl;
+        cout<<"Interest Timed out: "<<adj.getInterestTimedOutNo()<<endl;
+        return os;
+    }
 
 } //namespace nlsr
