diff --git a/scripts/nbhelper/__init__.py b/scripts/nbhelper/__init__.py
index 7755623..85acea5 100644
--- a/scripts/nbhelper/__init__.py
+++ b/scripts/nbhelper/__init__.py
@@ -1,3 +1,6 @@
+# SPDX-FileCopyrightText: © 2021 Open Networking Foundation <support@opennetworking.org>
+# SPDX-License-Identifier: Apache-2.0
+
 from .utils import initialize
 from .tenant import Tenant
 from .device import Device, VirtualMachine
diff --git a/scripts/nbhelper/container.py b/scripts/nbhelper/container.py
index 397ee32..0e728a1 100644
--- a/scripts/nbhelper/container.py
+++ b/scripts/nbhelper/container.py
@@ -1,4 +1,5 @@
 import netaddr
+from .utils import logger
 
 
 class Singleton(type):
@@ -10,7 +11,7 @@
         return cls._instances[cls]
 
 
-class Container(object):
+class Container:
     def __init__(self):
         self.instances = dict()
 
@@ -36,16 +37,19 @@
         for instance in self.instances.values():
             if "dns" in list(map(str, instance.services)):
                 return instance
+        return None
 
     def getDHCPServer(self):
         for instance in self.instances.values():
             if "tftp" in list(map(str, instance.services)):
                 return instance
+        return None
 
     def getNTPServer(self):
         for instance in self.instances.values():
             if "ntp" in list(map(str, instance.services)):
                 return instance
+        return None
 
     def getRouters(self):
         """ Get a list of Devices/VMs which type is Router """
@@ -72,6 +76,7 @@
                         prefix.subnet
                     ):
                         return str(netaddr.IPNetwork(address).ip)
+        return None
 
 
 class DeviceContainer(AssignedObjectContainer, metaclass=Singleton):
@@ -87,9 +92,6 @@
 class PrefixContainer(Container, metaclass=Singleton):
     # PrefixContainer holds all prefixes fetch from Netbox, prefix(str) as key
 
-    def get(self, instance_id, name_segments=1):
-        return super().get(instance_id)
-
     def all(self):
         return self.instances.values()
 
@@ -221,7 +223,8 @@
                             #         "eno1": {
                             #             "mgmtOnly": False,
                             #             "macaddr": "ca:fe:ba:be:11:11",
-                            #             "ipaddr": [IPAddress("10.32.4.129"), IPAddress("10.32.4.130")]
+                            #             "ipaddr": [IPAddress("10.32.4.129"),
+                            #                        IPAddress("10.32.4.130")]
                             #         }
                             #    }
                             #  "mgmtswitch1": ...
@@ -242,14 +245,24 @@
                             ]
                             interfaceDict.setdefault("mgmtOnly", False)
 
-                            # Use interface["mac_address"] as the default value, but if the mac_address
-                            #  is None, that means we are dealing with a virtual interfaces
-                            #  so we can get the linked interface's mac_address instead
+                            # Use interface["mac_address"] as the default value, but if the
+                            # mac_address is None, that means we are dealing with a virtual
+                            # interfaces so we can get the linked interface's mac_address instead
 
-                            interfaceDict.setdefault(
-                                "mac_address", interface["mac_address"] or
-                                device.interfaces[interface["instance"].label]["mac_address"]
-                            )
+                            try:
+                                interfaceDict.setdefault(
+                                    "mac_address",
+                                    interface["mac_address"]
+                                    or device.interfaces[interface["instance"].label][
+                                        "mac_address"
+                                    ],
+                                )
+                            except KeyError:
+                                logger.error(
+                                    "Problem with MAC address on interface %s",
+                                    interface,
+                                )
+
                             interfaceDict.setdefault("ip_addresses", list())
                             interfaceDict["ip_addresses"].append(address)
 
diff --git a/scripts/nbhelper/device.py b/scripts/nbhelper/device.py
index 94b03df..32a2075 100644
--- a/scripts/nbhelper/device.py
+++ b/scripts/nbhelper/device.py
@@ -4,12 +4,11 @@
 # SPDX-License-Identifier: Apache-2.0
 
 # device.py
-#
 
+import sys
 import netaddr
 
-from .utils import logger, clean_name_dns
-from .network import Prefix
+from .utils import logger
 from .container import DeviceContainer, VirtualMachineContainer, PrefixContainer
 
 
@@ -40,7 +39,7 @@
     objects = dict()
 
     def __init__(self, data):
-        from .utils import netboxapi, netbox_config
+        from .utils import netboxapi
 
         self.data = data
         self.nbapi = netboxapi
@@ -49,6 +48,7 @@
         self.id = self.data.id
         self.tenant = None
         self.primary_ip = None
+        self.primary_iface = None
 
         # In Netbox, we use FQDN as the Device name, but in the script,
         # we use the first segment to be the name of device.
@@ -108,8 +108,12 @@
             # ipam.ip_addresses doesn't have primary tag,
             # the primary tag is only available is only in the Device.
             # So we need to compare address to check which one is primary ip
-            if address.address == self.primary_ip.address:
-                interface["isPrimary"] = True
+            try:
+                if address.address == self.primary_ip.address:
+                    interface["isPrimary"] = True
+                    self.primary_iface = interface
+            except AttributeError:
+                logger.error("Error with primary address for device %s", self.fullname)
 
             # mgmt_only = False is a hack for VirtualMachine type
             if self.__class__ == VirtualMachine:
@@ -181,7 +185,7 @@
                 self.netplan_config["ethernets"].setdefault(intfName, {})
                 self.netplan_config["ethernets"][intfName].setdefault(
                     "addresses", []
-                ).append(address)
+                ).extend(interface["addresses"])
 
         # If the current selected device is a Server
         elif isinstance(self, Device) and self.data.device_role.name == "Server":
@@ -233,7 +237,9 @@
                     for dest_addr in destination.split(","):
 
                         # If interface address is in destination subnet, we don't need this route
-                        if netaddr.IPNetwork(address).ip in netaddr.IPNetwork(dest_addr):
+                        if netaddr.IPNetwork(address).ip in netaddr.IPNetwork(
+                            dest_addr
+                        ):
                             continue
 
                         new_route = {
@@ -298,7 +304,8 @@
                 }
             )
 
-        # Only management server needs to be configured the whitelist netrange of internal interface
+        # Only management server needs to be configured the whitelist netrange of
+        # internal interface
         if self.data.device_role.name == "Router":
 
             ret["interface_subnets"] = dict()
@@ -329,8 +336,13 @@
                         if prefix.subnet not in ret["interface_subnets"][intfName]:
                             ret["interface_subnets"][intfName].append(prefix.subnet)
                         for neighbor in prefix.neighbor:
-                            if neighbor.subnet not in ret["interface_subnets"][intfName]:
-                                ret["interface_subnets"][intfName].append(neighbor.subnet)
+                            if (
+                                neighbor.subnet
+                                not in ret["interface_subnets"][intfName]
+                            ):
+                                ret["interface_subnets"][intfName].append(
+                                    neighbor.subnet
+                                )
 
             for prefix in PrefixContainer().all():
 
@@ -361,8 +373,6 @@
         if self.extra_config:
             return self.extra_config
 
-        primary_ip = self.data.primary_ip.address if self.data.primary_ip else None
-
         service_names = list(map(lambda x: x.name, self.services))
 
         if "dns" in service_names:
diff --git a/scripts/nbhelper/network.py b/scripts/nbhelper/network.py
index 3a51219..9b5d824 100644
--- a/scripts/nbhelper/network.py
+++ b/scripts/nbhelper/network.py
@@ -10,7 +10,6 @@
 
 from .utils import logger, check_name_dns
 from .container import PrefixContainer
-from .container import DeviceContainer, VirtualMachineContainer
 
 
 class Prefix:
@@ -71,7 +70,6 @@
                     if self not in prefix.neighbor:
                         prefix.neighbor.append(self)
 
-
     def build_prefix(self):
         """
         find ip information for items (devices/vms, reserved_ips, dhcp_range) in prefix
diff --git a/scripts/nbhelper/service.py b/scripts/nbhelper/service.py
index 1ad992c..fe78a9f 100644
--- a/scripts/nbhelper/service.py
+++ b/scripts/nbhelper/service.py
@@ -4,12 +4,9 @@
 # SPDX-License-Identifier: Apache-2.0
 
 # service.py
-#
 
-import re
 import netaddr
 
-from .utils import logger, AttrDict
 from .container import ServiceInfoContainer
 
 
@@ -66,7 +63,7 @@
             for host in domain["hosts"]:
                 if ip_address == host["ip_addr"]:
                     return f"{host['name']}.{domainName}."
-
+        return ""
 
     dnsForwardZoneConfigs = dict()
 
@@ -91,7 +88,9 @@
         if ntpServer:
             forwardZoneConfig["cname"]["ntp"] = getDomainNameByIP(ntpServer["address"])
         if dhcpServer:
-            forwardZoneConfig["cname"]["tftp"] = getDomainNameByIP(dhcpServer["address"])
+            forwardZoneConfig["cname"]["tftp"] = getDomainNameByIP(
+                dhcpServer["address"]
+            )
         if dnsServer:
             forwardZoneConfig["cname"]["ns"] = getDomainNameByIP(dnsServer["address"])
             forwardZoneConfig["ns"].append(getDomainNameByIP(dnsServer["address"]))
@@ -126,7 +125,7 @@
         if o1 == 10:
             o2 = o3 = o4 = 0
             cidr_plen = 8
-        elif (o1 == 172 and o2 >= 16 and o2 <= 31) or (o1 == 192 and o2 == 168):
+        elif (o1 == 172 and 16 <= o2 <= 31) or (o1 == 192 and o2 == 168):
             o3 = o4 = 0
             cidr_plen = 16
 
diff --git a/scripts/nbhelper/tenant.py b/scripts/nbhelper/tenant.py
index 4d529a7..a4d4048 100644
--- a/scripts/nbhelper/tenant.py
+++ b/scripts/nbhelper/tenant.py
@@ -6,7 +6,9 @@
 # tenant.py
 # The tenant abstract object of Netbox Object - Tenant
 
-from .utils import logger, netboxapi
+import sys
+
+from .utils import logger
 from .device import Device, VirtualMachine
 from .network import Prefix
 
@@ -58,9 +60,9 @@
         """
 
         for machine in self.devices + self.vms:
-            if name and machine.name == name:
-                return machine
-            elif machine.data["device_role"]["name"] == "Router":
+            if (name and machine.name == name) or machine.data["device_role"][
+                "name"
+            ] == "Router":
                 return machine
 
         ret_msg = (
@@ -71,10 +73,12 @@
         logger.error(ret_msg, name)
         sys.exit(1)
 
-    def get_devices(self, device_types=["server", "router"]):
+    def get_devices(self, device_types=None):
         """
         Get all devices (Router + Server) belong to this Tenant
         """
+        if not device_types:
+            device_types = ["server", "router"]
 
         if not device_types:
             return self.devices + self.vms
diff --git a/scripts/nbhelper/utils.py b/scripts/nbhelper/utils.py
index 5614ba9..d44bc96 100644
--- a/scripts/nbhelper/utils.py
+++ b/scripts/nbhelper/utils.py
@@ -6,11 +6,13 @@
 # utils.py
 # The utility functions shared among nbhelper objects
 
-import re
-import logging
 import argparse
-import pynetbox
+import logging
+import re
+import sys
+
 import requests
+import pynetbox
 
 from ruamel import yaml
 
@@ -36,7 +38,7 @@
 
     for require_args in ["api_endpoint", "token", "tenant_name"]:
         if not netbox_config.get(require_args):
-            logger.error("The require argument: %s was not set. Stop." % require_args)
+            logger.error("The require argument: %s was not set. Stop.", require_args)
             sys.exit(1)
 
     netboxapi = pynetbox.api(
@@ -53,7 +55,7 @@
     return args
 
 
-def parse_cli_args(extra_args={}):
+def parse_cli_args(extra_args):
     """
     parse CLI arguments.  Can add extra arguments with a option:kwargs dict
     """
@@ -115,5 +117,5 @@
 
 class AttrDict(dict):
     def __init__(self, *args, **kwargs):
-        super(AttrDict, self).__init__(*args, **kwargs)
+        super().__init__(*args, **kwargs)
         self.__dict__ = self
