diff --git a/src/face.hpp b/src/face.hpp
index 3407d92..9f11b0a 100644
--- a/src/face.hpp
+++ b/src/face.hpp
@@ -246,8 +246,8 @@
    * @param onFailure      A callback to be called when prefixRegister command fails
    * @param flags          (optional) RIB flags (not used when direct FIB management is requested)
    * @param certificate    (optional) A certificate under which the prefix registration
-   *                       command interest is signed.  When omitted, a default certificate
-   *                       of the default identity is used to sign the registration command
+   *                       command is signed.  When omitted, a default certificate of
+   *                       the default identity is used to sign the registration command
    *
    * @return Opaque registered prefix ID which can be used with unsetInterestFilter or
    *         removeRegisteredPrefix
@@ -275,8 +275,8 @@
    * @param onFailure      A callback to be called when prefixRegister command fails
    * @param flags          (optional) RIB flags (not used when direct FIB management is requested)
    * @param certificate    (optional) A certificate under which the prefix registration
-   *                       command interest is signed.  When omitted, a default certificate
-   *                       of the default identity is used to sign the registration command
+   *                       command is signed.  When omitted, a default certificate of
+   *                       the default identity is used to sign the registration command
    *
    * @return Opaque registered prefix ID which can be used with unsetInterestFilter or
    *         removeRegisteredPrefix
@@ -302,8 +302,8 @@
    * @param onInterest     A callback to be called when a matching interest is received
    * @param onSuccess      A callback to be called when prefixRegister command succeeds
    * @param onFailure      A callback to be called when prefixRegister command fails
-   * @param identity       A signing identity. A command interest is signed under the default
-   *                       certificate of this identity
+   * @param identity       A signing identity. A prefix registration command is signed
+   *                       under the default certificate of this identity
    * @param flags          (optional) RIB flags (not used when direct FIB management is requested)
    *
    * @return Opaque registered prefix ID which can be used with removeRegisteredPrefix
@@ -329,8 +329,8 @@
    * @param interestFilter Interest filter (prefix part will be registered with the forwarder)
    * @param onInterest     A callback to be called when a matching interest is received
    * @param onFailure      A callback to be called when prefixRegister command fails
-   * @param identity       A signing identity. A command interest is signed under the default
-   *                       certificate of this identity
+   * @param identity       A signing identity. A prefix registration command is signed
+   *                       under the default certificate of this identity
    * @param flags          (optional) RIB flags (not used when direct FIB management is requested)
    *
    * @return Opaque registered prefix ID which can be used with removeRegisteredPrefix
@@ -370,8 +370,8 @@
    * @param onSuccess   A callback to be called when prefixRegister command succeeds
    * @param onFailure   A callback to be called when prefixRegister command fails
    * @param certificate (optional) A certificate under which the prefix registration
-   *                    command interest is signed.  When omitted, a default certificate
-   *                    of the default identity is used to sign the registration command
+   *                    command is signed.  When omitted, a default certificate of
+   *                    the default identity is used to sign the registration command
    * @param flags       (optional) RIB flags (not used when direct FIB management is requested)
    *
    * @return The registered prefix ID which can be used with unregisterPrefix
@@ -394,8 +394,8 @@
    * @param prefix    A prefix to register with the connected NDN forwarder
    * @param onSuccess A callback to be called when prefixRegister command succeeds
    * @param onFailure A callback to be called when prefixRegister command fails
-   * @param identity  A signing identity. A command interest is signed under the default
-   *                  certificate of this identity
+   * @param identity  A signing identity. A prefix registration command is signed
+   *                  under the default certificate of this identity
    * @param flags     (optional) RIB flags (not used when direct FIB management is requested)
    *
    * @return The registered prefix ID which can be used with unregisterPrefix
diff --git a/src/management/nfd-control-command.cpp b/src/management/nfd-control-command.cpp
index ac7a40d..fd9ec6b 100644
--- a/src/management/nfd-control-command.cpp
+++ b/src/management/nfd-control-command.cpp
@@ -62,15 +62,6 @@
   return name;
 }
 
-Interest
-ControlCommand::makeCommandInterest(const ControlParameters& parameters,
-                                    const Sign& sign) const
-{
-  Interest commandInterest(this->getRequestName(parameters));
-  sign(commandInterest);
-  return commandInterest;
-}
-
 ControlCommand::FieldValidator::FieldValidator()
   : m_required(CONTROL_PARAMETER_UBOUND)
   , m_optional(CONTROL_PARAMETER_UBOUND)
diff --git a/src/management/nfd-control-command.hpp b/src/management/nfd-control-command.hpp
index bc4ef53..8285a6d 100644
--- a/src/management/nfd-control-command.hpp
+++ b/src/management/nfd-control-command.hpp
@@ -23,7 +23,6 @@
 #define NDN_MANAGEMENT_NFD_CONTROL_COMMAND_HPP
 
 #include "nfd-control-parameters.hpp"
-#include "../util/command-interest-generator.hpp"
 
 namespace ndn {
 namespace nfd {
@@ -83,18 +82,6 @@
   Name
   getRequestName(const ControlParameters& parameters) const;
 
-public: // deprecated
-  /** \brief a callback on signing command interest
-   */
-  typedef function<void(Interest&)> Sign;
-
-  /** \brief make a Command Interest from parameters
-   *  \deprecated use .getCommandName and sign with KeyChain
-   */
-  Interest
-  makeCommandInterest(const ControlParameters& parameters,
-                      const Sign& sign) const;
-
 protected:
   ControlCommand(const std::string& module, const std::string& verb);
 
diff --git a/src/management/nfd-controller.hpp b/src/management/nfd-controller.hpp
index 3899de6..ef82cac 100644
--- a/src/management/nfd-controller.hpp
+++ b/src/management/nfd-controller.hpp
@@ -79,8 +79,6 @@
 
   /** \brief start command execution
    *  \param certificate the certificate used to sign request Interests
-   *  \deprecated passing IdentityCertificate() empty certificate as fourth argument
-   *              is deprecated, use four-parameter overload instead
    */
   template<typename Command>
   void
@@ -90,11 +88,6 @@
         const IdentityCertificate& certificate,
         const time::milliseconds& timeout = getDefaultCommandTimeout())
   {
-    if (certificate.getName().empty()) { // deprecated usage
-      start<Command>(parameters, onSuccess, onFailure, timeout);
-      return;
-    }
-
     start<Command>(parameters, onSuccess, onFailure,
       bind(static_cast<void(KeyChain::*)(Interest&,const Name&)>(&KeyChain::sign<Interest>),
            &m_keyChain, _1, cref(certificate.getName())),
diff --git a/tests/unit-tests/management/test-nfd-controller.cpp b/tests/unit-tests/management/test-nfd-controller.cpp
index 3792f2c..2ec9285 100644
--- a/tests/unit-tests/management/test-nfd-controller.cpp
+++ b/tests/unit-tests/management/test-nfd-controller.cpp
@@ -22,11 +22,10 @@
 #include "management/nfd-controller.hpp"
 #include "management/nfd-control-response.hpp"
 
-#include "../dummy-client-face.hpp"
-
 #include <boost/tuple/tuple.hpp>
 
 #include "boost-test.hpp"
+#include "../dummy-client-face.hpp"
 
 namespace ndn {
 namespace nfd {
@@ -86,18 +85,18 @@
   face->processEvents(time::milliseconds(1));
 
   BOOST_REQUIRE_EQUAL(face->m_sentInterests.size(), 1);
-  const Interest& commandInterest = face->m_sentInterests[0];
+  const Interest& requestInterest = face->m_sentInterests[0];
 
   FaceCreateCommand command;
-  BOOST_CHECK(command.getPrefix().isPrefixOf(commandInterest.getName()));
-  // 9 components: ndn:/localhost/nfd/face/create/<parameters>/<command Interest signature x4>
-  BOOST_REQUIRE_EQUAL(commandInterest.getName().size(), 9);
+  BOOST_CHECK(command.getPrefix().isPrefixOf(requestInterest.getName()));
+  // 9 components: ndn:/localhost/nfd/face/create/<parameters>/<signed Interest x4>
+  BOOST_REQUIRE_EQUAL(requestInterest.getName().size(), 9);
   ControlParameters request;
   // 4th component: <parameters>
-  BOOST_REQUIRE_NO_THROW(request.wireDecode(commandInterest.getName().at(4).blockFromValue()));
+  BOOST_REQUIRE_NO_THROW(request.wireDecode(requestInterest.getName().at(4).blockFromValue()));
   BOOST_CHECK_NO_THROW(command.validateRequest(request));
   BOOST_CHECK_EQUAL(request.getUri(), parameters.getUri());
-  BOOST_CHECK_EQUAL(commandInterest.getInterestLifetime(), Controller::getDefaultCommandTimeout());
+  BOOST_CHECK_EQUAL(requestInterest.getInterestLifetime(), Controller::getDefaultCommandTimeout());
 
   ControlParameters responseBody;
   responseBody.setUri("tcp4://192.0.2.1:6363")
@@ -105,7 +104,7 @@
   ControlResponse responsePayload(201, "created");
   responsePayload.setBody(responseBody.wireEncode());
 
-  Data responseData(commandInterest.getName());
+  Data responseData(requestInterest.getName());
   responseData.setContent(responsePayload.wireEncode());
   keyChain.sign(responseData);
   face->receive(responseData);
@@ -143,11 +142,11 @@
   face->processEvents(time::milliseconds(1));
 
   BOOST_REQUIRE_EQUAL(face->m_sentInterests.size(), 1);
-  const Interest& commandInterest = face->m_sentInterests[0];
+  const Interest& requestInterest = face->m_sentInterests[0];
 
   ControlResponse responsePayload(401, "Not Authenticated");
 
-  Data responseData(commandInterest.getName());
+  Data responseData(requestInterest.getName());
   responseData.setContent(responsePayload.wireEncode());
   keyChain.sign(responseData);
   face->receive(responseData);
@@ -170,7 +169,7 @@
   face->processEvents(time::milliseconds(1));
 
   BOOST_REQUIRE_EQUAL(face->m_sentInterests.size(), 1);
-  const Interest& commandInterest = face->m_sentInterests[0];
+  const Interest& requestInterest = face->m_sentInterests[0];
 
   ControlParameters responseBody;
   responseBody.setUri("tcp4://192.0.2.1:6363")
@@ -179,7 +178,7 @@
   ControlResponse responsePayload(201, "created");
   responsePayload.setBody(responseBody.wireEncode());
 
-  Data responseData(commandInterest.getName());
+  Data responseData(requestInterest.getName());
   responseData.setContent(responsePayload.wireEncode());
   keyChain.sign(responseData);
   face->receive(responseData);
