diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java b/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java
index fd9d535..f5f8b00 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/internal/DeviceStorageImpl.java
@@ -68,28 +68,34 @@
 	@Override
 	public IDeviceObject addDevice(IDevice device) {
 		IDeviceObject obj = null;
- 		try {
- 			if ((obj = ope.searchDevice(device.getMACAddressString())) != null) {
- 				log.debug("Adding device {}: found existing device", device.getMACAddressString());
-            } else {
-            	obj = ope.newDevice();
-                log.debug("Adding device {}: creating new device", device.getMACAddressString());
-            }
- 			
-            changeDeviceAttachments(device, obj);
-	        
-            changeDeviceIpv4Addresses(device, obj);
-            
- 			obj.setMACAddress(device.getMACAddressString());
- 			obj.setType("device");
- 			obj.setState("ACTIVE");
- 			ope.commit();
-		
- 			//log.debug("Adding device {}",device.getMACAddressString());
-		} catch (TitanException e) {
-			ope.rollback();
-			log.error("Adding device {} failed", device.getMACAddressString(), e);
-			obj = null;
+		for (int i = 0; i < 6; i++) {
+	 		try {
+	 			if (i > 0) {
+	 				log.debug("Retrying add device: i is {}", i);
+	 			}
+	 			if ((obj = ope.searchDevice(device.getMACAddressString())) != null) {
+	 				log.debug("Adding device {}: found existing device", device.getMACAddressString());
+	            } else {
+	            	obj = ope.newDevice();
+	                log.debug("Adding device {}: creating new device", device.getMACAddressString());
+	            }
+	 			
+	            changeDeviceAttachments(device, obj);
+		        
+	            changeDeviceIpv4Addresses(device, obj);
+	            
+	 			obj.setMACAddress(device.getMACAddressString());
+	 			obj.setType("device");
+	 			obj.setState("ACTIVE");
+	 			ope.commit();
+	 			
+	 			break;
+	 			//log.debug("Adding device {}",device.getMACAddressString());
+			} catch (TitanException e) {
+				ope.rollback();
+				log.error("Adding device {} failed", device.getMACAddressString(), e);
+				obj = null;
+			}
 		}
  		
 		return obj;		
@@ -262,8 +268,10 @@
 	
 	private void changeDeviceIpv4Addresses(IDevice device, IDeviceObject deviceObject) {
 		List<String> dbIpv4Addresses = new ArrayList<String>();
+		List<Integer> intDbIpv4Addresses = new ArrayList<Integer>();
 		for (IIpv4Address ipv4Vertex : deviceObject.getIpv4Addresses()) {
 			dbIpv4Addresses.add(InetAddresses.fromInteger(ipv4Vertex.getIpv4Address()).getHostAddress());
+			intDbIpv4Addresses.add(ipv4Vertex.getIpv4Address());
 		}
 		
 		List<String> memIpv4Addresses = new ArrayList<String>();
@@ -275,13 +283,16 @@
 				memIpv4Addresses, dbIpv4Addresses);
 		
 		for (int ipv4Address : device.getIPv4Addresses()) {
-			if (deviceObject.getIpv4Address(ipv4Address) == null) {
+			//if (deviceObject.getIpv4Address(ipv4Address) == null) {
+			if (!intDbIpv4Addresses.contains(ipv4Address)) {
 				IIpv4Address dbIpv4Address = ope.ensureIpv4Address(ipv4Address);
 				
+				/*
 				IDeviceObject oldDevice = dbIpv4Address.getDevice();
 				if (oldDevice != null) {
 					oldDevice.removeIpv4Address(dbIpv4Address);
 				}
+				*/
 				
 				log.debug("Adding IP address {}", 
 						InetAddresses.fromInteger(ipv4Address).getHostAddress());
diff --git a/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java b/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
index 85fd618..3bf6c4e 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/proxyarp/ProxyArpManager.java
@@ -17,7 +17,6 @@
 import net.floodlightcontroller.core.IFloodlightProviderService;
 import net.floodlightcontroller.core.IOFMessageListener;
 import net.floodlightcontroller.core.IOFSwitch;
-import net.floodlightcontroller.devicemanager.IDevice;
 import net.floodlightcontroller.packet.ARP;
 import net.floodlightcontroller.packet.Ethernet;
 import net.floodlightcontroller.packet.IPv4;
@@ -35,6 +34,9 @@
 import net.onrc.onos.ofcontroller.core.internal.DeviceStorageImpl;
 import net.onrc.onos.ofcontroller.core.internal.TopoLinkServiceImpl;
 import net.onrc.onos.ofcontroller.core.internal.TopoSwitchServiceImpl;
+import net.onrc.onos.ofcontroller.util.Dpid;
+import net.onrc.onos.ofcontroller.util.Port;
+import net.onrc.onos.ofcontroller.util.SwitchPort;
 
 import org.openflow.protocol.OFMessage;
 import org.openflow.protocol.OFPacketIn;
@@ -246,21 +248,14 @@
 	public Command receive(
 			IOFSwitch sw, OFMessage msg, FloodlightContext cntx) {
 		
-		//if (msg.getType() != OFType.PACKET_IN){
-			//return Command.CONTINUE;
-		//}
-		log.debug("received packet");
-		
 		OFPacketIn pi = (OFPacketIn) msg;
 		
 		Ethernet eth = IFloodlightProviderService.bcStore.get(cntx, 
                 IFloodlightProviderService.CONTEXT_PI_PAYLOAD);
 		
 		if (eth.getEtherType() == Ethernet.TYPE_ARP){
-			log.debug("is arp");
 			ARP arp = (ARP) eth.getPayload();	
 			if (arp.getOpCode() == ARP.OP_REQUEST) {
-				log.debug("is request");
 				//TODO check what the DeviceManager does about propagating
 				//or swallowing ARPs. We want to go after DeviceManager in the
 				//chain but we really need it to CONTINUE ARP packets so we can
@@ -268,7 +263,6 @@
 				handleArpRequest(sw, pi, arp, eth);
 			}
 			else if (arp.getOpCode() == ARP.OP_REPLY) {
-				log.debug("is reply");
 				//handleArpReply(sw, pi, arp);
 			}
 		}
@@ -548,6 +542,8 @@
 	}
 	
 	private void broadcastArpRequestOutMyEdge(byte[] arpRequest) {
+		List<SwitchPort> switchPorts = new ArrayList<SwitchPort>();
+		
 		for (IOFSwitch sw : floodlightProvider.getSwitches().values()) {
 			
 			OFPacketOut po = new OFPacketOut();
@@ -565,6 +561,8 @@
 			
 			for (IPortObject portObject : ports) {
 				if (!portObject.getLinkedPorts().iterator().hasNext()) {
+					switchPorts.add(new SwitchPort(new Dpid(sw.getId()), 
+							new Port(portObject.getNumber())));
 					actions.add(new OFActionOutput(portObject.getNumber()));
 				}
 			}
@@ -583,6 +581,8 @@
 				log.error("Failure writing packet out to switch", e);
 			}
 		}
+		
+		log.debug("Broadcast ARP request for to: {}", switchPorts);
 	}
 	
 	private void sendArpRequestOutPort(byte[] arpRequest, long dpid, short port) {
@@ -722,13 +722,17 @@
 	
 	@Override
 	public void arpRequestNotification(ArpMessage arpMessage) {
-		log.debug("Received ARP notification from other instances");
+		//log.debug("Received ARP notification from other instances");
 		
 		switch (arpMessage.getType()){
 		case REQUEST:
+			log.debug("Received ARP request notification for {}", 
+					arpMessage.getAddress());
 			broadcastArpRequestOutMyEdge(arpMessage.getPacket());
 			break;
 		case REPLY:
+			log.debug("Received ARP reply notification for {}",
+					arpMessage.getAddress());
 			sendArpReplyToWaitingRequesters(arpMessage.getAddress());
 			break;
 		}
