diff --git a/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java b/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java
index 4f11c6c..e29e8e1 100644
--- a/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java
+++ b/src/main/java/net/floodlightcontroller/core/INetMapTopologyObjects.java
@@ -46,7 +46,7 @@
 		public Iterable<IPortObject> getPorts();
 		
 		@JsonIgnore
-		@GremlinGroovy("_().out('on').has('number',portnum)")
+		@GremlinGroovy("_().out('on').has('number',port_num)")
 		public IPortObject getPort(final short port_num);
 		
 		@Adjacency(label="on")
@@ -109,9 +109,16 @@
 		@Incidence(label="outport",direction = Direction.IN)
 		public Iterable<IFlowEntry> getOutFlowEntries();
 		
+		@JsonIgnore
+		@Adjacency(label="link")
+		public Iterable<IPortObject> getLinkedPorts();
+		
 		@Adjacency(label="link")
 		public void removeLink(final IPortObject dest_port);
 		
+		@Adjacency(label="link")
+		public void setLinkPort(final IPortObject dest_port);			
+		
 //		@JsonIgnore
 //		@Adjacency(label="link")
 //		public Iterable<ILinkObject> getLinks();
diff --git a/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java b/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java
index 17ab274..f040881 100644
--- a/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java
+++ b/src/main/java/net/floodlightcontroller/core/internal/SwitchStorageImpl.java
@@ -178,7 +178,7 @@
             		log.info("SwitchStorage:deletePort dpid:{} port:{} found and deleted", dpid, port);
             		sw.removePort(p);
             		conn.utils().removePort(conn, p);
-            		conn.endTx(Transaction.COMMIT,GenerateEvent.TRUE);
+            		conn.endTx(Transaction.COMMIT);
             	}
             }
 		} catch (Exception e) {
diff --git a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java
index 33ae22a..e67ecac 100644
--- a/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java
+++ b/src/main/java/net/floodlightcontroller/linkdiscovery/internal/LinkStorageImpl.java
@@ -36,6 +36,7 @@
 public class LinkStorageImpl implements ILinkStorage {
 	public TitanGraph graph;
 	protected static Logger log = LoggerFactory.getLogger(LinkStorageImpl.class);
+	protected String conf;
 
 	@Override
 	public void update(Link link, DM_OPERATION op) {
@@ -76,7 +77,8 @@
 	}
 	
 	public void addOrUpdateLink(Link lt, LinkInfo linkinfo, DM_OPERATION op) {
-		Vertex vportSrc = null, vportDst = null;
+		GraphDBConnection conn = GraphDBConnection.getInstance(this.conf);
+		IPortObject vportSrc = null, vportDst = null;
 	
 		log.trace("addOrUpdateLink(): op {} {} {}", new Object[]{op, lt, linkinfo});
 		
@@ -84,18 +86,19 @@
             // get source port vertex
         	String dpid = HexString.toHexString(lt.getSrc());
         	short port = lt.getSrcPort();
-        	vportSrc = getPortVertex(dpid, port);
+        	vportSrc = conn.utils().searchPort(conn, dpid, port);
             
             // get dest port vertex
             dpid = HexString.toHexString(lt.getDst());
             port = lt.getDstPort();
-            vportDst = getPortVertex(dpid, port);
+            vportDst = conn.utils().searchPort(conn, dpid, port);
                         
             if (vportSrc != null && vportDst != null) {
+         	
             	
             	// check if the link exists
             	List<Vertex> currLinks = new ArrayList<Vertex>();
-            	for (Vertex V : vportSrc.query().direction(Direction.OUT).labels("link").vertices()) {
+            	for (Vertex V : vportSrc.asVertex().query().direction(Direction.OUT).labels("link").vertices()) {
             		currLinks.add(V);
             	}
             	
@@ -106,7 +109,7 @@
             					new Object[]{op, lt, vportSrc, vportDst});
             		}
             	} else {
-            		graph.addEdge(null, vportSrc, vportDst, "link");
+            		graph.addEdge(null, vportSrc.asVertex(), vportDst.asVertex(), "link");
             		graph.stopTransaction(Conclusion.SUCCESS);
             		log.debug("addOrUpdateLink(): link added {} {} src {} dst {}", new Object[]{op, lt, vportSrc, vportDst});
             	}
@@ -134,7 +137,7 @@
 
 	@Override
 	public void deleteLink(Link lt) {
-		GraphDBConnection conn = GraphDBConnection.getInstance("");
+		GraphDBConnection conn = GraphDBConnection.getInstance(this.conf);
 		IPortObject vportSrc = null, vportDst = null;
 		int count = 0;
 		
@@ -164,7 +167,7 @@
          			}
          		}*/
          		vportSrc.removeLink(vportDst);
-        		conn.endTx(Transaction.COMMIT, GenerateEvent.TRUE);
+        		conn.endTx(Transaction.COMMIT);
             	log.debug("deleteLink(): deleted edges src {} dst {}", new Object[]{
             			lt, vportSrc, vportDst});
             	
@@ -204,7 +207,8 @@
 	public void init(String conf) {
 		//TODO extract the DB location from properties
 	
-        graph = TitanFactory.open(conf);
+		this.conf = conf;
+        graph = TitanFactory.open(this.conf);
         
         // FIXME: These keys are not needed for Links but we better create it before using it as per titan
         Set<String> s = graph.getIndexedKeys(Vertex.class);
diff --git a/src/main/java/net/onrc/onos/util/GraphDBUtils.java b/src/main/java/net/onrc/onos/util/GraphDBUtils.java
index b0ca23b..dd52874 100644
--- a/src/main/java/net/onrc/onos/util/GraphDBUtils.java
+++ b/src/main/java/net/onrc/onos/util/GraphDBUtils.java
@@ -14,10 +14,8 @@
 
 import com.thinkaurelius.titan.core.TitanGraph;
 import com.tinkerpop.blueprints.Vertex;
-import com.tinkerpop.blueprints.util.wrappers.event.EventGraph;
-import com.tinkerpop.blueprints.util.wrappers.event.EventTransactionalGraph;
 import com.tinkerpop.frames.FramedGraph;
-import com.tinkerpop.frames.structures.FramedVertexIterable;
+import com.tinkerpop.frames.FramedVertexIterable;
 import com.tinkerpop.gremlin.java.GremlinPipeline;
 
 public class GraphDBUtils implements IDBUtils {
@@ -57,7 +55,19 @@
 	@Override
 	public IPortObject searchPort(GraphDBConnection conn, String dpid, short number) {
 		ISwitchObject sw = searchSwitch(conn, dpid);
-		return sw != null ? sw.getPort(number): null;
+		if (sw != null) {
+			
+			IPortObject port = null;
+			try {
+				port = sw.getPort(number);
+			} catch (Exception e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			
+			return port;
+		}
+		return null;
 	/*	GremlinPipeline<Vertex, IPortObject> pipe = new GremlinPipeline<Vertex, IPortObject>();
 		pipe.start(sw.asVertex());
 	    pipe.out("on").has("number", number);
diff --git a/src/main/java/net/onrc/onos/util/LocalTopologyEventListener.java b/src/main/java/net/onrc/onos/util/LocalTopologyEventListener.java
index 61f227d..17d4b2a 100644
--- a/src/main/java/net/onrc/onos/util/LocalTopologyEventListener.java
+++ b/src/main/java/net/onrc/onos/util/LocalTopologyEventListener.java
@@ -88,15 +88,13 @@
 
 
 	@Override
-	public void edgePropertyChanged(Edge arg0, String arg1, Object arg2,
-			Object arg3) {
+	public void edgePropertyChanged(Edge arg0, String arg1, Object arg2) {
 		// TODO Auto-generated method stub
 		
 	}
 
 	@Override
-	public void vertexPropertyChanged(Vertex arg0, String arg1, Object arg2,
-			Object arg3) {
+	public void vertexPropertyChanged(Vertex arg0, String arg1, Object arg2) {
 		// TODO Auto-generated method stub
 		
 	}
diff --git a/start-onos.sh b/start-onos.sh
index 1263b8a..0515bd5 100755
--- a/start-onos.sh
+++ b/start-onos.sh
@@ -91,7 +91,7 @@
 
 function stop {
   # Kill the existing processes
-  flpid=`ps -edalf |grep java |grep logback.xml | awk '{print $4}'`
+  flpid=`jps -l |grep net.floodlightcontroller.core.Main | awk '{print $1}'`
   tdpid=`ps -edalf |grep tcpdump |grep ${PCAP_LOG} | awk '{print $4}'`
   pids="$flpid $tdpid"
   for p in ${pids}; do
