diff --git a/src/python/oftest/testutils.py b/src/python/oftest/testutils.py
index d7e5e9d..f005b39 100644
--- a/src/python/oftest/testutils.py
+++ b/src/python/oftest/testutils.py
@@ -66,7 +66,7 @@
     self.assertEqual(rv, 0, "Failed to reset port config")
 
 def required_wildcards(parent):
-    w = test_param_get(config, 'required_wildcards', default='default')
+    w = test_param_get('required_wildcards', default='default')
     if w == 'l3-l4':
         return (ofp.OFPFW_NW_SRC_ALL | ofp.OFPFW_NW_DST_ALL | ofp.OFPFW_NW_TOS
                 | ofp.OFPFW_NW_PROTO | ofp.OFPFW_TP_SRC | ofp.OFPFW_TP_DST)
@@ -252,7 +252,7 @@
     rv = controller.message_send(mod)
     return rv
 
-def receive_pkt_check(dp, pkt, yes_ports, no_ports, assert_if, config):
+def receive_pkt_check(dp, pkt, yes_ports, no_ports, assert_if):
     """
     Check for proper receive packets across all ports
     @param dp The dataplane object
@@ -262,7 +262,7 @@
     @param assert_if Object that implements assertXXX
     """
     exp_pkt_arg = None
-    if config and config["relax"]:
+    if config["relax"]:
         exp_pkt_arg = pkt
 
     for ofport in yes_ports:
@@ -502,7 +502,7 @@
     @param clear_table If true, clear the flow table before installing
     """
 
-    clear_table = test_param_get(config, 'clear_table', default=True)
+    clear_table = test_param_get('clear_table', default=True)
     if(clear_table_override != None):
         clear_table = clear_table_override
 
@@ -604,7 +604,7 @@
     test_count = 0
 
     if egr_count == -1:
-        egr_count = test_param_get(config, 'egr_count', default=2)
+        egr_count = test_param_get('egr_count', default=2)
     
     for ing_idx in range(len(of_ports)):
         ingress_port = of_ports[ing_idx]
@@ -625,11 +625,10 @@
             logging.info("Ran " + str(test_count) + " tests; exiting")
             return
 
-def test_param_get(config, key, default=None):
+def test_param_get(key, default=None):
     """
     Return value passed via test-params if present
 
-    @param config The configuration structure for OFTest
     @param key The lookup key
     @param default Default value to use if not found
 
@@ -708,7 +707,7 @@
     """
     Set up the ingress and expected packet and action list for a test
 
-    @param parent Must implement, assertTrue, and config hash
+    @param parent Must implement assertTrue
     @param start_field_values Field values to use for ingress packet (optional)
     @param mod_field_values Field values to use for modified packet (optional)
     @param mod_fields The list of fields to be modified by the switch in the test.
@@ -753,9 +752,9 @@
     # Check for test param modifications
     strip = False
     if check_test_params:
-        add_vlan = test_param_get(config, 'add_vlan')
-        strip_vlan = test_param_get(config, 'strip_vlan')
-        vid = test_param_get(config, 'vid')
+        add_vlan = test_param_get('add_vlan')
+        strip_vlan = test_param_get('strip_vlan')
+        vid = test_param_get('vid')
 
         if add_vlan and strip_vlan:
             parent.assertTrue(0, "Add and strip VLAN both specified")
diff --git a/tests/actions.py b/tests/actions.py
index 0712302..590a91c 100644
--- a/tests/actions.py
+++ b/tests/actions.py
@@ -174,7 +174,7 @@
         #Verifying packets recieved on expected dataplane ports
         yes_ports = set(of_ports).difference([ingress_port])
         receive_pkt_check(self.dataplane, pkt, yes_ports, [ingress_port],
-                      self, config)
+                      self)
 
 
 class ForwardController(base_tests.SimpleDataPlane):
@@ -334,7 +334,7 @@
         #Verifying packets recieved on expected dataplane ports
         yes_ports = set(of_ports).difference([ingress_port])
         receive_pkt_check(self.dataplane, pkt, yes_ports, [ingress_port],
-                      self, config)
+                      self)
 
 class ForwardInport(base_tests.SimpleDataPlane):
     
@@ -386,7 +386,7 @@
 
         #Verfying packet recieved on expected dataplane ports
         receive_pkt_check(self.dataplane, pkt, yes_ports,set(of_ports).difference([ingress_port]),
-                          self, config)
+                          self)
 
 class ForwardTable(base_tests.SimpleDataPlane):
    
diff --git a/tests/basic.py b/tests/basic.py
index 5681ed8..113640a 100644
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -81,7 +81,7 @@
         self.assertEqual(rc, 0, "Failed to delete all flows")
         self.assertEqual(do_barrier(self.controller), 0, "Barrier failed")
 
-        vid = test_param_get(config, 'vid', default=TEST_VID_DEFAULT)
+        vid = test_param_get('vid', default=TEST_VID_DEFAULT)
 
         for of_port in config["port_map"].keys():
             for pkt, pt in [
@@ -277,7 +277,7 @@
 
                receive_pkt_check(self.dataplane, outpkt, dp_ports,
                                  set(of_ports).difference(dp_ports),
-                                 self, config)
+                                 self)
 
 class FlowStatsGet(base_tests.SimpleProtocol):
     """
diff --git a/tests/cxn.py b/tests/cxn.py
index eeea564..da15c9e 100644
--- a/tests/cxn.py
+++ b/tests/cxn.py
@@ -46,8 +46,7 @@
     def setUp(self):
         logging.info("** START TEST CASE " + str(self))
 
-        self.test_timeout = test_param_get(config,
-                                           'handshake_timeout') or 60
+        self.test_timeout = test_param_get('handshake_timeout', default=60)
 
     def inheritSetup(self, parent):
         """
diff --git a/tests/flow_query.py b/tests/flow_query.py
index 7d86172..e3dc1a7 100644
--- a/tests/flow_query.py
+++ b/tests/flow_query.py
@@ -147,8 +147,8 @@
             self.dl_addrs.append(rand_dl_addr())
             i = i + 1
     
-        if test_param_get(config, "vlans", []) != []:
-           self.vlans = test_param_get(config, "vlans", [])
+        if test_param_get("vlans", []) != []:
+           self.vlans = test_param_get("vlans", [])
 
            logging.info("Overriding VLAN ids to:")
            logging.info(self.vlans)
@@ -394,7 +394,7 @@
         return True
 
     def actions_equal(self, x):
-        if test_param_get(config, "conservative_ordered_actions", True):
+        if test_param_get("conservative_ordered_actions", True):
             # Compare actions lists as unordered
             
             aa = copy.deepcopy(x.actions.actions)
@@ -498,7 +498,7 @@
         # Action lists are ordered, so pick an ordered random subset of
         # supported actions
 
-        actions_force = test_param_get(config, "actions_force", 0)
+        actions_force = test_param_get("actions_force", 0)
         if actions_force != 0:
             logging.info("Forced actions:")
             logging.info(actions_bmap_to_str(actions_force))
@@ -607,11 +607,11 @@
 
         # By default, test with conservative ordering conventions
         # This should probably be indicated in a profile
-        if test_param_get(config, "conservative_ordered_actions", True):
+        if test_param_get("conservative_ordered_actions", True):
             self.rand_actions_ordered(fi, valid_actions, valid_ports, valid_queues)
             return self
 
-        actions_force = test_param_get(config, "actions_force", 0)
+        actions_force = test_param_get("actions_force", 0)
         if actions_force != 0:
             logging.info("Forced actions:")
             logging.info(actions_bmap_to_str(actions_force))
@@ -1238,7 +1238,7 @@
         self.valid_ports = map(lambda x: x.port_no, self.sw_features.ports)
         logging.info("Ports reported by switch:")
         logging.info(self.valid_ports)
-        ports_override = test_param_get(config, "ports", [])
+        ports_override = test_param_get("ports", [])
         if ports_override != []:
             logging.info("Overriding ports to:")
             logging.info(ports_override)
@@ -1263,7 +1263,7 @@
                           actions_bmap_to_str(self.sw_features.actions) \
                           ) \
                        )
-        actions_override = test_param_get(config, "actions", -1)
+        actions_override = test_param_get("actions", -1)
         if actions_override != -1:
             logging.info("Overriding supported actions to:")
             logging.info(actions_bmap_to_str(actions_override))
@@ -1287,7 +1287,7 @@
                               wildcards_to_str(ts.wildcards) \
                               ) \
                            )
-            wildcards_override = test_param_get(config, "wildcards", -1)
+            wildcards_override = test_param_get("wildcards", -1)
             if wildcards_override != -1:
                 logging.info("Overriding supported wildcards for table %d to:"
                                % (i)
@@ -1311,7 +1311,7 @@
                                 )
         logging.info("(Port, queue) pairs reported by switch:")
         logging.info(self.valid_queues)
-        queues_override = test_param_get(config, "queues", [])
+        queues_override = test_param_get("queues", [])
         if queues_override != []:
             logging.info("Overriding (port, queue) pairs to:")
             logging.info(queues_override)
@@ -1578,7 +1578,7 @@
     def runTest(self):
         logging.info("Flow_Add_5 TEST BEGIN")
 
-        num_flows = test_param_get(config, "num_flows", 100)
+        num_flows = test_param_get("num_flows", 100)
 
         # Clear all flows from switch
 
@@ -1681,7 +1681,7 @@
     def runTest(self):
         logging.info("Flow_Add_5_1 TEST BEGIN")
 
-        num_flows = test_param_get(config, "num_flows", 100)
+        num_flows = test_param_get("num_flows", 100)
         
         # Clear all flows from switch
 
@@ -2305,7 +2305,7 @@
     def runTest(self):
         logging.info("Flow_Mod_2 TEST BEGIN")
 
-        num_flows = test_param_get(config, "num_flows", 100)
+        num_flows = test_param_get("num_flows", 100)
 
         # Clear all flows from switch
 
@@ -2789,7 +2789,7 @@
     def runTest(self):
         logging.info("Flow_Del_2 TEST BEGIN")
 
-        num_flows = test_param_get(config, "num_flows", 100)
+        num_flows = test_param_get("num_flows", 100)
 
         # Clear all flows from switch
 
diff --git a/tests/load.py b/tests/load.py
index a05a373..e913445 100644
--- a/tests/load.py
+++ b/tests/load.py
@@ -50,8 +50,8 @@
     def runTest(self):
         # Set up flow to send from port 1 to port 2 and copy to CPU
         # Test parameter gives LB port base (assumes consecutive)
-        lb_port = test_param_get(config, 'lb_port', default=1)
-        barrier_count = test_param_get(config, 'barrier_count', 
+        lb_port = test_param_get('lb_port', default=1)
+        barrier_count = test_param_get('barrier_count', 
                                        default=10)
 
         # Set controller to filter packet ins
diff --git a/tests/pktact.py b/tests/pktact.py
index 76dea36..a68e773 100644
--- a/tests/pktact.py
+++ b/tests/pktact.py
@@ -537,7 +537,7 @@
             no_ports = set(of_ports).difference(yes_ports)
 
             receive_pkt_check(self.dataplane, pkt, yes_ports, no_ports,
-                              self, config)
+                              self)
 
 class DirectMCNonIngress(base_tests.SimpleDataPlane):
     """
@@ -591,7 +591,7 @@
             self.dataplane.send(ingress_port, str(pkt))
             yes_ports = set(of_ports).difference([ingress_port])
             receive_pkt_check(self.dataplane, pkt, yes_ports, [ingress_port],
-                              self, config)
+                              self)
 
 
 class DirectMC(base_tests.SimpleDataPlane):
@@ -644,7 +644,7 @@
 
             logging.info("Sending packet to dp port " + str(ingress_port))
             self.dataplane.send(ingress_port, str(pkt))
-            receive_pkt_check(self.dataplane, pkt, of_ports, [], self, config)
+            receive_pkt_check(self.dataplane, pkt, of_ports, [], self)
 
 class Flood(base_tests.SimpleDataPlane):
     """
@@ -692,7 +692,7 @@
             self.dataplane.send(ingress_port, str(pkt))
             yes_ports = set(of_ports).difference([ingress_port])
             receive_pkt_check(self.dataplane, pkt, yes_ports, [ingress_port],
-                              self, config)
+                              self)
 
 class FloodPlusIngress(base_tests.SimpleDataPlane):
     """
@@ -742,7 +742,7 @@
 
             logging.info("Sending packet to dp port " + str(ingress_port))
             self.dataplane.send(ingress_port, str(pkt))
-            receive_pkt_check(self.dataplane, pkt, of_ports, [], self, config)
+            receive_pkt_check(self.dataplane, pkt, of_ports, [], self)
 
 class All(base_tests.SimpleDataPlane):
     """
@@ -790,7 +790,7 @@
             self.dataplane.send(ingress_port, str(pkt))
             yes_ports = set(of_ports).difference([ingress_port])
             receive_pkt_check(self.dataplane, pkt, yes_ports, [ingress_port],
-                              self, config)
+                              self)
 
 class AllPlusIngress(base_tests.SimpleDataPlane):
     """
@@ -840,7 +840,7 @@
 
             logging.info("Sending packet to dp port " + str(ingress_port))
             self.dataplane.send(ingress_port, str(pkt))
-            receive_pkt_check(self.dataplane, pkt, of_ports, [], self, config)
+            receive_pkt_check(self.dataplane, pkt, of_ports, [], self)
             
 class FloodMinusPort(base_tests.SimpleDataPlane):
     """
@@ -897,7 +897,7 @@
             self.dataplane.send(ingress_port, str(pkt))
             no_ports = set([ingress_port, no_flood_port])
             yes_ports = set(of_ports).difference(no_ports)
-            receive_pkt_check(self.dataplane, pkt, yes_ports, no_ports, self, config)
+            receive_pkt_check(self.dataplane, pkt, yes_ports, no_ports, self)
 
             # Turn no flood off again
             rv = port_config_set(self.controller, no_flood_port,
@@ -936,7 +936,7 @@
     """
 
     def runTest(self):
-        vid = test_param_get(config, 'vid', default=TEST_VID_DEFAULT)
+        vid = test_param_get('vid', default=TEST_VID_DEFAULT)
         flow_match_test(self, config["port_map"], dl_vlan=vid)
 
 class ExactMatchTaggedMany(BaseMatchCase):
@@ -1167,7 +1167,7 @@
     Verify flow_expiration message is correct when command option is set
     """
     def runTest(self):
-        vid = test_param_get(config, 'vid', default=TEST_VID_DEFAULT)
+        vid = test_param_get('vid', default=TEST_VID_DEFAULT)
         for wc in WILDCARD_VALUES:
             wc |= required_wildcards(self)
             if wc & ofp.OFPFW_DL_VLAN:
@@ -1183,7 +1183,7 @@
     SingleWildcardMatch with tagged packets
     """
     def runTest(self):
-        vid = test_param_get(config, 'vid', default=TEST_VID_DEFAULT)
+        vid = test_param_get('vid', default=TEST_VID_DEFAULT)
         for wc in WILDCARD_VALUES:
             wc |= required_wildcards(self)
             flow_match_test(self, config["port_map"], wildcards=wc, dl_vlan=vid,
@@ -1201,7 +1201,7 @@
     Verify flow_expiration message is correct when command option is set
     """
     def runTest(self):
-        vid = test_param_get(config, 'vid', default=TEST_VID_DEFAULT)
+        vid = test_param_get('vid', default=TEST_VID_DEFAULT)
         for all_exp_one_wildcard in NO_WILDCARD_VALUES:
             all_exp_one_wildcard |= required_wildcards(self)
             if all_exp_one_wildcard & ofp.OFPFW_DL_VLAN:
@@ -1217,7 +1217,7 @@
     Match one field with tagged packets
     """
     def runTest(self):
-        vid = test_param_get(config, 'vid', default=TEST_VID_DEFAULT)
+        vid = test_param_get('vid', default=TEST_VID_DEFAULT)
         for all_exp_one_wildcard in NO_WILDCARD_VALUES:
             all_exp_one_wildcard |= required_wildcards(self)
             flow_match_test(self, config["port_map"], wildcards=all_exp_one_wildcard,
@@ -1242,7 +1242,7 @@
     AllWildcardMatch with tagged packets
     """
     def runTest(self):
-        vid = test_param_get(config, 'vid', default=TEST_VID_DEFAULT)
+        vid = test_param_get('vid', default=TEST_VID_DEFAULT)
         flow_match_test(self, config["port_map"], wildcards=ofp.OFPFW_ALL, 
                         dl_vlan=vid)
 
@@ -1293,7 +1293,7 @@
     priority = -1
 
     def runTest(self):
-        vid = test_param_get(config, 'vid', default=TEST_VID_DEFAULT)
+        vid = test_param_get('vid', default=TEST_VID_DEFAULT)
         pkt = simple_tcp_packet(dl_vlan_enable=True, dl_vlan=vid)
         of_ports = config["port_map"].keys()
         of_ports.sort()
@@ -1681,8 +1681,8 @@
     (add, modify, delete +/- strict).
     """
     def runTest(self):
-        flow_count = test_param_get(config, 'ft_flow_count', default=20)
-        iter_count = test_param_get(config, 'ft_iter_count', default=10)
+        flow_count = test_param_get('ft_flow_count', default=20)
+        iter_count = test_param_get('ft_iter_count', default=10)
 
         logging.info("Running flow toggle with %d flows, %d iterations" %
                        (flow_count, iter_count))
@@ -1789,7 +1789,7 @@
     priority = -1
 
     def runTest(self):
-        count = test_param_get(config, 'iter_count', default=10)
+        count = test_param_get('iter_count', default=10)
         tests_done = 0
         logging.info("Running iteration test " + str(count) + " times")
         start = time.time()
diff --git a/tests/serial_failover.py b/tests/serial_failover.py
index 7baeae0..fab5141 100644
--- a/tests/serial_failover.py
+++ b/tests/serial_failover.py
@@ -88,8 +88,7 @@
 
     def buildControllerList(self):
         # controller_list is list of ip/port tuples
-        partial_list = test_param_get(config,
-                                      'controller_list')
+        partial_list = test_param_get('controller_list')
         logging.debug("ctrl list: " + str(partial_list))
         self.controller_list = [(config["controller_host"],
                                  config["controller_port"])]
@@ -114,10 +113,8 @@
     def setUp(self):
         logging.info("** START TEST CASE " + str(self))
 
-        self.test_timeout = test_param_get(config,
-                                           'failover_timeout') or 60
-        self.test_iterations = test_param_get(config,
-                                              'failover_iterations') or 4
+        self.test_timeout = test_param_get('failover_timeout') or 60
+        self.test_iterations = test_param_get('failover_iterations') or 4
 
         self.buildControllerList()
         self.controller_idx = 0
