diff --git a/src/sync-digest.cc b/src/sync-digest.cc
index 6f41d3d..19ec240 100644
--- a/src/sync-digest.cc
+++ b/src/sync-digest.cc
@@ -41,7 +41,6 @@
 
 using namespace boost;
 using namespace boost::archive::iterators;
-using namespace std;
 
 // Other options: VP_md2, EVP_md5, EVP_sha, EVP_sha1, EVP_sha256, EVP_dss, EVP_dss1, EVP_mdc2, EVP_ripemd160
 #define HASH_FUNCTION EVP_sha256
@@ -95,7 +94,7 @@
   }
 };
 
-typedef transform_width<transform_iterator<hex_to_4_bit<string::const_iterator::value_type>, string::const_iterator>, 8, 4> string_to_binary;
+typedef transform_width<transform_iterator<hex_to_4_bit<std::string::const_iterator::value_type>, std::string::const_iterator>, 8, 4> string_to_binary;
 
 namespace Sync {
 
@@ -224,7 +223,7 @@
 {
   BOOST_ASSERT (!digest.m_buffer.empty ());
   
-  ostreambuf_iterator<char> out_it (os); // ostream iterator
+  std::ostreambuf_iterator<char> out_it (os); // ostream iterator
   // need to encode to base64
   copy (string_from_binary (digest.m_buffer.begin ()),
         string_from_binary (digest.m_buffer.end ()),
@@ -236,7 +235,7 @@
 std::istream &
 operator >> (std::istream &is, Digest &digest)
 {
-  string str;
+  std::string str;
   is >> str; // read string first
 
   if (str.size () == 0)
diff --git a/src/sync-interest-table.cc b/src/sync-interest-table.cc
index 415b641..fc1d3bf 100644
--- a/src/sync-interest-table.cc
+++ b/src/sync-interest-table.cc
@@ -22,7 +22,6 @@
 
 #include "sync-interest-table.h"
 #include "sync-logging.h"
-using namespace std;
 
 INIT_LOGGER ("SyncInterestTable");
 
@@ -54,7 +53,7 @@
 }
 
 bool
-SyncInterestTable::insert (DigestConstPtr digest, const string &name, bool unknownState/*=false*/)
+SyncInterestTable::insert (DigestConstPtr digest, const std::string& name, bool unknownState/*=false*/)
 {
   bool existent = false;
   
@@ -76,7 +75,7 @@
 }
 
 bool
-SyncInterestTable::remove (const string &name)
+SyncInterestTable::remove (const std::string& name)
 {
   InterestContainer::index<named>::type::iterator item = m_table.get<named> ().find (name);
   if (item != m_table.get<named> ().end ())
diff --git a/src/sync-logic.cc b/src/sync-logic.cc
index 617830b..56692e5 100644
--- a/src/sync-logic.cc
+++ b/src/sync-logic.cc
@@ -31,7 +31,6 @@
 #include <boost/lexical_cast.hpp>
 #include <vector>
 
-using namespace std;
 using namespace ndn;
 
 INIT_LOGGER ("SyncLogic");
@@ -89,7 +88,7 @@
   m_reexpressingInterestId = m_scheduler.scheduleEvent (time::seconds (0), // no need to add jitter
                                                         bind (&SyncLogic::sendSyncInterest, this));
 
-  m_instanceId = string("Instance " + boost::lexical_cast<string>(m_instanceCounter++) + " ");
+  m_instanceId = std::string("Instance " + boost::lexical_cast<std::string>(m_instanceCounter++) + " ");
 }
 
 SyncLogic::SyncLogic (const Name& syncPrefix,
@@ -141,8 +140,8 @@
   BOOST_ASSERT (nameLengthDiff > 0);
   BOOST_ASSERT (nameLengthDiff < 3);
   
-  string hash = name.get(-1).toEscapedString();
-  string interestType;
+  std::string hash = name.get(-1).toEscapedString();
+  std::string interestType;
   
   if(nameLengthDiff == 1)
     interestType = "normal";
@@ -152,7 +151,7 @@
   _LOG_DEBUG_ID (hash << ", " << interestType);
 
   DigestPtr digest = boost::make_shared<Digest> ();
-  istringstream is (hash);
+  std::istringstream is (hash);
   is >> *digest;
 
   return make_tuple (digest, interestType);
@@ -174,7 +173,7 @@
         return;
 
       DigestConstPtr digest;
-      string type;
+      std::string type;
       tie (digest, type) = convertNameToDigestAndType (name);
 
       if (type == "normal") // kind of ineffective...
@@ -195,7 +194,7 @@
 }
 
 void
-SyncLogic::onSyncRegisterFailed(const Name& prefix, const string& msg)
+SyncLogic::onSyncRegisterFailed(const Name& prefix, const std::string& msg)
 {
   _LOG_DEBUG_ID("Sync prefix registration failed! " << msg);
 }
@@ -232,7 +231,7 @@
       _LOG_DEBUG_ID ("<< D " << name);
   
       DigestConstPtr digest;
-      string type;
+      std::string type;
       tie (digest, type) = convertNameToDigestAndType (name);
 
       if (type == "normal")
@@ -338,7 +337,7 @@
       }
       msg >> diff;
 
-      vector<MissingDataInfo> v;
+      std::vector<MissingDataInfo> v;
       BOOST_FOREACH (LeafConstPtr leaf, diff.getLeaves().get<ordered>())
         {
           DiffLeafConstPtr diffLeaf = boost::dynamic_pointer_cast<const DiffLeaf> (leaf);
@@ -372,15 +371,15 @@
                   {
                     MissingDataInfo mdi = {info->toString(), oldSeq, seq};
                     {
-                      ostringstream interestName;
+                      std::ostringstream interestName;
                       interestName << mdi.prefix << "/" << mdi.high.getSession() << "/" << mdi.high.getSeq();
                       _LOG_DEBUG_ID("+++++++++++++++ " + interestName.str());
                     }
                     if (m_perBranch)
                     {
-                       ostringstream interestName;
-                       interestName << mdi.prefix << "/" << mdi.high.getSession() << "/" << mdi.high.getSeq();
-                       m_onUpdateBranch(interestName.str());
+                      std::ostringstream interestName;
+                      interestName << mdi.prefix << "/" << mdi.high.getSession() << "/" << mdi.high.getSeq();
+                      m_onUpdateBranch(interestName.str());
                     }
                     else
                     {
@@ -575,7 +574,7 @@
 
   {
     m_outstandingInterestName = m_syncPrefix;
-    ostringstream os;
+    std::ostringstream os;
     os << *m_state->getDigest();
     m_outstandingInterestName.append(os.str());
     _LOG_DEBUG_ID (">> I " << m_outstandingInterestName);
@@ -599,7 +598,7 @@
 void
 SyncLogic::sendSyncRecoveryInterests (DigestConstPtr digest)
 {
-  ostringstream os;
+  std::ostringstream os;
   os << *digest;
   
   Name interestName = m_syncPrefix;
@@ -670,10 +669,10 @@
     }
 }
 
-string
+std::string
 SyncLogic::getRootDigest() 
 {
-  ostringstream os;
+  std::ostringstream os;
   os << *m_state->getDigest();
   return os.str();
 }
@@ -704,7 +703,7 @@
       // do not return forwarder prefix
       if (prefix != forwarderPrefix)
       {
-        m.insert(pair<std::string, bool>(prefix, false));
+        m.insert(std::pair<std::string, bool>(prefix, false));
       }
     }
 
diff --git a/src/sync-socket.cc b/src/sync-socket.cc
index 9c31f79..f5e378f 100644
--- a/src/sync-socket.cc
+++ b/src/sync-socket.cc
@@ -21,7 +21,6 @@
 #include "sync-socket.h"
 #include "sync-logging.h"
 
-using namespace std;
 using namespace ndn;
 
 INIT_LOGGER ("SyncSocket");
@@ -107,8 +106,8 @@
 
   Name dataName;
   dataName.append(m_dataPrefix)
-    .append(boost::lexical_cast<string>(m_dataSession))
-    .append(boost::lexical_cast<string>(sequence));
+    .append(boost::lexical_cast<std::string>(m_dataSession))
+    .append(boost::lexical_cast<std::string>(sequence));
   if(isCert)
     dataName.append("INTRO-CERT");
   data->setName(dataName);
@@ -118,8 +117,8 @@
     {
       Name wrappedName;
       wrappedName.append(m_routableDataPrefix)
-        .append(boost::lexical_cast<string>(m_dataSession))
-        .append(boost::lexical_cast<string>(sequence));
+        .append(boost::lexical_cast<std::string>(m_dataSession))
+        .append(boost::lexical_cast<std::string>(sequence));
 
       Data wrappedData(wrappedName);
       wrappedData.setContent(data->wireEncode());
@@ -141,7 +140,7 @@
 SyncSocket::fetchData(const Name& prefix, const SeqNo& seq, const OnDataValidated& dataCallback, int retry)
 {
   Name interestName = prefix;
-  interestName.append(boost::lexical_cast<string>(seq.getSession())).append(boost::lexical_cast<string>(seq.getSeq()));
+  interestName.append(boost::lexical_cast<std::string>(seq.getSession())).append(boost::lexical_cast<std::string>(seq.getSeq()));
 
   ndn::Interest interest(interestName);
   interest.setMustBeFresh(true);
diff --git a/src/sync-validator.cc b/src/sync-validator.cc
index e1d40d8..f2c05bb 100644
--- a/src/sync-validator.cc
+++ b/src/sync-validator.cc
@@ -14,12 +14,13 @@
 #include <queue>
 
 using namespace ndn;
-using namespace std;
 
 INIT_LOGGER ("SyncValidator");
 
 namespace Sync {
 
+using ndn::shared_ptr;
+
 const shared_ptr<CertificateCache> SyncValidator::DefaultCertificateCache = shared_ptr<CertificateCache>();
 const shared_ptr<SecRuleRelative> SyncValidator::DefaultDataRule = shared_ptr<SecRuleRelative>();
 
@@ -56,7 +57,7 @@
 void
 SyncValidator::deriveTrustNodes()
 {
-  queue<Name> nodeQueue;
+  std::queue<Name> nodeQueue;
 
   // Clear existing trust nodes.
   m_trustedNodes.clear();
@@ -151,7 +152,7 @@
       catch(SignatureSha256WithRsa::Error& e)
         {
           return onValidationFailed(data.shared_from_this(), 
-                                    "Not SignatureSha256WithRsa signature: " + string(e.what()));
+                                    "Not SignatureSha256WithRsa signature: " + std::string(e.what()));
         }
       catch(KeyLocator::Error& e)
         {
@@ -194,13 +195,13 @@
   catch(IntroCertificate::Error& e)
     {
       return onValidationFailed(data, 
-                                "Intro cert decoding error: " + string(e.what()));
+                                "Intro cert decoding error: " + std::string(e.what()));
     }
 }
 
 void
 SyncValidator::onCertificateValidationFailed(const shared_ptr<const Data>& signCertificate, 
-                                             const string& failureInfo,
+                                             const std::string& failureInfo,
                                              const shared_ptr<const Data>& data, 
                                              const OnDataValidationFailed& onValidationFailed)
 {
@@ -223,7 +224,7 @@
 }
 
 void
-SyncValidator::onCertRegisterFailed(const Name& prefix, const string& msg)
+SyncValidator::onCertRegisterFailed(const Name& prefix, const std::string& msg)
 {
   _LOG_DEBUG("SyncValidator::onCertRegisterFailed: " << msg);
 }
