diff --git a/src/main/java/net/floodlightcontroller/flowcache/FCQueryObj.java b/src/main/java/net/floodlightcontroller/flowcache/FCQueryObj.java
index 058820b4065b2ed0ffcf4230d0cdad6f6db235dd..f78aaaeed818ed6b24b5dcceb8152315f4454e2e 100644
--- a/src/main/java/net/floodlightcontroller/flowcache/FCQueryObj.java
+++ b/src/main/java/net/floodlightcontroller/flowcache/FCQueryObj.java
@@ -4,7 +4,6 @@ import java.util.Arrays;
 
 import net.floodlightcontroller.devicemanager.IDevice;
 import net.floodlightcontroller.flowcache.IFlowCacheService.FCQueryEvType;
-import net.floodlightcontroller.flowcache.IFlowCacheService.FCQueryType;
 
 
 /**
@@ -14,8 +13,6 @@ public class FCQueryObj {
 
     /** The caller of the flow cache query. */
     public IFlowQueryHandler fcQueryHandler;
-    /** The query type. */
-    public FCQueryType queryType;
     /** The application instance name. */
     public String applInstName;
     /** The vlan Id. */
@@ -36,14 +33,37 @@ public class FCQueryObj {
     /**
      * Instantiates a new flow cache query object
      */
-    public FCQueryObj() {
-        queryType = FCQueryType.UNKNOWN;
+    public FCQueryObj(IFlowQueryHandler fcQueryHandler,
+            String        applInstName,
+            Short         vlan,
+            IDevice       srcDevice,
+            IDevice       dstDevice,
+            String        callerName,
+            FCQueryEvType evType,
+            Object        callerOpaqueObj) {
+        this.fcQueryHandler    = fcQueryHandler;
+        this.applInstName     = applInstName;
+        this.srcDevice        = srcDevice;
+        this.dstDevice        = dstDevice;
+        this.callerName       = callerName;
+        this.evType           = evType;
+        this.callerOpaqueObj  = callerOpaqueObj;
+        
+        if (vlan != null) {
+        	this.vlans = new Short[] { vlan };
+        } else {
+	        if (srcDevice != null) {
+	        	this.vlans = srcDevice.getVlanId();
+	        } else if (dstDevice != null) {
+	            this.vlans = dstDevice.getVlanId();
+	        }
+        }
     }
 
     @Override
     public String toString() {
         return "FCQueryObj [fcQueryCaller=" + fcQueryHandler
-                + ", queryType=" + queryType + ", applInstName="
+                + ", applInstName="
                 + applInstName + ", vlans=" + Arrays.toString(vlans)
                 + ", dstDevice=" + dstDevice + ", srcDevice="
                 + srcDevice + ", callerName=" + callerName + ", evType="
diff --git a/src/main/java/net/floodlightcontroller/flowcache/FlowCacheQueryResp.java b/src/main/java/net/floodlightcontroller/flowcache/FlowCacheQueryResp.java
index cb15ee6bb2d131d1a9cdca29cacfc669b8c7288e..b01aedfe9b09433268bcad10eeff66510a6e658f 100644
--- a/src/main/java/net/floodlightcontroller/flowcache/FlowCacheQueryResp.java
+++ b/src/main/java/net/floodlightcontroller/flowcache/FlowCacheQueryResp.java
@@ -16,6 +16,12 @@ public class FlowCacheQueryResp {
      * query. 
      */
     public boolean     moreFlag;
+    
+    /**
+     * Set to true if the response has been sent to handler
+     */
+    public boolean     hasSent;
+    
     /** 
      * The flow list. If there are large number of flows to be returned
      * then they may be returned in multiple callbacks.
@@ -32,6 +38,7 @@ public class FlowCacheQueryResp {
         qrFlowCacheObjList = new ArrayList<QRFlowCacheObj>();
         queryObj    = query;
         moreFlag    = false;
+        hasSent     = false;
     }
 
     /* (non-Javadoc)
@@ -39,12 +46,8 @@ public class FlowCacheQueryResp {
      */
     @Override
     public String toString() {
-        String s = queryObj.toString();
-        if (moreFlag) {
-            s += "; moreFlasg=True";
-        } else {
-            s += "; moreFlag=False";
-        }
+        String s = queryObj.toString() + "; moreFlasg=" + moreFlag +
+                   "; hasSent=" + hasSent;
         s += "; FlowCount=" + Integer.toString(qrFlowCacheObjList.size());
         return s;
     }
diff --git a/src/main/java/net/floodlightcontroller/flowcache/FlowReconcileManager.java b/src/main/java/net/floodlightcontroller/flowcache/FlowReconcileManager.java
index f977dbc3ec75667974c1ac58d5d448762b430890..e48f3adcc306fd89d111af90da8f6ff9352c1b84 100644
--- a/src/main/java/net/floodlightcontroller/flowcache/FlowReconcileManager.java
+++ b/src/main/java/net/floodlightcontroller/flowcache/FlowReconcileManager.java
@@ -33,10 +33,6 @@ public class FlowReconcileManager
      * need to be reconciled with the current configuration of the controller.
      */
     protected ListenerDispatcher<OFType, IFlowReconcileListener> flowReconcileListeners;
-    
-    public OFMatchReconcile newOFMatchReconcile() {
-        return new OFMatchReconcile();
-    }
 
     @Override
     public synchronized void addFlowReconcileListener(IFlowReconcileListener listener) {
@@ -89,19 +85,23 @@ public class FlowReconcileManager
     }
     
     @Override
-    public void updateFlowForDestinationDevice(IDevice device, FCQueryEvType fcEvType){
+    public void updateFlowForDestinationDevice(IDevice device,
+    		                                   IFlowQueryHandler handler,
+    		                                   FCQueryEvType fcEvType) {
     	// NO-OP
     }
 
     @Override
-    public void updateFlowForSourceDevice(IDevice device, FCQueryEvType fcEvType){
+    public void updateFlowForSourceDevice(IDevice device,
+                                          IFlowQueryHandler handler,
+                                          FCQueryEvType fcEvType) {
     	// NO-OP
     }
     
     @Override
     public void flowQueryGenericHandler(FlowCacheQueryResp flowResp) {
         if (flowResp.queryObj.evType != FCQueryEvType.GET) {
-            OFMatchReconcile ofmRc = newOFMatchReconcile();
+            OFMatchReconcile ofmRc = new OFMatchReconcile();;
             /* Re-provision these flows */
             for (QRFlowCacheObj entry : flowResp.qrFlowCacheObjList) {
                 /* reconcile the flows in entry */
diff --git a/src/main/java/net/floodlightcontroller/flowcache/IFlowCacheService.java b/src/main/java/net/floodlightcontroller/flowcache/IFlowCacheService.java
index ad489041224162e59cb29104ac30ab20195ac4b2..8e44ed3303d054e78b6e40107f7ea0fbeb1ac2a5 100644
--- a/src/main/java/net/floodlightcontroller/flowcache/IFlowCacheService.java
+++ b/src/main/java/net/floodlightcontroller/flowcache/IFlowCacheService.java
@@ -6,7 +6,6 @@ import net.floodlightcontroller.core.FloodlightContext;
 import net.floodlightcontroller.core.FloodlightContextStore;
 import net.floodlightcontroller.core.IOFSwitch;
 import net.floodlightcontroller.devicemanager.SwitchPort;
-import net.floodlightcontroller.devicemanager.IDevice;
 import net.floodlightcontroller.core.module.IFloodlightService;
 
 /**
@@ -26,18 +25,6 @@ public interface IFlowCacheService extends IFloodlightService {
         "net.floodlightcontroller.flowcache.appName";
     public static final String FLOWCACHE_APP_INSTANCE_NAME = 
         "net.floodlightcontroller.flowcache.appInstanceName";
-    
-    /**
-     * The Enum FCQueryType.
-     */
-    public enum FCQueryType {
-        APPLINSTNAME,           // The APPLINSTNAME.
-        APPLINSTNAME_VLAN,      // The APPLINSTNAM e_ vlan.
-        ALLAPP_DESTDEVICE,      // The destdevice for all application.
-        ALLAPP_SRCDEVICE,       // The source device for all application.
-        ALLAPP_SRCDEVICE_DESTDEVICE,    // The APPLINSTNAM srcdevic destdevice.
-        UNKNOWN,                // The UNKNOWN.
-    }
 
     /**
      * The flow cache query event type indicating the event that triggered the
@@ -97,71 +84,6 @@ public interface IFlowCacheService extends IFloodlightService {
      */
     public void submitFlowCacheQuery(FCQueryObj query);
 
-    /**
-     * Get a new flow cache query object populated with the supplied parameters.
-     * The query type field id populated automatically based on the parameters
-     * passed.
-     *
-     * @param fcQueryCaller the caller of this API
-     * @param applInstName the application instance name
-     * @param callerOpaqueData opaque data passed by the caller which is 
-     *        returned unchanged in the corresponding callback.
-     * @return a new initialized flow cache query object
-     */
-    public FCQueryObj newFCQueryObj(IFlowQueryHandler fcQueryHandler,
-            String        applInstName,
-            String        callerName,
-            FCQueryEvType evType,
-            Object        callerOpaqueObj);
-
-    /**
-     * Get a new flow cache query object populated with the supplied parameters.
-     * The query type field id populated automatically based on the parameters
-     * passed.
-     *
-     * @param fcQueryCaller the caller of this API
-     * @param applInstName the application instance name
-     * @param vlan VLAN ID
-     * @param callerOpaqueData opaque data passed by the caller which is 
-     *        returned unchanged in the corresponding callback.
-     * @return a new initialized flow cache query object
-     */
-    public FCQueryObj newFCQueryObj(IFlowQueryHandler fcQueryHandler,
-            String        applInstName,
-            short         vlan,
-            String        callerName,
-            FCQueryEvType evType,
-            Object        callerOpaqueObj);
-
-    /**
-     * Get a new flow cache query object populated with the supplied parameters.
-     * The query type field id populated automatically based on the parameters
-     * passed.
-     *
-     * @param fcQueryCaller the caller of this API
-     * @param applInstName the application instance name
-     * @param srcDevice source device object
-     * @param dstDevice destination device object
-     * @param callerOpaqueData opaque data passed by the caller which is 
-     *        returned unchanged in the corresponding callback.
-     * @return a new initialized flow cache query object
-     */
-    public FCQueryObj newFCQueryObj(IFlowQueryHandler fcQueryHandler,
-            IDevice        srcDevice,
-            IDevice        dstDevice,
-            String        callerName,
-            FCQueryEvType evType,
-            Object        callerOpaqueObj);
-
-    /**
-     * Get a new flow cache query object populated with the supplied parameters.
-     * The query type field id populated automatically based on the parameters
-     * passed.
-     *
-     * @return a new uninitialized flow cache query object
-     */
-    public FCQueryObj newFCQueryObj();
-
     /**
      * Deactivates all flows in the flow cache for which the source switch
      * matches the given switchDpid. Note that the flows are NOT deleted
@@ -245,18 +167,6 @@ public interface IFlowCacheService extends IFloodlightService {
      */
     public boolean moveFlowToDifferentApplInstName(OFMatchReconcile ofMRc);
 
-    /**
-     * Move all the flows from their current application instance to a 
-     * different application instance. This API can be used when all flows in 
-     * an application instance move to a different application instance when 
-     * the application instance configuration changes.
-     * 
-     * @param curApplInstName current application instance name
-     * @param newApplInstName new application instance name
-     */
-    public void moveFlowToDifferentApplInstName(String curApplInstName,
-            String newApplInstName);
-
     /**
      * Delete all flow from the specified switch
      * @param sw
diff --git a/src/main/java/net/floodlightcontroller/flowcache/IFlowReconcileService.java b/src/main/java/net/floodlightcontroller/flowcache/IFlowReconcileService.java
index 387c7d57c36cf488b48d36549b4077f0572f347c..f48c4e085c4bebc964bf2cfac3bb25c191714d2f 100644
--- a/src/main/java/net/floodlightcontroller/flowcache/IFlowReconcileService.java
+++ b/src/main/java/net/floodlightcontroller/flowcache/IFlowReconcileService.java
@@ -43,10 +43,13 @@ public interface IFlowReconcileService extends IFloodlightService {
      * new attachment point
      *
      * @param device      device that has moved
+     * @param handler	  handler to process the flows
      * @param fcEvType    Event type that triggered the update
      *
      */
-    public void updateFlowForDestinationDevice(IDevice device, FCQueryEvType fcEvType);
+    public void updateFlowForDestinationDevice(IDevice device,
+            IFlowQueryHandler handler,
+    		FCQueryEvType fcEvType);
     
     /**
      * Updates the flows from a device
@@ -56,10 +59,13 @@ public interface IFlowReconcileService extends IFloodlightService {
      * new attachment point
      *
      * @param device      device where the flow originates
+     * @param handler	  handler to process the flows
      * @param fcEvType    Event type that triggered the update
      *
      */
-    public void updateFlowForSourceDevice(IDevice device, FCQueryEvType fcEvType);
+    public void updateFlowForSourceDevice(IDevice device,
+            IFlowQueryHandler handler,
+    		FCQueryEvType fcEvType);
 
     /**
      * Generic flow query handler to insert FlowMods into the reconcile pipeline.
diff --git a/src/test/java/net/floodlightcontroller/flowcache/FlowReconcileMgrTest.java b/src/test/java/net/floodlightcontroller/flowcache/FlowReconcileMgrTest.java
index 542b9ccb502431824eea9975719005753a028204..fcf8e67984b925c156f15befe89ac0bc1492aa41 100644
--- a/src/test/java/net/floodlightcontroller/flowcache/FlowReconcileMgrTest.java
+++ b/src/test/java/net/floodlightcontroller/flowcache/FlowReconcileMgrTest.java
@@ -18,17 +18,6 @@ import org.junit.Test;
 import org.openflow.protocol.OFStatisticsRequest;
 import org.openflow.protocol.OFType;
 
-/**
- * The Class FlowCacheTest. Tests flow cache operations for
- * (a) adding a flow to the flow cache when flow mod is programmed
- * (b) Deleting a flow from flow cache when flow mod removal mesg is received
- * (c) Reprogramming a flow based on flows queried from flow cache when a
- *     device is moved.
- * (d) Reprogramming a flow based on flows queried from flow cache when a
- *     link goes down.
- *
- * @author subrata
- */
 public class FlowReconcileMgrTest extends FloodlightTestCase {
 
     protected MockFloodlightProvider mockFloodlightProvider;
@@ -81,7 +70,7 @@ public class FlowReconcileMgrTest extends FloodlightTestCase {
         flowReconcileMgr.addFlowReconcileListener(r2);
         flowReconcileMgr.addFlowReconcileListener(r3);
         
-        OFMatchReconcile ofmRcIn = flowReconcileMgr.newOFMatchReconcile();
+        OFMatchReconcile ofmRcIn = new OFMatchReconcile();
         try {
             flowReconcileMgr.reconcileFlow(ofmRcIn);
         } catch (RuntimeException e) {