diff --git a/src/route/nlsr_npte.cpp b/src/route/nlsr_npte.cpp
index c342a21..d8e83c3 100644
--- a/src/route/nlsr_npte.cpp
+++ b/src/route/nlsr_npte.cpp
@@ -3,6 +3,9 @@
 #include "nlsr_npte.hpp"
 #include "nlsr_rte.hpp"
 #include "nlsr_nexthop.hpp"
+#include "utility/nlsr_logger.hpp"
+
+#define THIS_FILE "nlsr_npte.cpp"
 
 namespace nlsr
 {
@@ -12,14 +15,14 @@
   void
   Npte::generateNhlfromRteList()
   {
-    nhl.resetNhl();
-    for( std::list<RoutingTableEntry>::iterator it=rteList.begin();
-         it != rteList.end(); ++it )
+    m_nhl.reset();
+    for( std::list<RoutingTableEntry>::iterator it=m_rteList.begin();
+         it != m_rteList.end(); ++it )
     {
       for(std::list< NextHop >::iterator nhit=(*it).getNhl().getNextHopList().begin();
           nhit != (*it).getNhl().getNextHopList().end(); ++nhit)
       {
-        nhl.addNextHop((*nhit));
+        m_nhl.addNextHop((*nhit));
       }
     }
   }
@@ -35,28 +38,28 @@
   void
   Npte::removeRoutingTableEntry(RoutingTableEntry& rte)
   {
-    std::list<RoutingTableEntry >::iterator it = std::find_if( rteList.begin(),
-        rteList.end(),
+    std::list<RoutingTableEntry >::iterator it = std::find_if( m_rteList.begin(),
+        m_rteList.end(),
         bind(&rteCompare, _1, rte.getDestination()));
-    if ( it != rteList.end() )
+    if ( it != m_rteList.end() )
     {
-      rteList.erase(it);
+      m_rteList.erase(it);
     }
   }
 
   void
   Npte::addRoutingTableEntry(RoutingTableEntry &rte)
   {
-    std::list<RoutingTableEntry >::iterator it = std::find_if( rteList.begin(),
-        rteList.end(),
+    std::list<RoutingTableEntry >::iterator it = std::find_if( m_rteList.begin(),
+        m_rteList.end(),
         bind(&rteCompare, _1, rte.getDestination()));
-    if ( it == rteList.end() )
+    if ( it == m_rteList.end() )
     {
-      rteList.push_back(rte);
+      m_rteList.push_back(rte);
     }
     else
     {
-      (*it).getNhl().resetNhl(); // reseting existing routing table's next hop
+      (*it).getNhl().reset(); // reseting existing routing table's next hop
       for(std::list< NextHop >::iterator nhit=rte.getNhl().getNextHopList().begin();
           nhit != rte.getNhl().getNextHopList().end(); ++nhit)
       {
