Optimized code
diff --git a/src/main/java/net/onrc/onos/graph/DBOperation.java b/src/main/java/net/onrc/onos/graph/DBOperation.java
index f9b0e9f..1f77728 100644
--- a/src/main/java/net/onrc/onos/graph/DBOperation.java
+++ b/src/main/java/net/onrc/onos/graph/DBOperation.java
@@ -116,9 +116,8 @@
 
     }
 
-    @Override
-    public IDeviceObject newDevice() {
-        IDeviceObject obj = (IDeviceObject) conn.getFramedGraph().addVertex(null, IDeviceObject.class);
+    public IDeviceObject newDevice(final FramedGraph fg) {
+        IDeviceObject obj = (IDeviceObject) fg.addVertex(null, IDeviceObject.class);
         if (obj != null) {
             obj.setType("device");
         }
diff --git a/src/main/java/net/onrc/onos/graph/RamCloudDBOperation.java b/src/main/java/net/onrc/onos/graph/RamCloudDBOperation.java
index 9aa038a..8150e38 100644
--- a/src/main/java/net/onrc/onos/graph/RamCloudDBOperation.java
+++ b/src/main/java/net/onrc/onos/graph/RamCloudDBOperation.java
@@ -138,4 +138,10 @@
     public void close() {
         conn.close();
     }
+    
+    @Override
+    public IDeviceObject newDevice() {
+	FramedGraph<RamCloudGraph> fg = conn.getFramedGraph();
+	return super.newDevice(fg);
+    }
 }
diff --git a/src/main/java/net/onrc/onos/graph/TitanDBOperation.java b/src/main/java/net/onrc/onos/graph/TitanDBOperation.java
index 02b8052..845fd46 100644
--- a/src/main/java/net/onrc/onos/graph/TitanDBOperation.java
+++ b/src/main/java/net/onrc/onos/graph/TitanDBOperation.java
@@ -140,4 +140,11 @@
     public void close() {
         conn.close();
     }
+    
+    @Override
+    public IDeviceObject newDevice() {
+	FramedGraph<TitanGraph> fg = conn.getFramedGraph();
+	return super.newDevice(fg);
+    }
+
 }
\ No newline at end of file