diff --git a/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java b/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java
index 6b84d32..160587f 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/core/INetMapTopologyObjects.java
@@ -21,24 +21,24 @@
  */
 public interface INetMapTopologyObjects {
 	
-public interface IBaseObject extends VertexFrame {
+	public interface IBaseObject extends VertexFrame {
+		
+		@JsonProperty("state")
+		@Property("state")
+		public String getState();
+		
+		@Property("state")
+		public void setState(final String state);
+		
+		@JsonIgnore
+		@Property("type")
+		public String getType();
+		@Property("type")
+		public void setType(final String type);
+		
+	}
 	
-	@JsonProperty("state")
-	@Property("state")
-	public String getState();
-	
-	@Property("state")
-	public void setState(final String state);
-	
-	@JsonIgnore
-	@Property("type")
-	public String getType();
-	@Property("type")
-	public void setType(final String type);
-	
-}
-	
-public interface ISwitchObject extends IBaseObject{
+	public interface ISwitchObject extends IBaseObject{
 		
 		@JsonProperty("dpid")
 		@Property("dpid")
@@ -51,7 +51,7 @@
 		@Adjacency(label="on")
 		public Iterable<IPortObject> getPorts();
 
-// Requires Frames 2.3.0		
+		// Requires Frames 2.3.0		
 		@JsonIgnore
 		@GremlinGroovy("it.out('on').has('number',port_num)")
 		public IPortObject getPort(@GremlinParam("port_num") final short port_num);
@@ -104,7 +104,6 @@
 		public void setPortState(Integer s);
 		
 		@JsonIgnore
-//		@GremlinGroovy("it.in('on')")
 		@Adjacency(label="on",direction = Direction.IN)
 		public ISwitchObject getSwitch();
 				
@@ -136,9 +135,9 @@
 		@Adjacency(label="link")
 		public void setLinkPort(final IPortObject dest_port);			
 		
-//		@JsonIgnore
-//		@Adjacency(label="link")
-//		public Iterable<ILinkObject> getLinks();
+		// @JsonIgnore
+		// @Adjacency(label="link")
+		// public Iterable<ILinkObject> getLinks();
 	}
 	
 	public interface IDeviceObject extends IBaseObject {
@@ -146,6 +145,7 @@
 		@JsonProperty("mac")
 		@Property("dl_addr")
 		public String getMACAddress();
+		
 		@Property("dl_addr")
 		public void setMACAddress(String macaddr);
 		
@@ -173,7 +173,7 @@
 		public Iterable<IIpv4Address> getIpv4Addresses();
 
 		@JsonIgnore
-		@GremlinGroovy("it.out('hasAddress').has('ipv4', ipv4Address)")
+		@GremlinGroovy("it.out('hasAddress').has('ipv4_address', ipv4Address)")
 		public IIpv4Address getIpv4Address(@GremlinParam("ipv4Address") final int ipv4Address);
 		
 		@Adjacency(label="hasAddress")
@@ -209,7 +209,7 @@
 		public IDeviceObject getDevice();
 	}
 	
-public interface IFlowPath extends IBaseObject {
+	public interface IFlowPath extends IBaseObject {
 		@JsonProperty("flowId")
 		@Property("flow_id")
 		public String getFlowId();
@@ -392,7 +392,7 @@
 		public String getState();
 	}
 
-public interface IFlowEntry extends IBaseObject {
+	public interface IFlowEntry extends IBaseObject {
 		@Property("flow_entry_id")
 		public String getFlowEntryId();
 
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 ed6d85f..6438ffd 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
@@ -75,10 +75,11 @@
             }
  			
             changeDeviceAttachments(device, obj);
-	            
-            for (Integer intIpv4Address : device.getIPv4Addresses()) {
+	        
+            changeDeviceIpv4Addresses(device, obj);
+            /*for (Integer intIpv4Address : device.getIPv4Addresses()) {
             	obj.addIpv4Address(ope.ensureIpv4Address(intIpv4Address));
-            }
+            }*/
             
  			obj.setMACAddress(device.getMACAddressString());
  			obj.setType("device");
@@ -228,19 +229,7 @@
 		IDeviceObject obj;
   		try {
   			if ((obj = ope.searchDevice(device.getMACAddressString())) != null) {
-  				for (int ipv4Address : device.getIPv4Addresses()) {
-  					if (obj.getIpv4Address(ipv4Address) == null) {
-  						IIpv4Address dbIpv4Address = ope.ensureIpv4Address(ipv4Address);
-  						obj.addIpv4Address(dbIpv4Address);
-  					}
-  				}
-  				
-  				List<Integer> deviceIpv4Addresses = Arrays.asList(device.getIPv4Addresses());
-  				for (IIpv4Address dbIpv4Address : obj.getIpv4Addresses()) {
-  					if (!deviceIpv4Addresses.contains(dbIpv4Address.getIpv4Address())) {
-  						obj.removeIpv4Address(dbIpv4Address);
-  					}
-  				}
+  				changeDeviceIpv4Addresses(device, obj);
   	            
               	ope.commit();
   			} else {
@@ -251,5 +240,21 @@
 			log.error(":changeDeviceIPv4Address mac:{} failed due to exception {}", device.getMACAddressString(), e);
 		}
 	}
+	
+	private void changeDeviceIpv4Addresses(IDevice device, IDeviceObject deviceObject) {
+		for (int ipv4Address : device.getIPv4Addresses()) {
+			if (deviceObject.getIpv4Address(ipv4Address) == null) {
+				IIpv4Address dbIpv4Address = ope.ensureIpv4Address(ipv4Address);
+				deviceObject.addIpv4Address(dbIpv4Address);
+			}
+		}
+			
+		List<Integer> deviceIpv4Addresses = Arrays.asList(device.getIPv4Addresses());
+		for (IIpv4Address dbIpv4Address : deviceObject.getIpv4Addresses()) {
+			if (!deviceIpv4Addresses.contains(dbIpv4Address.getIpv4Address())) {
+				deviceObject.removeIpv4Address(dbIpv4Address);
+			}
+		}
+	}
 
 }
