diff --git a/wireshark_gen/__init__.py b/wireshark_gen/__init__.py
index e92ebf2..5c02e06 100644
--- a/wireshark_gen/__init__.py
+++ b/wireshark_gen/__init__.py
@@ -55,17 +55,6 @@
     else:
         return "read_" + m.oftype.replace(')', '').replace('(', '_')
 
-def get_peeker(version, cls, m):
-    """
-    Decide on a peeker function to use for the given field
-    """
-    ofproto = loxi_globals.ir[version]
-    enum = ofproto.enum_by_name(m.oftype)
-    if enum and 'wire_type' in enum.params:
-        return "peek_" + enum.params['wire_type']
-    else:
-        return "peek_" + m.oftype.replace(')', '').replace('(', '_')
-
 def get_field_info(version, cls, name, oftype):
     """
     Decide on a Wireshark type and base for a given field.
diff --git a/wireshark_gen/templates/_ofclass_dissector.lua b/wireshark_gen/templates/_ofclass_dissector.lua
index fbb9f6a..d9fb5cb 100644
--- a/wireshark_gen/templates/_ofclass_dissector.lua
+++ b/wireshark_gen/templates/_ofclass_dissector.lua
@@ -26,7 +26,7 @@
 :: # under the EPL.
 ::
 :: from loxi_ir import *
-:: from wireshark_gen import make_field_name, get_reader, get_peeker
+:: from wireshark_gen import make_field_name, get_reader
 :: attrs = []
 :: if ofclass.virtual: attrs.append("virtual")
 :: if ofclass.superclass: attrs.append("child")
@@ -43,18 +43,25 @@
 :: if ofclass.virtual:
 :: discriminator_name = make_field_name(version, ofclass.name, ofclass.discriminator.name)
 :: #endif
+:: offset = 0
 :: for m in ofclass.members:
 :: if isinstance(m, OFPadMember):
+:: if not ofclass.virtual:
     reader.skip(${m.length})
+:: #endif
 :: continue
 :: #endif
 :: field_name = make_field_name(version, ofclass.name, m.name)
 :: reader_name = get_reader(version, ofclass, m)
-:: peeker_name = get_peeker(version, ofclass, m)
+:: if ofclass.virtual:
+:: var_len = m.length
 :: if (field_name == discriminator_name):
-    return ${peeker_name}(reader, ${version.wire_version}, subtree, '${field_name}')
+    return ${ofclass.name}_v${version.wire_version}_dissectors[reader.peek(${offset},${var_len}):uint()](reader, subtree)
 ::    break
 :: else:
+:: offset = offset + var_len
+:: #endif
+:: else:
     ${reader_name}(reader, ${version.wire_version}, subtree, '${field_name}')
 :: #endif
 :: #endfor
diff --git a/wireshark_gen/templates/_oftype_readers.lua b/wireshark_gen/templates/_oftype_readers.lua
index e9eb9fa..9a5e4fa 100644
--- a/wireshark_gen/templates/_oftype_readers.lua
+++ b/wireshark_gen/templates/_oftype_readers.lua
@@ -51,32 +51,6 @@
     end
 end
 
-function peek_scalar(reader, subtree, field_name, length)
-    return reader.read(length):uint()
-end
-
-function peek_uint8_t(reader, version, subtree, field_name)
-    return peek_scalar(reader, subtree, field_name, 1)
-end
-
-function peek_uint16_t(reader, version, subtree, field_name)
-    return peek_scalar(reader, subtree, field_name, 2)
-end
-
-function peek_uint32_t(reader, version, subtree, field_name)
-    return peek_scalar(reader, subtree, field_name, 4)
-end
-
-function peek_uint64_t(reader, version, subtree, field_name)
-    return peek_scalar(reader, subtree, field_name, 8)
-end
-
-function peek_of_octets_t(reader, version, subtree, field_name)
-    if not reader.is_empty() then
-        return reader.peek_all()
-    end
-end
-
 function read_list_of_hello_elem_t(reader, version, subtree, field_name)
     -- TODO
 end
@@ -131,14 +105,6 @@
     end
 end
 
-function peek_of_fm_cmd_t(reader, version, subtree, field_name)
-    if version == 1 then
-        return peek_scalar(reader, subtree, field_name, 2)
-    else
-        return peek_scalar(reader, subtree, field_name, 1)
-    end
-end
-
 function read_list_of_action_t(reader, version, subtree, field_name)
     if reader.is_empty() then
         return
diff --git a/wireshark_gen/templates/openflow.lua b/wireshark_gen/templates/openflow.lua
index 12520ce..09ebcc4 100644
--- a/wireshark_gen/templates/openflow.lua
+++ b/wireshark_gen/templates/openflow.lua
@@ -84,52 +84,30 @@
 :: for ofclass in ofproto.classes:
 :: if ofclass.virtual:
 ${ofclass.name}_v${version.wire_version}_dissectors = {}
-${ofclass.name}_v${version.wire_version}_dissectors_virtual = {}
 :: #endif
 :: #endfor
 :: #endfor
 
-:: virtual_classes = []
-
 --- Dissectors for each class
 :: for version, ofproto in ir.items():
 :: for ofclass in ofproto.classes:
 :: name = 'dissect_%s_v%d' % (ofclass.name, version.wire_version)
-:: name_virtual = '%s_v%d_dissectors' % (ofclass.name, version.wire_version)
 :: include('_ofclass_dissector.lua', name=name, ofclass=ofclass, version=version)
 :: if ofclass.superclass:
 :: discriminator = ofclass.superclass.discriminator
 :: discriminator_value = ofclass.member_by_name(discriminator.name).value
-:: if ofclass.virtual:
-:: if discriminator_value not in virtual_classes:
-:: virtual_classes.append(discriminator_value)
-:: #endif
-${ofclass.superclass.name}_v${version.wire_version}_dissectors_virtual[${discriminator_value}] = ${name_virtual}
-:: #endif
 ${ofclass.superclass.name}_v${version.wire_version}_dissectors[${discriminator_value}] = ${name}
 
 :: #endif
 :: #endfor
 :: #endfor
 
-local virtual_classes = {
-:: for classes in virtual_classes:
-    [${classes}] = ${classes},
-:: #endfor
-}
-
 local of_message_dissectors = {
 :: for version in ir:
     [${version.wire_version}] = of_header_v${version.wire_version}_dissectors,
 :: #endfor
 }
 
-local of_message_dissectors_virtual = {
-:: for version in ir:
-    [${version.wire_version}] = of_header_v${version.wire_version}_dissectors_virtual,
-:: #endfor
-}
-
 local of_oxm_dissectors = {
 :: for version in ir:
     [${version.wire_version}] = of_oxm_v${version.wire_version}_dissectors,
@@ -202,17 +180,12 @@
     local version_val = buf(0,1):uint()
     local type_val = buf(1,1):uint()
 
-    local virtual_reader = OFReader.new(buf)
-
     local protocol = "OF ?"
     if openflow_versions[version_val] then
         protocol = "OF " .. openflow_versions[version_val]
     end
-    if virtual_classes[type_val] then
-        info = of_message_dissectors_virtual[version_val][type_val][of_message_dissectors[version_val][type_val](virtual_reader, subtree)](reader, subtree)
-    else
-        info = of_message_dissectors[version_val][type_val](reader, subtree)
-    end
+
+    info = of_message_dissectors[version_val][type_val](reader, subtree)
 
     return protocol, info
 end
