diff --git a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
index a9b7614..a21980c 100644
--- a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
+++ b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
@@ -634,20 +634,6 @@
             task = BrcmUniLockTask(self.omci_agent, self.device_id, lock=True)
             self._deferred = self._onu_omci_device.task_runner.queue_task(task)
             self._deferred.addCallbacks(stop_anyway, stop_anyway)
-            '''
-            # Disable in parent device (OLT)
-            parent_device = self.adapter_agent.get_device(device.parent_id)
-
-            if parent_device.type == 'openolt':
-                parent_adapter = registry('adapter_loader').get_agent(parent_device.adapter).adapter
-                self.log.info('parent-adapter-disable-onu', onu_device=device,
-                              parent_device=parent_device,
-                              parent_adapter=parent_adapter)
-                try:
-                    parent_adapter.disable_child_device(parent_device.id, device)
-                except AttributeError:
-                    self.log.debug('parent-device-disable-child-not-implemented')
-            '''
         except Exception as e:
             log.exception('exception-in-onu-disable', exception=e)
 
diff --git a/voltha/adapters/broadcom_onu/broadcom_onu.py b/voltha/adapters/broadcom_onu/broadcom_onu.py
index 9618ee7..8b770ec 100644
--- a/voltha/adapters/broadcom_onu/broadcom_onu.py
+++ b/voltha/adapters/broadcom_onu/broadcom_onu.py
@@ -1746,20 +1746,6 @@
             device.oper_status = OperStatus.UNKNOWN
             device.connect_status = ConnectStatus.UNREACHABLE
             self.adapter_agent.update_device(device)
-            '''
-            # Disable in parent device (OLT)
-            parent_device = self.adapter_agent.get_device(device.parent_id)
-
-            if parent_device.type == 'openolt':
-                parent_adapter = registry('adapter_loader').get_agent(parent_device.adapter).adapter
-                self.log.info('parent-adapter-disable-onu', onu_device=device,
-                              parent_device=parent_device,
-                              parent_adapter=parent_adapter)
-                try:
-                    parent_adapter.disable_child_device(parent_device.id, device)
-                except AttributeError:
-                    self.log.debug('parent-device-disable-child-not-implemented')
-            '''
         except Exception as e:
             log.exception('exception-in-onu-disable', exception=e)
 
diff --git a/voltha/adapters/openolt/openolt.py b/voltha/adapters/openolt/openolt.py
index e2df59c..219d5d4 100644
--- a/voltha/adapters/openolt/openolt.py
+++ b/voltha/adapters/openolt/openolt.py
@@ -342,14 +342,13 @@
                  'not use this', data=data)
         raise NotImplementedError()
 
-    def disable_child_device(self, parent_device_id, child_device):
-        log.info('disable-child_device', parent_device_id=parent_device_id,
-                 child_device=child_device)
-        handler = self.devices[parent_device_id]
-        handler.disable_child_device(child_device)
-
     def delete_child_device(self, parent_device_id, child_device):
         log.info('delete-child_device', parent_device_id=parent_device_id,
                  child_device=child_device)
         handler = self.devices[parent_device_id]
-        handler.delete_child_device(child_device)
+        if handler is not None:
+            handler.delete_child_device(child_device)
+        else:
+            log.error('Could not find matching handler',
+                      looking_for_device_id =parent_device_id,
+                      available_handlers=self.devices.keys())
diff --git a/voltha/adapters/openolt/openolt_device.py b/voltha/adapters/openolt/openolt_device.py
index 366b900..1127e83 100644
--- a/voltha/adapters/openolt/openolt_device.py
+++ b/voltha/adapters/openolt/openolt_device.py
@@ -363,10 +363,6 @@
                                errmsg=disc_alarm_error.message)
             # continue for now.
 
-        pir = self.bw_mgr.pir(serial_number_str)
-        self.log.debug("peak information rate", serial_number=serial_number,
-                       pir=pir)
-
         onu_device = self.adapter_agent.get_child_device(
             self.device_id,
             serial_number=serial_number_str)
@@ -378,11 +374,8 @@
                     intf_id,
                     platform.intf_id_to_port_no(intf_id, Port.PON_OLT),
                     onu_id, serial_number)
-                self.log.info("activate-onu", intf_id=intf_id, onu_id=onu_id,
-                              serial_number=serial_number_str)
-                onu = openolt_pb2.Onu(intf_id=intf_id, onu_id=onu_id,
-                                      serial_number=serial_number, pir=pir)
-                self.stub.ActivateOnu(onu)
+                self.activate_onu(intf_id, onu_id, serial_number,
+                                  serial_number_str)
             except Exception as e:
                 self.log.exception('onu-activation-failed', e=e)
 
@@ -405,15 +398,17 @@
                               state=onu_device.oper_status)
             elif onu_device.oper_status == OperStatus.UNKNOWN:
                 self.log.info("onu in unknown state, recovering from olt \
-                              reboot, activate onu", intf_id=intf_id,
+                              reboot probably, activate onu", intf_id=intf_id,
                               onu_id=onu_id, serial_number=serial_number_str)
 
                 onu_device.oper_status = OperStatus.DISCOVERED
                 self.adapter_agent.update_device(onu_device)
-
-                onu = openolt_pb2.Onu(intf_id=intf_id, onu_id=onu_id,
-                                      serial_number=serial_number, pir=pir)
-                self.stub.ActivateOnu(onu)
+                try:
+                    self.activate_onu(intf_id, onu_id, serial_number,
+                                  serial_number_str)
+                except Exception as e:
+                    self.log.error('onu-activation-error',
+                                   serial_number=serial_number_str, error=e)
             else:
                 self.log.warn('unexpected state', onu_id=onu_id,
                               onu_device_oper_state=onu_device.oper_status)
@@ -872,16 +867,6 @@
                        intf_id=intf_id, ids_taken=platform.MAX_ONUS_PER_PON)
         return None
 
-    def stringify_vendor_specific(self, vendor_specific):
-        return ''.join(str(i) for i in [
-                hex(ord(vendor_specific[0]) >> 4 & 0x0f)[2:],
-                hex(ord(vendor_specific[0]) & 0x0f)[2:],
-                hex(ord(vendor_specific[1]) >> 4 & 0x0f)[2:],
-                hex(ord(vendor_specific[1]) & 0x0f)[2:],
-                hex(ord(vendor_specific[2]) >> 4 & 0x0f)[2:],
-                hex(ord(vendor_specific[2]) & 0x0f)[2:],
-                hex(ord(vendor_specific[3]) >> 4 & 0x0f)[2:],
-                hex(ord(vendor_specific[3]) & 0x0f)[2:]])
 
     def update_flow_table(self, flows):
         self.log.debug('No updates here now, all is done in logical flows '
@@ -934,11 +919,29 @@
             hex_ip.append(octet_hex)
         return ":".join(hex_ip)
 
+    def stringify_vendor_specific(self, vendor_specific):
+        return ''.join(str(i) for i in [
+            hex(ord(vendor_specific[0]) >> 4 & 0x0f)[2:],
+            hex(ord(vendor_specific[0]) & 0x0f)[2:],
+            hex(ord(vendor_specific[1]) >> 4 & 0x0f)[2:],
+            hex(ord(vendor_specific[1]) & 0x0f)[2:],
+            hex(ord(vendor_specific[2]) >> 4 & 0x0f)[2:],
+            hex(ord(vendor_specific[2]) & 0x0f)[2:],
+            hex(ord(vendor_specific[3]) >> 4 & 0x0f)[2:],
+            hex(ord(vendor_specific[3]) & 0x0f)[2:]])
+
+
     def stringify_serial_number(self, serial_number):
         return ''.join([serial_number.vendor_id,
                         self.stringify_vendor_specific(
                             serial_number.vendor_specific)])
 
+    def destringify_serial_number(self, serial_number_str):
+        serial_number = openolt_pb2.SerialNumber(
+            vendor_id=serial_number_str[:4].encode('utf-8'),
+            vendor_specific=binascii.unhexlify(serial_number_str[4:]))
+        return serial_number
+
     def disable(self):
         self.log.debug('sending-deactivate-olt-message',
                       device_id=self.device_id)
@@ -983,23 +986,18 @@
         else:
             self.log.info('openolt device reenabled')
 
+    def activate_onu(self, intf_id, onu_id, serial_number,
+                     serial_number_str):
+        pir = self.bw_mgr.pir(serial_number_str)
+        self.log.debug("activating-onu", intf_id=intf_id, onu_id=onu_id,
+                      serial_number_str=serial_number_str,
+                      serial_number=serial_number, pir=pir)
+        onu = openolt_pb2.Onu(intf_id=intf_id, onu_id=onu_id,
+                              serial_number=serial_number, pir=pir)
+        self.stub.ActivateOnu(onu)
+        self.log.info('onu-activated', serial_number=serial_number_str)
 
 
-    def disable_child_device(self, child_device):
-        self.log.debug('sending-disable-onu',
-                       olt_device_id=self.device_id,
-                       onu_device=child_device,
-                       onu_serial_number=child_device.serial_number)
-        vendor_id = child_device.vendor_id.encode('hex')
-        vendor_specific = child_device.serial_number.replace(
-            child_device.vendor_id, '').encode('hex')
-        serial_number = openolt_pb2.SerialNumber(
-            vendor_id=vendor_id, vendor_specific=vendor_specific)
-        onu = openolt_pb2.Onu(intf_id=child_device.proxy_address.channel_id,
-                              onu_id=child_device.proxy_address.onu_id,
-                              serial_number=serial_number)
-        self.stub.DeactivateOnu(onu)
-
     def delete_child_device(self, child_device):
         self.log.debug('sending-deactivate-onu',
                        olt_device_id=self.device_id,
@@ -1018,11 +1016,7 @@
             self.delete_port(child_device.serial_number)
         except Exception as e:
             self.log.error('port delete error', error=e)
-        vendor_id = child_device.vendor_id.encode('hex')
-        vendor_specific = child_device.serial_number.replace(
-            child_device.vendor_id, '').encode('hex')
-        serial_number = openolt_pb2.SerialNumber(
-            vendor_id=vendor_id, vendor_specific=vendor_specific)
+        serial_number = self.destringify_serial_number(child_device.serial_number)
         onu = openolt_pb2.Onu(intf_id=child_device.proxy_address.channel_id,
                               onu_id=child_device.proxy_address.onu_id,
                               serial_number=serial_number)
