diff --git a/api/src/main/java/org/opencord/bng/BngAttachment.java b/api/src/main/java/org/opencord/bng/BngAttachment.java
index 3fce980..77d37e4 100644
--- a/api/src/main/java/org/opencord/bng/BngAttachment.java
+++ b/api/src/main/java/org/opencord/bng/BngAttachment.java
@@ -138,8 +138,6 @@
 
     /**
      * Abstract builder of attachments.
-     * <p>
-     * TODO: javadoc
      */
     public abstract static class BngBuilder {
         ApplicationId appId;
diff --git a/api/src/main/java/org/opencord/bng/PppoeBngAttachment.java b/api/src/main/java/org/opencord/bng/PppoeBngAttachment.java
index 7d6c8ed..f7ca7be 100644
--- a/api/src/main/java/org/opencord/bng/PppoeBngAttachment.java
+++ b/api/src/main/java/org/opencord/bng/PppoeBngAttachment.java
@@ -49,11 +49,6 @@
         return new Builder();
     }
 
-    // TODO: remove when BngProgrammable API are updated!
-    @Override
-    public BngProgrammable.AttachmentId attachmentId() {
-        return null;
-    }
 
     @Override
     public BngProgrammable.Attachment.AttachmentType type() {
diff --git a/app/src/main/java/org/opencord/bng/impl/BngManager.java b/app/src/main/java/org/opencord/bng/impl/BngManager.java
index 1f399e1..fa5c755 100644
--- a/app/src/main/java/org/opencord/bng/impl/BngManager.java
+++ b/app/src/main/java/org/opencord/bng/impl/BngManager.java
@@ -253,22 +253,19 @@
                                                   ConnectPoint asgConnectPoint,
                                                   ConnectPoint oltConnectPoint,
                                                   String onuSerialNumber) {
-//        Set<HostLocation> hostLocation = Set.of(new HostLocation(oltConnectPoint.deviceId(),
-//                oltConnectPoint.port(),
-//                System.currentTimeMillis()));
-//        var auxLocation = String.join(",", asgConnectPoint.toString());
-        // FIXME: remove this hostLocation and decomment the above rows when aux-location patch will be merged
-        Set<HostLocation> hostLocation = Set.of(new HostLocation(asgConnectPoint.deviceId(),
-                                                                 asgConnectPoint.port(),
+        Set<HostLocation> hostLocation = Set.of(new HostLocation(oltConnectPoint.deviceId(),
+                                                                 oltConnectPoint.port(),
                                                                  System.currentTimeMillis()));
+        Set<HostLocation> auxLocation = Set.of(new HostLocation(asgConnectPoint.deviceId(),
+                                                                asgConnectPoint.port(),
+                                                                System.currentTimeMillis()));
         var annotations = DefaultAnnotations.builder()
-//                .set(AUX_LOCATIONS_ANNOTATION, auxLocation)
                 .set(ONU_ANNOTATION, onuSerialNumber)
                 .build();
         Set<IpAddress> ips = hostIp != null
                 ? ImmutableSet.of(hostIp) : ImmutableSet.of();
         return new DefaultHostDescription(hostMac, sTag,
-                                          hostLocation,
+                                          hostLocation, auxLocation,
                                           ips, cTag, EthType.EtherType.QINQ.ethType(),
                                           false, annotations);
     }
@@ -287,7 +284,11 @@
         // Try to remove host even if the BNG user plane device is not available
         hostProviderService.hostVanished(hostToBeRemoved);
         if (bngProgrammableAvailable()) {
-            bngProgrammable.removeAttachment(regAttachment);
+            try {
+                bngProgrammable.removeAttachment(regAttachment);
+            } catch (BngProgrammableException ex) {
+                log.error("Exception when removing the attachment: " + ex.getMessage());
+            }
         } else {
             log.info("BNG user plane not available!");
         }
diff --git a/app/src/main/java/org/opencord/bng/impl/PppoeHandlerRelay.java b/app/src/main/java/org/opencord/bng/impl/PppoeHandlerRelay.java
index 56566c3..f6c47f3 100644
--- a/app/src/main/java/org/opencord/bng/impl/PppoeHandlerRelay.java
+++ b/app/src/main/java/org/opencord/bng/impl/PppoeHandlerRelay.java
@@ -456,8 +456,6 @@
      * @param eth Packet to be modified
      */
     private void modPacketForPPPoEServer(Ethernet eth) {
-        // TODO: rewrite it. Retrieve information about the interface where
-        //  PPPoE Server is connected and apply them to the packet
         Set<Interface> interfaces = interfaceService.getInterfacesByPort(pppoeRelayConfig.getPppoeServerConnectPoint());
         if (interfaces != null &&
                 interfaces.iterator().hasNext() &&
diff --git a/pom.xml b/pom.xml
index fbf6640..0b5075a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.onosproject</groupId>
         <artifactId>onos-dependencies</artifactId>
-        <version>2.2.1-b3</version>
+        <version>2.2.1-b4</version>
     </parent>
 
     <groupId>org.opencord</groupId>
