diff --git a/of/api/src/main/java/org/onlab/onos/of/controller/DefaultPacketContext.java b/of/api/src/main/java/org/onlab/onos/of/controller/DefaultPacketContext.java
index 41c8adc..bb6640c 100644
--- a/of/api/src/main/java/org/onlab/onos/of/controller/DefaultPacketContext.java
+++ b/of/api/src/main/java/org/onlab/onos/of/controller/DefaultPacketContext.java
@@ -1,8 +1,12 @@
 package org.onlab.onos.of.controller;
 
+import java.util.Collections;
+
 import org.onlab.packet.Ethernet;
 import org.projectfloodlight.openflow.protocol.OFPacketIn;
 import org.projectfloodlight.openflow.protocol.OFPacketOut;
+import org.projectfloodlight.openflow.protocol.action.OFAction;
+import org.projectfloodlight.openflow.types.OFBufferId;
 import org.projectfloodlight.openflow.types.OFPort;
 
 public final class DefaultPacketContext implements PacketContext {
@@ -11,7 +15,7 @@
     private boolean isBuilt = false;
     private final OpenFlowSwitch sw;
     private final OFPacketIn pktin;
-    private final OFPacketOut pktout = null;
+    private OFPacketOut pktout = null;
 
     private DefaultPacketContext(OpenFlowSwitch s, OFPacketIn pkt) {
         this.sw = s;
@@ -39,20 +43,32 @@
 
     @Override
     public void build(Ethernet ethFrame, OFPort outPort) {
-        // TODO Auto-generated method stub
-
+        if (isBuilt) {
+            return;
+        }
+        OFPacketOut.Builder builder = sw.factory().buildPacketOut();
+        OFAction act = sw.factory().actions()
+                .buildOutput()
+                .setPort(OFPort.of(outPort.getPortNumber()))
+                .build();
+        pktout = builder.setXid(pktin.getXid())
+                .setBufferId(OFBufferId.NO_BUFFER)
+                .setActions(Collections.singletonList(act))
+                .setData(ethFrame.serialize())
+                .build();
+        isBuilt = true;
     }
 
     @Override
     public Ethernet parsed() {
-        // TODO Auto-generated method stub
-        return null;
+        Ethernet eth = new Ethernet();
+        eth.deserialize(pktin.getData(), 0, pktin.getTotalLen());
+        return eth;
     }
 
     @Override
     public Dpid dpid() {
-        // TODO Auto-generated method stub
-        return null;
+        return new Dpid(sw.getId());
     }
 
     public static PacketContext packetContextFromPacketIn(OpenFlowSwitch s, OFPacketIn pkt) {
diff --git a/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java b/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java
index ed9d970..84b7f44 100644
--- a/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java
+++ b/providers/of/link/src/main/java/org/onlab/onos/provider/of/link/impl/OpenFlowLinkProvider.java
@@ -12,9 +12,12 @@
 import org.onlab.onos.net.link.LinkProviderService;
 import org.onlab.onos.net.provider.AbstractProvider;
 import org.onlab.onos.net.provider.ProviderId;
+import org.onlab.onos.of.controller.Dpid;
 import org.onlab.onos.of.controller.OpenFlowController;
+import org.onlab.onos.of.controller.OpenFlowSwitchListener;
 import org.onlab.onos.of.controller.PacketContext;
 import org.onlab.onos.of.controller.PacketListener;
+import org.projectfloodlight.openflow.protocol.OFPortStatus;
 import org.slf4j.Logger;
 
 /**
@@ -34,7 +37,7 @@
 
     private LinkProviderService providerService;
 
-    private final PacketListener listener = new InternalLinkProvider();
+    private final InternalLinkProvider listener = new InternalLinkProvider();
 
     /**
      * Creates an OpenFlow link provider.
@@ -46,6 +49,7 @@
     @Activate
     public void activate() {
         providerService = providerRegistry.register(this);
+        controller.addListener(listener);
         controller.addPacketListener(0, listener);
         log.info("Started");
     }
@@ -53,19 +57,38 @@
     @Deactivate
     public void deactivate() {
         providerRegistry.unregister(this);
+        controller.removeListener(listener);
         controller.removePacketListener(listener);
         providerService = null;
         log.info("Stopped");
     }
 
 
-    private class InternalLinkProvider implements PacketListener {
+    private class InternalLinkProvider implements PacketListener, OpenFlowSwitchListener {
 
         @Override
         public void handlePacket(PacketContext pktCtx) {
 
         }
 
+        @Override
+        public void switchAdded(Dpid dpid) {
+            // TODO Auto-generated method stub
+
+        }
+
+        @Override
+        public void switchRemoved(Dpid dpid) {
+            // TODO Auto-generated method stub
+
+        }
+
+        @Override
+        public void portChanged(Dpid dpid, OFPortStatus status) {
+            // TODO Auto-generated method stub
+
+        }
+
     }
 
 }
diff --git a/utils/misc/pom.xml b/utils/misc/pom.xml
index c39fd32..2ff34ec 100644
--- a/utils/misc/pom.xml
+++ b/utils/misc/pom.xml
@@ -22,10 +22,10 @@
             <artifactId>guava-testlib</artifactId>
             <scope>test</scope>
         </dependency>
-
         <dependency>
-            <groupId>commons-lang</groupId>
-            <artifactId>commons-lang</artifactId>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+            <version>3.9.0.Final</version>
         </dependency>
     </dependencies>
 
diff --git a/utils/misc/src/main/java/org/onlab/packet/OVXLLDP.java b/utils/misc/src/main/java/org/onlab/packet/ONLabLddp.java
similarity index 95%
rename from utils/misc/src/main/java/org/onlab/packet/OVXLLDP.java
rename to utils/misc/src/main/java/org/onlab/packet/ONLabLddp.java
index f1a4b5f..b3aba43 100644
--- a/utils/misc/src/main/java/org/onlab/packet/OVXLLDP.java
+++ b/utils/misc/src/main/java/org/onlab/packet/ONLabLddp.java
@@ -29,7 +29,7 @@
  *
  */
 @SuppressWarnings("rawtypes")
-public class OVXLLDP extends LLDP {
+public class ONLabLddp extends LLDP {
 
     // ON.Lab OUI and OVX name for organizationally specific TLVs
     public static final byte[] ONLAB_OUI = {(byte) 0xa4, 0x23, 0x05};
@@ -58,7 +58,7 @@
 
     private static final byte NAME_TLV_TYPE = 127;
     // 4 = OUI (3) + subtype (1)
-    private static final byte NAME_TLV_SIZE = (byte) (4 + OVXLLDP.OVX_NAME.length());
+    private static final byte NAME_TLV_SIZE = (byte) (4 + ONLabLddp.OVX_NAME.length());
     private static final byte NAME_TLV_SUBTYPE = 1;
     private static final short NAME_TLV_OFFSET = 32;
     private static final short NAME_TLV_HEADER = (short) ((NAME_TLV_TYPE << 9) | NAME_TLV_SIZE);
@@ -119,7 +119,7 @@
     /**
      * Instantiates a new OVX LDDP message.
      */
-    public OVXLLDP() {
+    public ONLabLddp() {
         // Create TLVs
         this.chassisTLV = new LLDPTLV();
         this.portTLV = new LLDPTLV();
@@ -140,7 +140,7 @@
         this.setChassisTLV(DEFAULT_DPID);
         this.setPortTLV(DEFAULT_PORT);
         this.setTTLTLV(DEFAULT_TTL);
-        this.setOUIName(OVXLLDP.OVX_NAME);
+        this.setOUIName(ONLabLddp.OVX_NAME);
         this.setOUIDpid(DEFAULT_DPID);
     }
 
@@ -198,7 +198,7 @@
      */
     private void setOUIName(final String name) {
         this.bb = ByteBuffer.wrap(ouiName);
-        this.bb.put(OVXLLDP.ONLAB_OUI);
+        this.bb.put(ONLabLddp.ONLAB_OUI);
         this.bb.put(NAME_TLV_SUBTYPE);
         this.bb.put(name.getBytes());
 
@@ -214,7 +214,7 @@
      */
     private void setOUIDpid(final byte[] dpid) {
         this.bb = ByteBuffer.wrap(ouiDpid);
-        this.bb.put(OVXLLDP.ONLAB_OUI);
+        this.bb.put(ONLabLddp.ONLAB_OUI);
         this.bb.put(DPID_TLV_SUBTYPE);
         this.bb.put(dpid);
 
@@ -272,9 +272,9 @@
         final byte[] dst = new byte[6];
         bb.get(dst);
 
-        if (!(Arrays.equals(dst, OVXLLDP.LLDP_NICIRA)
-                || Arrays.equals(dst, OVXLLDP.LLDP_MULTICAST) || Arrays.equals(
-                        dst, OVXLLDP.BDDP_MULTICAST))) {
+        if (!(Arrays.equals(dst, ONLabLddp.LLDP_NICIRA)
+                || Arrays.equals(dst, ONLabLddp.LLDP_MULTICAST) || Arrays.equals(
+                        dst, ONLabLddp.BDDP_MULTICAST))) {
 
             return false;
         }
