diff --git a/xos/synchronizer/models/attic/header.py b/xos/synchronizer/models/attic/header.py
deleted file mode 100644
index e9ca7c0..0000000
--- a/xos/synchronizer/models/attic/header.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-from django.db import models
-from core.models import Service, XOSBase, Slice, Instance, TenantWithContainer, Node, Image, User, Flavor, NetworkParameter, NetworkParameterType, Port, AddressPool, User
-from core.models.xosbase import StrippedCharField
-import os
-from django.db import models, transaction
-from django.forms.models import model_to_dict
-from django.db.models import *
-from operator import itemgetter, attrgetter, methodcaller
-from core.models import Tag
-from services.addressmanager.models import AddressManagerService, AddressManagerServiceInstance
-import traceback
-from xos.exceptions import *
-from django.contrib.contenttypes.models import ContentType
diff --git a/xos/synchronizer/models/attic/vegtenant_bottom.py b/xos/synchronizer/models/attic/vegtenant_bottom.py
deleted file mode 100644
index e523f0a..0000000
--- a/xos/synchronizer/models/attic/vegtenant_bottom.py
+++ /dev/null
@@ -1,28 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-def model_policy_veg(pk):
-    # TODO: this should be made in to a real model_policy
-    with transaction.atomic():
-        veg = VEGTenant.objects.select_for_update().filter(pk=pk)
-        if not veg:
-            return
-        veg = veg[0]
-        veg.manage_container()
-        veg.manage_vrouter()
-        veg.cleanup_orphans()
-
-
diff --git a/xos/synchronizer/models/attic/vegtenant_model.py b/xos/synchronizer/models/attic/vegtenant_model.py
deleted file mode 100644
index 1c1d15a..0000000
--- a/xos/synchronizer/models/attic/vegtenant_model.py
+++ /dev/null
@@ -1,128 +0,0 @@
-
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-sync_attributes = ("wan_container_ip", "wan_container_mac", "wan_container_netbits",
-                   "wan_container_gateway_ip", "wan_container_gateway_mac",
-                   "wan_vm_ip", "wan_vm_mac")
-
-
-def __init__(self, *args, **kwargs):
-    super(VEGTenant, self).__init__(*args, **kwargs)
-    self.cached_address_service_instance = None
-@property
-def address_service_instance(self):
-    address_service_instance = self.get_newest_subscribed_tenant(AddressManagerServiceInstance)
-    if not address_service_instance:
-        return None
-
-    # always return the same object when possible
-    if (self.cached_address_service_instance) and (self.cached_address_service_instance.id == address_service_instance.id):
-        return self.cached_address_service_instance
-
-    address_service_instance.caller = self.creator
-    self.cached_address_service_instance = address_service_instance
-    return address_service_instance
-
-@address_service_instance.setter
-def address_service_instance(self, value):
-    raise XOSConfigurationError("VEGTenant.address_service_instance setter is not implemented")
-
-@property
-def volt(self):
-    from services.volt.models import VOLTTenant
-    if not self.subscriber_tenant:
-        return None
-    volts = VOLTTenant.objects.filter(id=self.subscriber_tenant.id)
-    if not volts:
-        return None
-    return volts[0]
-
-@volt.setter
-def volt(self, value):
-    raise XOSConfigurationError("VEGTenant.volt setter is not implemented")
-
-@property
-def ssh_command(self):
-    if self.instance:
-        return self.instance.get_ssh_command()
-    else:
-        return "no-instance"
-
-def get_address_service_instance_field(self, name, default=None):
-    if self.address_service_instance:
-        return getattr(self.address_service_instance, name, default)
-    else:
-        return default
-
-@property
-def wan_container_ip(self):
-    return self.get_address_service_instance_field("public_ip", None)
-
-@property
-def wan_container_mac(self):
-    return self.get_address_service_instance_field("public_mac", None)
-
-@property
-def wan_container_netbits(self):
-    return self.get_address_service_instance_field("netbits", None)
-
-@property
-def wan_container_gateway_ip(self):
-    return self.get_address_service_instance_field("gateway_ip", None)
-
-@property
-def wan_container_gateway_mac(self):
-    return self.get_address_service_instance_field("gateway_mac", None)
-
-@property
-def wan_vm_ip(self):
-    tags = Tag.objects.filter(content_type=self.instance.get_content_type_key(), object_id=self.instance.id, name="vm_vrouter_tenant")
-    if tags:
-        tenant = AddressManagerServiceInstance.objects.get(id=tags[0].value)
-        return tenant.public_ip
-    else:
-        raise Exception("no vm_vrouter_tenant tag for instance %s" % o.instance)
-
-@property
-def wan_vm_mac(self):
-    tags = Tag.objects.filter(content_type=self.instance.get_content_type_key(), object_id=self.instance.id, name="vm_vrouter_tenant")
-    if tags:
-        tenant = AddressManagerServiceInstance.objects.get(id=tags[0].value)
-        return tenant.public_mac
-    else:
-        raise Exception("no vm_vrouter_tenant tag for instance %s" % o.instance)
-
-@property
-def is_synced(self):
-    return (self.enacted is not None) and (self.enacted >= self.updated)
-
-@is_synced.setter
-def is_synced(self, value):
-    pass
-def save(self, *args, **kwargs):
-    if not self.creator:
-        if not getattr(self, "caller", None):
-            # caller must be set when creating a vEG since it creates a slice
-            raise XOSProgrammingError("VEGTenant's self.caller was not set")
-        self.creator = self.caller
-        if not self.creator:
-            raise XOSProgrammingError("VEGTenant's self.creator was not set")
-
-    super(VEGTenant, self).save(*args, **kwargs)
-
-
-def delete(self, *args, **kwargs):
-    super(VEGTenant, self).delete(*args, **kwargs)
diff --git a/xos/synchronizer/models/veg.xproto b/xos/synchronizer/models/veg.xproto
index f8d5a0e..d13ce29 100644
--- a/xos/synchronizer/models/veg.xproto
+++ b/xos/synchronizer/models/veg.xproto
@@ -16,5 +16,7 @@
 
 message VEGTenant (TenantWithContainer){
     option verbose_name = "vEG Tenant";
+    option owner_class_name="VEGService";
+
     optional string last_ansible_hash = 1 [db_index = False, max_length = 128, null = True, content_type = "stripped", blank = True];
 }
