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
