diff --git a/tests/test-encode-decode-benchmark.cpp b/tests/test-encode-decode-benchmark.cpp
index 89beaf6..73a0e75 100644
--- a/tests/test-encode-decode-benchmark.cpp
+++ b/tests/test-encode-decode-benchmark.cpp
@@ -25,7 +25,6 @@
 
 using namespace std;
 using namespace ndn;
-using namespace ndn::ptr_lib;
 
 static double
 getNowSeconds()
@@ -141,11 +140,11 @@
   Blob finalBlockId((uint8_t*)"\x00", 1);
   
   // Initialize the KeyChain storage in case useCrypto is true.
-  shared_ptr<MemoryIdentityStorage> identityStorage(new MemoryIdentityStorage());
-  shared_ptr<MemoryPrivateKeyStorage> privateKeyStorage(new MemoryPrivateKeyStorage());
+  ptr_lib::shared_ptr<MemoryIdentityStorage> identityStorage(new MemoryIdentityStorage());
+  ptr_lib::shared_ptr<MemoryPrivateKeyStorage> privateKeyStorage(new MemoryPrivateKeyStorage());
   KeyChain keyChain
-    (make_shared<IdentityManager>(identityStorage, privateKeyStorage), 
-     make_shared<SelfVerifyPolicyManager>(identityStorage.get()));
+    (ptr_lib::make_shared<IdentityManager>(identityStorage, privateKeyStorage), 
+     ptr_lib::make_shared<SelfVerifyPolicyManager>(identityStorage.get()));
   Name keyName("/testname/DSK-123");
   Name certificateName = keyName.getSubName(0, keyName.size() - 1).append("KEY").append
     (keyName.get(keyName.size() - 1)).append("ID-CERT").append("0");
@@ -193,13 +192,13 @@
 }
 
 static void 
-onVerified(const shared_ptr<Data>& data)
+onVerified(const ptr_lib::shared_ptr<Data>& data)
 {
   // Do nothing since we expect it to verify.
 }
 
 static void 
-onVerifyFailed(const shared_ptr<Data>& data)
+onVerifyFailed(const ptr_lib::shared_ptr<Data>& data)
 {
   cout << "Signature verification: FAILED" << endl;
 }
@@ -215,18 +214,18 @@
 benchmarkDecodeDataSecondsCpp(int nIterations, bool useCrypto, const Blob& encoding)
 {
   // Initialize the KeyChain storage in case useCrypto is true.
-  shared_ptr<MemoryIdentityStorage> identityStorage(new MemoryIdentityStorage());
-  shared_ptr<MemoryPrivateKeyStorage> privateKeyStorage(new MemoryPrivateKeyStorage());
+  ptr_lib::shared_ptr<MemoryIdentityStorage> identityStorage(new MemoryIdentityStorage());
+  ptr_lib::shared_ptr<MemoryPrivateKeyStorage> privateKeyStorage(new MemoryPrivateKeyStorage());
   KeyChain keyChain
-    (make_shared<IdentityManager>(identityStorage, privateKeyStorage), 
-     make_shared<SelfVerifyPolicyManager>(identityStorage.get()));
+    (ptr_lib::make_shared<IdentityManager>(identityStorage, privateKeyStorage), 
+     ptr_lib::make_shared<SelfVerifyPolicyManager>(identityStorage.get()));
   Name keyName("/testname/DSK-123");
   identityStorage->addKey(keyName, KEY_TYPE_RSA, Blob(DEFAULT_PUBLIC_KEY_DER, sizeof(DEFAULT_PUBLIC_KEY_DER)));
 
   size_t nameSize = 0;
   double start = getNowSeconds();
   for (int i = 0; i < nIterations; ++i) {
-    shared_ptr<Data> data(new Data());
+    ptr_lib::shared_ptr<Data> data(new Data());
     data->wireDecode(*encoding);
     
     if (useCrypto)
@@ -430,13 +429,13 @@
 {
   Blob encoding;
   {
-    int nIterations = useCrypto ? 20000 : 2000000;
+    int nIterations = useCrypto ? 20000 : 100;
     double duration = benchmarkEncodeDataSecondsCpp(nIterations, useComplex, useCrypto, encoding);
     cout << "Encode " << (useComplex ? "complex" : "simple ") << " data C++: Crypto? " << (useCrypto ? "yes" : "no ") 
          << ", Duration sec, Hz: " << duration << ", " << (nIterations / duration) << endl;  
   }
   {
-    int nIterations = useCrypto ? 100000 : 500000;
+    int nIterations = useCrypto ? 100000 : 100;
     double duration = benchmarkDecodeDataSecondsCpp(nIterations, useCrypto, encoding);
     cout << "Decode " << (useComplex ? "complex" : "simple ") << " data C++: Crypto? " << (useCrypto ? "yes" : "no ") 
          << ", Duration sec, Hz: " << duration << ", " << (nIterations / duration) << endl;  
diff --git a/tests/test-encode-decode-data.cpp b/tests/test-encode-decode-data.cpp
index 5791a84..41fefcd 100644
--- a/tests/test-encode-decode-data.cpp
+++ b/tests/test-encode-decode-data.cpp
@@ -18,7 +18,6 @@
 
 using namespace std;
 using namespace ndn;
-using namespace ndn::ptr_lib;
 using namespace ndn::func_lib;
 #if NDN_CPP_HAVE_STD_FUNCTION
 // In the std library, the placeholders are in a different namespace than boost.                                                           
@@ -208,12 +207,12 @@
   }
 }
 
-static void onVerified(const char *prefix, const shared_ptr<Data>& data)
+static void onVerified(const char *prefix, const ptr_lib::shared_ptr<Data>& data)
 {
   cout << prefix << " signature verification: VERIFIED" << endl;
 }
 
-static void onVerifyFailed(const char *prefix, const shared_ptr<Data>& data)
+static void onVerifyFailed(const char *prefix, const ptr_lib::shared_ptr<Data>& data)
 {
   cout << prefix << " signature verification: FAILED" << endl;
 }
@@ -221,28 +220,28 @@
 int main(int argc, char** argv)
 {
   try {
-    shared_ptr<Data> data(new Data());
+    ptr_lib::shared_ptr<Data> data(new Data());
     data->wireDecode(Data1, sizeof(Data1));
     cout << "Decoded Data:" << endl;
     dumpData(*data);
     
     Blob encoding = data->wireEncode();
     
-    shared_ptr<Data> reDecodedData(new Data());
+    ptr_lib::shared_ptr<Data> reDecodedData(new Data());
     reDecodedData->wireDecode(*encoding);
     cout << endl << "Re-decoded Data:" << endl;
     dumpData(*reDecodedData);
   
-    shared_ptr<Data> freshData(new Data(Name("/ndn/abc")));
+    ptr_lib::shared_ptr<Data> freshData(new Data(Name("/ndn/abc")));
     const uint8_t freshContent[] = "SUCCESS!";
     freshData->setContent(freshContent, sizeof(freshContent) - 1);
     freshData->getMetaInfo().setTimestampMilliseconds(time(NULL) * 1000.0);
     
-    shared_ptr<MemoryIdentityStorage> identityStorage(new MemoryIdentityStorage());
-    shared_ptr<MemoryPrivateKeyStorage> privateKeyStorage(new MemoryPrivateKeyStorage());
+    ptr_lib::shared_ptr<MemoryIdentityStorage> identityStorage(new MemoryIdentityStorage());
+    ptr_lib::shared_ptr<MemoryPrivateKeyStorage> privateKeyStorage(new MemoryPrivateKeyStorage());
     KeyChain keyChain
-      (make_shared<IdentityManager>(identityStorage, privateKeyStorage), 
-       make_shared<SelfVerifyPolicyManager>(identityStorage.get()));
+      (ptr_lib::make_shared<IdentityManager>(identityStorage, privateKeyStorage), 
+       ptr_lib::make_shared<SelfVerifyPolicyManager>(identityStorage.get()));
     
     // Initialize the storage.
     Name keyName("/testname/DSK-123");
diff --git a/tests/test-get-async.cpp b/tests/test-get-async.cpp
index 46e9920..67a0348 100644
--- a/tests/test-get-async.cpp
+++ b/tests/test-get-async.cpp
@@ -12,7 +12,6 @@
 
 using namespace std;
 using namespace ndn;
-using namespace ndn::ptr_lib;
 using namespace ndn::func_lib;
 #if NDN_CPP_HAVE_STD_FUNCTION
 // In the std library, the placeholders are in a different namespace than boost.
@@ -26,7 +25,7 @@
     callbackCount_ = 0;
   }
   
-  void onData(const shared_ptr<const Interest>& interest, const shared_ptr<Data>& data)
+  void onData(const ptr_lib::shared_ptr<const Interest>& interest, const ptr_lib::shared_ptr<Data>& data)
   {
     ++callbackCount_;
     cout << "Got data packet with name " << data->getName().to_uri() << endl;
@@ -35,7 +34,7 @@
     cout << endl;  
   }
 
-  void onTimeout(const shared_ptr<const Interest>& interest)
+  void onTimeout(const ptr_lib::shared_ptr<const Interest>& interest)
   {
     ++callbackCount_;
     cout << "Time out for interest " << interest->getName().toUri() << endl;    
diff --git a/tests/test-publish-async.cpp b/tests/test-publish-async.cpp
index 6e2c731..bdea5b0 100644
--- a/tests/test-publish-async.cpp
+++ b/tests/test-publish-async.cpp
@@ -17,7 +17,6 @@
 
 using namespace std;
 using namespace ndn;
-using namespace ndn::ptr_lib;
 using namespace ndn::func_lib;
 
 static uint8_t DEFAULT_PUBLIC_KEY_DER[] = {
@@ -75,7 +74,7 @@
   
   // onInterest.
   void operator()
-     (const shared_ptr<const Name>& prefix, const shared_ptr<const Interest>& interest, Transport& transport,
+     (const ptr_lib::shared_ptr<const Name>& prefix, const ptr_lib::shared_ptr<const Interest>& interest, Transport& transport,
       uint64_t registeredPrefixId) 
   {
     ++responseCount_;
@@ -93,7 +92,7 @@
   }
   
   // onRegisterFailed.
-  void operator()(const shared_ptr<const Name>& prefix)
+  void operator()(const ptr_lib::shared_ptr<const Name>& prefix)
   {
     ++responseCount_;
     cout << "Register failed for prefix " << prefix->toUri() << endl;
@@ -109,10 +108,10 @@
   try {
     Face face("localhost");
         
-    shared_ptr<MemoryIdentityStorage> identityStorage(new MemoryIdentityStorage());
-    shared_ptr<MemoryPrivateKeyStorage> privateKeyStorage(new MemoryPrivateKeyStorage());
+    ptr_lib::shared_ptr<MemoryIdentityStorage> identityStorage(new MemoryIdentityStorage());
+    ptr_lib::shared_ptr<MemoryPrivateKeyStorage> privateKeyStorage(new MemoryPrivateKeyStorage());
     KeyChain keyChain
-      (make_shared<IdentityManager>(identityStorage, privateKeyStorage), make_shared<NoVerifyPolicyManager>());
+      (ptr_lib::make_shared<IdentityManager>(identityStorage, privateKeyStorage), ptr_lib::shared_ptr<NoVerifyPolicyManager>(new NoVerifyPolicyManager()));
     keyChain.setFace(&face);
     
     // Initialize the storage.
