diff --git a/xos/core/models/service.py b/xos/core/models/service.py
index 104b4cf..b341e83 100644
--- a/xos/core/models/service.py
+++ b/xos/core/models/service.py
@@ -673,26 +673,15 @@
         from core.models import Image
         # Implement the logic here to pick the image that should be used when
         # instantiating the VM that will hold the container.
+
         slice = self.provider_service.slices.all()
         if not slice:
             raise XOSProgrammingError("provider service has no slice")
         slice = slice[0]
 
-        if slice.default_isolation in ["container", "container_vm"]:
-            look_for_images = self.LOOK_FOR_CONTAINER_IMAGES
-        else:
-            look_for_images = self.LOOK_FOR_IMAGES
-
-        for image_name in look_for_images:
-
-            images = Image.objects.filter(name=image_name)
-
-            if images:
-                return images[0]
-            else:
-                images = Image.objects.filter(name = slice.default_image)
-                if images:
-                    return images[0]
+        # If slice has default_image set then use it
+        if slice.default_image:
+            return slice.default_image
 
         raise XOPSProgrammingError("Please set a default image for %s" % self.slice.name)
 
@@ -743,7 +732,6 @@
 
             if not instance:
                 slice = self.provider_service.slices.all()[0]
-                flavors = Flavor.objects.filter(name=slice.default_flavor) #MCORD
 
                 flavor = slice.default_flavor
                 if not flavor:
@@ -751,8 +739,6 @@
                     if not flavors:
                         raise XOSConfigurationError("No m1.small flavor")
                     flavor = flavors[0]
-#                default_flavor = slice.default_flavor #MCORD
-
 
                 if slice.default_isolation == "container_vm":
                     (node, parent) = ContainerVmScheduler(slice).pick()
