diff --git a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
index 5179ded..2d494c3 100644
--- a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
+++ b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
@@ -15,7 +15,6 @@
  */
 package org.onosproject.segmentrouting;
 
-import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableMap.Builder;
 import com.google.common.collect.ImmutableSet;
@@ -60,7 +59,6 @@
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.stream.Stream;
 
-import static com.google.common.base.MoreObjects.toStringHelper;
 import static com.google.common.base.Preconditions.checkNotNull;
 import static java.util.concurrent.Executors.newScheduledThreadPool;
 import static org.onlab.util.Tools.groupedThreads;
@@ -435,10 +433,8 @@
      *            seen link
      */
     // TODO This method should be refactored into three separated methods
-    public void populateRoutingRulesForLinkStatusChange(Link linkDown,
-                                                           Link linkUp,
-                                                           DeviceId switchDown,
-                                                           boolean seenBefore) {
+    public void populateRoutingRulesForLinkStatusChange(Link linkDown, Link linkUp,
+                                                        DeviceId switchDown, boolean seenBefore) {
         if (Stream.of(linkDown, linkUp, switchDown).filter(Objects::nonNull)
                 .count() != 1) {
             log.warn("Only one event can be handled for link status change .. aborting");
@@ -939,7 +935,6 @@
            }
         }
 
-
         // To save on ECMP groups
         // avoid MPLS rules in non-edge-devices to non-edge-devices
         // avoid MPLS transit rules in edge-devices
@@ -1182,7 +1177,6 @@
     void purgeEcmpGraph(DeviceId deviceId) {
         statusLock.lock();
         try {
-
             if (populationStatus == Status.STARTED) {
                 log.warn("Previous rule population is not finished. Cannot"
                         + " proceeed with purgeEcmpGraph for {}", deviceId);
@@ -1770,54 +1764,6 @@
         return ImmutableSet.of(); //no next-hops found
     }
 
-    /**
-     * Represents two devices that are paired by configuration. An EdgePair for
-     * (dev1, dev2) is the same as as EdgePair for (dev2, dev1)
-     */
-    protected final class EdgePair {
-        DeviceId dev1;
-        DeviceId dev2;
-
-        EdgePair(DeviceId dev1, DeviceId dev2) {
-            this.dev1 = dev1;
-            this.dev2 = dev2;
-        }
-
-        boolean includes(DeviceId dev) {
-            return dev1.equals(dev) || dev2.equals(dev);
-        }
-
-        @Override
-        public boolean equals(Object o) {
-            if (this == o) {
-                return true;
-            }
-            if (!(o instanceof EdgePair)) {
-                return false;
-            }
-            EdgePair that = (EdgePair) o;
-            return ((this.dev1.equals(that.dev1) && this.dev2.equals(that.dev2)) ||
-                    (this.dev1.equals(that.dev2) && this.dev2.equals(that.dev1)));
-        }
-
-        @Override
-        public int hashCode() {
-            if (dev1.toString().compareTo(dev2.toString()) <= 0) {
-                return Objects.hash(dev1, dev2);
-            } else {
-                return Objects.hash(dev2, dev1);
-            }
-        }
-
-        @Override
-        public String toString() {
-            return toStringHelper(this)
-                    .add("Dev1", dev1)
-                    .add("Dev2", dev2)
-                    .toString();
-        }
-    }
-
     //////////////////////////////////////
     //  Filtering rule creation
     //////////////////////////////////////
@@ -1843,49 +1789,6 @@
     }
 
     /**
-     * Utility class used to temporarily store information about the ports on a
-     * device processed for filtering objectives.
-     */
-    public final class PortFilterInfo {
-        int disabledPorts = 0, errorPorts = 0, filteredPorts = 0;
-
-        public PortFilterInfo(int disabledPorts, int errorPorts,
-                           int filteredPorts) {
-            this.disabledPorts = disabledPorts;
-            this.filteredPorts = filteredPorts;
-            this.errorPorts = errorPorts;
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(disabledPorts, filteredPorts, errorPorts);
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (this == obj) {
-                return true;
-            }
-            if ((obj == null) || (!(obj instanceof PortFilterInfo))) {
-                return false;
-            }
-            PortFilterInfo other = (PortFilterInfo) obj;
-            return ((disabledPorts == other.disabledPorts) &&
-                    (filteredPorts == other.filteredPorts) &&
-                    (errorPorts == other.errorPorts));
-        }
-
-        @Override
-        public String toString() {
-            MoreObjects.ToStringHelper helper = toStringHelper(this)
-                    .add("disabledPorts", disabledPorts)
-                    .add("errorPorts", errorPorts)
-                    .add("filteredPorts", filteredPorts);
-            return helper.toString();
-        }
-    }
-
-    /**
      * RetryFilters populates filtering objectives for a device and keeps retrying
      * till the number of ports filtered are constant for a predefined number
      * of attempts.
@@ -1921,5 +1824,4 @@
             prevRun = (thisRun == null) ? prevRun : thisRun;
         }
     }
-
 }
diff --git a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/EdgePair.java b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/EdgePair.java
new file mode 100644
index 0000000..571e87f
--- /dev/null
+++ b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/EdgePair.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.segmentrouting;
+
+import org.onosproject.net.DeviceId;
+
+import java.util.Objects;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+
+/**
+ * Represents two devices that are paired by configuration. An EdgePair for
+ * (dev1, dev2) is the same as as EdgePair for (dev2, dev1)
+ */
+public final class EdgePair {
+    DeviceId dev1;
+    DeviceId dev2;
+
+    EdgePair(DeviceId dev1, DeviceId dev2) {
+        this.dev1 = dev1;
+        this.dev2 = dev2;
+    }
+
+    boolean includes(DeviceId dev) {
+        return dev1.equals(dev) || dev2.equals(dev);
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (!(o instanceof EdgePair)) {
+            return false;
+        }
+        EdgePair that = (EdgePair) o;
+        return ((this.dev1.equals(that.dev1) && this.dev2.equals(that.dev2)) ||
+                (this.dev1.equals(that.dev2) && this.dev2.equals(that.dev1)));
+    }
+
+    @Override
+    public int hashCode() {
+        if (dev1.toString().compareTo(dev2.toString()) <= 0) {
+            return Objects.hash(dev1, dev2);
+        } else {
+            return Objects.hash(dev2, dev1);
+        }
+    }
+
+    @Override
+    public String toString() {
+        return toStringHelper(this)
+                .add("Dev1", dev1)
+                .add("Dev2", dev2)
+                .toString();
+    }
+}
\ No newline at end of file
diff --git a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/PortFilterInfo.java b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/PortFilterInfo.java
new file mode 100644
index 0000000..75c12d6
--- /dev/null
+++ b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/PortFilterInfo.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.segmentrouting;
+
+import com.google.common.base.MoreObjects;
+
+import java.util.Objects;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+
+/**
+ * Utility class used to temporarily store information about the ports on a
+ * device processed for filtering objectives.
+ */
+public final class PortFilterInfo {
+    int disabledPorts = 0, errorPorts = 0, filteredPorts = 0;
+
+    public PortFilterInfo(int disabledPorts, int errorPorts,
+                          int filteredPorts) {
+        this.disabledPorts = disabledPorts;
+        this.filteredPorts = filteredPorts;
+        this.errorPorts = errorPorts;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(disabledPorts, filteredPorts, errorPorts);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if ((obj == null) || (!(obj instanceof PortFilterInfo))) {
+            return false;
+        }
+        PortFilterInfo other = (PortFilterInfo) obj;
+        return ((disabledPorts == other.disabledPorts) &&
+                (filteredPorts == other.filteredPorts) &&
+                (errorPorts == other.errorPorts));
+    }
+
+    @Override
+    public String toString() {
+        MoreObjects.ToStringHelper helper = toStringHelper(this)
+                .add("disabledPorts", disabledPorts)
+                .add("errorPorts", errorPorts)
+                .add("filteredPorts", filteredPorts);
+        return helper.toString();
+    }
+}
\ No newline at end of file
diff --git a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
index ef9e279..ea730aa 100644
--- a/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
+++ b/apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
@@ -47,7 +47,6 @@
 import org.onosproject.net.flowobjective.ObjectiveContext;
 import org.onosproject.net.flowobjective.ObjectiveError;
 import org.onosproject.net.packet.PacketPriority;
-import org.onosproject.segmentrouting.DefaultRoutingHandler.PortFilterInfo;
 import org.onosproject.segmentrouting.config.DeviceConfigNotFoundException;
 import org.onosproject.segmentrouting.config.DeviceConfiguration;
 import org.onosproject.segmentrouting.grouphandler.DefaultGroupHandler;
@@ -922,8 +921,7 @@
         }
         log.debug("Filtering on dev:{}, disabledPorts:{}, errorPorts:{}, filteredPorts:{}",
                   deviceId, disabledPorts, errorPorts, filteredPorts);
-        return srManager.defaultRoutingHandler.new PortFilterInfo(disabledPorts,
-                                                       errorPorts, filteredPorts);
+        return new PortFilterInfo(disabledPorts, errorPorts, filteredPorts);
     }
 
     /**
