diff --git a/src/nlsr_adl.hpp b/src/nlsr_adl.hpp
index 0169a5f..4c44993 100644
--- a/src/nlsr_adl.hpp
+++ b/src/nlsr_adl.hpp
@@ -5,53 +5,55 @@
 #include "nlsr_adjacent.hpp"
 #include<list>
 
-namespace nlsr {
+namespace nlsr
+{
 
-class Nlsr;
+    class Nlsr;
 
-using namespace std;
+    using namespace std;
 
-class Adl{
+    class Adl
+    {
 
-public:
-	Adl();
-	~Adl();
-	int insert(Adjacent& adj);
-	int updateAdjacentStatus(string adjName, int s);
-	int updateAdjacentLinkCost(string adjName, double lc);	
-	std::list<Adjacent>& getAdjList();
-	bool isNeighbor(string adjName);
-	void incrementTimedOutInterestCount(string& neighbor);
-	int getTimedOutInterestCount(string& neighbor);
-	int getStatusOfNeighbor(string& neighbor);
-	void setStatusOfNeighbor(string& neighbor, int status);
-	void setTimedOutInterestCount(string& neighbor, int count);
-	void addAdjacentsFromAdl(Adl& adl);
+    public:
+        Adl();
+        ~Adl();
+        int insert(Adjacent& adj);
+        int updateAdjacentStatus(string adjName, int s);
+        int updateAdjacentLinkCost(string adjName, double lc);
+        std::list<Adjacent>& getAdjList();
+        bool isNeighbor(string adjName);
+        void incrementTimedOutInterestCount(string& neighbor);
+        int getTimedOutInterestCount(string& neighbor);
+        int getStatusOfNeighbor(string& neighbor);
+        void setStatusOfNeighbor(string& neighbor, int status);
+        void setTimedOutInterestCount(string& neighbor, int count);
+        void addAdjacentsFromAdl(Adl& adl);
 
-	bool isAdjLsaBuildable(Nlsr& pnlsr);
-	int getNumOfActiveNeighbor();
-	Adjacent getAdjacent(string adjName);
+        bool isAdjLsaBuildable(Nlsr& pnlsr);
+        int getNumOfActiveNeighbor();
+        Adjacent getAdjacent(string adjName);
 
-	bool isAdlEqual(Adl &adl);
+        bool isAdlEqual(Adl &adl);
 
-	int getAdlSize()
-	{
-		return adjList.size();
-	}
+        int getAdlSize()
+        {
+            return adjList.size();
+        }
 
-	void resetAdl()
-	{
-		if( adjList.size() > 0 )
-		{
-			adjList.clear();
-		}
-	}
+        void resetAdl()
+        {
+            if( adjList.size() > 0 )
+            {
+                adjList.clear();
+            }
+        }
 
-	void printAdl();
+        void printAdl();
 
-private:	
-	std::list< Adjacent > adjList;
-};	
+    private:
+        std::list< Adjacent > adjList;
+    };
 
 } //namespace nlsr
 #endif
