diff --git a/include/ndn-cpp/forwarding-entry.hpp b/include/ndn-cpp/forwarding-entry.hpp
index b828a7b..9ac4df6 100644
--- a/include/ndn-cpp/forwarding-entry.hpp
+++ b/include/ndn-cpp/forwarding-entry.hpp
@@ -10,11 +10,8 @@
 
 #include <string>
 #include "name.hpp"
-#include "publisher-public-key-digest.hpp"
 #include "forwarding-flags.hpp"
-#include "encoding/wire-format.hpp"
-
-struct ndn_ForwardingEntry;
+#include "encoding/block.hpp"
 
 namespace ndn {
 
@@ -24,46 +21,39 @@
 class ForwardingEntry {
 public:    
   ForwardingEntry
-    (const std::string& action, const Name& prefix, const PublisherPublicKeyDigest publisherPublicKeyDigest,
-     int faceId, const ForwardingFlags& forwardingFlags, int freshnessSeconds) 
-  : action_(action), prefix_(prefix), publisherPublicKeyDigest_(publisherPublicKeyDigest), 
-    faceId_(faceId), forwardingFlags_(forwardingFlags), freshnessSeconds_(freshnessSeconds)
+    (const std::string& action,
+       const Name& prefix,
+       int faceId,
+       const ForwardingFlags& forwardingFlags,
+       int freshnessPeriod) 
+  : action_(action)
+  , prefix_(prefix)
+  , faceId_(faceId)
+  , forwardingFlags_(forwardingFlags)
+  , freshnessPeriod_(freshnessPeriod)
   {
   }
 
   ForwardingEntry()
-  : faceId_(-1), freshnessSeconds_(-1)
+  : faceId_(-1), freshnessPeriod_(-1)
   {
     forwardingFlags_.setActive(true);
     forwardingFlags_.setChildInherit(true);
   }
   
-  Blob 
-  wireEncode(WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) const 
+  Block 
+  wireEncode() const 
   {
-    return wireFormat.encodeForwardingEntry(*this);
+    return wire_;
+    // return wireFormat.encodeForwardingEntry(*this);
   }
   
   void 
-  wireDecode(const uint8_t *input, size_t inputLength, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) 
+  wireDecode(const Block &wire) 
   {
-    wireFormat.decodeForwardingEntry(*this, input, inputLength);
+    // wireFormat.decodeForwardingEntry(*this, input, inputLength);
   }
   
-  void 
-  wireDecode(const std::vector<uint8_t>& input, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) 
-  {
-    wireDecode(&input[0], input.size(), wireFormat);
-  }
-  
-  /**
-   * Set the forwardingEntryStruct to point to the components in this forwarding entry, without copying any memory.
-   * WARNING: The resulting pointers in forwardingEntryStruct are invalid after a further use of this object which could reallocate memory.
-   * @param forwardingEntryStruct a C ndn_ForwardingEntry struct where the prefix name components array is already allocated.
-   */
-  void 
-  get(struct ndn_ForwardingEntry& forwardingEntryStruct) const;
-
   const std::string& 
   getAction() const { return action_; }
   
@@ -73,12 +63,6 @@
   const Name& 
   getPrefix() const { return prefix_; }
   
-  PublisherPublicKeyDigest& 
-  getPublisherPublicKeyDigest() { return publisherPublicKeyDigest_; }
-  
-  const PublisherPublicKeyDigest& 
-  getPublisherPublicKeyDigest() const { return publisherPublicKeyDigest_; }
-  
   int 
   getFaceId() const { return faceId_; }
 
@@ -86,14 +70,7 @@
   getForwardingFlags() const { return forwardingFlags_; }
 
   int 
-  getFreshnessSeconds() const { return freshnessSeconds_; }
-  
-  /**
-   * Clear this forwarding entry, and set the values by copying from forwardingEntryStruct.
-   * @param forwardingEntryStruct a C ndn_ForwardingEntry struct.
-   */
-  void 
-  set(const struct ndn_ForwardingEntry& forwardingEntryStruct);
+  getFreshnessPeriod() const { return freshnessPeriod_; }
 
   void 
   setAction(const std::string& action) { action_ = action; }
@@ -105,15 +82,16 @@
   setForwardingFlags(const ForwardingFlags& forwardingFlags) { forwardingFlags_ = forwardingFlags; }
       
   void 
-  setFreshnessSeconds(int freshnessSeconds) { freshnessSeconds_ = freshnessSeconds; }
+  setFreshnessPeriod(int freshnessPeriod) { freshnessPeriod_ = freshnessPeriod; }
       
 private:
   std::string action_;   /**< empty for none. */
   Name prefix_;
-  PublisherPublicKeyDigest publisherPublicKeyDigest_;
   int faceId_;           /**< -1 for none. */
   ForwardingFlags forwardingFlags_;
-  int freshnessSeconds_; /**< -1 for none. */
+  int freshnessPeriod_; /**< -1 for none. */
+
+  Block wire_;
 };
 
 }
diff --git a/include/ndn-cpp/forwarding-flags.hpp b/include/ndn-cpp/forwarding-flags.hpp
index 7c878b9..e0b91a9 100644
--- a/include/ndn-cpp/forwarding-flags.hpp
+++ b/include/ndn-cpp/forwarding-flags.hpp
@@ -8,8 +8,6 @@
 #ifndef NDN_FORWARDING_FLAGS_HPP
 #define NDN_FORWARDING_FLAGS_HPP
 
-#include "c/forwarding-flags.h"
-
 namespace ndn {
 
 /**
@@ -17,18 +15,21 @@
  * a registered prefix.  We use a separate ForwardingFlags object to retain future compatibility if the daemon forwarding
  * bits are changed, amended or deprecated.
  */
-class ForwardingFlags : public ndn_ForwardingFlags {
+class ForwardingFlags {
 public:
   /**
    * Create a new ForwardingFlags with "active" and "childInherit" set and all other flags cleared.
    */
   ForwardingFlags() 
-  {
-    ndn_ForwardingFlags_initialize(this);
-  }
-  
-  ForwardingFlags(const struct ndn_ForwardingFlags &forwardingFlagsStruct)
-  : ndn_ForwardingFlags(forwardingFlagsStruct)
+    : active_(true)
+    , childInherit_(true)
+    , advertise_(false)
+    , last_(false)
+    , capture_(false)
+    , local_(false)
+    , tap_(false)
+    , captureOk_(false)
+
   {
   }
 
@@ -36,97 +37,107 @@
    * Get the value of the "active" flag.
    * @return true if the flag is set, false if it is cleared.
    */
-  bool getActive() const { return active; }
+  bool getActive() const { return active_; }
   
   /**
    * Get the value of the "childInherit" flag.
    * @return true if the flag is set, false if it is cleared.
    */
-  bool getChildInherit() const { return childInherit; }
+  bool getChildInherit() const { return childInherit_; }
   
   /**
    * Get the value of the "advertise" flag.
    * @return true if the flag is set, false if it is cleared.
    */
-  bool getAdvertise() const { return advertise; }
+  bool getAdvertise() const { return advertise_; }
   
   /**
    * Get the value of the "last" flag.
    * @return true if the flag is set, false if it is cleared.
    */
-  bool getLast() const { return last; }
+  bool getLast() const { return last_; }
   
   /**
    * Get the value of the "capture" flag.
    * @return true if the flag is set, false if it is cleared.
    */
-  bool getCapture() const { return capture; }
+  bool getCapture() const { return capture_; }
   
   /**
    * Get the value of the "local" flag.
    * @return true if the flag is set, false if it is cleared.
    */
-  bool getLocal() const { return local; }
+  bool getLocal() const { return local_; }
   
   /**
    * Get the value of the "tap" flag.
    * @return true if the flag is set, false if it is cleared.
    */
-  bool getTap() const { return tap; }
+  bool getTap() const { return tap_; }
   
   /**
    * Get the value of the "captureOk" flag.
    * @return true if the flag is set, false if it is cleared.
    */
-  bool getCaptureOk() const { return captureOk; }
+  bool getCaptureOk() const { return captureOk_; }
 
   /**
    * Set the value of the "active" flag
    * @param active true to set the flag, false to clear it.
    */  
-  void setActive(bool active) { this->active = active ? 1 : 0; }
+  void setActive(bool active) { this->active_ = active; }
   
   /**
    * Set the value of the "childInherit" flag
    * @param childInherit true to set the flag, false to clear it.
    */  
-  void setChildInherit(bool childInherit) { this->childInherit = childInherit ? 1 : 0; }
+  void setChildInherit(bool childInherit) { this->childInherit_ = childInherit; }
   
   /**
    * Set the value of the "advertise" flag
    * @param advertise true to set the flag, false to clear it.
    */  
-  void setAdvertise(bool advertise) { this->advertise = advertise ? 1 : 0; }
+  void setAdvertise(bool advertise) { this->advertise_ = advertise; }
   
   /**
    * Set the value of the "last" flag
    * @param last true to set the flag, false to clear it.
    */  
-  void setLast(bool last) { this->last = last ? 1 : 0; }
+  void setLast(bool last) { this->last_ = last; }
   
   /**
    * Set the value of the "capture" flag
    * @param capture true to set the flag, false to clear it.
    */  
-  void setCapture(bool capture) { this->capture = capture ? 1 : 0; }
+  void setCapture(bool capture) { this->capture_ = capture; }
   
   /**
    * Set the value of the "local" flag
    * @param local true to set the flag, false to clear it.
    */  
-  void setLocal(bool local) { this->local = local ? 1 : 0; }
+  void setLocal(bool local) { this->local_ = local; }
   
   /**
    * Set the value of the "tap" flag
    * @param tap true to set the flag, false to clear it.
    */  
-  void setTap(bool tap) { this->tap = tap ? 1 : 0; }
+  void setTap(bool tap) { this->tap_ = tap; }
   
   /**
    * Set the value of the "captureOk" flag
    * @param captureOk true to set the flag, false to clear it.
    */  
-  void setCaptureOk(bool captureOk) { this->captureOk = captureOk ? 1 : 0; }
+  void setCaptureOk(bool captureOk) { this->captureOk_ = captureOk; }
+
+private:
+  bool active_;
+  bool childInherit_;
+  bool advertise_;
+  bool last_;
+  bool capture_;
+  bool local_;
+  bool tap_;
+  bool captureOk_;
 };
 
 }
