diff --git a/tests/test-encode-decode-data.cpp b/tests/test-encode-decode-data.cpp
index 7521221..70cf81c 100644
--- a/tests/test-encode-decode-data.cpp
+++ b/tests/test-encode-decode-data.cpp
@@ -237,24 +237,20 @@
     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());
-    KeyChain keyChain(shared_ptr<IdentityManager>(new IdentityManager(identityStorage, privateKeyStorage)));
+    KeyChain keyChain(shared_ptr<IdentityManager>
+      (new IdentityManager(make_shared<MemoryIdentityStorage>(), privateKeyStorage)));
     
     // Initialize the storage.
-    Name identityName("/testname");
-    Name keyName = Name(identityName).append(Name("DSK-123"));
+    Name keyName("/testname/DSK-123");
     Name certificateName = Name(keyName).append(Name("ID-CERT/0"));
-    identityStorage->addIdentity(identityName);
-    identityStorage->setDefaultIdentity(identityName);
     privateKeyStorage->setKeyPairForKeyName
       (keyName, DEFAULT_PUBLIC_KEY_DER, sizeof(DEFAULT_PUBLIC_KEY_DER), DEFAULT_PRIVATE_KEY_DER, sizeof(DEFAULT_PRIVATE_KEY_DER));
     
     keyChain.signData(*freshData, certificateName);
     cout << endl << "Freshly-signed Data:" << endl;
     dumpData(*freshData);
-    Blob freshEncoding = freshData->wireEncode();
-
+    
     keyChain.verifyData(freshData, bind(&onVerified, "Freshly-signed Data", _1), bind(&onVerifyFailed, "Freshly-signed Data"));
   } catch (std::exception& e) {
     cout << "exception: " << e.what() << endl;
diff --git a/tests/test-publish-async.cpp b/tests/test-publish-async.cpp
index 749c7c1..467780e 100644
--- a/tests/test-publish-async.cpp
+++ b/tests/test-publish-async.cpp
@@ -105,16 +105,15 @@
 {
   try {
     Face face("localhost");
-    
-    shared_ptr<MemoryIdentityStorage> identityStorage(new MemoryIdentityStorage());
+        
     shared_ptr<MemoryPrivateKeyStorage> privateKeyStorage(new MemoryPrivateKeyStorage());
-    KeyChain keyChain(shared_ptr<IdentityManager>(new IdentityManager(identityStorage, privateKeyStorage)));
+    KeyChain keyChain(shared_ptr<IdentityManager>
+      (new IdentityManager(make_shared<MemoryIdentityStorage>(), privateKeyStorage)));
     keyChain.setFace(&face);
     
     // Initialize the storage.
     Name keyName("/testname/DSK-123");
-    Name certificateName = keyName;
-    certificateName.append(Name("ID-CERT/0"));
+    Name certificateName = Name(keyName).append(Name("ID-CERT/0"));
     privateKeyStorage->setKeyPairForKeyName
       (keyName, DEFAULT_PUBLIC_KEY_DER, sizeof(DEFAULT_PUBLIC_KEY_DER), DEFAULT_PRIVATE_KEY_DER, sizeof(DEFAULT_PRIVATE_KEY_DER));
    
