diff --git a/olt.py b/olt.py
index 4f78f2a..2c36d58 100644
--- a/olt.py
+++ b/olt.py
@@ -5,9 +5,11 @@
 import logging
 from __builtin__ import xrange
 from oftest import config
+from oltbase import OltBaseTest
 import oftest.base_tests as base_tests
 import oftest.packet as scapy
 
+
 import ofp
 import time
 import copy
@@ -832,7 +834,13 @@
         self.assertTrue(len(stats) == 4, \
                         "Wrong number of rules reports; reported %s, expected 4\n\n %s" % (len(stats), stats))
 
-        logging.info(stats)
+        eapol = ofp.oxm.eth_type(0x888e)
+        found = False
+        for fe in stats:
+            if eapol in fe.match.oxm_list:
+                found = True
+
+        self.assertFalse(found, "Removed incorrect flow rule")
 
 
 class MultipleDoubleTaggingForwarding(base_tests.SimpleDataPlane):
@@ -842,7 +850,7 @@
         pass
 
 
-class DoubleVlanTest(base_tests.SimpleDataPlane):
+class DoubleVlanTest(OltBaseTest):
 
     def runTest(self):
         logging.info("Running double vlan tests")
@@ -851,7 +859,7 @@
         c_vlan_id = 100
         s_vlan_id = 102
 
-        installDoubleTaggingRules(s_vlan_id, c_vlan_id, self.controller)
+        self.installDoubleTaggingRules(s_vlan_id, c_vlan_id)
 
         # It takes some time for flows to propagate down to the data plane
         time.sleep(10)
@@ -950,108 +958,3 @@
     verify_no_packet(test, upstreamDoubleTaggedPkt, olt_port)
 
 
-def installDoubleTaggingRules(s_vlan_id, c_vlan_id, controller, cookie=42):
-
-    # upstream flow rule
-    match = ofp.match()
-    match.oxm_list.append(ofp.oxm.in_port(onu_port))
-    if device_type == "cpqd":
-        match.oxm_list.append(ofp.oxm.vlan_vid(value=ofp.OFPVID_NONE))
-        actions = [
-            ofp.action.push_vlan(ethertype=0x8100),
-            ofp.action.set_field(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | c_vlan_id)),
-            ofp.action.set_field(ofp.oxm.vlan_pcp(0))
-        ]
-    else:  # "pmc", "normal"
-        match.oxm_list.append(ofp.oxm.vlan_vid(value=ofp.OFPVID_PRESENT))
-        match.oxm_list.append(ofp.oxm.vlan_pcp(value=0))
-        actions = [
-            ofp.action.set_field(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | c_vlan_id))
-        ]
-    cookie += 1
-
-    # push inner vlan (c-vlan) for upstream
-    request = ofp.message.flow_add(
-        table_id=test_param_get("table", 0),
-        cookie=cookie,
-        match=match,
-        instructions=[
-            ofp.instruction.apply_actions(actions=actions),
-            ofp.instruction.goto_table(1)],
-        buffer_id=ofp.OFP_NO_BUFFER,
-        priority=1000)
-
-    controller.message_send(request)
-    do_barrier(controller)
-    verify_no_errors(controller)
-
-    # push outer vlan (s-vlan) for upstream
-    match = ofp.match()
-    match.oxm_list.append(ofp.oxm.in_port(onu_port))
-    match.oxm_list.append(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | c_vlan_id))
-    match.oxm_list.append(ofp.oxm.vlan_pcp(0))
-    cookie += 1
-
-    request = ofp.message.flow_add(
-        table_id=test_param_get("table", 1),
-        cookie=cookie,
-        match=match,
-        instructions=[
-            ofp.instruction.apply_actions(
-                actions=[
-                    ofp.action.push_vlan(ethertype=0x8100),
-                    ofp.action.set_field(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | s_vlan_id)),
-                    ofp.action.set_field(ofp.oxm.vlan_pcp(0)),
-                    ofp.action.output(port=olt_port)]),
-        ],
-        buffer_id=ofp.OFP_NO_BUFFER,
-        priority=1000)
-
-    controller.message_send(request)
-    do_barrier(controller)
-    verify_no_errors(controller)
-    cookie += 1
-
-    # strip outer vlan (s-vlan) for downstream
-    match = ofp.match()
-    match.oxm_list.append(ofp.oxm.in_port(olt_port))
-    match.oxm_list.append(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | s_vlan_id))
-    match.oxm_list.append(ofp.oxm.vlan_pcp(0))
-    request = ofp.message.flow_add(
-        table_id=test_param_get("table", 0),
-        cookie=cookie,
-        match=match,
-        instructions=[
-            ofp.instruction.apply_actions(
-                actions=[ofp.action.pop_vlan()]),
-            ofp.instruction.goto_table(1)],
-        buffer_id=ofp.OFP_NO_BUFFER,
-        priority=1000)
-
-    controller.message_send(request)
-    do_barrier(controller)
-    verify_no_errors(controller)
-
-    # rewrite inner vlan (c-vlan) to default (0) for downstream
-    match = ofp.match()
-    match.oxm_list.append(ofp.oxm.in_port(olt_port))
-    match.oxm_list.append(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | c_vlan_id))
-    match.oxm_list.append(ofp.oxm.vlan_pcp(0))
-    cookie += 1
-
-    request = ofp.message.flow_add(
-        table_id=test_param_get("table", 1),
-        cookie=cookie,
-        match=match,
-        instructions=[
-            ofp.instruction.apply_actions(
-                actions=[
-                    ofp.action.pop_vlan(),
-                    ofp.action.output(port=onu_port)])
-        ],
-        buffer_id=ofp.OFP_NO_BUFFER,
-        priority=1000)
-
-    controller.message_send(request)
-    do_barrier(controller)
-    verify_no_errors(controller)
diff --git a/oltbase.py b/oltbase.py
new file mode 100644
index 0000000..642d5c2
--- /dev/null
+++ b/oltbase.py
@@ -0,0 +1,114 @@
+import oftest.base_tests as base_tests
+import oftest.packet as scapy
+
+import ofp
+import time
+
+
+class OltBaseTest(base_tests.SimpleDataPlane):
+
+    def installDoubleTaggingRules(s_vlan_id, c_vlan_id, cookie=42):
+
+        # upstream flow rule
+        match = ofp.match()
+        match.oxm_list.append(ofp.oxm.in_port(onu_port))
+        if device_type == "cpqd":
+            match.oxm_list.append(ofp.oxm.vlan_vid(value=ofp.OFPVID_NONE))
+            actions = [
+                ofp.action.push_vlan(ethertype=0x8100),
+                ofp.action.set_field(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | c_vlan_id)),
+                ofp.action.set_field(ofp.oxm.vlan_pcp(0))
+            ]
+        else:  # "pmc", "normal"
+            match.oxm_list.append(ofp.oxm.vlan_vid(value=ofp.OFPVID_PRESENT))
+            match.oxm_list.append(ofp.oxm.vlan_pcp(value=0))
+            actions = [
+                ofp.action.set_field(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | c_vlan_id))
+            ]
+        cookie += 1
+
+        # push inner vlan (c-vlan) for upstream
+        request = ofp.message.flow_add(
+            table_id=test_param_get("table", 0),
+            cookie=cookie,
+            match=match,
+            instructions=[
+                ofp.instruction.apply_actions(actions=actions),
+                ofp.instruction.goto_table(1)],
+            buffer_id=ofp.OFP_NO_BUFFER,
+            priority=1000)
+
+        self.controller.message_send(request)
+        do_barrier(self.controller)
+        verify_no_errors(self.controller)
+
+        # push outer vlan (s-vlan) for upstream
+        match = ofp.match()
+        match.oxm_list.append(ofp.oxm.in_port(onu_port))
+        match.oxm_list.append(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | c_vlan_id))
+        match.oxm_list.append(ofp.oxm.vlan_pcp(0))
+        cookie += 1
+
+        request = ofp.message.flow_add(
+            table_id=test_param_get("table", 1),
+            cookie=cookie,
+            match=match,
+            instructions=[
+                ofp.instruction.apply_actions(
+                    actions=[
+                        ofp.action.push_vlan(ethertype=0x8100),
+                        ofp.action.set_field(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | s_vlan_id)),
+                        ofp.action.set_field(ofp.oxm.vlan_pcp(0)),
+                        ofp.action.output(port=olt_port)]),
+            ],
+            buffer_id=ofp.OFP_NO_BUFFER,
+            priority=1000)
+
+        self.controller.message_send(request)
+        do_barrier(self.controller)
+        verify_no_errors(self.controller)
+        cookie += 1
+
+        # strip outer vlan (s-vlan) for downstream
+        match = ofp.match()
+        match.oxm_list.append(ofp.oxm.in_port(olt_port))
+        match.oxm_list.append(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | s_vlan_id))
+        match.oxm_list.append(ofp.oxm.vlan_pcp(0))
+        request = ofp.message.flow_add(
+            table_id=test_param_get("table", 0),
+            cookie=cookie,
+            match=match,
+            instructions=[
+                ofp.instruction.apply_actions(
+                    actions=[ofp.action.pop_vlan()]),
+                ofp.instruction.goto_table(1)],
+            buffer_id=ofp.OFP_NO_BUFFER,
+            priority=1000)
+
+        self.controller.message_send(request)
+        do_barrier(self.controller)
+        verify_no_errors(self.controller)
+
+        # rewrite inner vlan (c-vlan) to default (0) for downstream
+        match = ofp.match()
+        match.oxm_list.append(ofp.oxm.in_port(olt_port))
+        match.oxm_list.append(ofp.oxm.vlan_vid(ofp.OFPVID_PRESENT | c_vlan_id))
+        match.oxm_list.append(ofp.oxm.vlan_pcp(0))
+        cookie += 1
+
+        request = ofp.message.flow_add(
+            table_id=test_param_get("table", 1),
+            cookie=cookie,
+            match=match,
+            instructions=[
+                ofp.instruction.apply_actions(
+                    actions=[
+                        ofp.action.pop_vlan(),
+                        ofp.action.output(port=onu_port)])
+            ],
+            buffer_id=ofp.OFP_NO_BUFFER,
+            priority=1000)
+
+        self.controller.message_send(request)
+        do_barrier(self.controller)
+        verify_no_errors(self.controller)
