diff --git a/java_gen/java_model.py b/java_gen/java_model.py
index b03c224..410a1dd 100644
--- a/java_gen/java_model.py
+++ b/java_gen/java_model.py
@@ -378,14 +378,15 @@
             annotated_base_class = base_class + "<?>" if base_class == "OFOxm" else base_class
 
             factories[base_class] = OFFactory(package="%s.%s" % (prefix, package),
-                    name=base_class + "s", members=[], remove_prefix=remove_prefix, base_class=annotated_base_class, sub_factories={})
+                    name=base_class + "s", members=[], remove_prefix=remove_prefix, base_class=annotated_base_class, sub_factories={}, xid_generator=False)
 
         factories[""] = OFFactory(
                     package=prefix,
                     name="OFFactory",
                     remove_prefix="",
                     members=[], base_class="OFMessage", sub_factories=OrderedDict(
-                        ("{}{}s".format(n[2].lower(), n[3:]), "{}s".format(n)) for n in sub_factory_classes ))
+                        ("{}{}s".format(n[2].lower(), n[3:]), "{}s".format(n)) for n in sub_factory_classes ),
+                    xid_generator=True)
 
         for i in self.interfaces:
             for n, factory in factories.items():
@@ -421,7 +422,7 @@
             return True
 
 
-class OFFactory(namedtuple("OFFactory", ("package", "name", "members", "remove_prefix", "base_class", "sub_factories"))):
+class OFFactory(namedtuple("OFFactory", ("package", "name", "members", "remove_prefix", "base_class", "sub_factories", "xid_generator"))):
     @property
     def factory_classes(self):
             return [ OFFactoryClass(
@@ -572,8 +573,10 @@
         # FIXME: This duplicates inheritance information that is now available in the loxi_ir
         # model (note, that the loxi model is on versioned classes). Should check/infer the
         # inheritance information from the versioned lox_ir classes.
-        if re.match(r'OF.+StatsRequest$', self.name):
-            return ("", "OFStatsRequest", None)
+        if re.match(r'OFStatsRequest$', self.name):
+            return ("", "OFMessage", "T extends OFStatsReply")
+        elif re.match(r'OF.+StatsRequest$', self.name):
+            return ("", "OFStatsRequest<{}>".format(re.sub(r'Request$', 'Reply', self.name)), None)
         elif re.match(r'OF.+StatsReply$', self.name):
             return ("", "OFStatsReply", None)
         elif re.match(r'OFFlow(Add|Modify(Strict)?|Delete(Strict)?)$', self.name):
@@ -622,6 +625,10 @@
     def writeable_members(self):
         return [ m for m in self.members if m.is_writeable ]
 
+    @memoize
+    def member_by_name(self, name):
+        return find(lambda m: m.name == name, self.members)
+
     @property
     @memoize
     def members(self):
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index 87ce9d6..7da6f6a 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -248,8 +248,8 @@
 u64 = JType('U64', 'U64') \
         .op(read='U64.ofRaw(bb.readLong())', write='bb.writeLong($name.getValue())', default="U64.ZERO")
 of_port = JType("OFPort") \
-         .op(version=1, read="OFPort.read2Bytes(bb)", write="$name.write2Bytes(bb)", default="OFPort.NONE") \
-         .op(version=ANY, read="OFPort.read4Bytes(bb)", write="$name.write4Bytes(bb)", default="OFPort.NONE")
+         .op(version=1, read="OFPort.read2Bytes(bb)", write="$name.write2Bytes(bb)", default="OFPort.ANY") \
+         .op(version=ANY, read="OFPort.read4Bytes(bb)", write="$name.write4Bytes(bb)", default="OFPort.ANY")
 actions_list = JType('List<OFAction>') \
         .op(read='ChannelUtils.readList(bb, $length, OFActionVer$version.READER)',
             write='ChannelUtils.writeList(bb, $name);',
@@ -380,7 +380,10 @@
 table_stats_wildcards = JType("int") \
         .op(read='bb.readInt()',
             write='bb.writeInt($name)')
-
+table_id = JType("TableId") \
+        .op(read='TableId.readByte(bb)',
+            write='$name.writeByte(bb)',
+            default='TableId.ALL')
 
 port_speed = JType("PortSpeed")
 error_type = JType("OFErrorType")
@@ -538,6 +541,8 @@
         return JType("OFActionType", 'short') \
             .op(read='bb.readShort()', write='bb.writeShort($name)', pub_type=False)\
             .op(read="OFActionTypeSerializerVer$version.readFrom(bb)", write="OFActionTypeSerializerVer$version.writeTo(bb, $name)", pub_type=True)
+    elif field_name == "table_id" and c_type == "uint8_t":
+        return table_id
     elif field_name == "version" and c_type == "uint8_t":
         return JType("OFVersion", 'byte') \
             .op(read='bb.readByte()', write='bb.writeByte($name)')
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/XidGenerator.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/XidGenerator.java
index 65976dc..2ee2764 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/XidGenerator.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/XidGenerator.java
@@ -1,5 +1,5 @@
 package org.projectfloodlight.openflow.protocol;
 
 public interface XidGenerator {
-    int nextXid();
+    long nextXid();
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/XidGenerators.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/XidGenerators.java
new file mode 100644
index 0000000..4609afa
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/protocol/XidGenerators.java
@@ -0,0 +1,38 @@
+package org.projectfloodlight.openflow.protocol;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+public class XidGenerators {
+    private static final XidGenerator GLOBAL_XID_GENERATOR = new StandardXidGenerator();
+
+    public static XidGenerator create() {
+        return new StandardXidGenerator();
+    }
+
+    public static XidGenerator global() {
+        return GLOBAL_XID_GENERATOR;
+    }
+}
+
+class StandardXidGenerator implements XidGenerator {
+
+    private final AtomicLong xidGen = new AtomicLong();
+    long MAX_XID = 0xFFffFFffL;
+
+    @Override
+    public long nextXid() {
+        long xid;
+        do {
+            xid = xidGen.incrementAndGet();
+            if(xid > MAX_XID) {
+                synchronized(this) {
+                    if(xidGen.get() > MAX_XID) {
+                        xidGen.set(0);
+                    }
+                }
+            }
+        } while(xid > MAX_XID);
+        return xid;
+    }
+
+}
\ No newline at end of file
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
index 5ab940d..2a33a0e 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ArpOpcode.java
@@ -2,6 +2,8 @@
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
+import com.google.common.primitives.UnsignedInts;
+
 public class ArpOpcode implements OFValueType<ArpOpcode> {
 
     final static int LENGTH = 2;
@@ -160,4 +162,31 @@
         return opcode;
     }
 
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + opcode;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        ArpOpcode other = (ArpOpcode) obj;
+        if (opcode != other.opcode)
+            return false;
+        return true;
+    }
+
+    @Override
+    public int compareTo(ArpOpcode o) {
+        return UnsignedInts.compare(opcode, o.opcode);
+    }
+
 }
\ No newline at end of file
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/EthType.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/EthType.java
index abd4bff..7031a0d 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/EthType.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/EthType.java
@@ -2,6 +2,8 @@
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
+import com.google.common.primitives.UnsignedInts;
+
 
 /**
  * EtherType field representation.
@@ -214,24 +216,6 @@
     }
 
     @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof EthType))
-            return false;
-        EthType o = (EthType)obj;
-        if (o.rawValue != this.rawValue)
-            return false;
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 37;
-        int result = 1;
-        result = prime * result + rawValue;
-        return result;
-    }
-
-    @Override
     public String toString() {
         return Integer.toHexString(rawValue);
     }
@@ -253,5 +237,28 @@
         return rawValue;
     }
 
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof EthType))
+            return false;
+        EthType o = (EthType)obj;
+        if (o.rawValue != this.rawValue)
+            return false;
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 37;
+        int result = 1;
+        result = prime * result + rawValue;
+        return result;
+    }
+
+    @Override
+    public int compareTo(EthType o) {
+        return UnsignedInts.compare(rawValue, o.rawValue);
+    }
+
 
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Code.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Code.java
index a6544c9..c66486f 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Code.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Code.java
@@ -2,6 +2,8 @@
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
+import com.google.common.primitives.Shorts;
+
 /**
  *
  * @author Yotam Harchol (yotam.harchol@bigswitch.com)
@@ -56,4 +58,30 @@
     }
 
 
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + code;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        ICMPv4Code other = (ICMPv4Code) obj;
+        if (code != other.code)
+            return false;
+        return true;
+    }
+
+    @Override
+    public int compareTo(ICMPv4Code o) {
+        return Shorts.compare(code, o.code);
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
index 5190d4e..594aaec 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/ICMPv4Type.java
@@ -2,8 +2,9 @@
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
-public class ICMPv4Type implements OFValueType<ICMPv4Type> {
+import com.google.common.primitives.Shorts;
 
+public class ICMPv4Type implements OFValueType<ICMPv4Type> {
     final static int LENGTH = 1;
 
     private static final short ICMPV4_TYPE_VAL_ECHO_REPLY    = 0;
@@ -166,5 +167,30 @@
         return ICMPv4Type.of((short)(this.type & mask.type));
     }
 
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + type;
+        return result;
+    }
 
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        ICMPv4Type other = (ICMPv4Type) obj;
+        if (type != other.type)
+            return false;
+        return true;
+    }
+
+    @Override
+    public int compareTo(ICMPv4Type o) {
+        return Shorts.compare(type, o.type);
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
index 3b07c17..77b792f 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv4Address.java
@@ -1,7 +1,11 @@
 package org.projectfloodlight.openflow.types;
 
+import java.util.Arrays;
+
 import org.jboss.netty.buffer.ChannelBuffer;
 
+import com.google.common.primitives.UnsignedInts;
+
 
 
 /**
@@ -106,28 +110,6 @@
         return res.toString();
     }
 
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + rawValue;
-        return result;
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (this == obj)
-            return true;
-        if (obj == null)
-            return false;
-        if (getClass() != obj.getClass())
-            return false;
-        IPv4Address other = (IPv4Address) obj;
-        if (rawValue != other.rawValue)
-            return false;
-        return true;
-    }
-
     public void write4Bytes(ChannelBuffer c) {
         c.writeInt(rawValue);
     }
@@ -141,5 +123,33 @@
         return IPv4Address.of(this.rawValue & mask.rawValue);
     }
 
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + Arrays.hashCode(bytesCache);
+        result = prime * result + rawValue;
+        return result;
+    }
 
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        IPv4Address other = (IPv4Address) obj;
+        if (!Arrays.equals(bytesCache, other.bytesCache))
+            return false;
+        if (rawValue != other.rawValue)
+            return false;
+        return true;
+    }
+
+    @Override
+    public int compareTo(IPv4Address o) {
+        return UnsignedInts.compare(rawValue, o.rawValue);
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
index eb52f67..b58de1a 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6Address.java
@@ -5,6 +5,8 @@
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
+import com.google.common.primitives.Longs;
+
 /**
  * IPv6 address object. Instance controlled, immutable. Internal representation:
  * two 64 bit longs (not that you'd have to know).
@@ -297,4 +299,13 @@
     public IPv6Address applyMask(IPv6Address mask) {
         return IPv6Address.of(this.raw1 & mask.raw1, this.raw2 & mask.raw2);
     }
+
+    @Override
+    public int compareTo(IPv6Address o) {
+        int res = Longs.compare(raw1, o.raw1);
+        if(res != 0)
+            return res;
+        else
+            return Longs.compare(raw2, o.raw2);
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6FlowLabel.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6FlowLabel.java
index 7dbf9bb..45bbf4b 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6FlowLabel.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IPv6FlowLabel.java
@@ -3,6 +3,8 @@
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
+import com.google.common.primitives.UnsignedInts;
+
 public class IPv6FlowLabel implements OFValueType<IPv6FlowLabel> {
 
     static final int LENGTH = 4;
@@ -69,4 +71,9 @@
     public int getIPv6FlowLabelValue() {
         return label;
     }
+
+    @Override
+    public int compareTo(IPv6FlowLabel o) {
+        return UnsignedInts.compare(label, o.label);
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
index 36a76a2..f0f79ec 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/IpProtocol.java
@@ -2,6 +2,8 @@
 
 import org.jboss.netty.buffer.ChannelBuffer;
 
+import com.google.common.primitives.Shorts;
+
 /**
  * IP-Protocol field representation
  *
@@ -608,24 +610,6 @@
     }
 
     @Override
-    public boolean equals(Object obj) {
-        if (!(obj instanceof IpProtocol))
-            return false;
-        IpProtocol o = (IpProtocol)obj;
-        if (o.proto != this.proto)
-            return false;
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 37;
-        int result = 1;
-        result = prime * result + proto;
-        return result;
-    }
-
-    @Override
     public String toString() {
         return Integer.toHexString(proto);
     }
@@ -647,4 +631,28 @@
         return proto;
     }
 
-}
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof IpProtocol))
+            return false;
+        IpProtocol o = (IpProtocol)obj;
+        if (o.proto != this.proto)
+            return false;
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 37;
+        int result = 1;
+        result = prime * result + proto;
+        return result;
+    }
+
+
+    @Override
+    public int compareTo(IpProtocol o) {
+        return Shorts.compare(proto, o.proto);
+    }
+
+}
\ No newline at end of file
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/LagId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/LagId.java
index 713db9a..b7f7f67 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/LagId.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/LagId.java
@@ -1,10 +1,13 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
 import javax.annotation.concurrent.Immutable;
 
+import org.jboss.netty.buffer.ChannelBuffer;
+
+import com.google.common.primitives.UnsignedInts;
+
 @Immutable
-public class LagId {
+public class LagId implements OFValueType<LagId> {
     static final int LENGTH = 4;
     private final int rawValue;
 
@@ -20,6 +23,7 @@
         return rawValue;
     }
 
+    @Override
     public int getLength() {
         return LENGTH;
     }
@@ -58,4 +62,14 @@
     public static LagId read4Bytes(ChannelBuffer c) {
         return LagId.of(c.readInt());
     }
+
+    @Override
+    public int compareTo(LagId o) {
+        return UnsignedInts.compare(rawValue, o.rawValue);
+    }
+
+    @Override
+    public LagId applyMask(LagId mask) {
+        return LagId.of(rawValue & mask.rawValue);
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/MacAddress.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/MacAddress.java
index cc047ca..87be7c2 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/MacAddress.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/MacAddress.java
@@ -4,6 +4,8 @@
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 import org.projectfloodlight.openflow.util.HexString;
 
+import com.google.common.primitives.Longs;
+
 /**
  * Wrapper around a 6 byte mac address.
  *
@@ -131,6 +133,11 @@
         return MacAddress.of(this.rawValue & mask.rawValue);
     }
 
+    @Override
+    public int compareTo(MacAddress o) {
+        return Longs.compare(rawValue, o.rawValue);
+    }
+
 
 
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/Masked.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/Masked.java
index ead7d62..4d88793 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/Masked.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/Masked.java
@@ -5,20 +5,20 @@
 public class Masked<T extends OFValueType<T>> implements OFValueType<Masked<T>> {
     protected T value;
     protected T mask;
-    
+
     protected Masked(T value, T mask) {
         this.value = value.applyMask(mask);
         this.mask = mask;
     }
-    
+
     public T getValue() {
         return value;
     }
-    
+
     public T getMask() {
         return mask;
     }
-    
+
     public static <T extends OFValueType<T>> Masked<T> of(T value, T mask) {
         return new Masked<T>(value, mask);
     }
@@ -27,7 +27,20 @@
     public int getLength() {
         return this.value.getLength() + this.mask.getLength();
     }
-        
+
+    @Override
+    public String toString() {
+        // General representation: value/mask
+        StringBuilder sb = new StringBuilder();
+        sb.append(value.toString()).append('/').append(mask.toString());
+        return sb.toString();
+    }
+
+    @Override
+    public Masked<T> applyMask(Masked<T> mask) {
+        return this;
+    }
+
     @Override
     public boolean equals(Object obj) {
         if (!(obj instanceof Masked<?>))
@@ -46,16 +59,11 @@
     }
 
     @Override
-    public String toString() {
-        // General representation: value/mask
-        StringBuilder sb = new StringBuilder();
-        sb.append(value.toString()).append('/').append(mask.toString());
-        return sb.toString();
+    public int compareTo(Masked<T> o) {
+        int res = value.compareTo(o.value);
+        if(res != 0)
+            return res;
+        else
+            return mask.compareTo(o.mask);
     }
-
-    @Override
-    public Masked<T> applyMask(Masked<T> mask) {
-        return this;
-    }
-    
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/Metadata.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/Metadata.java
index e4eed77..4764747 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/Metadata.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/Metadata.java
@@ -2,8 +2,10 @@
 
 import javax.annotation.concurrent.Immutable;
 
+import com.google.common.primitives.UnsignedInts;
+
 @Immutable
-public class Metadata {
+public class Metadata implements OFValueType<Metadata> {
     static final int LENGTH = 4;
 
     private final static int NONE_VAL = 0;
@@ -26,11 +28,21 @@
         return rawValue;
     }
 
+    @Override
     public int getLength() {
         return LENGTH;
     }
 
     @Override
+    public String toString() {
+        return Integer.toString(rawValue);
+    }
+
+    @Override
+    public Metadata applyMask(Metadata mask) {
+        return Metadata.of(rawValue & mask.rawValue);    }
+
+    @Override
     public int hashCode() {
         final int prime = 31;
         int result = 1;
@@ -53,7 +65,7 @@
     }
 
     @Override
-    public String toString() {
-        return Integer.toString(rawValue);
+    public int compareTo(Metadata o) {
+        return UnsignedInts.compare(rawValue, rawValue);
     }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBufferId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBufferId.java
index 99f3e7f..856eff0 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBufferId.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFBufferId.java
@@ -4,14 +4,15 @@
 import org.projectfloodlight.openflow.annotations.Immutable;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
+import com.google.common.primitives.UnsignedInts;
+
 /**
  * Abstraction of a buffer id in OpenFlow. Immutable.
  *
  * @author Rob Vaterlaus <rob.vaterlaus@bigswitch.com>
  */
 @Immutable
-public class OFBufferId {
-
+public class OFBufferId implements Comparable<OFBufferId> {
     public static final OFBufferId NO_BUFFER = new OFBufferId(0xFFFFFFFF);
 
     private final int rawValue;
@@ -64,4 +65,9 @@
             return false;
         return true;
     }
+
+    @Override
+    public int compareTo(OFBufferId o) {
+        return UnsignedInts.compare(rawValue, o.rawValue);
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFMetadata.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFMetadata.java
index 766ade1..0844d89 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFMetadata.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFMetadata.java
@@ -63,6 +63,8 @@
         return "Metadata: " + u64.toString();
     }
 
-
-
+    @Override
+    public int compareTo(OFMetadata o) {
+        return u64.compareTo(o.u64);
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
index db7bd5f..cb36d0c 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFPort.java
@@ -4,6 +4,8 @@
 import org.projectfloodlight.openflow.annotations.Immutable;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
+import com.google.common.primitives.UnsignedInts;
+
 /**
  * Abstraction of an logical / OpenFlow switch port (ofp_port_no) in OpenFlow.
  * Immutable. Note: Switch port numbers were changed in OpenFlow 1.1 from uint16
@@ -20,7 +22,6 @@
 
     // private int constants (OF1.1+) to avoid duplication in the code
     // should not have to use these outside this class
-    private static final int OFPP_NONE_INT = 0x0;
     private static final int OFPP_ANY_INT = 0xFFffFFff;
     private static final int OFPP_LOCAL_INT = 0xFFffFFfe;
     private static final int OFPP_CONTROLLER_INT = 0xFFffFFfd;
@@ -87,9 +88,6 @@
      */
     public final static OFPort ANY = new NamedPort(OFPP_ANY_INT, "any");
 
-    /** port number 0, read of the wire, e.g, if not set */
-    public final static OFPort NONE = new NamedPort(OFPP_NONE_INT, "none");
-
     public static final OFPort NO_MASK = OFPort.of(0xFFFFFFFF);
     public static final OFPort FULL_MASK = OFPort.of(0x0);
 
@@ -162,8 +160,6 @@
      */
     public static OFPort ofInt(final int portNumber) {
         switch (portNumber) {
-            case 0:
-                return NONE;
             case 1:
                 return PrecachedPort.p1;
             case 2:
@@ -306,8 +302,6 @@
      */
     public static OFPort ofShort(final short portNumber) {
         switch (portNumber) {
-            case 0:
-                return NONE;
             case 1:
                 return PrecachedPort.p1;
             case 2:
@@ -546,4 +540,9 @@
     public OFPort applyMask(OFPort mask) {
         return OFPort.of(this.portNumber & mask.portNumber);
     }
+
+    @Override
+    public int compareTo(OFPort o) {
+        return UnsignedInts.compare(this.portNumber, o.portNumber);
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFValueType.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFValueType.java
index 5f41494..3d8d1cd 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFValueType.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFValueType.java
@@ -3,10 +3,8 @@
 
 
 
-public interface OFValueType<T extends OFValueType<T>> {
-
+public interface OFValueType<T extends OFValueType<T>> extends Comparable<T> {
     public int getLength();
-    
-    public T applyMask(T mask);
 
+    public T applyMask(T mask);
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TableId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TableId.java
new file mode 100644
index 0000000..ebb1966
--- /dev/null
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TableId.java
@@ -0,0 +1,92 @@
+package org.projectfloodlight.openflow.types;
+
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.projectfloodlight.openflow.exceptions.OFParseError;
+
+import com.google.common.primitives.Shorts;
+
+public class TableId implements OFValueType<TableId>, Comparable<TableId> {
+
+    final static int LENGTH = 1;
+
+    private static final short VALIDATION_MASK = 0x00FF;
+
+    private static final short ALL_VAL = 0x00FF;
+    private static final short NONE_VAL = 0x0000;
+    public static final TableId NONE = new TableId(NONE_VAL);
+    public static final TableId ALL = new TableId(ALL_VAL);
+
+    private final short id;
+
+    private TableId(short id) {
+        this.id = id;
+    }
+
+    public static TableId of(short id) {
+        switch(id) {
+            case NONE_VAL:
+                return NONE;
+            case ALL_VAL:
+                return ALL;
+            default:
+                if ((id & VALIDATION_MASK) != id)
+                    throw new IllegalArgumentException("Illegal Table id value: " + id);
+                return new TableId(id);
+        }
+    }
+
+    public static TableId of(int id) {
+        if((id & VALIDATION_MASK) != id)
+            throw new IllegalArgumentException("Illegal Table id value: "+id);
+        return of((short) id);
+    }
+
+    @Override
+    public String toString() {
+        return "0x" + Integer.toHexString(id);
+    }
+
+    public short getValue() {
+        return id;
+    }
+
+    @Override
+    public int getLength() {
+        return LENGTH;
+    }
+
+    public void writeByte(ChannelBuffer c) {
+        c.writeByte(this.id);
+    }
+
+    public static TableId readByte(ChannelBuffer c) throws OFParseError {
+        return TableId.of(c.readUnsignedByte());
+    }
+
+    @Override
+    public TableId applyMask(TableId mask) {
+        return TableId.of((short)(this.id & mask.id));
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof TableId))
+            return false;
+        TableId other = (TableId)obj;
+        if (other.id != this.id)
+            return false;
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int prime = 13873;
+        return this.id * prime;
+    }
+
+    @Override
+    public int compareTo(TableId other) {
+        return Shorts.compare(this.id, other.id);
+    }
+
+}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TransportPort.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TransportPort.java
index 6efd813..540ad1a 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TransportPort.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/TransportPort.java
@@ -3,6 +3,8 @@
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
+import com.google.common.primitives.Ints;
+
 /**
  * Represents L4 (Transport Layer) port (TCP, UDP, etc.)
  *
@@ -80,4 +82,9 @@
         return TransportPort.of(this.port & mask.port);
     }
 
+    @Override
+    public int compareTo(TransportPort o) {
+        return Ints.compare(port,  o.port);
+    }
+
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U16.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U16.java
index 43bec7a..c52a74a 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U16.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U16.java
@@ -60,7 +60,7 @@
 
     @Override
     public String toString() {
-        return "" + f(raw);
+        return Integer.toString(f(raw));
     }
 
     @Override
@@ -110,4 +110,9 @@
     public U16 applyMask(U16 mask) {
         return ofRaw( (short) (raw & mask.raw));
     }
+
+    @Override
+    public int compareTo(U16 o) {
+        return Integer.compare(f(raw), f(o.raw));
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U32.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U32.java
index f56a528..daf5fa6 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U32.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U32.java
@@ -22,6 +22,8 @@
 import org.projectfloodlight.openflow.protocol.OFMessageReader;
 import org.projectfloodlight.openflow.protocol.Writeable;
 
+import com.google.common.primitives.UnsignedInts;
+
 public class U32 implements Writeable, OFValueType<U32> {
     private final static int ZERO_VAL = 0;
     public final static U32 ZERO = new U32(ZERO_VAL);
@@ -110,4 +112,9 @@
         return ofRaw(raw & mask.raw);
     }
 
+    @Override
+    public int compareTo(U32 o) {
+        return UnsignedInts.compare(raw, o.raw);
+    }
+
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
index 3b89e24..8cd577f 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U64.java
@@ -22,6 +22,8 @@
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.projectfloodlight.openflow.protocol.Writeable;
 
+import com.google.common.primitives.UnsignedLongs;
+
 public class U64 implements Writeable, OFValueType<U64> {
     private static final long UNSIGNED_MASK = 0x7fffffffffffffffL;
     private final static long ZERO_VAL = 0;
@@ -113,4 +115,9 @@
         bb.writeLong(raw);
     }
 
+    @Override
+    public int compareTo(U64 o) {
+        return UnsignedLongs.compare(raw, o.raw);
+    }
+
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U8.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U8.java
index f85bfae..b85627e 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U8.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/U8.java
@@ -22,6 +22,8 @@
 import org.projectfloodlight.openflow.protocol.OFMessageReader;
 import org.projectfloodlight.openflow.protocol.Writeable;
 
+import com.google.common.primitives.UnsignedBytes;
+
 public class U8 implements Writeable, OFValueType<U8> {
     private final static byte ZERO_VAL = 0;
     public final static U8 ZERO = new U8(ZERO_VAL);
@@ -112,4 +114,9 @@
         return ofRaw( (byte) (raw & mask.raw));
     }
 
+    @Override
+    public int compareTo(U8 o) {
+        return UnsignedBytes.compare(raw, o.raw);
+    }
+
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VRF.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VRF.java
index cda5699..10e2ebc 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VRF.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VRF.java
@@ -1,8 +1,11 @@
 package org.projectfloodlight.openflow.types;
 
-import org.jboss.netty.buffer.ChannelBuffer;
 import javax.annotation.concurrent.Immutable;
 
+import org.jboss.netty.buffer.ChannelBuffer;
+
+import com.google.common.primitives.UnsignedInts;
+
 @Immutable
 public class VRF implements OFValueType<VRF> {
     static final int LENGTH = 4;
@@ -67,4 +70,9 @@
     public VRF applyMask(VRF mask) {
         return VRF.of(this.rawValue & mask.rawValue);
     }
+
+    @Override
+    public int compareTo(VRF o) {
+        return UnsignedInts.compare(rawValue, o.rawValue);
+    }
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanPcp.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanPcp.java
index 7d15fb7..dcc7d60 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanPcp.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanPcp.java
@@ -3,6 +3,8 @@
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
+import com.google.common.primitives.UnsignedBytes;
+
 public class VlanPcp implements OFValueType<VlanPcp> {
 
     private static final byte VALIDATION_MASK = 0x07;
@@ -68,4 +70,9 @@
         return VlanPcp.of((byte)(this.pcp & mask.pcp));
     }
 
+    @Override
+    public int compareTo(VlanPcp o) {
+        return UnsignedBytes.compare(pcp, o.pcp);
+    }
+
 }
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanVid.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanVid.java
index 5c23779..d6f65d5 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanVid.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/VlanVid.java
@@ -3,6 +3,8 @@
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.projectfloodlight.openflow.exceptions.OFParseError;
 
+import com.google.common.primitives.Shorts;
+
 public class VlanVid implements OFValueType<VlanVid> {
 
     private static final short VALIDATION_MASK = 0x0FFF;
@@ -86,4 +88,9 @@
         return VlanVid.of((short)(this.vid & mask.vid));
     }
 
+    @Override
+    public int compareTo(VlanVid o) {
+        return Shorts.compare(vid, o.vid);
+    }
+
 }
diff --git a/java_gen/templates/custom/OFMatchV1Ver10.Builder.java b/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
index 769a687..38cc127 100644
--- a/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
+++ b/java_gen/templates/custom/OFMatchV1Ver10.Builder.java
@@ -425,7 +425,7 @@
                     wildcards |= OFPFW_TP_SRC;
                     break;
                 case IN_PORT:
-                    setInPort(OFPort.NONE);
+                    setInPort(OFPort.of(0)); // NOTE: not 'NONE' -- that is 0xFF for ports
                     wildcards |= OFPFW_IN_PORT;
                     break;
                 case IPV4_DST:
diff --git a/java_gen/templates/of_factory_class.java b/java_gen/templates/of_factory_class.java
index 86b092a..5263226 100644
--- a/java_gen/templates/of_factory_class.java
+++ b/java_gen/templates/of_factory_class.java
@@ -40,7 +40,10 @@
 
 public class ${factory.name} implements ${factory.interface.name} {
     public final static ${factory.name} INSTANCE = new ${factory.name}();
-    private ${factory.name}() {}
+
+    //:: if factory.interface.xid_generator:
+    private final XidGenerator xidGenerator = XidGenerators.global();
+    //:: #endif
 
     //:: for name, clazz in factory.interface.sub_factories.items():
     public ${clazz} ${name}() {
@@ -59,7 +62,7 @@
     //:: if len(i.writeable_members) > 0:
     public ${i.name}.Builder ${factory.interface.method_name(i, builder=True)}() {
         //::   if i.has_version(factory.version) and model.generate_class(i.versioned_class(factory.version)):
-        return new ${i.versioned_class(factory.version).name}.Builder();
+        return new ${i.versioned_class(factory.version).name}.Builder()${".setXid(nextXid())" if i.member_by_name("xid") else ""};
         //:: else:
         throw new UnsupportedOperationException("${i.name} not supported in version ${factory.version}");
         //:: #endif
@@ -72,12 +75,12 @@
     //::     general_get_match_func_written = True
     //:: #endif
     //:: if len(i.writeable_members) <= 2:
-    public ${i.name} ${factory.interface.method_name(i, builder=False)}(${", ".join("%s %s" % (p.java_type.public_type, p.name) for p in i.writeable_members)}) {
+    public ${i.name} ${factory.interface.method_name(i, builder=False)}(${", ".join("%s %s" % (p.java_type.public_type, p.name) for p in i.writeable_members if p.name != "xid" )}) {
         //::   if i.has_version(factory.version) and model.generate_class(i.versioned_class(factory.version)):
         //:: if len(i.writeable_members) > 0:
         return new ${i.versioned_class(factory.version).name}(
                 ${",\n                      ".join(
-                         [ prop.name for prop in i.versioned_class(factory.version).data_members])}
+                         [ prop.name if prop.name != "xid" else "nextXid()" for prop in i.versioned_class(factory.version).data_members])}
                     );
         //:: else:
         return ${i.versioned_class(factory.version).name}.INSTANCE;
@@ -155,5 +158,10 @@
         }
     }
 //:: #endif
+//:: if factory.interface.xid_generator:
+    public long nextXid() {
+        return xidGenerator.nextXid();
+    }
+//:: #endif
 
 }
diff --git a/java_gen/templates/of_factory_interface.java b/java_gen/templates/of_factory_interface.java
index 634362d..48ea34a 100644
--- a/java_gen/templates/of_factory_interface.java
+++ b/java_gen/templates/of_factory_interface.java
@@ -36,7 +36,7 @@
 
 //:: include("_imports.java")
 
-public interface ${factory.name} {
+public interface ${factory.name}${" extends XidGenerator" if factory.xid_generator else ""} {
     // Subfactories
 //:: for name, clazz in factory.sub_factories.items():
     ${clazz} ${name}();
@@ -50,7 +50,7 @@
     ${i.name}.Builder ${factory.method_name(i, builder=True)}()${ "" if i.is_universal else " throws UnsupportedOperationException"};
     //:: #endif
     //:: if len(i.writeable_members) <= 2:
-    ${i.name} ${factory.method_name(i, builder=False )}(${", ".join("%s %s" % (p.java_type.public_type, p.name) for p in i.writeable_members)});
+    ${i.name} ${factory.method_name(i, builder=False )}(${", ".join("%s %s" % (p.java_type.public_type, p.name) for p in i.writeable_members if p.name != "xid" )});
     //:: #endif
 //:: #endfor
 //:: if factory.name == 'OFFactory':
diff --git a/java_gen/templates/of_interface.java b/java_gen/templates/of_interface.java
index 8c9bf25..98d7b9e 100644
--- a/java_gen/templates/of_interface.java
+++ b/java_gen/templates/of_interface.java
@@ -50,7 +50,7 @@
 //:: for prop in msg.members:
         ${prop.java_type.public_type} ${prop.getter_name}()${ "" if prop.is_universal else " throws UnsupportedOperationException"};
 //:: if prop.is_writeable:
-        Builder ${prop.setter_name}(${prop.java_type.public_type} ${prop.name})${ "" if prop.is_universal else " throws UnsupportedOperationException"};
+        Builder${msg.type_variable} ${prop.setter_name}(${prop.java_type.public_type} ${prop.name})${ "" if prop.is_universal else " throws UnsupportedOperationException"};
 //:: #endif
 //:: #endfor
     }
diff --git a/test_data/of10/flow_add.data b/test_data/of10/flow_add.data
index 127e1fc..60fd780 100644
--- a/test_data/of10/flow_add.data
+++ b/test_data/of10/flow_add.data
@@ -148,6 +148,7 @@
     .setIdleTimeout(5)
     .setFlags(Sets.immutableEnumSet(OFFlowModFlags.CHECK_OVERLAP))
     .setBufferId(OFBufferId.of(0))
+    .setOutPort(OFPort.of(0)) // doesn't make that much sense, but is in the example
     .setActions(
         ImmutableList.of(
             factory.actions().output(OFPort.FLOOD, 0),
diff --git a/test_data/of10/flow_stats_entry.data b/test_data/of10/flow_stats_entry.data
index 3422064..b9a8dc1 100644
--- a/test_data/of10/flow_stats_entry.data
+++ b/test_data/of10/flow_stats_entry.data
@@ -110,7 +110,7 @@
 of_flow_stats_entry_table_id_set(obj, 3);
 -- java
     builder
-      .setTableId((short) 3)
+      .setTableId(TableId.of(3))
       .setMatch(
         factory.buildMatch()
             .setExact(MatchField.IN_PORT, OFPort.of(3))
diff --git a/test_data/of13/flow_add.data b/test_data/of13/flow_add.data
index f86f4ae..854c908 100644
--- a/test_data/of13/flow_add.data
+++ b/test_data/of13/flow_add.data
@@ -76,7 +76,7 @@
 builder.setXid(0x12345678)
     .setCookie(U64.parseHex("FEDCBA9876543210"))
     .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
-    .setTableId((byte) 3)
+    .setTableId(TableId.of(3))
     .setIdleTimeout(5)
     .setHardTimeout(10)
     .setPriority(6000)
@@ -96,7 +96,7 @@
     )
     .setInstructions(
         ImmutableList.<OFInstruction>of(
-        	factory.instructions().gotoTable((short)4),
-        	factory.instructions().gotoTable((short)7)
+                factory.instructions().gotoTable(TableId.of(4)),
+                factory.instructions().gotoTable(TableId.of(7))
         )
     );
diff --git a/test_data/of13/flow_delete.data b/test_data/of13/flow_delete.data
index 6dee43b..497103f 100644
--- a/test_data/of13/flow_delete.data
+++ b/test_data/of13/flow_delete.data
@@ -76,7 +76,7 @@
 builder.setXid(0x12345678)
     .setCookie(U64.parseHex("FEDCBA9876543210"))
     .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
-    .setTableId((byte) 3)
+    .setTableId(TableId.of(3))
     .setIdleTimeout(5)
     .setHardTimeout(10)
     .setPriority(6000)
@@ -96,7 +96,7 @@
     )
     .setInstructions(
         ImmutableList.<OFInstruction>of(
-        	factory.instructions().gotoTable((short)4),
-        	factory.instructions().gotoTable((short)7)
+                factory.instructions().gotoTable(TableId.of(4)),
+                factory.instructions().gotoTable(TableId.of(7))
         )
     );
diff --git a/test_data/of13/flow_delete_strict.data b/test_data/of13/flow_delete_strict.data
index 5da11a2..83d212c 100644
--- a/test_data/of13/flow_delete_strict.data
+++ b/test_data/of13/flow_delete_strict.data
@@ -76,7 +76,7 @@
 builder.setXid(0x12345678)
     .setCookie(U64.parseHex("FEDCBA9876543210"))
     .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
-    .setTableId((byte) 3)
+    .setTableId(TableId.of(3))
     .setIdleTimeout(5)
     .setHardTimeout(10)
     .setPriority(6000)
@@ -96,7 +96,7 @@
     )
     .setInstructions(
         ImmutableList.<OFInstruction>of(
-        	factory.instructions().gotoTable((short)4),
-        	factory.instructions().gotoTable((short)7)
+                factory.instructions().gotoTable(TableId.of(4)),
+                factory.instructions().gotoTable(TableId.of(7))
         )
     );
diff --git a/test_data/of13/flow_modify.data b/test_data/of13/flow_modify.data
index 7f7f7a6..9b8834d 100644
--- a/test_data/of13/flow_modify.data
+++ b/test_data/of13/flow_modify.data
@@ -76,7 +76,7 @@
 builder.setXid(0x12345678)
     .setCookie(U64.parseHex("FEDCBA9876543210"))
     .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
-    .setTableId((byte) 3)
+    .setTableId(TableId.of(3))
     .setIdleTimeout(5)
     .setHardTimeout(10)
     .setPriority(6000)
@@ -96,7 +96,7 @@
     )
     .setInstructions(
         ImmutableList.<OFInstruction>of(
-        	factory.instructions().gotoTable((short)4),
-        	factory.instructions().gotoTable((short)7)
+                factory.instructions().gotoTable(TableId.of(4)),
+                factory.instructions().gotoTable(TableId.of(7))
         )
     );
diff --git a/test_data/of13/flow_modify_strict.data b/test_data/of13/flow_modify_strict.data
index f288d5f..250adb9 100644
--- a/test_data/of13/flow_modify_strict.data
+++ b/test_data/of13/flow_modify_strict.data
@@ -76,7 +76,7 @@
 builder.setXid(0x12345678)
     .setCookie(U64.parseHex("FEDCBA9876543210"))
     .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
-    .setTableId((byte) 3)
+    .setTableId(TableId.of(3))
     .setIdleTimeout(5)
     .setHardTimeout(10)
     .setPriority(6000)
@@ -96,7 +96,7 @@
     )
     .setInstructions(
         ImmutableList.<OFInstruction>of(
-        	factory.instructions().gotoTable((short)4),
-        	factory.instructions().gotoTable((short)7)
+                factory.instructions().gotoTable(TableId.of(4)),
+                factory.instructions().gotoTable(TableId.of(7))
         )
     );
diff --git a/test_data/of13/packet_in.data b/test_data/of13/packet_in.data
index b32bbee..ca7006f 100644
--- a/test_data/of13/packet_in.data
+++ b/test_data/of13/packet_in.data
@@ -36,7 +36,7 @@
    .setBufferId(OFBufferId.of(100))
    .setTotalLen(17000)
    .setReason(OFPacketInReason.ACTION)
-   .setTableId((byte) 20)
+   .setTableId(TableId.of(20))
    .setCookie(U64.parseHex("FEDCBA9876543210"))
    .setMatch(
         factory.buildMatchV3()
