diff --git a/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java b/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
index 8b447af..40ee55f 100644
--- a/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
+++ b/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
@@ -93,7 +93,7 @@
         try {
             populationStatus = Status.STARTED;
             rulePopulator.resetCounter();
-            log.info("Starts to populate routing rules");
+            log.info("Starting to populate segment-routing rules");
             log.debug("populateAllRoutingRules: populationStatus is STARTED");
 
             for (Device sw : srManager.deviceService.getDevices()) {
@@ -117,7 +117,7 @@
 
             log.debug("populateAllRoutingRules: populationStatus is SUCCEEDED");
             populationStatus = Status.SUCCEEDED;
-            log.info("Completes routing rule population. Total # of rules pushed : {}",
+            log.info("Completed routing rule population. Total # of rules pushed : {}",
                     rulePopulator.getCounter());
             return true;
         } finally {
@@ -426,7 +426,7 @@
                     .get(itrIdx);
             for (DeviceId targetSw : swViaMap.keySet()) {
                 Set<DeviceId> nextHops = new HashSet<>();
-
+                log.debug("** Iter: {} root: {} target: {}", itrIdx, destSw, targetSw);
                 for (ArrayList<DeviceId> via : swViaMap.get(targetSw)) {
                     if (via.isEmpty()) {
                         nextHops.add(destSw);
@@ -456,7 +456,7 @@
         // rule for both subnet and router IP.
         if (config.isEdgeDevice(targetSw) && config.isEdgeDevice(destSw)) {
             List<Ip4Prefix> subnets = config.getSubnets(destSw);
-            log.debug("populateEcmpRoutingRulePartial in device {} towards {} for subnets {}",
+            log.debug("* populateEcmpRoutingRulePartial in device {} towards {} for subnets {}",
                     targetSw, destSw, subnets);
             result = rulePopulator.populateIpRuleForSubnet(targetSw,
                                                            subnets,
@@ -468,7 +468,7 @@
 
             Ip4Address routerIp = config.getRouterIp(destSw);
             IpPrefix routerIpPrefix = IpPrefix.valueOf(routerIp, IpPrefix.MAX_INET_MASK_LENGTH);
-            log.debug("populateEcmpRoutingRulePartial in device {} towards {} for router IP {}",
+            log.debug("* populateEcmpRoutingRulePartial in device {} towards {} for router IP {}",
                     targetSw, destSw, routerIpPrefix);
             result = rulePopulator.populateIpRuleForRouter(targetSw, routerIpPrefix, destSw, nextHops);
             if (!result) {
@@ -479,7 +479,7 @@
         } else if (config.isEdgeDevice(targetSw)) {
             Ip4Address routerIp = config.getRouterIp(destSw);
             IpPrefix routerIpPrefix = IpPrefix.valueOf(routerIp, IpPrefix.MAX_INET_MASK_LENGTH);
-            log.debug("populateEcmpRoutingRulePartial in device {} towards {} for router IP {}",
+            log.debug("* populateEcmpRoutingRulePartial in device {} towards {} for router IP {}",
                     targetSw, destSw, routerIpPrefix);
             result = rulePopulator.populateIpRuleForRouter(targetSw, routerIpPrefix, destSw, nextHops);
             if (!result) {
@@ -488,7 +488,7 @@
         }
 
         // Populates MPLS rules to all routers
-        log.debug("populateEcmpRoutingRulePartial in device{} towards {} for all MPLS rules",
+        log.debug("* populateEcmpRoutingRulePartial in device{} towards {} for all MPLS rules",
                 targetSw, destSw);
         result = rulePopulator.populateMplsRule(targetSw, destSw, nextHops);
         if (!result) {
@@ -500,7 +500,7 @@
 
     /**
      * Populates table miss entries for all tables, and pipeline rules for VLAN
-     * and TACM tables.
+     * and TCAM tables. XXX rename/rethink
      *
      * @param deviceId Switch ID to set the rules
      */
@@ -534,6 +534,8 @@
     /**
      * Resume the flow rule population process if it was aborted for any reason.
      * Mostly the process is aborted when the groups required are not set yet.
+     *  XXX is this called?
+     *
      */
     public void resumePopulationProcess() {
         statusLock.lock();
diff --git a/src/main/java/org/onosproject/segmentrouting/DeviceConfiguration.java b/src/main/java/org/onosproject/segmentrouting/DeviceConfiguration.java
index eef1b14..0bc155b 100644
--- a/src/main/java/org/onosproject/segmentrouting/DeviceConfiguration.java
+++ b/src/main/java/org/onosproject/segmentrouting/DeviceConfiguration.java
@@ -134,7 +134,7 @@
     @Override
     public int getSegmentId(DeviceId deviceId) {
         if (deviceConfigMap.get(deviceId) != null) {
-            log.debug("getSegmentId for device{} is {}",
+            log.trace("getSegmentId for device{} is {}",
                     deviceId,
                     deviceConfigMap.get(deviceId).nodeSid);
             return deviceConfigMap.get(deviceId).nodeSid;
@@ -189,7 +189,7 @@
     @Override
     public MacAddress getDeviceMac(DeviceId deviceId) {
         if (deviceConfigMap.get(deviceId) != null) {
-            log.debug("getDeviceMac for device{} is {}",
+            log.trace("getDeviceMac for device{} is {}",
                     deviceId,
                     deviceConfigMap.get(deviceId).mac);
             return deviceConfigMap.get(deviceId).mac;
@@ -209,7 +209,7 @@
      */
     public Ip4Address getRouterIp(DeviceId deviceId) {
         if (deviceConfigMap.get(deviceId) != null) {
-            log.debug("getDeviceIp for device{} is {}",
+            log.trace("getDeviceIp for device{} is {}",
                     deviceId,
                     deviceConfigMap.get(deviceId).ip);
             return deviceConfigMap.get(deviceId).ip;
@@ -231,7 +231,7 @@
     @Override
     public boolean isEdgeDevice(DeviceId deviceId) {
         if (deviceConfigMap.get(deviceId) != null) {
-            log.debug("isEdgeDevice for device{} is {}",
+            log.trace("isEdgeDevice for device{} is {}",
                     deviceId,
                     deviceConfigMap.get(deviceId).isEdge);
             return deviceConfigMap.get(deviceId).isEdge;
@@ -297,7 +297,7 @@
      */
     public List<Ip4Address> getSubnetGatewayIps(DeviceId deviceId) {
         if (deviceConfigMap.get(deviceId) != null) {
-            log.debug("getSubnetGatewayIps for device{} is {}",
+            log.trace("getSubnetGatewayIps for device{} is {}",
                     deviceId,
                     deviceConfigMap.get(deviceId).gatewayIps.values());
             return new ArrayList<>(deviceConfigMap.get(deviceId).gatewayIps.values());
@@ -314,7 +314,7 @@
      */
     public List<Ip4Prefix> getSubnets(DeviceId deviceId) {
         if (deviceConfigMap.get(deviceId) != null) {
-            log.debug("getSubnets for device{} is {}",
+            log.trace("getSubnets for device{} is {}",
                     deviceId,
                     deviceConfigMap.get(deviceId).subnets.values());
             return new ArrayList<>(deviceConfigMap.get(deviceId).subnets.values());
diff --git a/src/main/java/org/onosproject/segmentrouting/ECMPShortestPathGraph.java b/src/main/java/org/onosproject/segmentrouting/ECMPShortestPathGraph.java
index 2e2041c..e9a59ba 100644
--- a/src/main/java/org/onosproject/segmentrouting/ECMPShortestPathGraph.java
+++ b/src/main/java/org/onosproject/segmentrouting/ECMPShortestPathGraph.java
@@ -31,7 +31,7 @@
 
 /**
  * This class creates bandwidth constrained breadth first tree and returns paths
- * from root Device to leaf Devicees which satisfies the bandwidth condition. If
+ * from root Device to leaf Devices which satisfies the bandwidth condition. If
  * bandwidth parameter is not specified, the normal breadth first tree will be
  * calculated. The paths are snapshot paths at the point of the class
  * instantiation.
@@ -281,7 +281,7 @@
      * Return the complete info of the computed ECMP paths for each Device
      * learned in multiple iterations from the root Device.
      *
-     * @return the hash table of Devicees learned in multiple Dijkstra
+     * @return the hash table of Devices learned in multiple Dijkstra
      *         iterations and corresponding ECMP paths to it from the root
      *         Device
      */
@@ -305,8 +305,8 @@
      * Return the complete info of the computed ECMP paths for each Device
      * learned in multiple iterations from the root Device.
      *
-     * @return the hash table of Devicees learned in multiple Dijkstra
-     *         iterations and corresponding ECMP paths in terms of Devicees to
+     * @return the hash table of Devices learned in multiple Dijkstra
+     *         iterations and corresponding ECMP paths in terms of Devices to
      *         be traversed to it from the root Device
      */
     public HashMap<Integer, HashMap<DeviceId,
diff --git a/src/main/java/org/onosproject/segmentrouting/IpHandler.java b/src/main/java/org/onosproject/segmentrouting/IpHandler.java
index e37fe52..14ce679 100644
--- a/src/main/java/org/onosproject/segmentrouting/IpHandler.java
+++ b/src/main/java/org/onosproject/segmentrouting/IpHandler.java
@@ -115,7 +115,7 @@
     /**
      * Forwards IP packets in the buffer to the destination IP address.
      * It is called when the controller finds the destination MAC address
-     * via ARP responsees.
+     * via ARP responses.
      *
      * @param deviceId switch device ID
      * @param destIpAddress destination IP address
diff --git a/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java b/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
index d802be9..7641571 100644
--- a/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
+++ b/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
@@ -150,7 +150,7 @@
     /**
      * Populates IP flow rules for the router IP address.
      *
-     * @param deviceId device ID to set the rules
+     * @param deviceId target device ID to set the rules
      * @param ipPrefix the IP address of the destination router
      * @param destSw device ID of the destination router
      * @param nextHops next hop switch ID list
@@ -210,9 +210,9 @@
     }
 
     /**
-     * Populates MPLS flow rules to all transit routers.
+     * Populates MPLS flow rules to all routers.
      *
-     * @param deviceId device ID of the switch to set the rules
+     * @param deviceId target device ID of the switch to set the rules
      * @param destSwId destination switch device ID
      * @param nextHops next hops switch ID list
      * @return true if all rules are set successfully, false otherwise
@@ -379,7 +379,7 @@
                 .addCondition(Criteria.matchEthDst(config
                                       .getDeviceMac(deviceId)));
         fob.permit().fromApp(srManager.appId);
-        log.debug("populateTableVlan: Installing filtering objective for router mac");
+        log.debug("populateTableTMac: Installing filtering objective for router mac");
         srManager.flowObjectiveService.
             filter(deviceId,
                    fob.add(new SRObjectiveContext(deviceId,
diff --git a/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
index 9011160..eb2cf56 100644
--- a/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
+++ b/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
@@ -296,7 +296,8 @@
     }
 
     /**
-     * Returns the GrouopKey object for the device and the NighborSet given.
+     * Returns the GroupKey object for the device and the NeighborSet given.
+     * XXX is this called
      *
      * @param ns NeightborSet object for the GroupKey
      * @return GroupKey object for the NeighborSet
diff --git a/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultEdgeGroupHandler.java b/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultEdgeGroupHandler.java
index 3dc312d..c960adc 100644
--- a/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultEdgeGroupHandler.java
+++ b/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultEdgeGroupHandler.java
@@ -35,13 +35,14 @@
  * where D0 and D3 are edge devices and D1 and D2 are transit devices.
  * Assume device D0 is connected to 2 neighbors (D1 and D2 ).
  * The following groups will be created in D0:
- * 1) all ports to D1 + with no label push,
- * 2) all ports to D1 + with label 102 pushed,
- * 3) all ports to D1 + with label 103 pushed,
+ * 1) all ports to D1 + with no label push, // direct attach case, seen
+ * 2) all ports to D1 + with label 102 pushed, // this is not needed
+ * 3) all ports to D1 + with label 103 pushed, // maybe needed, sometimes seen
  * 4) all ports to D2 + with no label push,
  * 5) all ports to D2 + with label 101 pushed,
  * 6) all ports to D2 + with label 103 pushed,
- * 7) all ports to D1 and D2 + with label 103 pushed
+ * 7) all ports to D1 and D2 + with label 103 pushed // ecmp case
+ * 8) what about ecmp no label case
  */
 public class DefaultEdgeGroupHandler extends DefaultGroupHandler {
 
