diff --git a/xos/admin.py b/xos/admin.py
index e0beabc..a479d9c 100644
--- a/xos/admin.py
+++ b/xos/admin.py
@@ -46,21 +46,21 @@
                            ) #('hpctools.html', 'top', 'tools') )
 
     def get_queryset(self, request):
-        return VTRService.get_service_objects_by_user(request.user)
+        return VTRService.select_by_user(request.user)
 
 class VTRTenantForm(forms.ModelForm):
     target = forms.ModelChoiceField(queryset=CordSubscriberRoot.objects.all())
 
     def __init__(self,*args,**kwargs):
         super (VTRTenantForm,self ).__init__(*args,**kwargs)
-        self.fields['provider_service'].queryset = VTRService.get_service_objects().all()
+        self.fields['provider_service'].queryset = VTRService.objects.all()
         if self.instance:
             if self.instance.target_id:
                 self.fields["target"].initial = CordSubscriberRoot.get_content_object(self.instance.target_type, self.instance.target_id)
         if (not self.instance) or (not self.instance.pk):
             self.fields['kind'].initial = VTR_KIND
-            if VTRService.get_service_objects().exists():
-               self.fields["provider_service"].initial = VTRService.get_service_objects().all()[0]
+            if VTRService.objects.exists():
+               self.fields["provider_service"].initial = VTRService.objects.all()[0]
 
     def save(self, commit=True):
         if self.cleaned_data.get("target"):
@@ -87,7 +87,7 @@
         return (obj.enacted is not None) and (obj.enacted >= obj.updated)
 
     def get_queryset(self, request):
-        return VTRTenant.get_tenant_objects_by_user(request.user)
+        return VTRTenant.select_by_user(request.user)
 
 admin.site.register(VTRService, VTRServiceAdmin)
 admin.site.register(VTRTenant, VTRTenantAdmin)
diff --git a/xos/api/tenant/truckroll.py b/xos/api/tenant/truckroll.py
index 68db1ca..caf9e24 100644
--- a/xos/api/tenant/truckroll.py
+++ b/xos/api/tenant/truckroll.py
@@ -13,7 +13,7 @@
 from django.contrib.contenttypes.models import ContentType
 
 def get_default_vtr_service():
-    vtr_services = VTRService.get_service_objects().all()
+    vtr_services = VTRService.objects.all()
     if vtr_services:
         return vtr_services[0]
     return None
@@ -29,7 +29,7 @@
         test = serializers.CharField()
         scope = serializers.CharField()
         argument = serializers.CharField(required=False)
-        provider_service = serializers.PrimaryKeyRelatedField(queryset=VTRService.get_service_objects().all(), default=get_default_vtr_service)
+        provider_service = serializers.PrimaryKeyRelatedField(queryset=VTRService.objects.all(), default=get_default_vtr_service)
         result = serializers.CharField(required=False)
         result_code = serializers.CharField(required=False)
         backend_status = ReadOnlyField()
@@ -56,7 +56,7 @@
     base_name = "truckroll"
     method_name = "truckroll"
     method_kind = "viewset"
-    queryset = VTRTenantForAPI.get_tenant_objects().all() # select_related().all()
+    queryset = VTRTenantForAPI.objects.all() # select_related().all()
     serializer_class = VTRTenantSerializer
 
     @classmethod
diff --git a/xos/attic/vtrtenant_model.py b/xos/attic/vtrtenant_model.py
index 6d3dba2..f2d24c3 100644
--- a/xos/attic/vtrtenant_model.py
+++ b/xos/attic/vtrtenant_model.py
@@ -1,7 +1,7 @@
 sync_attributes = ( 'test', 'argument', "scope" )
 
 def __init__(self, *args, **kwargs):
-    vtr_services = VTRService.get_service_objects().all()
+    vtr_services = VTRService.objects.all()
     if vtr_services:
         self._meta.get_field("provider_service").default = vtr_services[0].id
     super(VTRTenant, self).__init__(*args, **kwargs)
