diff --git a/api/pom.xml b/api/pom.xml
index 9ce1655..b1111c4 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -26,7 +26,7 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>onos-app-igmpproxy-api</artifactId>
-
+    <version>${igmpproxy.api.version}</version>
     <packaging>bundle</packaging>
     <description>IGMPProxy application API</description>
 
diff --git a/app/app.xml b/app/app.xml
index 33b0ef8..18dd5db 100644
--- a/app/app.xml
+++ b/app/app.xml
@@ -17,8 +17,10 @@
 <app name="org.opencord.igmpproxy" origin="Nokia" version="${project.version}"
      category="Traffic Steering" url="http://onosproject.org" title="IGMPProxy application for CORD"
      featuresRepo="mvn:${project.groupId}/${project.artifactId}/${project.version}/xml/features"
-     features="${project.artifactId}" apps="org.onosproject.mcast,org.opencord.sadis">
+     features="${project.artifactId}">
     <description>IGMP PROXY APP</description>
     <artifact>mvn:${project.groupId}/${project.artifactId}/${project.version}</artifact>
-    <artifact>mvn:${project.groupId}/onos-app-igmpproxy-api/${project.version}</artifact>
+    <artifact>mvn:${project.groupId}/onos-app-igmpproxy-api/${igmpproxy.api.version}</artifact>
+    <artifact>mvn:${project.groupId}/sadis-api/${sadis.api.version}</artifact>
+    <artifact>mvn:org.onosproject/onos-apps-mcast-api/${onos.version}</artifact>
 </app>
diff --git a/app/features.xml b/app/features.xml
index 412164e..b3e1ab2 100644
--- a/app/features.xml
+++ b/app/features.xml
@@ -18,7 +18,9 @@
     <feature name="${project.artifactId}" version="${project.version}"
              description="${project.description}">
         <feature>onos-api</feature>
-        <bundle>mvn:${project.groupId}/onos-app-igmpproxy-api/${project.version}</bundle>
+        <bundle>mvn:${project.groupId}/onos-app-igmpproxy-api/${igmpproxy.api.version}</bundle>
         <bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle>
+        <bundle>mvn:${project.groupId}/sadis-api/${sadis.api.version}</bundle>
+        <bundle>mvn:org.onosproject/onos-apps-mcast-api/${onos.version}</bundle>
     </feature>
 </features>
diff --git a/app/pom.xml b/app/pom.xml
index e56bc97..60597f6 100644
--- a/app/pom.xml
+++ b/app/pom.xml
@@ -36,14 +36,9 @@
         <onos.app.title>IGMP proxy app</onos.app.title>
         <onos.app.url>http://opencord.org</onos.app.url>
         <onos.app.readme>IGMP implementation.</onos.app.readme>
-        <onos.app.requires>
-            org.onosproject.mcast
-            org.opencord.sadis
-        </onos.app.requires>
-        <sadis.api.version>5.1.0</sadis.api.version>
+        <sadis.api.version>5.3.0-SNAPSHOT</sadis.api.version>
     </properties>
 
-
     <dependencies>
         <dependency>
             <groupId>org.onosproject</groupId>
@@ -104,7 +99,7 @@
         <dependency>
             <groupId>org.opencord</groupId>
             <artifactId>onos-app-igmpproxy-api</artifactId>
-            <version>${project.version}</version>
+            <version>${igmpproxy.api.version}</version>
             <scope>compile</scope>
         </dependency>
 
diff --git a/app/src/main/java/org/opencord/igmpproxy/impl/IgmpManager.java b/app/src/main/java/org/opencord/igmpproxy/impl/IgmpManager.java
index 2025e0b..fbe96c6 100644
--- a/app/src/main/java/org/opencord/igmpproxy/impl/IgmpManager.java
+++ b/app/src/main/java/org/opencord/igmpproxy/impl/IgmpManager.java
@@ -67,7 +67,6 @@
 import org.opencord.igmpproxy.impl.store.groupmember.GroupMember;
 import org.opencord.igmpproxy.impl.store.groupmember.GroupMemberStore;
 import org.opencord.igmpproxy.statemachine.StateMachineService;
-import org.opencord.sadis.BaseInformationService;
 import org.opencord.sadis.SadisService;
 import org.opencord.sadis.SubscriberAndDeviceInformation;
 import org.osgi.service.component.annotations.Activate;
@@ -75,6 +74,7 @@
 import org.osgi.service.component.annotations.Deactivate;
 import org.osgi.service.component.annotations.Reference;
 import org.osgi.service.component.annotations.ReferenceCardinality;
+import org.osgi.service.component.annotations.ReferencePolicy;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -110,7 +110,8 @@
  */
 @Component(immediate = true)
 public class IgmpManager {
-
+    private static final String MCAST_NOT_RUNNING = "Multicast is not running.";
+    private static final String SADIS_NOT_RUNNING = "Sadis is not running.";
     private static final String APP_NAME = "org.opencord.igmpproxy";
 
     private static final Class<IgmpproxyConfig> IGMPPROXY_CONFIG_CLASS =
@@ -174,11 +175,17 @@
     @Reference(cardinality = ReferenceCardinality.MANDATORY)
     protected NetworkConfigRegistry networkConfig;
 
-    @Reference(cardinality = ReferenceCardinality.MANDATORY)
-    protected MulticastRouteService multicastService;
+    @Reference(cardinality = ReferenceCardinality.OPTIONAL,
+            bind = "bindMcastRouteService",
+            unbind = "unbindMcastRouteService",
+            policy = ReferencePolicy.DYNAMIC)
+    protected volatile MulticastRouteService multicastService;
 
-    @Reference(cardinality = ReferenceCardinality.MANDATORY)
-    protected SadisService sadisService;
+    @Reference(cardinality = ReferenceCardinality.OPTIONAL,
+            bind = "bindSadisService",
+            unbind = "unbindSadisService",
+            policy = ReferencePolicy.DYNAMIC)
+    protected volatile SadisService sadisService;
 
     @Reference(cardinality = ReferenceCardinality.MANDATORY)
     protected IgmpStatisticsService igmpStatisticsManager;
@@ -234,8 +241,6 @@
         return outgoingIgmpWithV3;
     }
 
-    protected BaseInformationService<SubscriberAndDeviceInformation> subsService;
-
     private List<Byte> validMembershipModes = Arrays.asList(MODE_IS_INCLUDE, MODE_IS_EXCLUDE, CHANGE_TO_INCLUDE_MODE,
             CHANGE_TO_EXCLUDE_MODE, ALLOW_NEW_SOURCES, BLOCK_OLD_SOURCES);
 
@@ -253,7 +258,6 @@
         configListener.reconfigureNetwork(networkConfig.getConfig(appId, IGMPPROXY_CONFIG_CLASS));
         configListener.reconfigureSsmTable(networkConfig.getConfig(appId, IGMPPROXY_SSM_CONFIG_CLASS));
 
-        subsService = sadisService.getSubscriberInfoService();
         if (connectPointMode) {
             provisionConnectPointFlows();
         } else {
@@ -287,7 +291,6 @@
         networkConfig.unregisterConfigFactory(igmpproxySsmConfigFactory);
         deviceService.removeListener(deviceListener);
         packetService.removeProcessor(processor);
-        flowRuleService.removeFlowRulesById(appId);
         log.info("Stopped");
     }
 
@@ -304,12 +307,33 @@
             igmpReportProcessServiceExecutorList[i] = igmpReportProcessServiceExecutor;
         }
     }
+
     private void shutdownIgmpReportProcessServiceExecutors() {
         for (ExecutorService executor : igmpReportProcessServiceExecutorList) {
             executor.shutdown();
         }
     }
 
+    protected void bindSadisService(SadisService service) {
+        sadisService = service;
+        log.info("Sadis-service binds to onos.");
+    }
+
+    protected void unbindSadisService(SadisService service) {
+        sadisService = null;
+        log.info("Sadis-service unbinds from onos.");
+    }
+
+    protected void bindMcastRouteService(MulticastRouteService service) {
+        multicastService = service;
+        log.info("Multicast route service binds to onos.");
+    }
+
+    protected void unbindMcastRouteService(MulticastRouteService service) {
+        multicastService = null;
+        log.info("Multicast route service unbinds from onos.");
+    }
+
     protected Ip4Address getDeviceIp(DeviceId ofDeviceId) {
         try {
             String[] mgmtAddress = deviceService.getDevice(ofDeviceId)
@@ -384,6 +408,11 @@
     }
 
     private void processIgmpReport(IGMPMembership igmpGroup, VlanId vlan, ConnectPoint cp, byte igmpType) {
+        if (multicastService == null) {
+            log.warn(MCAST_NOT_RUNNING);
+            return;
+        }
+
         DeviceId deviceId = cp.deviceId();
         PortNumber portNumber = cp.port();
 
@@ -522,6 +551,10 @@
     }
 
     private void leaveAction(GroupMember groupMember) {
+        if (multicastService == null) {
+            log.warn(MCAST_NOT_RUNNING);
+            return;
+        }
         igmpStatisticsManager.increaseStat(IgmpStatisticType.IGMP_DISCONNECT);
         ConnectPoint cp = new ConnectPoint(groupMember.getDeviceId(), groupMember.getPortNumber());
         stateMachineService.leave(groupMember.getDeviceId(), groupMember.getGroupIp());
@@ -841,6 +874,10 @@
     private Optional<SubscriberAndDeviceInformation> getSubscriberAndDeviceInformation(String serialNumber) {
         long start = System.currentTimeMillis();
         try {
+            if (sadisService == null) {
+                log.warn(SADIS_NOT_RUNNING);
+                return Optional.empty();
+            }
             return Optional.ofNullable(sadisService.getSubscriberInfoService().get(serialNumber));
         } finally {
             if (log.isDebugEnabled()) {
@@ -848,7 +885,6 @@
                 // This measurement is just for monitoring these kinds of situations.
                 log.debug("Device fetched from SADIS. Elapsed {} msec", System.currentTimeMillis() - start);
             }
-
         }
     }
 
@@ -956,6 +992,10 @@
     }
 
     private void onSourceStateChanged(DeviceId deviceId, PortNumber portNumber, boolean enabled) {
+        if (multicastService == null) {
+            log.warn(MCAST_NOT_RUNNING);
+            return;
+        }
         if (!(getSource().isPresent() &&
                 getSource().get().deviceId().equals(deviceId) &&
                 getSource().get().port().equals(portNumber))) {
diff --git a/app/src/main/java/org/opencord/igmpproxy/impl/store/groupmember/DistributedGroupMemberStore.java b/app/src/main/java/org/opencord/igmpproxy/impl/store/groupmember/DistributedGroupMemberStore.java
index 01f9af9..bd441ed 100644
--- a/app/src/main/java/org/opencord/igmpproxy/impl/store/groupmember/DistributedGroupMemberStore.java
+++ b/app/src/main/java/org/opencord/igmpproxy/impl/store/groupmember/DistributedGroupMemberStore.java
@@ -64,9 +64,6 @@
 
     @Deactivate
     public void deactivate() {
-        groupMemberMap.clear();
-        groupMemberMap = null;
-        consistentMap.destroy();
         log.info("Stopped.");
     }
 }
diff --git a/app/src/main/java/org/opencord/igmpproxy/impl/store/machine/DistributedStateMachineStore.java b/app/src/main/java/org/opencord/igmpproxy/impl/store/machine/DistributedStateMachineStore.java
index f337b09..7823133 100644
--- a/app/src/main/java/org/opencord/igmpproxy/impl/store/machine/DistributedStateMachineStore.java
+++ b/app/src/main/java/org/opencord/igmpproxy/impl/store/machine/DistributedStateMachineStore.java
@@ -78,11 +78,6 @@
 
     @Deactivate
     public void deactivate() {
-        stateMachineMap.clear();
-        stateMachineMap = null;
-        consistentMap.destroy();
-        stateMachineCounters.clear();
-        stateMachineCounters.destroy();
         log.info("Stopped.");
     }
 
diff --git a/app/src/test/java/org/opencord/igmpproxy/impl/IgmpManagerBase.java b/app/src/test/java/org/opencord/igmpproxy/impl/IgmpManagerBase.java
index 1905ec2..d93ec38 100644
--- a/app/src/test/java/org/opencord/igmpproxy/impl/IgmpManagerBase.java
+++ b/app/src/test/java/org/opencord/igmpproxy/impl/IgmpManagerBase.java
@@ -522,6 +522,11 @@
     private class MockBpService implements BaseInformationService<BandwidthProfileInformation> {
 
         @Override
+        public void clearLocalData() {
+
+        }
+
+        @Override
         public void invalidateAll() {
 
         }
@@ -562,6 +567,11 @@
         }
 
         @Override
+        public void clearLocalData() {
+
+        }
+
+        @Override
         public void invalidateAll() {
         }
 
diff --git a/pom.xml b/pom.xml
index 4fe4409..e7019cf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,6 +30,10 @@
     <version>2.2.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
+    <properties>
+        <igmpproxy.api.version>2.2.0-SNAPSHOT</igmpproxy.api.version>
+    </properties>
+
     <modules>
         <module>api</module>
         <module>app</module>
