diff --git a/lib/cpp/src/protocol/TBinaryProtocol.cc b/lib/cpp/src/protocol/TBinaryProtocol.cc
index 624965b..f1e4ec9 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.cc
+++ b/lib/cpp/src/protocol/TBinaryProtocol.cc
@@ -28,10 +28,10 @@
 uint32_t TBinaryProtocol::writeFieldBegin(shared_ptr<TTransport> out,
                                           const string& name,
                                           const TType fieldType,
-                                          const uint16_t fieldId) const {
+                                          const int16_t fieldId) const {
   return
     writeByte(out, (uint8_t)fieldType) +
-    writeI32(out, (int32_t)fieldId);
+    writeI16(out, fieldId);
 }
 
 uint32_t TBinaryProtocol::writeFieldEnd(shared_ptr<TTransport> out) const {
@@ -81,24 +81,31 @@
   return 0;
 }
 
+uint32_t TBinaryProtocol::writeBool(shared_ptr<TTransport> out,
+                                    const bool value) const {
+  uint8_t tmp =  value ? 1 : 0;
+  out->write(&tmp, 1);
+  return 1;
+}
+
 uint32_t TBinaryProtocol::writeByte(shared_ptr<TTransport> out,
                                     const uint8_t byte) const {
   out->write(&byte, 1);
   return 1;
 }
 
-uint32_t TBinaryProtocol::writeU32(shared_ptr<TTransport> out,
-                                   const uint32_t u32) const {
-  uint32_t net = (uint32_t)htonl(u32);
-  out->write((uint8_t*)&net, 4);
-  return 4;
+uint32_t TBinaryProtocol::writeU16(shared_ptr<TTransport> out,
+                                   const uint16_t u16) const {
+  uint16_t net = (uint16_t)htons(u16);
+  out->write((uint8_t*)&net, 2);
+  return 2;
 }
 
-uint32_t TBinaryProtocol::writeI32(shared_ptr<TTransport> out,
-                                   const int32_t i32) const {
-  int32_t net = (int32_t)htonl(i32);
-  out->write((uint8_t*)&net, 4);
-  return 4;
+uint32_t TBinaryProtocol::writeI16(shared_ptr<TTransport> out,
+                                   const int16_t i16) const {
+  int16_t net = (int16_t)htons(i16);
+  out->write((uint8_t*)&net, 2);
+  return 2;
 }
 
 uint32_t TBinaryProtocol::writeU64(shared_ptr<TTransport> out,
@@ -155,7 +162,7 @@
 uint32_t TBinaryProtocol::readFieldBegin(shared_ptr<TTransport> in,
                                          string& name,
                                          TType& fieldType,
-                                         uint16_t& fieldId) const {
+                                         int16_t& fieldId) const {
   uint32_t result = 0;
   uint8_t type;
   result += readByte(in, type);
@@ -164,9 +171,7 @@
     fieldId = 0;
     return result;
   }
-  int32_t id;
-  result += readI32(in, id);
-  fieldId = (uint16_t)id;
+  result += readI16(in, fieldId);
   return result;
 }
   
@@ -222,6 +227,14 @@
   return 0;
 }
 
+uint32_t TBinaryProtocol::readBool(shared_ptr<TTransport> in,
+                                   bool& value) const {
+  uint8_t b[1];
+  in->readAll(b, 1);
+  value = *(uint8_t*)b != 0;
+  return 1;
+}
+
 uint32_t TBinaryProtocol::readByte(shared_ptr<TTransport> in,
                                    uint8_t& byte) const {
   uint8_t b[1];
@@ -230,6 +243,24 @@
   return 1;
 }
 
+uint32_t TBinaryProtocol::readU16(shared_ptr<TTransport> in,
+                                  uint16_t& u16) const {
+  uint8_t b[2];
+  in->readAll(b, 2);
+  u16 = *(uint16_t*)b;
+  u16 = (uint16_t)ntohs(u16);
+  return 2;
+}
+
+uint32_t TBinaryProtocol::readI16(shared_ptr<TTransport> in,
+                                  int16_t& i16) const {
+  uint8_t b[2];
+  in->readAll(b, 2);
+  i16 = *(int16_t*)b;
+  i16 = (int16_t)ntohs(i16);
+  return 2;
+}
+
 uint32_t TBinaryProtocol::readU32(shared_ptr<TTransport> in,
                                   uint32_t& u32) const {
   uint8_t b[4];
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.h b/lib/cpp/src/protocol/TBinaryProtocol.h
index db7960f..89f4d4a 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.h
+++ b/lib/cpp/src/protocol/TBinaryProtocol.h
@@ -15,8 +15,8 @@
  *
  * @author Mark Slee <mcslee@facebook.com>
  */
-class TBinaryProtocol : public TProtocol {
-  public:
+    class TBinaryProtocol : public TProtocol {
+ public:
   TBinaryProtocol() {}
   ~TBinaryProtocol() {}
 
@@ -28,120 +28,137 @@
 				     const TMessageType messageType,
 				     const uint32_t seqid) const;
 
-  virtual uint32_t writeMessageEnd   (shared_ptr<TTransport> out) const;
+  virtual uint32_t writeMessageEnd(shared_ptr<TTransport> out) const;
 
 
-  uint32_t writeStructBegin   (shared_ptr<TTransport>    out,
-                               const std::string& name)   const;
+  uint32_t writeStructBegin(shared_ptr<TTransport> out,
+			     const std::string& name) const;
 
-  uint32_t writeStructEnd     (shared_ptr<TTransport>    out)        const;
+  uint32_t writeStructEnd(shared_ptr<TTransport> out) const;
 
-  uint32_t writeFieldBegin    (shared_ptr<TTransport>    out,
-                               const std::string& name,
-                               const TType    fieldType,
-                               const uint16_t fieldId)    const;
+  uint32_t writeFieldBegin(shared_ptr<TTransport> out,
+			    const std::string& name,
+			    const TType fieldType,
+			    const int16_t fieldId) const;
 
-  uint32_t writeFieldEnd      (shared_ptr<TTransport>    out)        const;
+  uint32_t writeFieldEnd(shared_ptr<TTransport> out) const;
 
-  uint32_t writeFieldStop     (shared_ptr<TTransport>    out)        const;
+  uint32_t writeFieldStop(shared_ptr<TTransport> out) const;
                                        
-  uint32_t writeMapBegin      (shared_ptr<TTransport>    out,
-                               const TType    keyType,
-                               const TType    valType,
-                               const int32_t  size)       const;
+  uint32_t writeMapBegin(shared_ptr<TTransport> out,
+			  const TType keyType,
+			  const TType valType,
+			  const int32_t size) const;
 
-  uint32_t writeMapEnd        (shared_ptr<TTransport>    out)        const;
+  uint32_t writeMapEnd(shared_ptr<TTransport> out) const;
 
-  uint32_t writeListBegin     (shared_ptr<TTransport>    out,
-                               const TType    elemType,
-                               const int32_t  size)       const;
+  uint32_t writeListBegin(shared_ptr<TTransport> out,
+			   const TType elemType,
+			   const int32_t size) const;
 
-  uint32_t writeListEnd       (shared_ptr<TTransport>    out)        const;
+  uint32_t writeListEnd(shared_ptr<TTransport> out) const;
 
-  uint32_t writeSetBegin      (shared_ptr<TTransport>    out,
-                               const TType    elemType,
-                               const int32_t  size)       const;
+  uint32_t writeSetBegin(shared_ptr<TTransport> out,
+			  const TType elemType,
+			  const int32_t size) const;
 
-  uint32_t writeSetEnd        (shared_ptr<TTransport>    out)        const;
+  uint32_t writeSetEnd(shared_ptr<TTransport> out) const;
 
-  uint32_t writeByte          (shared_ptr<TTransport>    out,
-                               const uint8_t  byte)       const;
+  uint32_t writeBool(shared_ptr<TTransport> out,
+		      const bool value) const;
 
-  uint32_t writeU32           (shared_ptr<TTransport>    out,
-                               const uint32_t u32)        const;
+  uint32_t writeByte(shared_ptr<TTransport> out,
+		      const uint8_t byte) const;
 
-  uint32_t writeI32           (shared_ptr<TTransport>    out,
-                               const int32_t  i32)        const;
+  uint32_t writeU16(shared_ptr<TTransport> out,
+		    const uint16_t u16) const;
 
-  uint32_t writeU64           (shared_ptr<TTransport>    out,
-                               const uint64_t u64)        const;
+  uint32_t writeI16(shared_ptr<TTransport> out,
+		     const int16_t i16) const;
 
-  uint32_t writeI64           (shared_ptr<TTransport>    out,
-                               const int64_t  i64)        const;
+  uint32_t writeU32(shared_ptr<TTransport> out,
+		     const uint32_t u32) const;
 
-  uint32_t writeString        (shared_ptr<TTransport>    out,
-                               const std::string& str)    const;
+  uint32_t writeI32(shared_ptr<TTransport> out,
+		     const int32_t i32) const;
+
+  uint32_t writeU64(shared_ptr<TTransport> out,
+		     const uint64_t u64) const;
+
+  uint32_t writeI64(shared_ptr<TTransport> out,
+		     const int64_t i64) const;
+
+  uint32_t writeString(shared_ptr<TTransport> out,
+			const std::string& str) const;
 
   /**
    * Reading functions
    */
 
 
-  uint32_t readMessasgeBegin    (shared_ptr<TTransport>    in,
-				 TMessageType& messageType,
-				 uint32_t& seqid) const;
+  uint32_t readMessasgeBegin(shared_ptr<TTransport> in,
+			      TMessageType& messageType,
+			      uint32_t& seqid) const;
 
-  uint32_t readMessageEnd      (shared_ptr<TTransport>    in) const;
+  uint32_t readMessageEnd(shared_ptr<TTransport> in) const;
 
-  uint32_t readStructBegin    (shared_ptr<TTransport>    in,
-                               std::string& name)         const;
+  uint32_t readStructBegin(shared_ptr<TTransport> in,
+			    std::string& name) const;
 
-  uint32_t readStructEnd      (shared_ptr<TTransport>    in)         const;
+  uint32_t readStructEnd(shared_ptr<TTransport> in) const;
 
-  uint32_t readFieldBegin     (shared_ptr<TTransport>    in,
-                               std::string&   name,
-                               TType&         fieldType,
-                               uint16_t&      fieldId)    const;
+  uint32_t readFieldBegin(shared_ptr<TTransport> in,
+			   std::string& name,
+			   TType& fieldType,
+			   int16_t& fieldId) const;
   
-  uint32_t readFieldEnd       (shared_ptr<TTransport>    in)         const;
+  uint32_t readFieldEnd(shared_ptr<TTransport> in) const;
  
-  uint32_t readMapBegin       (shared_ptr<TTransport>    in,
-                               TType&         keyType,
-                               TType&         valType,
-                               int32_t&       size)       const;
+  uint32_t readMapBegin(shared_ptr<TTransport> in,
+			 TType& keyType,
+			 TType& valType,
+			 int32_t& size) const;
 
-  uint32_t readMapEnd         (shared_ptr<TTransport>    in)         const;
+  uint32_t readMapEnd(shared_ptr<TTransport> in) const;
 
-  uint32_t readListBegin      (shared_ptr<TTransport>    in,
-                               TType&         elemType,
-                               int32_t&       size)       const;
+  uint32_t readListBegin(shared_ptr<TTransport> in,
+			  TType& elemType,
+			  int32_t& size) const;
   
-  uint32_t readListEnd        (shared_ptr<TTransport>    in)         const;
+  uint32_t readListEnd(shared_ptr<TTransport> in) const;
 
-  uint32_t readSetBegin       (shared_ptr<TTransport>    in,
-                               TType&         elemType,
-                               int32_t&       size)       const;
+  uint32_t readSetBegin(shared_ptr<TTransport> in,
+			 TType& elemType,
+			 int32_t& size) const;
 
-  uint32_t readSetEnd         (shared_ptr<TTransport>    in)         const;
+  uint32_t readSetEnd(shared_ptr<TTransport> in) const;
 
-  uint32_t readByte           (shared_ptr<TTransport>    in,
-                               uint8_t&       byte)       const;
+  uint32_t readBool(shared_ptr<TTransport> in,
+		      bool& value) const;
 
-  uint32_t readU32            (shared_ptr<TTransport>    in,
-                               uint32_t&      u32)        const;
+  uint32_t readByte(shared_ptr<TTransport> in,
+		     uint8_t& byte) const;
 
-  uint32_t readI32            (shared_ptr<TTransport>    in,
-                               int32_t&       i32)        const;
+  uint32_t readU16(shared_ptr<TTransport> in,
+		    uint16_t& u16) const;
 
-  uint32_t readU64            (shared_ptr<TTransport>    in,
-                               uint64_t&      u64)        const;
+  uint32_t readI16(shared_ptr<TTransport> in,
+		    int16_t& i16) const;
 
-  uint32_t readI64            (shared_ptr<TTransport>    in,
-                               int64_t&       i64)        const;
+  uint32_t readU32(shared_ptr<TTransport> in,
+		    uint32_t& u32) const;
 
-  uint32_t readString         (shared_ptr<TTransport>    in,
-                               std::string&   str)        const;
+  uint32_t readI32(shared_ptr<TTransport> in,
+		    int32_t& i32) const;
 
+  uint32_t readU64(shared_ptr<TTransport> in,
+		    uint64_t& u64) const;
+
+  uint32_t readI64(shared_ptr<TTransport> in,
+		    int64_t& i64) const;
+
+  uint32_t readString(shared_ptr<TTransport> in,
+		       std::string& str) const;
 };
 
 }}} // facebook::thrift::protocol
diff --git a/lib/cpp/src/protocol/TProtocol.h b/lib/cpp/src/protocol/TProtocol.h
index aa67e9c..8c89ba5 100644
--- a/lib/cpp/src/protocol/TProtocol.h
+++ b/lib/cpp/src/protocol/TProtocol.h
@@ -77,122 +77,140 @@
    * Writing functions.
    */
 
-  virtual uint32_t writeMessageBegin   (shared_ptr<TTransport> out,
-					const TMessageType messageType,
-					const uint32_t seqid) const = 0;
+  virtual uint32_t writeMessageBegin(shared_ptr<TTransport> out,
+				     const TMessageType messageType,
+				     const uint32_t seqid) const = 0;
 
-  virtual uint32_t writeMessageEnd   (shared_ptr<TTransport> out) const = 0;
+  virtual uint32_t writeMessageEnd(shared_ptr<TTransport> out) const = 0;
 
 
-  virtual uint32_t writeStructBegin   (shared_ptr<TTransport>    out,
-                                       const std::string& name)   const = 0;
+  virtual uint32_t writeStructBegin(shared_ptr<TTransport> out,
+				    const std::string& name) const = 0;
+  
+  virtual uint32_t writeStructEnd(shared_ptr<TTransport> out) const = 0;
+  
+  virtual uint32_t writeFieldBegin(shared_ptr<TTransport> out,
+				   const std::string& name,
+				   const TType fieldType,
+				   const int16_t fieldId) const = 0;
 
-  virtual uint32_t writeStructEnd     (shared_ptr<TTransport>    out)        const = 0;
+  virtual uint32_t writeFieldEnd(shared_ptr<TTransport> out) const = 0;
 
-  virtual uint32_t writeFieldBegin    (shared_ptr<TTransport>    out,
-                                       const std::string& name,
-                                       const TType    fieldType,
-                                       const uint16_t fieldId)    const = 0;
-
-  virtual uint32_t writeFieldEnd      (shared_ptr<TTransport>    out)        const = 0;
-
-  virtual uint32_t writeFieldStop     (shared_ptr<TTransport>    out)        const = 0;
+  virtual uint32_t writeFieldStop(shared_ptr<TTransport> out) const = 0;
                                       
-  virtual uint32_t writeMapBegin      (shared_ptr<TTransport>    out,
-                                       const TType    keyType,
-                                       const TType    valType,
-                                       const int32_t  size)       const = 0;
+  virtual uint32_t writeMapBegin(shared_ptr<TTransport> out,
+				 const TType keyType,
+				 const TType valType,
+				 const int32_t size) const = 0;
 
-  virtual uint32_t writeMapEnd        (shared_ptr<TTransport>    out)        const = 0;
+  virtual uint32_t writeMapEnd(shared_ptr<TTransport> out) const = 0;
+  
+  virtual uint32_t writeListBegin(shared_ptr<TTransport> out,
+				  const TType elemType,
+				  const int32_t size) const = 0;
 
-  virtual uint32_t writeListBegin     (shared_ptr<TTransport>    out,
-                                       const TType    elemType,
-                                       const int32_t  size)       const = 0;
+  virtual uint32_t writeListEnd(shared_ptr<TTransport> out) const = 0;
 
-  virtual uint32_t writeListEnd       (shared_ptr<TTransport>    out)        const = 0;
+  virtual uint32_t writeSetBegin(shared_ptr<TTransport> out,
+				 const TType elemType,
+				 const int32_t size) const = 0;
 
-  virtual uint32_t writeSetBegin      (shared_ptr<TTransport>    out,
-                                       const TType    elemType,
-                                       const int32_t  size)       const = 0;
+  virtual uint32_t writeSetEnd(shared_ptr<TTransport> out) const = 0;
 
-  virtual uint32_t writeSetEnd        (shared_ptr<TTransport>    out)        const = 0;
+  virtual uint32_t writeBool(shared_ptr<TTransport> out,
+			     const bool value) const = 0;
 
-  virtual uint32_t writeByte          (shared_ptr<TTransport>    out,
-                                       const uint8_t  byte)       const = 0;
+  virtual uint32_t writeByte(shared_ptr<TTransport> out,
+			     const uint8_t byte) const = 0;
 
-  virtual uint32_t writeU32           (shared_ptr<TTransport>    out,
-                                       const uint32_t u32)        const = 0;
+  virtual uint32_t writeI16(shared_ptr<TTransport> out,
+			    const int16_t i16) const = 0;
 
-  virtual uint32_t writeI32           (shared_ptr<TTransport>    out,
-                                       const int32_t  i32)        const = 0;
+  virtual uint32_t writeU16(shared_ptr<TTransport> out,
+			    const uint16_t u16) const = 0;
 
-  virtual uint32_t writeU64           (shared_ptr<TTransport>    out,
-                                       const uint64_t u64)        const = 0;
+  virtual uint32_t writeU32(shared_ptr<TTransport> out,
+			    const uint32_t u32) const = 0;
+  
+  virtual uint32_t writeI32(shared_ptr<TTransport> out,
+			    const int32_t i32) const = 0;
 
-  virtual uint32_t writeI64           (shared_ptr<TTransport>    out,
-                                       const int64_t  i64)        const = 0;
+  virtual uint32_t writeU64(shared_ptr<TTransport> out,
+			    const uint64_t u64) const = 0;
 
-  virtual uint32_t writeString        (shared_ptr<TTransport>    out,
-                                       const std::string& str)    const = 0;
+  virtual uint32_t writeI64(shared_ptr<TTransport> out,
+			    const int64_t i64) const = 0;
+
+  virtual uint32_t writeString(shared_ptr<TTransport> out,
+			       const std::string& str) const = 0;
 
   /**
    * Reading functions
    */
 
-  virtual uint32_t readMessasgeBegin    (shared_ptr<TTransport>    in,
-					 TMessageType& messageType,
-					 uint32_t& seqid) const = 0;
-
-  virtual uint32_t readMessageEnd      (shared_ptr<TTransport>    in)         const = 0;
-
-  virtual uint32_t readStructBegin    (shared_ptr<TTransport>    in,
-                                       std::string& name)         const = 0;
-
-  virtual uint32_t readStructEnd      (shared_ptr<TTransport>    in)         const = 0;
-
-  virtual uint32_t readFieldBegin     (shared_ptr<TTransport>    in,
-                                       std::string&   name,
-                                       TType&         fieldType,
-                                       uint16_t&      fieldId)    const = 0;
+  virtual uint32_t readMessasgeBegin(shared_ptr<TTransport> in,
+				     TMessageType& messageType,
+				     uint32_t& seqid) const = 0;
   
-  virtual uint32_t readFieldEnd       (shared_ptr<TTransport>    in)         const = 0;
+  virtual uint32_t readMessageEnd(shared_ptr<TTransport> in) const = 0;
+
+  virtual uint32_t readStructBegin(shared_ptr<TTransport> in,
+				   std::string& name) const = 0;
+
+  virtual uint32_t readStructEnd(shared_ptr<TTransport> in) const = 0;
+
+  virtual uint32_t readFieldBegin(shared_ptr<TTransport> in,
+				  std::string& name,
+				  TType& fieldType,
+				  int16_t& fieldId) const = 0;
+  
+  virtual uint32_t readFieldEnd(shared_ptr<TTransport> in) const = 0;
  
-  virtual uint32_t readMapBegin       (shared_ptr<TTransport>    in,
-                                       TType&         keyType,
-                                       TType&         valType,
-                                       int32_t&       size)       const = 0;
+  virtual uint32_t readMapBegin(shared_ptr<TTransport> in,
+				TType& keyType,
+				TType& valType,
+				int32_t& size) const = 0;
 
-  virtual uint32_t readMapEnd         (shared_ptr<TTransport>    in)         const = 0;
+  virtual uint32_t readMapEnd(shared_ptr<TTransport> in) const = 0;
 
-  virtual uint32_t readListBegin      (shared_ptr<TTransport>    in,
-                                       TType&         elemType,
-                                       int32_t&       size)       const = 0;
+  virtual uint32_t readListBegin(shared_ptr<TTransport> in,
+				 TType& elemType,
+				 int32_t& size) const = 0;
 
-  virtual uint32_t readListEnd        (shared_ptr<TTransport>    in)         const = 0;
+  virtual uint32_t readListEnd(shared_ptr<TTransport> in) const = 0;
 
-  virtual uint32_t readSetBegin       (shared_ptr<TTransport>    in,
-                                       TType&         elemType,
-                                       int32_t&       size)       const = 0;
+  virtual uint32_t readSetBegin(shared_ptr<TTransport> in,
+				TType& elemType,
+				int32_t& size) const = 0;
 
-  virtual uint32_t readSetEnd         (shared_ptr<TTransport>    in)         const = 0;
+  virtual uint32_t readSetEnd(shared_ptr<TTransport> in) const = 0;
 
-  virtual uint32_t readByte           (shared_ptr<TTransport>    in,
-                                       uint8_t&       byte)       const = 0;
+  virtual uint32_t readBool(shared_ptr<TTransport> in,
+			    bool& value) const = 0;
 
-  virtual uint32_t readU32            (shared_ptr<TTransport>    in,
-                                       uint32_t&      u32)        const = 0;
+  virtual uint32_t readByte(shared_ptr<TTransport> in,
+			    uint8_t& byte) const = 0;
 
-  virtual uint32_t readI32            (shared_ptr<TTransport>    in,
-                                       int32_t&       i32)        const = 0;
+  virtual uint32_t readU16(shared_ptr<TTransport> in,
+			   uint16_t& u16) const = 0;
 
-  virtual uint32_t readU64            (shared_ptr<TTransport>    in,
-                                       uint64_t&      u64)        const = 0;
+  virtual uint32_t readI16(shared_ptr<TTransport> in,
+			   int16_t& i16) const = 0;
 
-  virtual uint32_t readI64            (shared_ptr<TTransport>    in,
-                                       int64_t&       i64)        const = 0;
+  virtual uint32_t readU32(shared_ptr<TTransport> in,
+			   uint32_t& u32) const = 0;
 
-  virtual uint32_t readString         (shared_ptr<TTransport>    in,
-                                       std::string&   str)        const = 0;
+  virtual uint32_t readI32(shared_ptr<TTransport> in,
+			   int32_t& i32) const = 0;
+
+  virtual uint32_t readU64(shared_ptr<TTransport> in,
+			   uint64_t& u64) const = 0;
+
+  virtual uint32_t readI64(shared_ptr<TTransport> in,
+			   int64_t& i64) const = 0;
+
+  virtual uint32_t readString(shared_ptr<TTransport> in,
+			      std::string& str) const = 0;
 
   /**
    * Method to arbitrarily skip over data.
@@ -233,7 +251,7 @@
       {
         uint32_t result = 0;
         std::string name;
-        uint16_t fid;
+        int16_t fid;
         TType ftype;
         result += readStructBegin(in, name);
         while (true) {
