diff --git a/tests/face/dummy-face.hpp b/tests/face/dummy-face.hpp
index 4e4bb57..9c7252c 100644
--- a/tests/face/dummy-face.hpp
+++ b/tests/face/dummy-face.hpp
@@ -21,7 +21,7 @@
 {
 public:
   DummyFaceImpl()
-    : FaceBase(FaceUri("dummy://"))
+    : FaceBase(FaceUri("dummy://"), FaceUri("dummy://"))
   {
   }
 
diff --git a/tests/face/ethernet.cpp b/tests/face/ethernet.cpp
index 12eef0f..1224ee0 100644
--- a/tests/face/ethernet.cpp
+++ b/tests/face/ethernet.cpp
@@ -99,9 +99,10 @@
 
   BOOST_CHECK(!face->isOnDemand());
   BOOST_CHECK_EQUAL(face->isLocal(), false);
-  BOOST_CHECK_EQUAL(face->getUri().toString(),
-                    "ether://" + m_interfaces.front()->name + "/" +
-                    ethernet::getDefaultMulticastAddress().toString(':'));
+  BOOST_CHECK_EQUAL(face->getRemoteUri().toString(),
+                    "ether://" + ethernet::getDefaultMulticastAddress().toString(':'));
+  BOOST_CHECK_EQUAL(face->getLocalUri().toString(),
+                    "dev://" + m_interfaces.front()->name);
 
   Interest interest1("ndn:/TpnzGvW9R");
   Data     data1    ("ndn:/KfczhUqVix");
diff --git a/tests/face/tcp.cpp b/tests/face/tcp.cpp
index 6fe74e4..b98107e 100644
--- a/tests/face/tcp.cpp
+++ b/tests/face/tcp.cpp
@@ -38,16 +38,16 @@
   void
   channel1_onFaceCreated(const shared_ptr<Face>& newFace)
   {
-    BOOST_CHECK(!static_cast<bool>(m_face1));
-    m_face1 = newFace;
-    m_face1->onReceiveInterest +=
+    BOOST_CHECK(!static_cast<bool>(face1));
+    face1 = newFace;
+    face1->onReceiveInterest +=
       bind(&EndToEndFixture::face1_onReceiveInterest, this, _1);
-    m_face1->onReceiveData +=
+    face1->onReceiveData +=
       bind(&EndToEndFixture::face1_onReceiveData, this, _1);
-    m_face1->onFail +=
+    face1->onFail +=
       bind(&EndToEndFixture::face1_onFail, this);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
@@ -55,45 +55,45 @@
   {
     BOOST_CHECK_MESSAGE(false, reason);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face1_onReceiveInterest(const Interest& interest)
   {
-    m_face1_receivedInterests.push_back(interest);
+    face1_receivedInterests.push_back(interest);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face1_onReceiveData(const Data& data)
   {
-    m_face1_receivedDatas.push_back(data);
+    face1_receivedDatas.push_back(data);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face1_onFail()
   {
-    m_face1.reset();
-    m_limitedIo.afterOp();
+    face1.reset();
+    limitedIo.afterOp();
   }
 
   void
   channel2_onFaceCreated(const shared_ptr<Face>& newFace)
   {
-    BOOST_CHECK(!static_cast<bool>(m_face2));
-    m_face2 = newFace;
-    m_face2->onReceiveInterest +=
+    BOOST_CHECK(!static_cast<bool>(face2));
+    face2 = newFace;
+    face2->onReceiveInterest +=
       bind(&EndToEndFixture::face2_onReceiveInterest, this, _1);
-    m_face2->onReceiveData +=
+    face2->onReceiveData +=
       bind(&EndToEndFixture::face2_onReceiveData, this, _1);
-    m_face2->onFail +=
+    face2->onFail +=
       bind(&EndToEndFixture::face2_onFail, this);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
@@ -101,37 +101,37 @@
   {
     BOOST_CHECK_MESSAGE(false, reason);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face2_onReceiveInterest(const Interest& interest)
   {
-    m_face2_receivedInterests.push_back(interest);
+    face2_receivedInterests.push_back(interest);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face2_onReceiveData(const Data& data)
   {
-    m_face2_receivedDatas.push_back(data);
+    face2_receivedDatas.push_back(data);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face2_onFail()
   {
-    m_face2.reset();
-    m_limitedIo.afterOp();
+    face2.reset();
+    limitedIo.afterOp();
   }
 
   void
   channel_onFaceCreated(const shared_ptr<Face>& newFace)
   {
-    m_faces.push_back(newFace);
-    m_limitedIo.afterOp();
+    faces.push_back(newFace);
+    limitedIo.afterOp();
   }
 
   void
@@ -139,26 +139,26 @@
   {
     BOOST_CHECK_MESSAGE(false, reason);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   checkFaceList(size_t shouldBe)
   {
-    BOOST_CHECK_EQUAL(m_faces.size(), shouldBe);
+    BOOST_CHECK_EQUAL(faces.size(), shouldBe);
   }
 
 public:
-  LimitedIo m_limitedIo;
+  LimitedIo limitedIo;
 
-  shared_ptr<Face> m_face1;
-  std::vector<Interest> m_face1_receivedInterests;
-  std::vector<Data> m_face1_receivedDatas;
-  shared_ptr<Face> m_face2;
-  std::vector<Interest> m_face2_receivedInterests;
-  std::vector<Data> m_face2_receivedDatas;
+  shared_ptr<Face> face1;
+  std::vector<Interest> face1_receivedInterests;
+  std::vector<Data> face1_receivedDatas;
+  shared_ptr<Face> face2;
+  std::vector<Interest> face2_receivedInterests;
+  std::vector<Data> face2_receivedDatas;
 
-  std::list< shared_ptr<Face> > m_faces;
+  std::list< shared_ptr<Face> > faces;
 };
 
 
@@ -180,23 +180,24 @@
                      bind(&EndToEndFixture::channel2_onFaceCreated, this, _1),
                      bind(&EndToEndFixture::channel2_onConnectFailed, this, _1));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(10)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(10)) == LimitedIo::EXCEED_OPS,
                       "TcpChannel error: cannot connect or cannot accept connection");
 
-  BOOST_REQUIRE(static_cast<bool>(m_face1));
-  BOOST_REQUIRE(static_cast<bool>(m_face2));
+  BOOST_REQUIRE(static_cast<bool>(face1));
+  BOOST_REQUIRE(static_cast<bool>(face2));
 
-  BOOST_CHECK(m_face1->isOnDemand());
-  BOOST_CHECK(!m_face2->isOnDemand());
+  BOOST_CHECK(face1->isOnDemand());
+  BOOST_CHECK(!face2->isOnDemand());
 
-  BOOST_CHECK_EQUAL(m_face2->getUri().toString(), "tcp4://127.0.0.1:20070");
-  // face1 has an unknown URI, since the source port is automatically chosen by OS
+  BOOST_CHECK_EQUAL(face2->getRemoteUri().toString(), "tcp4://127.0.0.1:20070");
+  BOOST_CHECK_EQUAL(face1->getLocalUri().toString(), "tcp4://127.0.0.1:20070");
+  // face1 has an unknown remoteUri, since the source port is automatically chosen by OS
 
-  BOOST_CHECK_EQUAL(m_face1->isLocal(), true);
-  BOOST_CHECK_EQUAL(m_face2->isLocal(), true);
+  BOOST_CHECK_EQUAL(face1->isLocal(), true);
+  BOOST_CHECK_EQUAL(face2->isLocal(), true);
 
-  BOOST_CHECK_EQUAL(static_cast<bool>(dynamic_pointer_cast<LocalFace>(m_face1)), true);
-  BOOST_CHECK_EQUAL(static_cast<bool>(dynamic_pointer_cast<LocalFace>(m_face2)), true);
+  BOOST_CHECK_EQUAL(static_cast<bool>(dynamic_pointer_cast<LocalFace>(face1)), true);
+  BOOST_CHECK_EQUAL(static_cast<bool>(dynamic_pointer_cast<LocalFace>(face2)), true);
 
   // integrated tests needs to check that TcpFace for non-loopback fails these tests...
 
@@ -214,36 +215,36 @@
   data1.setSignature(fakeSignature);
   data2.setSignature(fakeSignature);
 
-  m_face1->sendInterest(interest1);
-  m_face1->sendInterest(interest1);
-  m_face1->sendInterest(interest1);
-  m_face1->sendData    (data1    );
-  m_face2->sendInterest(interest2);
-  m_face2->sendData    (data2    );
-  m_face2->sendData    (data2    );
-  m_face2->sendData    (data2    );
+  face1->sendInterest(interest1);
+  face1->sendInterest(interest1);
+  face1->sendInterest(interest1);
+  face1->sendData    (data1    );
+  face2->sendInterest(interest2);
+  face2->sendData    (data2    );
+  face2->sendData    (data2    );
+  face2->sendData    (data2    );
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(8, time::seconds(10)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(8, time::seconds(10)) == LimitedIo::EXCEED_OPS,
                       "TcpChannel error: cannot send or receive Interest/Data packets");
 
 
-  BOOST_REQUIRE_EQUAL(m_face1_receivedInterests.size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face1_receivedDatas    .size(), 3);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedInterests.size(), 3);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedDatas    .size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 3);
+  BOOST_REQUIRE_EQUAL(face2_receivedInterests.size(), 3);
+  BOOST_REQUIRE_EQUAL(face2_receivedDatas    .size(), 1);
 
-  BOOST_CHECK_EQUAL(m_face1_receivedInterests[0].getName(), interest2.getName());
-  BOOST_CHECK_EQUAL(m_face1_receivedDatas    [0].getName(), data2.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedInterests[0].getName(), interest1.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedDatas    [0].getName(), data1.getName());
+  BOOST_CHECK_EQUAL(face1_receivedInterests[0].getName(), interest2.getName());
+  BOOST_CHECK_EQUAL(face1_receivedDatas    [0].getName(), data2.getName());
+  BOOST_CHECK_EQUAL(face2_receivedInterests[0].getName(), interest1.getName());
+  BOOST_CHECK_EQUAL(face2_receivedDatas    [0].getName(), data1.getName());
 
-  const FaceCounters& counters1 = m_face1->getCounters();
+  const FaceCounters& counters1 = face1->getCounters();
   BOOST_CHECK_EQUAL(counters1.getInInterest() , 1);
   BOOST_CHECK_EQUAL(counters1.getInData()     , 3);
   BOOST_CHECK_EQUAL(counters1.getOutInterest(), 3);
   BOOST_CHECK_EQUAL(counters1.getOutData()    , 1);
 
-  const FaceCounters& counters2 = m_face2->getCounters();
+  const FaceCounters& counters2 = face2->getCounters();
   BOOST_CHECK_EQUAL(counters2.getInInterest() , 3);
   BOOST_CHECK_EQUAL(counters2.getInData()     , 1);
   BOOST_CHECK_EQUAL(counters2.getOutInterest(), 1);
@@ -264,20 +265,21 @@
                      bind(&EndToEndFixture::channel2_onFaceCreated, this, _1),
                      bind(&EndToEndFixture::channel2_onConnectFailed, this, _1));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(10)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(10)) == LimitedIo::EXCEED_OPS,
                       "TcpChannel error: cannot connect or cannot accept connection");
 
-  BOOST_REQUIRE(static_cast<bool>(m_face1));
-  BOOST_REQUIRE(static_cast<bool>(m_face2));
+  BOOST_REQUIRE(static_cast<bool>(face1));
+  BOOST_REQUIRE(static_cast<bool>(face2));
 
-  BOOST_CHECK_EQUAL(m_face2->getUri().toString(), "tcp6://[::1]:20070");
-  // face1 has an unknown URI, since the source port is automatically chosen by OS
+  BOOST_CHECK_EQUAL(face2->getRemoteUri().toString(), "tcp6://[::1]:20070");
+  BOOST_CHECK_EQUAL(face1->getLocalUri().toString(), "tcp6://[::1]:20070");
+  // face1 has an unknown remoteUri, since the source port is automatically chosen by OS
 
-  BOOST_CHECK_EQUAL(m_face1->isLocal(), true);
-  BOOST_CHECK_EQUAL(m_face2->isLocal(), true);
+  BOOST_CHECK_EQUAL(face1->isLocal(), true);
+  BOOST_CHECK_EQUAL(face2->isLocal(), true);
 
-  BOOST_CHECK_EQUAL(static_cast<bool>(dynamic_pointer_cast<LocalFace>(m_face1)), true);
-  BOOST_CHECK_EQUAL(static_cast<bool>(dynamic_pointer_cast<LocalFace>(m_face2)), true);
+  BOOST_CHECK_EQUAL(static_cast<bool>(dynamic_pointer_cast<LocalFace>(face1)), true);
+  BOOST_CHECK_EQUAL(static_cast<bool>(dynamic_pointer_cast<LocalFace>(face2)), true);
 
   // integrated tests needs to check that TcpFace for non-loopback fails these tests...
 
@@ -295,24 +297,24 @@
   data1.setSignature(fakeSignature);
   data2.setSignature(fakeSignature);
 
-  m_face1->sendInterest(interest1);
-  m_face1->sendData    (data1    );
-  m_face2->sendInterest(interest2);
-  m_face2->sendData    (data2    );
+  face1->sendInterest(interest1);
+  face1->sendData    (data1    );
+  face2->sendInterest(interest2);
+  face2->sendData    (data2    );
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(4, time::seconds(10)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(4, time::seconds(10)) == LimitedIo::EXCEED_OPS,
                       "TcpChannel error: cannot send or receive Interest/Data packets");
 
 
-  BOOST_REQUIRE_EQUAL(m_face1_receivedInterests.size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face1_receivedDatas    .size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedInterests.size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedDatas    .size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 1);
+  BOOST_REQUIRE_EQUAL(face2_receivedInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face2_receivedDatas    .size(), 1);
 
-  BOOST_CHECK_EQUAL(m_face1_receivedInterests[0].getName(), interest2.getName());
-  BOOST_CHECK_EQUAL(m_face1_receivedDatas    [0].getName(), data2.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedInterests[0].getName(), interest1.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedDatas    [0].getName(), data1.getName());
+  BOOST_CHECK_EQUAL(face1_receivedInterests[0].getName(), interest2.getName());
+  BOOST_CHECK_EQUAL(face1_receivedDatas    [0].getName(), data2.getName());
+  BOOST_CHECK_EQUAL(face2_receivedInterests[0].getName(), interest1.getName());
+  BOOST_CHECK_EQUAL(face2_receivedDatas    [0].getName(), data1.getName());
 }
 
 BOOST_FIXTURE_TEST_CASE(MultipleAccepts, EndToEndFixture)
@@ -330,11 +332,11 @@
                     bind(&EndToEndFixture::channel_onConnectFailed, this, _1),
                     time::seconds(4)); // very short timeout
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(10)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(10)) == LimitedIo::EXCEED_OPS,
                       "TcpChannel error: cannot connect or cannot accept connection");
 
 
-  BOOST_CHECK_EQUAL(m_faces.size(), 2);
+  BOOST_CHECK_EQUAL(faces.size(), 2);
 
   shared_ptr<TcpChannel> channel3 = factory.createChannel("127.0.0.1", "20072");
   channel3->connect("127.0.0.1", "20070",
@@ -359,11 +361,11 @@
   scheduler::schedule(time::milliseconds(500),
                       bind(&EndToEndFixture::checkFaceList, this, 4));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(4,// 2 connects and 2 accepts
+  BOOST_CHECK_MESSAGE(limitedIo.run(4,// 2 connects and 2 accepts
                       time::seconds(10)) == LimitedIo::EXCEED_OPS,
                       "TcpChannel error: cannot connect or cannot accept multiple connections");
 
-  BOOST_CHECK_EQUAL(m_faces.size(), 6);
+  BOOST_CHECK_EQUAL(faces.size(), 6);
 }
 
 
@@ -382,24 +384,24 @@
                     bind(&EndToEndFixture::channel2_onConnectFailed, this, _1),
                     time::seconds(4)); // very short timeout
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(10)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(10)) == LimitedIo::EXCEED_OPS,
                       "TcpChannel error: cannot connect or cannot accept connection");
 
   BOOST_CHECK_EQUAL(channel1->size(), 1);
   BOOST_CHECK_EQUAL(channel2->size(), 1);
 
-  BOOST_REQUIRE(static_cast<bool>(m_face1));
-  BOOST_CHECK(static_cast<bool>(m_face2));
+  BOOST_REQUIRE(static_cast<bool>(face1));
+  BOOST_CHECK(static_cast<bool>(face2));
 
   // Face::close must be invoked during io run to be counted as an op
-  scheduler::schedule(time::milliseconds(100), bind(&Face::close, m_face1));
+  scheduler::schedule(time::milliseconds(100), bind(&Face::close, face1));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(10)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(10)) == LimitedIo::EXCEED_OPS,
                       "FaceClosing error: cannot properly close faces");
 
   // both faces should get closed
-  BOOST_CHECK(!static_cast<bool>(m_face1));
-  BOOST_CHECK(!static_cast<bool>(m_face2));
+  BOOST_CHECK(!static_cast<bool>(face1));
+  BOOST_CHECK(!static_cast<bool>(face2));
 
   BOOST_CHECK_EQUAL(channel1->size(), 0);
   BOOST_CHECK_EQUAL(channel2->size(), 0);
diff --git a/tests/face/udp.cpp b/tests/face/udp.cpp
index ea9d1cc..157602d 100644
--- a/tests/face/udp.cpp
+++ b/tests/face/udp.cpp
@@ -5,8 +5,6 @@
  */
 
 #include "face/udp-factory.hpp"
-#include "core/face-uri.hpp"
-#include <ndn-cpp-dev/security/key-chain.hpp>
 
 #include "tests/test-common.hpp"
 #include "tests/core/limited-io.hpp"
@@ -165,25 +163,25 @@
   void
   channel1_onFaceCreated(const shared_ptr<Face>& newFace)
   {
-    BOOST_CHECK(!static_cast<bool>(m_face1));
+    BOOST_CHECK(!static_cast<bool>(face1));
     channel1_onFaceCreatedNoCheck(newFace);
   }
-  
+
   void
   channel1_onFaceCreatedNoCheck(const shared_ptr<Face>& newFace)
   {
-    m_face1 = newFace;
-    m_face1->onReceiveInterest +=
+    face1 = newFace;
+    face1->onReceiveInterest +=
       bind(&EndToEndFixture::face1_onReceiveInterest, this, _1);
-    m_face1->onReceiveData +=
+    face1->onReceiveData +=
       bind(&EndToEndFixture::face1_onReceiveData, this, _1);
-    m_face1->onFail +=
+    face1->onFail +=
       bind(&EndToEndFixture::face1_onFail, this);
     BOOST_CHECK_MESSAGE(true, "channel 1 face created");
 
-    m_faces.push_back(m_face1);
+    faces.push_back(face1);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
@@ -191,48 +189,48 @@
   {
     BOOST_CHECK_MESSAGE(false, reason);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face1_onReceiveInterest(const Interest& interest)
   {
-    m_face1_receivedInterests.push_back(interest);
+    face1_receivedInterests.push_back(interest);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face1_onReceiveData(const Data& data)
   {
-    m_face1_receivedDatas.push_back(data);
+    face1_receivedDatas.push_back(data);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face1_onFail()
   {
-    m_face1.reset();
-    m_limitedIo.afterOp();
+    face1.reset();
+    limitedIo.afterOp();
   }
 
   void
   channel2_onFaceCreated(const shared_ptr<Face>& newFace)
   {
-    BOOST_CHECK(!static_cast<bool>(m_face2));
-    m_face2 = newFace;
-    m_face2->onReceiveInterest +=
+    BOOST_CHECK(!static_cast<bool>(face2));
+    face2 = newFace;
+    face2->onReceiveInterest +=
       bind(&EndToEndFixture::face2_onReceiveInterest, this, _1);
-    m_face2->onReceiveData +=
+    face2->onReceiveData +=
       bind(&EndToEndFixture::face2_onReceiveData, this, _1);
-    m_face2->onFail +=
+    face2->onFail +=
       bind(&EndToEndFixture::face2_onFail, this);
 
-    m_faces.push_back(m_face2);
+    faces.push_back(face2);
 
     BOOST_CHECK_MESSAGE(true, "channel 2 face created");
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
@@ -240,47 +238,47 @@
   {
     BOOST_CHECK_MESSAGE(false, reason);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face2_onReceiveInterest(const Interest& interest)
   {
-    m_face2_receivedInterests.push_back(interest);
+    face2_receivedInterests.push_back(interest);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face2_onReceiveData(const Data& data)
   {
-    m_face2_receivedDatas.push_back(data);
+    face2_receivedDatas.push_back(data);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face2_onFail()
   {
-    m_face2.reset();
-    m_limitedIo.afterOp();
+    face2.reset();
+    limitedIo.afterOp();
   }
 
   void
   channel3_onFaceCreated(const shared_ptr<Face>& newFace)
   {
-    BOOST_CHECK(!static_cast<bool>(m_face1));
-    m_face3 = newFace;
-    m_faces.push_back(newFace);
+    BOOST_CHECK(!static_cast<bool>(face1));
+    face3 = newFace;
+    faces.push_back(newFace);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   channel_onFaceCreated(const shared_ptr<Face>& newFace)
   {
-    m_faces.push_back(newFace);
-    m_limitedIo.afterOp();
+    faces.push_back(newFace);
+    limitedIo.afterOp();
   }
 
   void
@@ -288,34 +286,34 @@
   {
     BOOST_CHECK_MESSAGE(false, reason);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   channel_onConnectFailedOk(const std::string& reason)
   {
     //it's ok, it was supposed to fail
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   checkFaceList(size_t shouldBe)
   {
-    BOOST_CHECK_EQUAL(m_faces.size(), shouldBe);
+    BOOST_CHECK_EQUAL(faces.size(), shouldBe);
   }
 
 public:
-  LimitedIo m_limitedIo;
+  LimitedIo limitedIo;
 
-  shared_ptr<Face> m_face1;
-  std::vector<Interest> m_face1_receivedInterests;
-  std::vector<Data> m_face1_receivedDatas;
-  shared_ptr<Face> m_face2;
-  std::vector<Interest> m_face2_receivedInterests;
-  std::vector<Data> m_face2_receivedDatas;
-  shared_ptr<Face> m_face3;
+  shared_ptr<Face> face1;
+  std::vector<Interest> face1_receivedInterests;
+  std::vector<Data> face1_receivedDatas;
+  shared_ptr<Face> face2;
+  std::vector<Interest> face2_receivedInterests;
+  std::vector<Data> face2_receivedDatas;
+  shared_ptr<Face> face3;
 
-  std::list< shared_ptr<Face> > m_faces;
+  std::list< shared_ptr<Face> > faces;
 };
 
 
@@ -330,13 +328,14 @@
                      bind(&EndToEndFixture::channel2_onConnectFailed, this, _1));
 
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(1, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot connect or cannot accept connection");
 
-  BOOST_REQUIRE(static_cast<bool>(m_face2));
-  BOOST_CHECK_EQUAL(m_face2->getUri().toString(), "udp4://127.0.0.1:20070");
-  BOOST_CHECK_EQUAL(m_face2->isLocal(), false);
-  // m_face1 is not created yet
+  BOOST_REQUIRE(static_cast<bool>(face2));
+  BOOST_CHECK_EQUAL(face2->getRemoteUri().toString(), "udp4://127.0.0.1:20070");
+  BOOST_CHECK_EQUAL(face2->getLocalUri().toString(), "udp4://127.0.0.1:20071");
+  BOOST_CHECK_EQUAL(face2->isLocal(), false);
+  // face1 is not created yet
 
   shared_ptr<UdpChannel> channel1 = factory.createChannel("127.0.0.1", "20070");
   channel1->listen(bind(&EndToEndFixture::channel1_onFaceCreated,   this, _1),
@@ -363,61 +362,62 @@
   data2.setSignature(fakeSignature);
   data3.setSignature(fakeSignature);
 
-  m_face2->sendInterest(interest2);
-  m_face2->sendData    (data2    );
-  m_face2->sendData    (data2    );
-  m_face2->sendData    (data2    );
+  face2->sendInterest(interest2);
+  face2->sendData    (data2    );
+  face2->sendData    (data2    );
+  face2->sendData    (data2    );
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(5,//4 send + 1 listen return
+  BOOST_CHECK_MESSAGE(limitedIo.run(5,//4 send + 1 listen return
                       time::seconds(4)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
 
-  BOOST_REQUIRE(static_cast<bool>(m_face1));
-  BOOST_CHECK_EQUAL(m_face1->getUri().toString(), "udp4://127.0.0.1:20071");
-  BOOST_CHECK_EQUAL(m_face1->isLocal(), false);
+  BOOST_REQUIRE(static_cast<bool>(face1));
+  BOOST_CHECK_EQUAL(face1->getRemoteUri().toString(), "udp4://127.0.0.1:20071");
+  BOOST_CHECK_EQUAL(face1->getLocalUri().toString(), "udp4://127.0.0.1:20070");
+  BOOST_CHECK_EQUAL(face1->isLocal(), false);
 
-  m_face1->sendInterest(interest1);
-  m_face1->sendInterest(interest1);
-  m_face1->sendInterest(interest1);
-  m_face1->sendData    (data1    );
+  face1->sendInterest(interest1);
+  face1->sendInterest(interest1);
+  face1->sendInterest(interest1);
+  face1->sendData    (data1    );
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(4, time::seconds(4)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(4, time::seconds(4)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
 
 
-  BOOST_REQUIRE_EQUAL(m_face1_receivedInterests.size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face1_receivedDatas    .size(), 3);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedInterests.size(), 3);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedDatas    .size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 3);
+  BOOST_REQUIRE_EQUAL(face2_receivedInterests.size(), 3);
+  BOOST_REQUIRE_EQUAL(face2_receivedDatas    .size(), 1);
 
-  BOOST_CHECK_EQUAL(m_face1_receivedInterests[0].getName(), interest2.getName());
-  BOOST_CHECK_EQUAL(m_face1_receivedDatas    [0].getName(), data2.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedInterests[0].getName(), interest1.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedDatas    [0].getName(), data1.getName());
+  BOOST_CHECK_EQUAL(face1_receivedInterests[0].getName(), interest2.getName());
+  BOOST_CHECK_EQUAL(face1_receivedDatas    [0].getName(), data2.getName());
+  BOOST_CHECK_EQUAL(face2_receivedInterests[0].getName(), interest1.getName());
+  BOOST_CHECK_EQUAL(face2_receivedDatas    [0].getName(), data1.getName());
 
 
 
   //checking if the connection accepting mechanism works properly.
 
-  m_face2->sendData    (data3    );
-  m_face2->sendInterest(interest3);
+  face2->sendData    (data3    );
+  face2->sendInterest(interest3);
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
 
-  BOOST_REQUIRE_EQUAL(m_face1_receivedInterests.size(), 2);
-  BOOST_REQUIRE_EQUAL(m_face1_receivedDatas    .size(), 4);
+  BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 2);
+  BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 4);
 
-  BOOST_CHECK_EQUAL(m_face1_receivedInterests[1].getName(), interest3.getName());
-  BOOST_CHECK_EQUAL(m_face1_receivedDatas    [3].getName(), data3.getName());
+  BOOST_CHECK_EQUAL(face1_receivedInterests[1].getName(), interest3.getName());
+  BOOST_CHECK_EQUAL(face1_receivedDatas    [3].getName(), data3.getName());
 
-  const FaceCounters& counters1 = m_face1->getCounters();
+  const FaceCounters& counters1 = face1->getCounters();
   BOOST_CHECK_EQUAL(counters1.getInInterest() , 2);
   BOOST_CHECK_EQUAL(counters1.getInData()     , 4);
   BOOST_CHECK_EQUAL(counters1.getOutInterest(), 3);
   BOOST_CHECK_EQUAL(counters1.getOutData()    , 1);
 
-  const FaceCounters& counters2 = m_face2->getCounters();
+  const FaceCounters& counters2 = face2->getCounters();
   BOOST_CHECK_EQUAL(counters2.getInInterest() , 3);
   BOOST_CHECK_EQUAL(counters2.getInData()     , 1);
   BOOST_CHECK_EQUAL(counters2.getOutInterest(), 2);
@@ -435,13 +435,14 @@
                      bind(&EndToEndFixture::channel2_onConnectFailed, this, _1));
 
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(1, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot connect or cannot accept connection");
 
-  BOOST_REQUIRE(static_cast<bool>(m_face2));
-  BOOST_CHECK_EQUAL(m_face2->getUri().toString(), "udp6://[::1]:20070");
-  BOOST_CHECK_EQUAL(m_face2->isLocal(), false);
-  // m_face1 is not created yet
+  BOOST_REQUIRE(static_cast<bool>(face2));
+  BOOST_CHECK_EQUAL(face2->getRemoteUri().toString(), "udp6://[::1]:20070");
+  BOOST_CHECK_EQUAL(face2->getLocalUri().toString(), "udp6://[::1]:20071");
+  BOOST_CHECK_EQUAL(face2->isLocal(), false);
+  // face1 is not created yet
 
   shared_ptr<UdpChannel> channel1 = factory.createChannel("::1", "20070");
   channel1->listen(bind(&EndToEndFixture::channel1_onFaceCreated,   this, _1),
@@ -468,49 +469,50 @@
   data2.setSignature(fakeSignature);
   data3.setSignature(fakeSignature);
 
-  m_face2->sendInterest(interest2);
-  m_face2->sendData    (data2    );
+  face2->sendInterest(interest2);
+  face2->sendData    (data2    );
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(3,//2 send + 1 listen return
+  BOOST_CHECK_MESSAGE(limitedIo.run(3,//2 send + 1 listen return
                       time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
 
-  BOOST_REQUIRE(static_cast<bool>(m_face1));
-  BOOST_CHECK_EQUAL(m_face1->getUri().toString(), "udp6://[::1]:20071");
-  BOOST_CHECK_EQUAL(m_face1->isLocal(), false);
+  BOOST_REQUIRE(static_cast<bool>(face1));
+  BOOST_CHECK_EQUAL(face1->getRemoteUri().toString(), "udp6://[::1]:20071");
+  BOOST_CHECK_EQUAL(face1->getLocalUri().toString(), "udp6://[::1]:20070");
+  BOOST_CHECK_EQUAL(face1->isLocal(), false);
 
-  m_face1->sendInterest(interest1);
-  m_face1->sendData    (data1    );
+  face1->sendInterest(interest1);
+  face1->sendData    (data1    );
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
 
 
-  BOOST_REQUIRE_EQUAL(m_face1_receivedInterests.size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face1_receivedDatas    .size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedInterests.size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedDatas    .size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 1);
+  BOOST_REQUIRE_EQUAL(face2_receivedInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face2_receivedDatas    .size(), 1);
 
-  BOOST_CHECK_EQUAL(m_face1_receivedInterests[0].getName(), interest2.getName());
-  BOOST_CHECK_EQUAL(m_face1_receivedDatas    [0].getName(), data2.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedInterests[0].getName(), interest1.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedDatas    [0].getName(), data1.getName());
+  BOOST_CHECK_EQUAL(face1_receivedInterests[0].getName(), interest2.getName());
+  BOOST_CHECK_EQUAL(face1_receivedDatas    [0].getName(), data2.getName());
+  BOOST_CHECK_EQUAL(face2_receivedInterests[0].getName(), interest1.getName());
+  BOOST_CHECK_EQUAL(face2_receivedDatas    [0].getName(), data1.getName());
 
 
 
   //checking if the connection accepting mechanism works properly.
 
-  m_face2->sendData    (data3    );
-  m_face2->sendInterest(interest3);
+  face2->sendData    (data3    );
+  face2->sendInterest(interest3);
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
 
-  BOOST_REQUIRE_EQUAL(m_face1_receivedInterests.size(), 2);
-  BOOST_REQUIRE_EQUAL(m_face1_receivedDatas    .size(), 2);
+  BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 2);
+  BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 2);
 
-  BOOST_CHECK_EQUAL(m_face1_receivedInterests[1].getName(), interest3.getName());
-  BOOST_CHECK_EQUAL(m_face1_receivedDatas    [1].getName(), data3.getName());
+  BOOST_CHECK_EQUAL(face1_receivedInterests[1].getName(), interest3.getName());
+  BOOST_CHECK_EQUAL(face1_receivedDatas    [1].getName(), data3.getName());
 }
 
 BOOST_FIXTURE_TEST_CASE(MultipleAccepts, EndToEndFixture)
@@ -531,10 +533,10 @@
                     bind(&EndToEndFixture::channel_onConnectFailed, this, _1));
 
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot connect or cannot accept connection");
 
-  BOOST_CHECK_EQUAL(m_faces.size(), 1);
+  BOOST_CHECK_EQUAL(faces.size(), 1);
 
   shared_ptr<UdpChannel> channel3 = factory.createChannel("127.0.0.1", "20072");
   channel3->connect("127.0.0.1", "20070",
@@ -555,25 +557,25 @@
 
   scheduler::schedule(time::milliseconds(400), bind(&EndToEndFixture::checkFaceList, this, 2));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2,// 2 connects
+  BOOST_CHECK_MESSAGE(limitedIo.run(2,// 2 connects
                       time::seconds(4)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot connect or cannot accept multiple connections");
 
-  BOOST_CHECK_EQUAL(m_faces.size(), 3);
+  BOOST_CHECK_EQUAL(faces.size(), 3);
 
 
-  m_face2->sendInterest(interest1);
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  face2->sendInterest(interest1);
+  BOOST_CHECK_MESSAGE(limitedIo.run(1, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
 
-  BOOST_CHECK_EQUAL(m_faces.size(), 4);
+  BOOST_CHECK_EQUAL(faces.size(), 4);
 
-  m_face3->sendInterest(interest2);
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  face3->sendInterest(interest2);
+  BOOST_CHECK_MESSAGE(limitedIo.run(1, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
 
-  //channel1 should have created 2 faces, one when m_face2 sent an interest, one when m_face3 sent an interest
-  BOOST_CHECK_EQUAL(m_faces.size(), 5);
+  //channel1 should have created 2 faces, one when face2 sent an interest, one when face3 sent an interest
+  BOOST_CHECK_EQUAL(faces.size(), 5);
   BOOST_CHECK_THROW(channel1->listen(bind(&EndToEndFixture::channel_onFaceCreated,     this, _1),
                                      bind(&EndToEndFixture::channel_onConnectFailedOk, this, _1)),
                     UdpChannel::Error);
@@ -590,7 +592,7 @@
 //                          bind(&EndToEndFixture::abortTestCase, this,
 //                              "UdpChannel error: cannot connect or cannot accept connection"));
 //
-//  m_limitedIoRemaining = 1;
+//  limitedIoRemaining = 1;
 //
 //  shared_ptr<UdpChannel> channel1 = factory.createChannel("::1", "20070");
 //  shared_ptr<UdpChannel> channel2 = factory.createChannel("::1", "20071");
@@ -605,7 +607,7 @@
 //  g_io.reset();
 //  scheduler.cancelEvent(abortEvent);
 //
-//  BOOST_REQUIRE(static_cast<bool>(m_face2));
+//  BOOST_REQUIRE(static_cast<bool>(face2));
 //
 //  abortEvent =
 //  scheduler.scheduleEvent(time::seconds(1),
@@ -630,57 +632,57 @@
 //  data2.setSignature(fakeSignature);
 //  data3.setSignature(fakeSignature);
 //
-//  m_face2->sendInterest(interest2);
-//  m_face2->sendData    (data2    );
+//  face2->sendInterest(interest2);
+//  face2->sendData    (data2    );
 //
-//  m_limitedIoRemaining = 3; //2 send + 1 listen return
+//  limitedIoRemaining = 3; //2 send + 1 listen return
 //  g_io.run();
 //  g_io.reset();
 //  scheduler.cancelEvent(abortEvent);
 //
-//  BOOST_REQUIRE(static_cast<bool>(m_face1));
+//  BOOST_REQUIRE(static_cast<bool>(face1));
 //
-//  m_face1->sendInterest(interest1);
-//  m_face1->sendData    (data1    );
+//  face1->sendInterest(interest1);
+//  face1->sendData    (data1    );
 //
 //  abortEvent =
 //  scheduler.scheduleEvent(time::seconds(1),
 //                          bind(&EndToEndFixture::abortTestCase, this,
 //                               "UdpChannel error: cannot send or receive Interest/Data packets"));
-//  m_limitedIoRemaining = 2;
+//  limitedIoRemaining = 2;
 //  g_io.run();
 //  g_io.reset();
 //  scheduler.cancelEvent(abortEvent);
 //
-//  BOOST_REQUIRE_EQUAL(m_face1_receivedInterests.size(), 1);
-//  BOOST_REQUIRE_EQUAL(m_face1_receivedDatas    .size(), 1);
-//  BOOST_REQUIRE_EQUAL(m_face2_receivedInterests.size(), 1);
-//  BOOST_REQUIRE_EQUAL(m_face2_receivedDatas    .size(), 1);
+//  BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 1);
+//  BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 1);
+//  BOOST_REQUIRE_EQUAL(face2_receivedInterests.size(), 1);
+//  BOOST_REQUIRE_EQUAL(face2_receivedDatas    .size(), 1);
 //
-//  BOOST_CHECK_EQUAL(m_face1_receivedInterests[0].getName(), interest2.getName());
-//  BOOST_CHECK_EQUAL(m_face1_receivedDatas    [0].getName(), data2.getName());
-//  BOOST_CHECK_EQUAL(m_face2_receivedInterests[0].getName(), interest1.getName());
-//  BOOST_CHECK_EQUAL(m_face2_receivedDatas    [0].getName(), data1.getName());
+//  BOOST_CHECK_EQUAL(face1_receivedInterests[0].getName(), interest2.getName());
+//  BOOST_CHECK_EQUAL(face1_receivedDatas    [0].getName(), data2.getName());
+//  BOOST_CHECK_EQUAL(face2_receivedInterests[0].getName(), interest1.getName());
+//  BOOST_CHECK_EQUAL(face2_receivedDatas    [0].getName(), data1.getName());
 //
 //  //checking if the connection accepting mechanism works properly.
 //
-//  m_face2->sendData    (data3    );
-//  m_face2->sendInterest(interest3);
+//  face2->sendData    (data3    );
+//  face2->sendInterest(interest3);
 //
 //  abortEvent =
 //  scheduler.scheduleEvent(time::seconds(1),
 //                          bind(&EndToEndFixture::abortTestCase, this,
 //                               "UdpChannel error: cannot send or receive Interest/Data packets"));
-//  m_limitedIoRemaining = 2;
+//  limitedIoRemaining = 2;
 //  g_io.run();
 //  g_io.reset();
 //  scheduler.cancelEvent(abortEvent);
 //
-//  BOOST_REQUIRE_EQUAL(m_face1_receivedInterests.size(), 2);
-//  BOOST_REQUIRE_EQUAL(m_face1_receivedDatas    .size(), 2);
+//  BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 2);
+//  BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 2);
 //
-//  BOOST_CHECK_EQUAL(m_face1_receivedInterests[1].getName(), interest3.getName());
-//  BOOST_CHECK_EQUAL(m_face1_receivedDatas    [1].getName(), data3.getName());
+//  BOOST_CHECK_EQUAL(face1_receivedInterests[1].getName(), interest3.getName());
+//  BOOST_CHECK_EQUAL(face1_receivedDatas    [1].getName(), data3.getName());
 //
 //}
 
@@ -710,12 +712,12 @@
 //                    bind(&EndToEndFixture::channel2_onFaceCreated, this, _1),
 //                    bind(&EndToEndFixture::channel_onConnectFailed, this, _1));
 //
-//  m_limitedIoRemaining = 1;
+//  limitedIoRemaining = 1;
 //  g_io.run();
 //  g_io.reset();
 //  scheduler.cancelEvent(abortEvent);
 //
-//  BOOST_CHECK_EQUAL(m_faces.size(), 1);
+//  BOOST_CHECK_EQUAL(faces.size(), 1);
 //
 //  shared_ptr<UdpChannel> channel3 = factory.createChannel("::1", "20072");
 //  channel3->connect("::1", "20070",
@@ -735,7 +737,7 @@
 //                      static_cast<UdpChannel::ConnectFailedCallback>(bind(&EndToEndFixture::
 //                                                                          channel_onConnectFailed, this, _1))));
 //
-//  m_limitedIoRemaining = 2; // 2 connects
+//  limitedIoRemaining = 2; // 2 connects
 //  abortEvent =
 //  scheduler.scheduleEvent(time::seconds(4),
 //                          bind(&EndToEndFixture::abortTestCase, this,
@@ -747,33 +749,33 @@
 //  g_io.run();
 //  g_io.reset();
 //
-//  BOOST_CHECK_EQUAL(m_faces.size(), 3);
+//  BOOST_CHECK_EQUAL(faces.size(), 3);
 //
 //
-//  m_face2->sendInterest(interest1);
+//  face2->sendInterest(interest1);
 //  abortEvent =
 //  scheduler.scheduleEvent(time::seconds(1),
 //                          bind(&EndToEndFixture::abortTestCase, this,
 //                               "UdpChannel error: cannot send or receive Interest/Data packets"));
-//  m_limitedIoRemaining = 1;
+//  limitedIoRemaining = 1;
 //  g_io.run();
 //  g_io.reset();
 //  scheduler.cancelEvent(abortEvent);
 //
-//  BOOST_CHECK_EQUAL(m_faces.size(), 4);
+//  BOOST_CHECK_EQUAL(faces.size(), 4);
 //
-//  m_face3->sendInterest(interest2);
+//  face3->sendInterest(interest2);
 //  abortEvent =
 //  scheduler.scheduleEvent(time::seconds(1),
 //                          bind(&EndToEndFixture::abortTestCase, this,
 //                               "UdpChannel error: cannot send or receive Interest/Data packets"));
-//  m_limitedIoRemaining = 1;
+//  limitedIoRemaining = 1;
 //  g_io.run();
 //  g_io.reset();
 //  scheduler.cancelEvent(abortEvent);
 //
-//  //channel1 should have created 2 faces, one when m_face2 sent an interest, one when m_face3 sent an interest
-//  BOOST_CHECK_EQUAL(m_faces.size(), 5);
+//  //channel1 should have created 2 faces, one when face2 sent an interest, one when face3 sent an interest
+//  BOOST_CHECK_EQUAL(faces.size(), 5);
 //  BOOST_CHECK_THROW(channel1->listen(bind(&EndToEndFixture::channel_onFaceCreated,
 //                                          this,
 //                                          _1),
@@ -798,24 +800,24 @@
                     bind(&EndToEndFixture::channel2_onFaceCreated, this, _1),
                     bind(&EndToEndFixture::channel2_onConnectFailed, this, _1));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot connect or cannot accept connection");
 
   BOOST_CHECK_EQUAL(channel2->size(), 1);
 
-  BOOST_CHECK(static_cast<bool>(m_face2));
+  BOOST_CHECK(static_cast<bool>(face2));
 
   // Face::close must be invoked during io run to be counted as an op
-  scheduler::schedule(time::milliseconds(100), bind(&Face::close, m_face2));
+  scheduler::schedule(time::milliseconds(100), bind(&Face::close, face2));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_OPS,
                       "FaceClosing error: cannot properly close faces");
 
-  BOOST_CHECK(!static_cast<bool>(m_face2));
+  BOOST_CHECK(!static_cast<bool>(face2));
 
   BOOST_CHECK_EQUAL(channel2->size(), 0);
 }
-  
+
 BOOST_FIXTURE_TEST_CASE(ClosingIdleFace, EndToEndFixture)
 {
   Interest interest1("ndn:/TpnzGvW9R");
@@ -834,55 +836,55 @@
   channel2->connect("127.0.0.1", "20070",
                     bind(&EndToEndFixture::channel2_onFaceCreated, this, _1),
                     bind(&EndToEndFixture::channel2_onConnectFailed, this, _1));
-  
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_OPS,
+
+  BOOST_CHECK_MESSAGE(limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot connect or cannot accept connection");
 
-  m_face2->sendInterest(interest1);
-  BOOST_CHECK(!m_face2->isOnDemand());
+  face2->sendInterest(interest1);
+  BOOST_CHECK(!face2->isOnDemand());
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2,//1 send + 1 listen return
+  BOOST_CHECK_MESSAGE(limitedIo.run(2,//1 send + 1 listen return
                                       time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
-  
-  BOOST_CHECK_EQUAL(m_faces.size(), 2);
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(2)) == LimitedIo::EXCEED_TIME,
+
+  BOOST_CHECK_EQUAL(faces.size(), 2);
+  BOOST_CHECK_MESSAGE(limitedIo.run(1, time::seconds(2)) == LimitedIo::EXCEED_TIME,
                       "Idle face should be still open because has been used recently");
-  BOOST_CHECK_EQUAL(m_faces.size(), 2);
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_EQUAL(faces.size(), 2);
+  BOOST_CHECK_MESSAGE(limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_OPS,
                       "Closing idle face error: face should be closed by now");
-  
+
   //the face on listen should be closed now
   BOOST_CHECK_EQUAL(channel1->size(), 0);
-  //checking that m_face2 has not been closed
+  //checking that face2 has not been closed
   BOOST_CHECK_EQUAL(channel2->size(), 1);
-  BOOST_REQUIRE(static_cast<bool>(m_face2));
-  
-  m_face2->sendInterest(interest2);
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2,//1 send + 1 listen return
+  BOOST_REQUIRE(static_cast<bool>(face2));
+
+  face2->sendInterest(interest2);
+  BOOST_CHECK_MESSAGE(limitedIo.run(2,//1 send + 1 listen return
                                       time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot send or receive Interest/Data packets");
   //channel1 should have created a new face by now
   BOOST_CHECK_EQUAL(channel1->size(), 1);
   BOOST_CHECK_EQUAL(channel2->size(), 1);
-  BOOST_REQUIRE(static_cast<bool>(m_face1));
-  BOOST_CHECK(m_face1->isOnDemand());
-  
+  BOOST_REQUIRE(static_cast<bool>(face1));
+  BOOST_CHECK(face1->isOnDemand());
+
   channel1->connect("127.0.0.1", "20071",
                     bind(&EndToEndFixture::channel1_onFaceCreatedNoCheck, this, _1),
                     bind(&EndToEndFixture::channel1_onConnectFailed, this, _1));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1,//1 connect
+  BOOST_CHECK_MESSAGE(limitedIo.run(1,//1 connect
                                       time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UdpChannel error: cannot connect");
 
-  BOOST_CHECK(!m_face1->isOnDemand());
-  
-  //the connect should have set m_face1 as permanent face,
+  BOOST_CHECK(!face1->isOnDemand());
+
+  //the connect should have set face1 as permanent face,
   //but it shouln't have created any additional faces
   BOOST_CHECK_EQUAL(channel1->size(), 1);
   BOOST_CHECK_EQUAL(channel2->size(), 1);
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_TIME,
+  BOOST_CHECK_MESSAGE(limitedIo.run(1, time::seconds(4)) == LimitedIo::EXCEED_TIME,
                       "Idle face should be still open because it's permanent now");
   //both faces are permanent, nothing should have changed
   BOOST_CHECK_EQUAL(channel1->size(), 1);
diff --git a/tests/face/unix-stream.cpp b/tests/face/unix-stream.cpp
index da474f6..2c7c177 100644
--- a/tests/face/unix-stream.cpp
+++ b/tests/face/unix-stream.cpp
@@ -5,7 +5,6 @@
  */
 
 #include "face/unix-stream-factory.hpp"
-#include <ndn-cpp-dev/security/key-chain.hpp>
 
 #include "tests/test-common.hpp"
 #include "tests/core/limited-io.hpp"
@@ -44,20 +43,20 @@
   {
     BOOST_CHECK_MESSAGE(!error, error.message());
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   channel1_onFaceCreated(const shared_ptr<Face>& newFace)
   {
-    BOOST_CHECK(!static_cast<bool>(m_face1));
-    m_face1 = static_pointer_cast<UnixStreamFace>(newFace);
-    m_face1->onReceiveInterest +=
+    BOOST_CHECK(!static_cast<bool>(face1));
+    face1 = static_pointer_cast<UnixStreamFace>(newFace);
+    face1->onReceiveInterest +=
       bind(&EndToEndFixture::face1_onReceiveInterest, this, _1);
-    m_face1->onReceiveData +=
+    face1->onReceiveData +=
       bind(&EndToEndFixture::face1_onReceiveData, this, _1);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
@@ -65,47 +64,47 @@
   {
     BOOST_CHECK_MESSAGE(false, reason);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face1_onReceiveInterest(const Interest& interest)
   {
-    m_face1_receivedInterests.push_back(interest);
+    face1_receivedInterests.push_back(interest);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face1_onReceiveData(const Data& data)
   {
-    m_face1_receivedDatas.push_back(data);
+    face1_receivedDatas.push_back(data);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face2_onReceiveInterest(const Interest& interest)
   {
-    m_face2_receivedInterests.push_back(interest);
+    face2_receivedInterests.push_back(interest);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   face2_onReceiveData(const Data& data)
   {
-    m_face2_receivedDatas.push_back(data);
+    face2_receivedDatas.push_back(data);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
   channel_onFaceCreated(const shared_ptr<Face>& newFace)
   {
-    m_faces.push_back(static_pointer_cast<UnixStreamFace>(newFace));
+    faces.push_back(static_pointer_cast<UnixStreamFace>(newFace));
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
   void
@@ -113,20 +112,20 @@
   {
     BOOST_CHECK_MESSAGE(false, reason);
 
-    m_limitedIo.afterOp();
+    limitedIo.afterOp();
   }
 
 protected:
-  LimitedIo m_limitedIo;
+  LimitedIo limitedIo;
 
-  shared_ptr<UnixStreamFace> m_face1;
-  std::vector<Interest> m_face1_receivedInterests;
-  std::vector<Data> m_face1_receivedDatas;
-  shared_ptr<UnixStreamFace> m_face2;
-  std::vector<Interest> m_face2_receivedInterests;
-  std::vector<Data> m_face2_receivedDatas;
+  shared_ptr<UnixStreamFace> face1;
+  std::vector<Interest> face1_receivedInterests;
+  std::vector<Data> face1_receivedDatas;
+  shared_ptr<UnixStreamFace> face2;
+  std::vector<Interest> face2_receivedInterests;
+  std::vector<Data> face2_receivedDatas;
 
-  std::list< shared_ptr<UnixStreamFace> > m_faces;
+  std::list< shared_ptr<UnixStreamFace> > faces;
 };
 
 
@@ -143,20 +142,22 @@
   client->async_connect(stream_protocol::endpoint(CHANNEL_PATH1),
                         bind(&EndToEndFixture::client_onConnect, this, _1));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UnixStreamChannel error: cannot connect or cannot accept connection");
 
-  BOOST_REQUIRE(static_cast<bool>(m_face1));
+  BOOST_REQUIRE(static_cast<bool>(face1));
 
-  std::string face1uri = m_face1->getUri().toString();
-  BOOST_CHECK_EQUAL(face1uri.find("unix:///"), 0); // third '/' is the path separator
-  BOOST_CHECK_EQUAL(face1uri.rfind(CHANNEL_PATH1),
-                    face1uri.size() - std::string(CHANNEL_PATH1).size());
+  BOOST_CHECK_EQUAL(face1->getRemoteUri().getScheme(), "fd");
+  BOOST_CHECK_NO_THROW(boost::lexical_cast<int>(face1->getRemoteUri().getHost()));
+  std::string face1localUri = face1->getLocalUri().toString();
+  BOOST_CHECK_EQUAL(face1localUri.find("unix:///"), 0); // third '/' is the path separator
+  BOOST_CHECK_EQUAL(face1localUri.rfind(CHANNEL_PATH1),
+                    face1localUri.size() - std::string(CHANNEL_PATH1).size());
 
-  m_face2 = make_shared<UnixStreamFace>(client);
-  m_face2->onReceiveInterest +=
+  face2 = make_shared<UnixStreamFace>(client);
+  face2->onReceiveInterest +=
     bind(&EndToEndFixture::face2_onReceiveInterest, this, _1);
-  m_face2->onReceiveData +=
+  face2->onReceiveData +=
     bind(&EndToEndFixture::face2_onReceiveData, this, _1);
 
   Interest interest1("ndn:/TpnzGvW9R");
@@ -173,35 +174,35 @@
   data1.setSignature(fakeSignature);
   data2.setSignature(fakeSignature);
 
-  m_face1->sendInterest(interest1);
-  m_face1->sendInterest(interest1);
-  m_face1->sendInterest(interest1);
-  m_face1->sendData    (data1    );
-  m_face2->sendInterest(interest2);
-  m_face2->sendData    (data2    );
-  m_face2->sendData    (data2    );
-  m_face2->sendData    (data2    );
+  face1->sendInterest(interest1);
+  face1->sendInterest(interest1);
+  face1->sendInterest(interest1);
+  face1->sendData    (data1    );
+  face2->sendInterest(interest2);
+  face2->sendData    (data2    );
+  face2->sendData    (data2    );
+  face2->sendData    (data2    );
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(8, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(8, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UnixStreamChannel error: cannot send or receive Interest/Data packets");
 
-  BOOST_REQUIRE_EQUAL(m_face1_receivedInterests.size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face1_receivedDatas    .size(), 3);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedInterests.size(), 3);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedDatas    .size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 3);
+  BOOST_REQUIRE_EQUAL(face2_receivedInterests.size(), 3);
+  BOOST_REQUIRE_EQUAL(face2_receivedDatas    .size(), 1);
 
-  BOOST_CHECK_EQUAL(m_face1_receivedInterests[0].getName(), interest2.getName());
-  BOOST_CHECK_EQUAL(m_face1_receivedDatas    [0].getName(), data2.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedInterests[0].getName(), interest1.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedDatas    [0].getName(), data1.getName());
+  BOOST_CHECK_EQUAL(face1_receivedInterests[0].getName(), interest2.getName());
+  BOOST_CHECK_EQUAL(face1_receivedDatas    [0].getName(), data2.getName());
+  BOOST_CHECK_EQUAL(face2_receivedInterests[0].getName(), interest1.getName());
+  BOOST_CHECK_EQUAL(face2_receivedDatas    [0].getName(), data1.getName());
 
-  const FaceCounters& counters1 = m_face1->getCounters();
+  const FaceCounters& counters1 = face1->getCounters();
   BOOST_CHECK_EQUAL(counters1.getInInterest() , 1);
   BOOST_CHECK_EQUAL(counters1.getInData()     , 3);
   BOOST_CHECK_EQUAL(counters1.getOutInterest(), 3);
   BOOST_CHECK_EQUAL(counters1.getOutData()    , 1);
 
-  const FaceCounters& counters2 = m_face2->getCounters();
+  const FaceCounters& counters2 = face2->getCounters();
   BOOST_CHECK_EQUAL(counters2.getInInterest() , 3);
   BOOST_CHECK_EQUAL(counters2.getInData()     , 1);
   BOOST_CHECK_EQUAL(counters2.getOutInterest(), 1);
@@ -221,36 +222,32 @@
   client1->async_connect(stream_protocol::endpoint(CHANNEL_PATH1),
                          bind(&EndToEndFixture::client_onConnect, this, _1));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UnixStreamChannel error: cannot connect or cannot accept connection");
 
-  BOOST_CHECK_EQUAL(m_faces.size(), 1);
+  BOOST_CHECK_EQUAL(faces.size(), 1);
 
   shared_ptr<stream_protocol::socket> client2 =
       make_shared<stream_protocol::socket>(boost::ref(g_io));
   client2->async_connect(stream_protocol::endpoint(CHANNEL_PATH1),
                          bind(&EndToEndFixture::client_onConnect, this, _1));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UnixStreamChannel error: cannot accept multiple connections");
 
-  BOOST_CHECK_EQUAL(m_faces.size(), 2);
+  BOOST_CHECK_EQUAL(faces.size(), 2);
 
   // now close one of the faces
-  m_faces.front()->close();
+  faces.front()->close();
 
   // we should still be able to send/receive with the other one
-  m_face1 = m_faces.back();
-  m_face1->onReceiveInterest +=
-      bind(&EndToEndFixture::face1_onReceiveInterest, this, _1);
-  m_face1->onReceiveData +=
-      bind(&EndToEndFixture::face1_onReceiveData, this, _1);
+  face1 = faces.back();
+  face1->onReceiveInterest += bind(&EndToEndFixture::face1_onReceiveInterest, this, _1);
+  face1->onReceiveData += bind(&EndToEndFixture::face1_onReceiveData, this, _1);
 
-  m_face2 = make_shared<UnixStreamFace>(client2);
-  m_face2->onReceiveInterest +=
-      bind(&EndToEndFixture::face2_onReceiveInterest, this, _1);
-  m_face2->onReceiveData +=
-      bind(&EndToEndFixture::face2_onReceiveData, this, _1);
+  face2 = make_shared<UnixStreamFace>(client2);
+  face2->onReceiveInterest += bind(&EndToEndFixture::face2_onReceiveInterest, this, _1);
+  face2->onReceiveData += bind(&EndToEndFixture::face2_onReceiveData, this, _1);
 
   Interest interest1("ndn:/TpnzGvW9R");
   Data     data1    ("ndn:/KfczhUqVix");
@@ -266,23 +263,23 @@
   data1.setSignature(fakeSignature);
   data2.setSignature(fakeSignature);
 
-  m_face1->sendInterest(interest1);
-  m_face1->sendData    (data1    );
-  m_face2->sendInterest(interest2);
-  m_face2->sendData    (data2    );
+  face1->sendInterest(interest1);
+  face1->sendData    (data1    );
+  face2->sendInterest(interest2);
+  face2->sendData    (data2    );
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(4, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(4, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UnixStreamChannel error: cannot send or receive Interest/Data packets");
 
-  BOOST_REQUIRE_EQUAL(m_face1_receivedInterests.size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face1_receivedDatas    .size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedInterests.size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedDatas    .size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 1);
+  BOOST_REQUIRE_EQUAL(face2_receivedInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face2_receivedDatas    .size(), 1);
 
-  BOOST_CHECK_EQUAL(m_face1_receivedInterests[0].getName(), interest2.getName());
-  BOOST_CHECK_EQUAL(m_face1_receivedDatas    [0].getName(), data2.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedInterests[0].getName(), interest1.getName());
-  BOOST_CHECK_EQUAL(m_face2_receivedDatas    [0].getName(), data1.getName());
+  BOOST_CHECK_EQUAL(face1_receivedInterests[0].getName(), interest2.getName());
+  BOOST_CHECK_EQUAL(face1_receivedDatas    [0].getName(), data2.getName());
+  BOOST_CHECK_EQUAL(face2_receivedInterests[0].getName(), interest1.getName());
+  BOOST_CHECK_EQUAL(face2_receivedDatas    [0].getName(), data1.getName());
 }
 
 static inline void
@@ -303,15 +300,15 @@
   client->async_connect(stream_protocol::endpoint(CHANNEL_PATH1),
                         bind(&EndToEndFixture::client_onConnect, this, _1));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UnixStreamChannel error: cannot connect or cannot accept connection");
 
-  BOOST_REQUIRE(static_cast<bool>(m_face1));
+  BOOST_REQUIRE(static_cast<bool>(face1));
 
-  m_face2 = make_shared<UnixStreamFace>(client);
-  m_face2->onReceiveInterest +=
+  face2 = make_shared<UnixStreamFace>(client);
+  face2->onReceiveInterest +=
     bind(&EndToEndFixture::face2_onReceiveInterest, this, _1);
-  m_face2->onReceiveData +=
+  face2->onReceiveData +=
     bind(&EndToEndFixture::face2_onReceiveData, this, _1);
 
   Interest interest1("ndn:/TpnzGvW9R");
@@ -328,44 +325,44 @@
   data1.setSignature(fakeSignature);
   data2.setSignature(fakeSignature);
 
-  m_face1->setLocalControlHeaderFeature(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID);
-  m_face1->setLocalControlHeaderFeature(LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID);
+  face1->setLocalControlHeaderFeature(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID);
+  face1->setLocalControlHeaderFeature(LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID);
 
-  BOOST_CHECK(m_face1->isLocalControlHeaderEnabled(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID));
-  BOOST_CHECK(m_face1->isLocalControlHeaderEnabled(LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID));
+  BOOST_CHECK(face1->isLocalControlHeaderEnabled(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID));
+  BOOST_CHECK(face1->isLocalControlHeaderEnabled(LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID));
 
-  m_face2->setLocalControlHeaderFeature(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID);
-  m_face2->setLocalControlHeaderFeature(LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID);
+  face2->setLocalControlHeaderFeature(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID);
+  face2->setLocalControlHeaderFeature(LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID);
 
-  BOOST_CHECK(m_face2->isLocalControlHeaderEnabled(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID));
-  BOOST_CHECK(m_face2->isLocalControlHeaderEnabled(LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID));
+  BOOST_CHECK(face2->isLocalControlHeaderEnabled(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID));
+  BOOST_CHECK(face2->isLocalControlHeaderEnabled(LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID));
 
   ////////////////////////////////////////////////////////
 
   interest1.setIncomingFaceId(11);
   interest1.setNextHopFaceId(111);
 
-  m_face1->sendInterest(interest1);
+  face1->sendInterest(interest1);
 
   data1.setIncomingFaceId(22);
   data1.getLocalControlHeader().setNextHopFaceId(222);
 
-  m_face1->sendData    (data1);
+  face1->sendData    (data1);
 
   //
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UnixStreamChannel error: cannot send or receive Interest/Data packets");
 
-  BOOST_REQUIRE_EQUAL(m_face2_receivedInterests.size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face2_receivedDatas    .size(), 1);
+  BOOST_REQUIRE_EQUAL(face2_receivedInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face2_receivedDatas    .size(), 1);
 
   // sending allows only IncomingFaceId, receiving allows only NextHopFaceId
-  BOOST_CHECK_EQUAL(m_face2_receivedInterests[0].getLocalControlHeader().hasIncomingFaceId(), false);
-  BOOST_CHECK_EQUAL(m_face2_receivedInterests[0].getLocalControlHeader().hasNextHopFaceId(), false);
+  BOOST_CHECK_EQUAL(face2_receivedInterests[0].getLocalControlHeader().hasIncomingFaceId(), false);
+  BOOST_CHECK_EQUAL(face2_receivedInterests[0].getLocalControlHeader().hasNextHopFaceId(), false);
 
-  BOOST_CHECK_EQUAL(m_face2_receivedDatas[0].getLocalControlHeader().hasIncomingFaceId(), false);
-  BOOST_CHECK_EQUAL(m_face2_receivedDatas[0].getLocalControlHeader().hasNextHopFaceId(), false);
+  BOOST_CHECK_EQUAL(face2_receivedDatas[0].getLocalControlHeader().hasIncomingFaceId(), false);
+  BOOST_CHECK_EQUAL(face2_receivedDatas[0].getLocalControlHeader().hasNextHopFaceId(), false);
 
   ////////////////////////////////////////////////////////
 
@@ -388,18 +385,18 @@
   client->async_send(interestWithHeader, bind(&noOp));
   client->async_send(dataWithHeader, bind(&noOp));
 
-  BOOST_CHECK_MESSAGE(m_limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
+  BOOST_CHECK_MESSAGE(limitedIo.run(2, time::seconds(1)) == LimitedIo::EXCEED_OPS,
                       "UnixStreamChannel error: cannot send or receive Interest/Data packets");
 
-  BOOST_REQUIRE_EQUAL(m_face1_receivedInterests.size(), 1);
-  BOOST_REQUIRE_EQUAL(m_face1_receivedDatas    .size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedInterests.size(), 1);
+  BOOST_REQUIRE_EQUAL(face1_receivedDatas    .size(), 1);
 
-  BOOST_CHECK_EQUAL(m_face1_receivedInterests[0].getLocalControlHeader().hasIncomingFaceId(), false);
-  BOOST_CHECK_EQUAL(m_face1_receivedInterests[0].getLocalControlHeader().hasNextHopFaceId(), true);
-  BOOST_CHECK_EQUAL(m_face1_receivedInterests[0].getNextHopFaceId(), 111);
+  BOOST_CHECK_EQUAL(face1_receivedInterests[0].getLocalControlHeader().hasIncomingFaceId(), false);
+  BOOST_CHECK_EQUAL(face1_receivedInterests[0].getLocalControlHeader().hasNextHopFaceId(), true);
+  BOOST_CHECK_EQUAL(face1_receivedInterests[0].getNextHopFaceId(), 111);
 
-  BOOST_CHECK_EQUAL(m_face1_receivedDatas[0].getLocalControlHeader().hasIncomingFaceId(), false);
-  BOOST_CHECK_EQUAL(m_face1_receivedDatas[0].getLocalControlHeader().hasNextHopFaceId(), false);
+  BOOST_CHECK_EQUAL(face1_receivedDatas[0].getLocalControlHeader().hasIncomingFaceId(), false);
+  BOOST_CHECK_EQUAL(face1_receivedDatas[0].getLocalControlHeader().hasNextHopFaceId(), false);
 }
 
 BOOST_AUTO_TEST_SUITE_END()
