diff --git a/xos/core/models/plcorebase.py b/xos/core/models/plcorebase.py
index 5e3e287..3eaf7e6 100644
--- a/xos/core/models/plcorebase.py
+++ b/xos/core/models/plcorebase.py
@@ -119,11 +119,12 @@
         return validators
 
     def get_backend_icon(self):
+        is_perfect = (self.backend_status is not None) and self.backend_status.startswith("1 -")
         is_good = (self.backend_status is not None) and (self.backend_status.startswith("0 -") or self.backend_status.startswith("1 -"))
         is_provisioning = self.backend_status is None or self.backend_status == "Provisioning in progress" or self.backend_status==""
 
         # returns (icon_name, tooltip)
-        if (self.enacted is not None) and self.enacted >= self.updated and is_good:
+        if (self.enacted is not None) and (self.enacted >= self.updated and is_good) or is_perfect:
             return ("success", "successfully enacted")
         else:
             if is_good or is_provisioning:
diff --git a/xos/dependency_walker.py b/xos/dependency_walker.py
index ba9de11..d99b783 100644
--- a/xos/dependency_walker.py
+++ b/xos/dependency_walker.py
@@ -46,7 +46,7 @@
 		deps = dependencies[model]
 	except:
 		deps = []
-	__walk_deps(fn, object, deps)
+	return __walk_deps(fn, object, deps)
 
 def walk_inv_deps(fn, object):
 	model = object.__class__.__name__
@@ -54,10 +54,11 @@
 		deps = inv_dependencies[model]
 	except:
 		deps = []
-	__walk_deps(fn, object, deps)
+	return __walk_deps(fn, object, deps)
 
 def __walk_deps(fn, object, deps):
 	model = object.__class__.__name__
+	ret = []
 	for dep in deps:
 		#print "Checking dep %s"%dep
 		peer=None
@@ -87,8 +88,10 @@
 				#if (isinstance(o,PlCoreBase)):
 				if (hasattr(o,'updated')):
 					fn(o, object)
+					ret.append(o)
 				# Uncomment the following line to enable recursion
 				# walk_inv_deps(fn, o)
+	return ret
 
 def p(x,source):
 	print x,x.__class__.__name__
@@ -96,11 +99,9 @@
 
 def main():
 	#pdb.set_trace()
-	import django
-	django.setup()
-	s = Site.objects.filter(login_base='onlab')
+	s = Slice.objects.filter(name='princeton_sapan62')
 	#pdb.set_trace()
-	walk_inv_deps(p,s[0])
+	print walk_inv_deps(p,s[0])
 	
 if __name__=='__main__':
 	main()
diff --git a/xos/model_policy.py b/xos/model_policy.py
index 9333adc..19c281a 100644
--- a/xos/model_policy.py
+++ b/xos/model_policy.py
@@ -90,6 +90,9 @@
         logging.error('Object %r is defective'%instance)
         bad_instances.append(instance)
 
+def noop(o,p):
+        pass
+
 def run_policy():
     from core.models import Sliver,Slice,Controller,Network,User,SlicePrivilege,Site,SitePrivilege,Image,ControllerSlice,ControllerUser,ControllerSite
     while (True):
@@ -110,6 +113,16 @@
         for o in deleted_objects:
             execute_model_policy(o, True)
 
+        # Reap non-sync'd models here
+        reaped = [Slice]
+
+        for m in reaped:
+            dobjs = m.deleted_objects.all()
+            for d in dobjs:
+                deps = walk_inv_deps(noop, d)
+                if (not deps):
+                    print 'Purging object %r'%d
+                    d.delete(purge=True)
 
         if (time.time()-start<1):
             time.sleep(1)
