diff --git a/ndn-cpp/data.hpp b/ndn-cpp/data.hpp
index 5d67f0f..28d753a 100644
--- a/ndn-cpp/data.hpp
+++ b/ndn-cpp/data.hpp
@@ -152,30 +152,18 @@
   {
   }
   
-  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode(WireFormat& wireFormat) const 
+  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode(WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) const 
   {
     return wireFormat.encodeData(*this);
   }
-  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode() const 
-  {
-    return wireEncode(*WireFormat::getDefaultWireFormat());
-  }
-  void wireDecode(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat) 
+  void wireDecode(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) 
   {
     wireFormat.decodeData(*this, input, inputLength);
   }
-  void wireDecode(const unsigned char *input, unsigned int inputLength) 
-  {
-    wireDecode(input, inputLength, *WireFormat::getDefaultWireFormat());
-  }
-  void wireDecode(const std::vector<unsigned char>& input, WireFormat& wireFormat) 
+  void wireDecode(const std::vector<unsigned char>& input, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) 
   {
     wireDecode(&input[0], input.size(), wireFormat);
   }
-  void wireDecode(const std::vector<unsigned char>& input) 
-  {
-    wireDecode(&input[0], input.size());
-  }
   
   /**
    * Set the dataStruct to point to the values in this interest, without copying any memory.
diff --git a/ndn-cpp/interest.hpp b/ndn-cpp/interest.hpp
index b3397af..50baaa4 100644
--- a/ndn-cpp/interest.hpp
+++ b/ndn-cpp/interest.hpp
@@ -159,30 +159,18 @@
     construct();
   }
   
-  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode(WireFormat& wireFormat) const 
+  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode(WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) const 
   {
     return wireFormat.encodeInterest(*this);
   }
-  ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode() const 
-  {
-    return wireEncode(*WireFormat::getDefaultWireFormat());
-  }
-  void wireDecode(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat) 
+  void wireDecode(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) 
   {
     wireFormat.decodeInterest(*this, input, inputLength);
   }
-  void wireDecode(const unsigned char *input, unsigned int inputLength) 
-  {
-    wireDecode(input, inputLength, *WireFormat::getDefaultWireFormat());
-  }
-  void wireDecode(const std::vector<unsigned char>& input, WireFormat& wireFormat) 
+  void wireDecode(const std::vector<unsigned char>& input, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) 
   {
     wireDecode(&input[0], input.size(), wireFormat);
   }
-  void wireDecode(const std::vector<unsigned char>& input) 
-  {
-    wireDecode(&input[0], input.size());
-  }
   
   /**
    * Set the interestStruct to point to the components in this interest, without copying any memory.
diff --git a/ndn-cpp/security/key-chain.cpp b/ndn-cpp/security/key-chain.cpp
index a9248df..c456036 100644
--- a/ndn-cpp/security/key-chain.cpp
+++ b/ndn-cpp/security/key-chain.cpp
@@ -121,12 +121,6 @@
   sign(data, DEFAULT_PUBLIC_KEY_DER, sizeof(DEFAULT_PUBLIC_KEY_DER), DEFAULT_PRIVATE_KEY_DER, sizeof(DEFAULT_PRIVATE_KEY_DER), wireFormat);
 }
 
-void KeyChain::defaultSign(Data& data)
-{
-  sign(data, DEFAULT_PUBLIC_KEY_DER, sizeof(DEFAULT_PUBLIC_KEY_DER), DEFAULT_PRIVATE_KEY_DER, sizeof(DEFAULT_PRIVATE_KEY_DER),
-       *WireFormat::getDefaultWireFormat());
-}
-
 bool KeyChain::selfVerifyData(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat)
 {
   // Decode the data packet and digest the data fields.
diff --git a/ndn-cpp/security/key-chain.hpp b/ndn-cpp/security/key-chain.hpp
index 584ddc4..0afa4b5 100644
--- a/ndn-cpp/security/key-chain.hpp
+++ b/ndn-cpp/security/key-chain.hpp
@@ -31,17 +31,11 @@
   /**
    * Call sign with the default public and private keys.
    * @param data
-   * @param wireFormat The WireFormat for calling encodeData.
+   * @param wireFormat The WireFormat for calling encodeData, or WireFormat::getDefaultWireFormat() if omitted.
    */
-  static void defaultSign(Data& data, WireFormat& wireFormat);
+  static void defaultSign(Data& data, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat());
 
   /**
-   * Call sign with the default public and private keys.  For wireFormat, use WireFormat::getDefaultWireFormat().
-   * @param data
-   */
-  static void defaultSign(Data& data);
-  
-  /**
    * Use the WireFormat to decode the input as a Data packet and use the public key in the key locator to 
    * verify the signature.
    * This does just uses the public key without checking whether it is certified.
