diff --git a/xos/model-deps b/xos/model-deps
index 4866373..7f15774 100644
--- a/xos/model-deps
+++ b/xos/model-deps
@@ -99,7 +99,7 @@
         "Slice", 
         "Role"
     ], 
-    "NetworkSliver": [
+    "Port": [
         "Network", 
         "Sliver"
     ], 
diff --git a/xos/observers/hpc/hpc_watcher.py b/xos/observers/hpc/hpc_watcher.py
index 0821e6c..d098257 100644
--- a/xos/observers/hpc/hpc_watcher.py
+++ b/xos/observers/hpc/hpc_watcher.py
@@ -366,7 +366,7 @@
         if (network_name is None) or (network_name=="") or (network_name.lower()=="public"):
             return sliver.get_public_ip()
 
-        for ns in sliver.networkslivers.all():
+        for ns in sliver.ports.all():
             if (ns.ip) and (ns.network.name==network_name):
                 return ns.ip
 
diff --git a/xos/observers/vcpe/steps/sync_vcpetenant.py b/xos/observers/vcpe/steps/sync_vcpetenant.py
index f803758..94f6d53 100644
--- a/xos/observers/vcpe/steps/sync_vcpetenant.py
+++ b/xos/observers/vcpe/steps/sync_vcpetenant.py
@@ -68,7 +68,7 @@
                 for slice in service.slices.all():
                     if "dnsdemux" in slice.name:
                         for sliver in slice.slivers.all():
-                            for ns in sliver.networkslivers.all():
+                            for ns in sliver.ports.all():
                                 if ns.ip and ns.network.labels and (vcpe_service.backend_network_label in ns.network.labels):
                                     dnsdemux_ip = ns.ip
             if not dnsdemux_ip:
@@ -100,7 +100,7 @@
         if vcpe_service.bbs_slice:
             if vcpe_service.backend_network_label:
                 for bbs_sliver in vcpe_service.bbs_slice.slivers.all():
-                    for ns in bbs_sliver.networkslivers.all():
+                    for ns in bbs_sliver.ports.all():
                         if ns.ip and ns.network.labels and (vcpe_service.backend_network_label in ns.network.labels):
                             bbs_addrs.append(ns.ip)
             else:
diff --git a/xos/openstack_observer/event_loop.py b/xos/openstack_observer/event_loop.py
index 003634b..b6eceb3 100644
--- a/xos/openstack_observer/event_loop.py
+++ b/xos/openstack_observer/event_loop.py
@@ -66,7 +66,6 @@
 	return ig
 
 class XOSObserver:
-	#sync_steps = [SyncNetworks,SyncNetworkSlivers,SyncSites,SyncSitePrivilege,SyncSlices,SyncSliceMemberships,SyncSlivers,SyncSliverIps,SyncExternalRoutes,SyncUsers,SyncRoles,SyncNodes,SyncImages,GarbageCollector]
 	sync_steps = []
 
 	
@@ -196,7 +195,6 @@
 		#self.ordered_steps = ['SyncRoles', 'SyncControllerSites', 'SyncControllerSitePrivileges','SyncImages', 'SyncControllerImages','SyncControllerUsers','SyncControllerUserSitePrivileges','SyncControllerSlices', 'SyncControllerSlicePrivileges', 'SyncControllerUserSlicePrivileges', 'SyncControllerNetworks','SyncSlivers']
 		#self.ordered_steps = ['SyncControllerSites','SyncRoles','SyncControllerUsers','SyncControllerSlices','SyncControllerNetworks']
 		#self.ordered_steps = ['SyncControllerNetworks']
-		#self.ordered_steps = ['SyncSlivers','SyncNetworkSlivers']
 
 		print "Order of steps=",self.ordered_steps
 
diff --git a/xos/openstack_observer/steps/sync_network_slivers.py b/xos/openstack_observer/steps/sync_ports.py
similarity index 76%
rename from xos/openstack_observer/steps/sync_network_slivers.py
rename to xos/openstack_observer/steps/sync_ports.py
index c46ca55..259245a 100644
--- a/xos/openstack_observer/steps/sync_network_slivers.py
+++ b/xos/openstack_observer/steps/sync_ports.py
@@ -7,10 +7,10 @@
 from core.models.network import *
 from util.logger import observer_logger as logger
 
-class SyncNetworkSlivers(OpenStackSyncStep):
+class SyncPorts(OpenStackSyncStep):
     requested_interval = 0 # 3600
-    provides=[NetworkSliver]
-    observes=NetworkSliver
+    provides=[Port]
+    observes=Port
 
     #     The way it works is to enumerate the all of the ports that quantum
     #     has, and then work backward from each port's network-id to determine
@@ -19,12 +19,12 @@
     def call(self, **args):
         logger.info("sync'ing network slivers")
 
-        networkSlivers = NetworkSliver.objects.all()
-        networkSlivers_by_id = {}
-        networkSlivers_by_port = {}
-        for networkSliver in networkSlivers:
-            networkSlivers_by_id[networkSliver.id] = networkSliver
-            networkSlivers_by_port[networkSliver.port_id] = networkSliver
+        ports = Port.objects.all()
+        ports_by_id = {}
+        ports_by_neutron_port = {}
+        for port in ports:
+            ports_by_id[port.id] = port
+            ports_by_neutron_port[port.port_id] = port
 
         networks = Network.objects.all()
         networks_by_id = {}
@@ -74,7 +74,7 @@
 
         for port in ports_by_id.values():
             #logger.info("port %s" % str(port))
-            if port["id"] in networkSlivers_by_port:
+            if port["id"] in ports_by_neutron_port:
                 # we already have it
                 #logger.info("already accounted for port %s" % port["id"])
                 continue
@@ -127,9 +127,9 @@
                 continue
 
             ip=port["fixed_ips"][0]["ip_address"]
-            logger.info("creating NetworkSliver (%s, %s, %s, %s)" % (str(network), str(sliver), ip, str(port["id"])))
+            logger.info("creating Port (%s, %s, %s, %s)" % (str(network), str(sliver), ip, str(port["id"])))
 
-            ns = NetworkSliver(network=network,
+            ns = Port(network=network,
                                sliver=sliver,
                                ip=ip,
                                port_id=port["id"])
@@ -137,27 +137,27 @@
             try:
                 ns.save()
             except:
-                logger.log_exc("failed to save networksliver %s" % str(ns))
+                logger.log_exc("failed to save port %s" % str(ns))
                 continue
 
-        # For networkSlivers that were created by the user, find that ones
+        # For ports that were created by the user, find that ones
         # that don't have neutron ports, and create them.
-        for networkSliver in NetworkSliver.objects.filter(port_id__isnull=True, sliver__isnull=False):
-            #logger.info("XXX working on networksliver %s" % networkSliver)
-            controller = networkSliver.sliver.node.site_deployment.controller
+        for port in Port.objects.filter(port_id__isnull=True, sliver__isnull=False):
+            #logger.info("XXX working on port %s" % port)
+            controller = port.sliver.node.site_deployment.controller
             if controller:
-                cn=networkSliver.network.controllernetworks.filter(controller=controller)
+                cn=port.network.controllernetworks.filter(controller=controller)
                 if not cn:
-                    logger.log_exc("no controllernetwork for %s" % networkSliver)
+                    logger.log_exc("no controllernetwork for %s" % port)
                     continue
                 cn=cn[0]
                 if cn.lazy_blocked:
                     cn.lazy_blocked=False
                     cn.save()
-                    logger.info("deferring networkSliver %s because controllerNetwork was lazy-blocked" % networkSliver)
+                    logger.info("deferring port %s because controllerNetwork was lazy-blocked" % port)
                     continue
                 if not cn.net_id:
-                    logger.info("deferring networkSliver %s because controllerNetwork does not have a port-id yet" % networkSliver)
+                    logger.info("deferring port %s because controllerNetwork does not have a port-id yet" % port)
                     continue
                 try:
                     # We need to use a client driver that specifies the tenant
@@ -169,38 +169,38 @@
                     # not being in working condition.
                     from openstack.client import OpenStackClient
                     from openstack.driver import OpenStackDriver
-                    caller = networkSliver.network.owner.creator
+                    caller = port.network.owner.creator
                     auth = {'username': caller.email,
                             'password': caller.remote_password,
-                            'tenant': networkSliver.sliver.slice.name} # networkSliver.network.owner.name}
+                            'tenant': port.sliver.slice.name} # port.network.owner.name}
                     client = OpenStackClient(controller=controller, **auth) # cacert=self.config.nova_ca_ssl_cert,
                     driver = OpenStackDriver(client=client)
 
                     port = driver.shell.quantum.create_port({"port": {"network_id": cn.net_id}})["port"]
-                    networkSliver.port_id = port["id"]
+                    port.port_id = port["id"]
                     if port["fixed_ips"]:
-                        networkSliver.ip = port["fixed_ips"][0]["ip_address"]
+                        port.ip = port["fixed_ips"][0]["ip_address"]
                 except:
-                    logger.log_exc("failed to create neutron port for %s" % networkSliver)
+                    logger.log_exc("failed to create neutron port for %s" % port)
                     continue
-                networkSliver.save()
+                port.save()
 
         # Now, handle port forwarding
-        # We get the list of NetworkSlivers again, since we might have just
+        # We get the list of Ports again, since we might have just
         # added a few. Then, for each one of them we find it's quantum port and
         # make sure quantum's nat:forward_ports argument is the same.
 
-        for networkSliver in NetworkSliver.objects.all():
+        for port in Port.objects.all():
             try:
-                nat_list = networkSliver.network.nat_list
+                nat_list = port.network.nat_list
             except (TypeError, ValueError), e:
                 logger.info("Failed to decode nat_list: %s" % str(e))
                 continue
 
-            if not networkSliver.port_id:
+            if not port.port_id:
                 continue
 
-            neutron_port = ports_by_id.get(networkSliver.port_id, None)
+            neutron_port = ports_by_id.get(port.port_id, None)
             if not neutron_port:
                 continue
 
@@ -210,15 +210,15 @@
                 neutron_nat_list = []
 
             if (neutron_nat_list != nat_list):
-                logger.info("Setting nat:forward_ports for port %s network %s sliver %s to %s" % (str(networkSliver.port_id), str(networkSliver.network.id), str(networkSliver.sliver), str(nat_list)))
+                logger.info("Setting nat:forward_ports for port %s network %s sliver %s to %s" % (str(port.port_id), str(port.network.id), str(port.sliver), str(nat_list)))
                 try:
-                    driver = self.driver.admin_driver(controller=networkSliver.sliver.node.site_deployment.controller,tenant='admin')
-                    driver.shell.quantum.update_port(networkSliver.port_id, {"port": {"nat:forward_ports": nat_list}})
+                    driver = self.driver.admin_driver(controller=port.sliver.node.site_deployment.controller,tenant='admin')
+                    driver.shell.quantum.update_port(port.port_id, {"port": {"nat:forward_ports": nat_list}})
                 except:
                     logger.log_exc("failed to update port with nat_list %s" % str(nat_list))
                     continue
             else:
-                #logger.info("port %s network %s sliver %s nat %s is already set" % (str(networkSliver.port_id), str(networkSliver.network.id), str(networkSliver.sliver), str(nat_list)))
+                #logger.info("port %s network %s sliver %s nat %s is already set" % (str(port.port_id), str(port.network.id), str(port.sliver), str(nat_list)))
                 pass
 
     def delete_record(self, network_sliver):
diff --git a/xos/openstack_observer/steps/sync_slivers.py b/xos/openstack_observer/steps/sync_slivers.py
index 4c29e3d..d98c2d2 100644
--- a/xos/openstack_observer/steps/sync_slivers.py
+++ b/xos/openstack_observer/steps/sync_slivers.py
@@ -62,7 +62,7 @@
         ports = []
         exclude_networks = set()
         exclude_templates = set()
-        for ns in sliver.networkslivers.all():
+        for ns in sliver.ports.all():
             if not ns.port_id:
                 raise DeferredException("Port %s on sliver %s has no id; Try again later" % (str(ns), str(sliver)) )
             ports.append(ns.port_id)
