diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index 6809e6c..0408f03 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.cpp
@@ -47,11 +47,9 @@
     return face;
 
   shared_ptr<boost::asio::posix::stream_descriptor> socket =
-    make_shared<boost::asio::posix::stream_descriptor>(boost::ref(getGlobalIoService()));
+    make_shared<boost::asio::posix::stream_descriptor>(ref(getGlobalIoService()));
 
-  face = make_shared<EthernetFace>(boost::cref(socket),
-                                   boost::cref(interface),
-                                   boost::cref(address));
+  face = make_shared<EthernetFace>(socket, interface, address);
   face->onFail += bind(&EthernetFactory::afterFaceFailed,
                        this, name, address);
   m_multicastFaces[std::make_pair(name, address)] = face;
diff --git a/daemon/face/face.cpp b/daemon/face/face.cpp
index 46dbcf6..75600b4 100644
--- a/daemon/face/face.cpp
+++ b/daemon/face/face.cpp
@@ -40,10 +40,10 @@
   , m_localUri(localUri)
   , m_isOnDemand(false)
 {
-  onReceiveInterest += bind(&increaseCounter, boost::ref(m_counters.getNInInterests()));
-  onReceiveData     += bind(&increaseCounter, boost::ref(m_counters.getNInDatas()));
-  onSendInterest    += bind(&increaseCounter, boost::ref(m_counters.getNOutInterests()));
-  onSendData        += bind(&increaseCounter, boost::ref(m_counters.getNOutDatas()));
+  onReceiveInterest += bind(&increaseCounter, ref(m_counters.getNInInterests()));
+  onReceiveData     += bind(&increaseCounter, ref(m_counters.getNInDatas()));
+  onSendInterest    += bind(&increaseCounter, ref(m_counters.getNOutInterests()));
+  onSendData        += bind(&increaseCounter, ref(m_counters.getNOutDatas()));
 }
 
 Face::~Face()
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index 708f36b..cd2fb4f 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -48,7 +48,7 @@
                    const ConnectFailedCallback& onAcceptFailed,
                    int backlog/* = tcp::acceptor::max_connections*/)
 {
-  m_acceptor = make_shared<ip::tcp::acceptor>(boost::ref(getGlobalIoService()));
+  m_acceptor = make_shared<ip::tcp::acceptor>(ref(getGlobalIoService()));
   m_acceptor->open(m_localEndpoint.protocol());
   m_acceptor->set_option(ip::tcp::acceptor::reuse_address(true));
   if (m_localEndpoint.address().is_v6())
@@ -59,7 +59,7 @@
   m_acceptor->listen(backlog);
 
   shared_ptr<ip::tcp::socket> clientSocket =
-    make_shared<ip::tcp::socket>(boost::ref(getGlobalIoService()));
+    make_shared<ip::tcp::socket>(ref(getGlobalIoService()));
   m_acceptor->async_accept(*clientSocket,
                            bind(&TcpChannel::handleSuccessfulAccept, this, _1,
                                 clientSocket,
@@ -81,10 +81,10 @@
   }
 
   shared_ptr<ip::tcp::socket> clientSocket =
-    make_shared<ip::tcp::socket>(boost::ref(getGlobalIoService()));
+    make_shared<ip::tcp::socket>(ref(getGlobalIoService()));
 
   shared_ptr<ndn::monotonic_deadline_timer> connectTimeoutTimer =
-    make_shared<ndn::monotonic_deadline_timer>(boost::ref(getGlobalIoService()));
+    make_shared<ndn::monotonic_deadline_timer>(ref(getGlobalIoService()));
 
   clientSocket->async_connect(remoteEndpoint,
                               bind(&TcpChannel::handleSuccessfulConnect, this, _1,
@@ -104,14 +104,14 @@
                     const time::seconds& timeout/* = time::seconds(4)*/)
 {
   shared_ptr<ip::tcp::socket> clientSocket =
-    make_shared<ip::tcp::socket>(boost::ref(getGlobalIoService()));
+    make_shared<ip::tcp::socket>(ref(getGlobalIoService()));
 
   shared_ptr<ndn::monotonic_deadline_timer> connectTimeoutTimer =
-    make_shared<ndn::monotonic_deadline_timer>(boost::ref(getGlobalIoService()));
+    make_shared<ndn::monotonic_deadline_timer>(ref(getGlobalIoService()));
 
   ip::tcp::resolver::query query(remoteHost, remotePort);
   shared_ptr<ip::tcp::resolver> resolver =
-    make_shared<ip::tcp::resolver>(boost::ref(getGlobalIoService()));
+    make_shared<ip::tcp::resolver>(ref(getGlobalIoService()));
 
   resolver->async_resolve(query,
                           bind(&TcpChannel::handleEndpointResolution, this, _1, _2,
@@ -140,9 +140,9 @@
 
   shared_ptr<Face> face;
   if (socket->local_endpoint().address().is_loopback())
-    face = make_shared<TcpLocalFace>(boost::cref(socket), isOnDemand);
+    face = make_shared<TcpLocalFace>(socket, isOnDemand);
   else
-    face = make_shared<TcpFace>(boost::cref(socket), isOnDemand);
+    face = make_shared<TcpFace>(socket, isOnDemand);
 
   face->onFail += bind(&TcpChannel::afterFaceFailed, this, remoteEndpoint);
 
@@ -178,7 +178,7 @@
 
   // prepare accepting the next connection
   shared_ptr<ip::tcp::socket> clientSocket =
-    make_shared<ip::tcp::socket>(boost::ref(getGlobalIoService()));
+    make_shared<ip::tcp::socket>(ref(getGlobalIoService()));
   m_acceptor->async_accept(*clientSocket,
                            bind(&TcpChannel::handleSuccessfulAccept, this, _1,
                                 clientSocket,
diff --git a/daemon/face/tcp-factory.cpp b/daemon/face/tcp-factory.cpp
index 07d7a86..bb08313 100644
--- a/daemon/face/tcp-factory.cpp
+++ b/daemon/face/tcp-factory.cpp
@@ -115,7 +115,7 @@
   if(static_cast<bool>(channel))
     return channel;
 
-  channel = make_shared<TcpChannel>(boost::cref(endpoint));
+  channel = make_shared<TcpChannel>(endpoint);
   m_channels[endpoint] = channel;
   prohibitEndpoint(endpoint);
 
diff --git a/daemon/face/udp-channel.cpp b/daemon/face/udp-channel.cpp
index ca052a2..99d01e3 100644
--- a/daemon/face/udp-channel.cpp
+++ b/daemon/face/udp-channel.cpp
@@ -42,7 +42,7 @@
   ///       We need to check this
   ///       (SO_REUSEADDR doesn't behave uniformly in different OS)
 
-  m_socket = make_shared<ip::udp::socket>(boost::ref(getGlobalIoService()));
+  m_socket = make_shared<ip::udp::socket>(ref(getGlobalIoService()));
   m_socket->open(m_localEndpoint.protocol());
   m_socket->set_option(boost::asio::ip::udp::socket::reuse_address(true));
   if (m_localEndpoint.address().is_v6())
@@ -106,7 +106,7 @@
 
   //creating a new socket for the face that will be created soon
   shared_ptr<ip::udp::socket> clientSocket =
-    make_shared<ip::udp::socket>(boost::ref(getGlobalIoService()));
+    make_shared<ip::udp::socket>(ref(getGlobalIoService()));
 
   clientSocket->open(m_localEndpoint.protocol());
   clientSocket->set_option(ip::udp::socket::reuse_address(true));
@@ -134,7 +134,7 @@
 {
   ip::udp::resolver::query query(remoteHost, remotePort);
   shared_ptr<ip::udp::resolver> resolver =
-  make_shared<ip::udp::resolver>(boost::ref(getGlobalIoService()));
+    make_shared<ip::udp::resolver>(ref(getGlobalIoService()));
 
   resolver->async_resolve(query,
                           bind(&UdpChannel::handleEndpointResolution, this, _1, _2,
@@ -180,7 +180,7 @@
 {
   udp::Endpoint remoteEndpoint = socket->remote_endpoint();
 
-  shared_ptr<UdpFace> face = make_shared<UdpFace>(boost::cref(socket), isOnDemand);
+  shared_ptr<UdpFace> face = make_shared<UdpFace>(socket, isOnDemand);
   face->onFail += bind(&UdpChannel::afterFaceFailed, this, remoteEndpoint);
 
   onFaceCreated(face);
@@ -215,7 +215,7 @@
   }
   else {
     shared_ptr<ip::udp::socket> clientSocket =
-      make_shared<ip::udp::socket>(boost::ref(getGlobalIoService()));
+      make_shared<ip::udp::socket>(ref(getGlobalIoService()));
     clientSocket->open(m_localEndpoint.protocol());
     clientSocket->set_option(ip::udp::socket::reuse_address(true));
     clientSocket->bind(m_localEndpoint);
diff --git a/daemon/face/udp-channel.hpp b/daemon/face/udp-channel.hpp
index f97c3a3..73403aa 100644
--- a/daemon/face/udp-channel.hpp
+++ b/daemon/face/udp-channel.hpp
@@ -124,8 +124,7 @@
    *        associated with any UdpFace
    */
   void
-  newPeer(const boost::system::error_code& error,
-                   std::size_t nBytesReceived);
+  newPeer(const boost::system::error_code& error, std::size_t nBytesReceived);
 
   void
   handleEndpointResolution(const boost::system::error_code& error,
diff --git a/daemon/face/udp-factory.cpp b/daemon/face/udp-factory.cpp
index e97e9bb..470fd5e 100644
--- a/daemon/face/udp-factory.cpp
+++ b/daemon/face/udp-factory.cpp
@@ -148,8 +148,7 @@
                 "create a multicast face");
   }
 
-  channel = make_shared<UdpChannel>(boost::cref(endpoint),
-                                    timeout);
+  channel = make_shared<UdpChannel>(endpoint, timeout);
   m_channels[endpoint] = channel;
   prohibitEndpoint(endpoint);
 
@@ -208,7 +207,7 @@
   }
 
   shared_ptr<ip::udp::socket> clientSocket =
-    make_shared<ip::udp::socket>(boost::ref(getGlobalIoService()));
+    make_shared<ip::udp::socket>(ref(getGlobalIoService()));
 
   clientSocket->open(multicastEndpoint.protocol());
 
@@ -249,7 +248,7 @@
 
   clientSocket->set_option(ip::multicast::enable_loopback(false));
 
-  multicastFace = make_shared<MulticastUdpFace>(boost::cref(clientSocket), localEndpoint);
+  multicastFace = make_shared<MulticastUdpFace>(clientSocket, localEndpoint);
   multicastFace->onFail += bind(&UdpFactory::afterFaceFailed, this, localEndpoint);
 
   m_multicastFaces[localEndpoint] = multicastFace;
@@ -326,8 +325,8 @@
       return;
     }
   }
-  onConnectFailed("No channels available to connect to "
-                  + boost::lexical_cast<std::string>(endpoint));
+  onConnectFailed("No channels available to connect to " +
+                  boost::lexical_cast<std::string>(endpoint));
 }
 
 shared_ptr<UdpChannel>
diff --git a/daemon/face/unix-stream-channel.cpp b/daemon/face/unix-stream-channel.cpp
index efdf700..d64f333 100644
--- a/daemon/face/unix-stream-channel.cpp
+++ b/daemon/face/unix-stream-channel.cpp
@@ -96,7 +96,7 @@
       throw Error(m_endpoint.path() + " already exists and is not a socket file");
     }
 
-  m_acceptor = make_shared<stream_protocol::acceptor>(boost::ref(getGlobalIoService()));
+  m_acceptor = make_shared<stream_protocol::acceptor>(ref(getGlobalIoService()));
   m_acceptor->open();
   m_acceptor->bind(m_endpoint);
   m_acceptor->listen(backlog);
@@ -108,7 +108,7 @@
     }
 
   shared_ptr<stream_protocol::socket> clientSocket =
-    make_shared<stream_protocol::socket>(boost::ref(getGlobalIoService()));
+    make_shared<stream_protocol::socket>(ref(getGlobalIoService()));
 
   m_acceptor->async_accept(*clientSocket,
                            bind(&UnixStreamChannel::handleSuccessfulAccept, this,
@@ -134,7 +134,7 @@
   NFD_LOG_DEBUG("[" << m_endpoint << "] << Incoming connection");
 
   shared_ptr<stream_protocol::socket> clientSocket =
-    make_shared<stream_protocol::socket>(boost::ref(getGlobalIoService()));
+    make_shared<stream_protocol::socket>(ref(getGlobalIoService()));
 
   // prepare accepting the next connection
   m_acceptor->async_accept(*clientSocket,
@@ -142,7 +142,7 @@
                                 boost::asio::placeholders::error, clientSocket,
                                 onFaceCreated, onAcceptFailed));
 
-  shared_ptr<UnixStreamFace> face = make_shared<UnixStreamFace>(boost::cref(socket));
+  shared_ptr<UnixStreamFace> face = make_shared<UnixStreamFace>(socket);
   onFaceCreated(face);
 }
 
diff --git a/daemon/face/unix-stream-factory.cpp b/daemon/face/unix-stream-factory.cpp
index 96a158a..45668c9 100644
--- a/daemon/face/unix-stream-factory.cpp
+++ b/daemon/face/unix-stream-factory.cpp
@@ -39,7 +39,7 @@
   if (channel)
     return channel;
 
-  channel = make_shared<UnixStreamChannel>(boost::cref(endpoint));
+  channel = make_shared<UnixStreamChannel>(endpoint);
   m_channels[endpoint] = channel;
   return channel;
 }
diff --git a/daemon/face/websocket-channel.cpp b/daemon/face/websocket-channel.cpp
index db7fdc0..f409dc9 100644
--- a/daemon/face/websocket-channel.cpp
+++ b/daemon/face/websocket-channel.cpp
@@ -78,7 +78,7 @@
       m_server.close(hdl, websocketpp::close::status::normal, "closed by channel", ecode);
     }
   shared_ptr<WebSocketFace> face = make_shared<WebSocketFace>(FaceUri(remote), this->getUri(),
-                                                              hdl, boost::ref(m_server));
+                                                              hdl, ref(m_server));
   m_onFaceCreatedCallback(face);
   m_channelFaces[hdl] = face;
 }
diff --git a/daemon/face/websocket-factory.cpp b/daemon/face/websocket-factory.cpp
index 224a75b..8a6e6c3 100644
--- a/daemon/face/websocket-factory.cpp
+++ b/daemon/face/websocket-factory.cpp
@@ -43,7 +43,7 @@
   if (static_cast<bool>(channel))
     return channel;
 
-  channel = make_shared<WebSocketChannel>(boost::cref(endpoint));
+  channel = make_shared<WebSocketChannel>(endpoint);
   m_channels[endpoint] = channel;
 
   return channel;
