diff --git a/src/python/oftest/oft12/packet.py b/src/python/oftest/oft12/packet.py
index 23a3e6e..a7aef94 100644
--- a/src/python/oftest/oft12/packet.py
+++ b/src/python/oftest/oft12/packet.py
@@ -36,12 +36,11 @@
 import socket
 import struct
 import logging
-import oftest.cstruct as ofp
+import ofp
 import unittest
 import binascii
 import string
 import collections #@UnresolvedImport
-import oftest.action as action
 
 ETHERTYPE_IP = 0x0800
 ETHERTYPE_VLAN = 0x8100
diff --git a/src/python/oftest/oft12/testutils.py b/src/python/oftest/oft12/testutils.py
index e508be1..f73873b 100644
--- a/src/python/oftest/oft12/testutils.py
+++ b/src/python/oftest/oft12/testutils.py
@@ -4,12 +4,8 @@
 from cStringIO import StringIO
 #import types
 
-import of12.cstruct as ofp
-import of12.match as oxm_field
-import of12.message as message
-import of12.action as action
-import of12.parse as parse
-import of12.instruction as instruction
+import ofp
+import oftest.parse as parse
 from packet import Packet
 
 try:
@@ -55,7 +51,7 @@
     @param ctrl The controller object for the test
     """
     logger.info("Initializing all table configs")
-    request = message.table_mod()  
+    request = ofp.message.table_mod()  
     request.config = ofp.OFPTC_TABLE_MISS_CONTROLLER
     rv = 0
     for table_id in [0, 1, 2, 3, 4, 5, 6, 7]:
@@ -82,10 +78,9 @@
     @param table_id Table ID
     """
     logger.info("Deleting all flows on table ID: " + str(table_id))
-    msg = message.flow_mod()
+    msg = ofp.message.flow_delete()
     msg.out_port = ofp.OFPP_ANY
     msg.out_group = ofp.OFPG_ANY
-    msg.command = ofp.OFPFC_DELETE
     msg.buffer_id = 0xffffffff
     msg.table_id = table_id
     logger.debug(msg.show())
@@ -100,7 +95,7 @@
     """
     
     logger.info("Deleting all groups")
-    msg = message.group_mod()
+    msg = ofp.message.group_mod()
     msg.group_id = ofp.OFPG_ALL
     msg.command = ofp.OFPGC_DELETE
     logger.debug(msg.show())
@@ -357,7 +352,7 @@
 
 
 def do_barrier(ctrl):
-    b = message.barrier_request()
+    b = ofp.message.barrier_request()
     ctrl.transact(b)
 
 
@@ -371,7 +366,7 @@
     @returns (hwaddr, config, advert) The hwaddress, configuration and
     advertised values
     """
-    request = message.features_request()
+    request = ofp.message.features_request()
     reply, _ = controller.transact(request, timeout=2)
     if reply is None:
         logger.warn("Get feature request failed")
@@ -393,7 +388,7 @@
     configuration value according to config and mask
     """
     logger.info("Setting port " + str(port_no) + " to config " + str(config))
-    request = message.features_request()
+    request = ofp.message.features_request()
     reply, _ = controller.transact(request, timeout=2)
     if reply is None:
         return -1
@@ -403,7 +398,7 @@
             break
     if idx >= len(reply.ports):
         return -1
-    mod = message.port_mod()
+    mod = ofp.message.port_mod()
     mod.port_no = port_no
     mod.hw_addr = reply.ports[idx].hw_addr
     mod.config = config
@@ -491,7 +486,7 @@
     """
     (response, _) = parent.controller.poll(ofp.OFPT_PACKET_IN, 2)
 
-    parent.assertTrue(response is not None, 'Packet in message not received')
+    parent.assertTrue(response is not None, 'Packet in ofp.message not received')
     if str(exp_pkt) != response.data:
         logging.debug("pkt  len " + str(len(str(exp_pkt))) + ": "
                             + str(exp_pkt).encode('hex'))
@@ -567,7 +562,7 @@
     @param byte_count If >= 0, verify byte count
     """
     (response, _) = parent.controller.poll(ofp.OFPT_FLOW_REMOVED, 2)
-    parent.assertTrue(response is not None, 'No flow removed message received')
+    parent.assertTrue(response is not None, 'No flow removed ofp.message received')
 
     if request is None:
         return
@@ -608,23 +603,23 @@
     See flow_match_test for other parameter descriptoins
    
     if egr_queue is set
-             append an out_queue action to egr_queue to the actions_list
+             append an out_queue ofp.action to egr_queue to the actions_list
     else if egr_port is set:  
-             append an output action to egr_port to the actions_list
+             append an output ofp.action to egr_port to the actions_list
     if the instruction_list is empty, 
-        append an APPLY instruction to it
-    Add the action_list to the first write or apply instruction
+        append an APPLY ofp.instruction to it
+    Add the action_list to the first write or apply ofp.instruction
     
-    @param egr_queue if not None, make the output an enqueue action
+    @param egr_queue if not None, make the output an enqueue ofp.action
     @param table_id Table ID for writing a flow_mod
     """
 
     if match_fields is None:
         match_fields = parse.packet_to_flow_match(pkt)
     parent.assertTrue(match_fields is not None, "Flow match from pkt failed")
-    in_port = oxm_field.in_port(ing_port)
+    in_port = ofp.oxm.in_port(ing_port)
     match_fields.add(in_port) 
-    request = message.flow_mod()
+    request = ofp.message.flow_add()
     request.match_fields = match_fields
     request.buffer_id = 0xffffffff
     request.table_id = table_id
@@ -638,21 +633,21 @@
     if instruction_list is None:
         instruction_list = []
     
-    # Set up output/enqueue action if directed
+    # Set up output/enqueue ofp.action if directed
     if egr_queue is not None:
         parent.assertTrue(egr_port is not None, "Egress port not set")
-        act = action.set_queue()
+        act = ofp.action.set_queue()
         act.port = egr_port
         act.queue_id = egr_queue
         action_list.append(act)
     elif egr_port is not None:
-        act = action.output()
+        act = ofp.action.output()
         act.port = egr_port
         action_list.append(act)
         
     inst = None
     if len(instruction_list) == 0: 
-        inst = instruction.instruction_apply_actions()
+        inst = ofp.instruction.instruction_apply_actions()
         instruction_list.append(inst)
     else:
         for inst in instruction_list:
@@ -662,16 +657,16 @@
 
     # add all the actions to the last inst
     for act in action_list:
-        logging.debug("Adding action " + act.show())
+        logging.debug("Adding ofp.action " + act.show())
         rv = inst.actions.add(act)
-        parent.assertTrue(rv, "Could not add action" + act.show())
+        parent.assertTrue(rv, "Could not add ofp.action" + act.show())
     # NOTE that the inst has already been added to the flow_mod
 
     # add all the instrutions to the flow_mod
     for i in instruction_list: 
-        logging.debug("Adding instruction " + inst.show())
+        logging.debug("Adding ofp.instruction " + inst.show())
         rv = request.instructions.add(i)
-        parent.assertTrue(rv, "Could not add instruction " + i.show())
+        parent.assertTrue(rv, "Could not add ofp.instruction " + i.show())
 
  
     logging.debug(request.show())
@@ -679,7 +674,7 @@
 
 def flow_msg_install(parent, request, clear_table=True):
     """
-    Install a flow mod message in the switch
+    Install a flow mod ofp.message in the switch
 
     @param parent Must implement controller, assertEqual, assertTrue
     @param request The request, all set to go
@@ -712,18 +707,18 @@
     @param exp_code Expected error code
     """
     (response, raw) = parent.controller.poll(ofp.OFPT_ERROR, 2)
-    parent.assertTrue(response is not None, 'No error message received')
+    parent.assertTrue(response is not None, 'No error ofp.message received')
 
     if (exp_type is None) or (exp_code is None):
         logging.debug("Parametrs are not sufficient")
         return
 
     parent.assertEqual(exp_type, response.type,
-                       'Error message type mismatch: ' +
+                       'Error ofp.message type mismatch: ' +
                        str(exp_type) + " != " +
                        str(response.type))
     parent.assertEqual(exp_code, response.code,
-                       'Error message code mismatch: ' +
+                       'Error ofp.message code mismatch: ' +
                        str(exp_code) + " != " +
                        str(response.code))
 
@@ -797,7 +792,7 @@
     @param dl_vlan If not -1, and pkt is None, create a pkt w/ VLAN tag
     @param exp_pkt If not None, use this as the expected output pkt; els use pkt
     @param action_list Additional actions to add to flow mod
-    @param check_expire Check for flow expiration message
+    @param check_expire Check for flow expiration ofp.message
     """
     of_ports = port_map.keys()
     of_ports.sort()
@@ -881,7 +876,7 @@
                     exp_pkt = simple_tcp_packet(
                                 vlan_tags=[{'type': exp_vlan_type, 'vid': exp_vid, 'pcp': exp_pcp}])
         else:
-            #subtract action
+            #subtract ofp.action
             if dl_vlan_int >= 0:
                 exp_pkt = simple_tcp_packet(
                             vlan_tags=[{'vid': dl_vlan_int, 'pcp': dl_vlan_pcp_int}])
@@ -919,7 +914,7 @@
         elif exp_msg is ofp.OFPT_ERROR:
             error_verify(parent, exp_msg_type, exp_msg_code)
         else:
-            parent.assertTrue(0, "Rcv: Unexpected Message: " + str(exp_msg))
+            parent.assertTrue(0, "Rcv: Unexpected ofp.message: " + str(exp_msg))
 
         (_, rcv_pkt, _) = parent.dataplane.poll(timeout=1)
         parent.assertFalse(rcv_pkt is not None, "Packet on dataplane")
@@ -958,13 +953,13 @@
     @param match_exp Set whether packet is expected to receive
     @param add_tag_exp If True, expected_packet has an additional vlan tag,
     If not, expected_packet's vlan tag is replaced as specified
-    @param exp_msg Expected message
-    @param exp_msg_type Expected message type associated with the message
-    @param exp_msg_code Expected message code associated with the msg_type
+    @param exp_msg Expected ofp.message
+    @param exp_msg_type Expected ofp.message type associated with the ofp.message
+    @param exp_msg_code Expected ofp.message code associated with the msg_type
     @param pkt If not None, use this packet for ingress
     @param exp_pkt If not None, use this as the expected output pkt
     @param action_list Additional actions to add to flow mod
-    @param check_expire Check for flow expiration message
+    @param check_expire Check for flow expiration ofp.message
     """
     of_ports = port_map.keys()
     of_ports.sort()
@@ -1029,7 +1024,7 @@
 
 def action_generate(parent, field_to_mod, mod_field_vals):
     """
-    Create an action to modify the field indicated in field_to_mod
+    Create an ofp.action to modify the field indicated in field_to_mod
 
     @param parent Must implement, assertTrue
     @param field_to_mod The field to modify as a string name
@@ -1042,41 +1037,41 @@
         return None
 
     if field_to_mod == 'dl_dst':
-        act = action.set_dl_dst()
+        act = ofp.action.set_dl_dst()
         act.dl_addr = parse.parse_mac(mod_field_vals['dl_dst'])
     elif field_to_mod == 'dl_src':
-        act = action.set_dl_src()
+        act = ofp.action.set_dl_src()
         act.dl_addr = parse.parse_mac(mod_field_vals['dl_src'])
     elif field_to_mod == 'vlan_tags':
         if len(mod_field_vals['vlan_tags']):
-            act = action.pop_vlan()
+            act = ofp.action.pop_vlan()
         else:
             pass
 #    elif field_to_mod == 'dl_vlan_enable':
 #        if not mod_field_vals['dl_vlan_enable']: # Strip VLAN tag
-#            act = action.pop_vlan()
+#            act = ofp.action.pop_vlan()
 #        # Add VLAN tag is handled by dl_vlan field
 #        # Will return None in this case
 #    elif field_to_mod == 'dl_vlan':
-#        act = action.set_vlan_vid()
+#        act = ofp.action.set_vlan_vid()
 #        act.vlan_vid = mod_field_vals['dl_vlan']
 #    elif field_to_mod == 'dl_vlan_pcp':
-#        act = action.set_vlan_pcp()
+#        act = ofp.action.set_vlan_pcp()
 #        act.vlan_pcp = mod_field_vals['dl_vlan_pcp']
     elif field_to_mod == 'ip_src':
-        act = action.set_nw_src()
+        act = ofp.action.set_nw_src()
         act.nw_addr = parse.parse_ip(mod_field_vals['ip_src'])
     elif field_to_mod == 'ip_dst':
-        act = action.set_nw_dst()
+        act = ofp.action.set_nw_dst()
         act.nw_addr = parse.parse_ip(mod_field_vals['ip_dst'])
     elif field_to_mod == 'ip_tos':
-        act = action.set_nw_tos()
+        act = ofp.action.set_nw_tos()
         act.nw_tos = mod_field_vals['ip_tos']
     elif field_to_mod == 'tcp_sport':
-        act = action.set_tp_src()
+        act = ofp.action.set_tp_src()
         act.tp_port = mod_field_vals['tcp_sport']
     elif field_to_mod == 'tcp_dport':
-        act = action.set_tp_dst()
+        act = ofp.action.set_tp_dst()
         act.tp_port = mod_field_vals['tcp_dport']
     else:
         parent.assertTrue(0, "Unknown field to modify: " + str(field_to_mod))
@@ -1086,7 +1081,7 @@
 def pkt_action_setup(parent, start_field_vals={}, mod_field_vals={}, 
                      mod_fields={}, check_test_params=False):
     """
-    Set up the ingress and expected packet and action list for a test
+    Set up the ingress and expected packet and ofp.action list for a test
 
     @param parent Must implement, assertTrue, config hash and logger
     @param start_field_values Field values to use for ingress packet (optional)
@@ -1095,7 +1090,7 @@
     @params check_test_params If True, will check the parameters vid, add_vlan
     and strip_vlan from the command line.
 
-    Returns a triple:  pkt-to-send, expected-pkt, action-list
+    Returns a triple:  pkt-to-send, expected-pkt, ofp.action-list
     """
 
     new_actions = []
@@ -1184,7 +1179,7 @@
 
 def skip_message_emit(parent, s):
     """
-    Print out a 'skipped' message to stderr
+    Print out a 'skipped' ofp.message to stderr
 
     @param s The string to print out to the log file
     @param parent Must implement config and logger objects
@@ -1199,11 +1194,11 @@
         sys.stderr.write("(S)")
 
 def do_echo_request_reply_test(test,controller):
-        request = message.echo_request()
+        request = ofp.message.echo_request()
         response, _ = controller.transact(request)
-        test.assertEqual(response.header.type, ofp.OFPT_ECHO_REPLY,
+        test.assertEqual(response.type, ofp.OFPT_ECHO_REPLY,
                          'response is not echo_reply')
-        test.assertEqual(request.header.xid, response.header.xid,
+        test.assertEqual(request.xid, response.xid,
                          'response xid != request xid')
         test.assertEqual(len(response.data), 0, 'response data non-empty')
 
@@ -1399,7 +1394,7 @@
         elif exp_msg == ofp.OFPT_ERROR:
             error_verify(parent, exp_msg_type, exp_msg_code)
         else:
-            parent.assertTrue(0, "Rcv: Unexpected Message: " + str(exp_msg))
+            parent.assertTrue(0, "Rcv: Unexpected ofp.message: " + str(exp_msg))
         (_, rcv_pkt, _) = parent.dataplane.poll(timeout=1)
         parent.assertFalse(rcv_pkt is not None, "Packet on dataplane")
 
@@ -1446,13 +1441,13 @@
     @param match_exp Set whether packet is expected to receive
     @param add_tag_exp If True, expected_packet has an additional MPLS shim,
     If not expected_packet's MPLS shim is replaced as specified
-    @param exp_msg Expected message
-    @param exp_msg_type Expected message type associated with the message
-    @param exp_msg_code Expected message code associated with the msg_type
+    @param exp_msg Expected ofp.message
+    @param exp_msg_type Expected ofp.message type associated with the ofp.message
+    @param exp_msg_code Expected ofp.message code associated with the msg_type
     @param pkt If not None, use this packet for ingress
     @param exp_pkt If not None, use this as the expected output pkt; els use pkt
     @param action_list Additional actions to add to flow mod
-    @param check_expire Check for flow expiration message
+    @param check_expire Check for flow expiration ofp.message
     """
     of_ports = port_map.keys()
     of_ports.sort()
@@ -1501,7 +1496,7 @@
     """ Get the flow_stats from the switch
     Test the response to make sure it's really a flow_stats object
     """
-    request = message.flow_stats_request()
+    request = ofp.message.flow_stats_request()
     request.out_port = ofp.OFPP_ANY
     request.out_group = ofp.OFPG_ANY
     request.table_id = 0xff
@@ -1509,6 +1504,6 @@
         request.match_fields = match_fields
     response, _ = parent.controller.transact(request, timeout=2)
     parent.assertTrue(response is not None, "Did not get response")
-    parent.assertTrue(isinstance(response,message.flow_stats_reply),
+    parent.assertTrue(isinstance(response,ofp.message.flow_stats_reply),
                       "Expected a flow_stats_reply, but didn't get it")
     return response
