diff --git a/planetstack/core/admin.py b/planetstack/core/admin.py
index 0c90b9a..aafa6e5 100644
--- a/planetstack/core/admin.py
+++ b/planetstack/core/admin.py
@@ -88,6 +88,7 @@
 class SliceMembershipInline(admin.TabularInline):
     model = SliceMembership
     extra = 0
+    fields = ('user', 'role')
 
     def formfield_for_foreignkey(self, db_field, request, **kwargs):
         if db_field.name == 'slice':
@@ -204,6 +205,17 @@
             # hide MyInline in the add view
             if obj is None:
                 continue
+            if isinstance(inline, SliceInline):
+                inline.model.caller = request.user
+            yield inline.get_formset(request, obj)
+
+    def get_formsets(self, request, obj=None):
+        for inline in self.get_inline_instances(request, obj):
+            # hide MyInline in the add view
+            if obj is None:
+                continue
+            if isinstance(inline, SliverInline):
+                inline.model.caller = request.user
             yield inline.get_formset(request, obj)
 
 class SitePrivilegeAdmin(PlanetStackBaseAdmin):
@@ -247,7 +259,7 @@
             qs = qs.filter(site__in=sites)
         return qs
 
-class SliceAdmin(OSModelAdmin):
+class SliceAdmin(PlanetStackBaseAdmin):
     fields = ['name', 'site', 'serviceClass', 'description', 'slice_url']
     list_display = ('name', 'site','serviceClass', 'slice_url')
     inlines = [SliverInline, SliceMembershipInline, SliceTagInline]
@@ -280,11 +292,8 @@
             # hide MyInline in the add view
             if obj is None:
                 continue
-            # give inline object access to driver and caller
-            auth = request.session.get('auth', {})
-            auth['tenant'] = obj.name       # meed to connect using slice's tenant
-            inline.model.os_manager = OpenStackManager(auth=auth, caller=request.user)
-            inline.model.creator = request.user
+            if isinstance(inline, SliverInline):
+                inline.model.caller = request.user
             yield inline.get_formset(request, obj)
 
     def get_queryset(self, request):
@@ -292,7 +301,12 @@
         if request.user.is_superuser:
             return qs
         # users can only see slices at their site
-        return qs.filter(site=request.user.site) 
+        return qs.filter(site=request.user.site)
+
+    def save_model(self, request, obj, form, change):
+        # update openstack connection to use this site/tenant
+        obj.caller = request.user
+        obj.save() 
 
 class SliceMembershipAdmin(PlanetStackBaseAdmin):
     fieldsets = [
@@ -476,7 +490,7 @@
         return self.initial["password"]
 
 
-class UserAdmin(UserAdmin, OSModelAdmin):
+class UserAdmin(UserAdmin):
     class Meta:
         app_label = "core"
 
diff --git a/planetstack/core/api/slivers.py b/planetstack/core/api/slivers.py
index 16a7e0b..2ce24c7 100644
--- a/planetstack/core/api/slivers.py
+++ b/planetstack/core/api/slivers.py
@@ -3,7 +3,6 @@
 from openstack.manager import OpenStackManager
 from core.models import Sliver, Slice
 from core.api.images import _get_images
-from core.api.keys import _get_keys
 from core.api.slices import _get_slices
 from core.api.deployment_networks import _get_deployment_networks
 from core.api.nodes import _get_nodes
@@ -26,12 +25,10 @@
                         password=auth.get('password'))
     
     images = _get_images(fields.get('image'))
-    keys = _get_keys(fields.get('key'))
     slices = _get_slices(fields.get('slice'))
     deployment_networks = _get_deployment_networks(fields.get('deploymentNetwork'))
     nodes = _get_nodes(fields.get('node'))
     if images: fields['image'] = images[0]     
-    if keys: fields['key'] = keys[0]     
     if slices: fields['slice'] = slices[0]     
     if deployment_networks: fields['deploymentNetwork'] = deployment_networks[0]     
     if nodes: fields['node'] = nodes[0]     
diff --git a/planetstack/core/models/slice.py b/planetstack/core/models/slice.py
index d6908a7..da9379d 100644
--- a/planetstack/core/models/slice.py
+++ b/planetstack/core/models/slice.py
@@ -22,6 +22,7 @@
     subnet_id = models.CharField(null=True, blank=True, max_length=256, help_text="Quantum subnet id")
 
     serviceClass = models.ForeignKey(ServiceClass, related_name = "slices", null=True, default=ServiceClass.get_default)
+    creator = models.ForeignKey(User, related_name='slices', blank=True, null=True)
 
     def __unicode__(self):  return u'%s' % (self.name)
 
@@ -31,6 +32,8 @@
             # will fail unless it is allowed. But, we we really don't want it to
             # ever save None, so fix it up here.
             self.serviceClass = ServiceClass.get_default()
+        if not self.creator and hasattr(self, 'caller'):
+            self.creator = self.caller
         super(Slice, self).save(*args, **kwds)
 
 class SliceMembership(PlCoreBase):
diff --git a/planetstack/core/models/sliver.py b/planetstack/core/models/sliver.py
index 72ad66d..13eb353 100644
--- a/planetstack/core/models/sliver.py
+++ b/planetstack/core/models/sliver.py
@@ -29,15 +29,6 @@
     def save(self, *args, **kwds):
         if not self.name:
             self.name = self.slice.name
-        if not hasattr(self, 'os_manager'):
-            from openstack.manager import OpenStackManager
-            setattr(self, 'os_manager', OpenStackManager())
-        self.os_manager.save_sliver(self)
+        if not self.creator and hasattr(self, 'caller'):
+            self.creator = self.caller
         super(Sliver, self).save(*args, **kwds)
-
-    def delete(self, *args, **kwds):
-        if not hasattr(self, 'os_manager'):
-            from openstack.manager import OpenStackManager
-            setattr(self, 'os_manager', OpenStackManager())
-        self.os_manager.delete_sliver(self)
-        super(Sliver, self).delete(*args, **kwds)
diff --git a/planetstack/openstack/manager.py b/planetstack/openstack/manager.py
index f912270..ed2769d 100644
--- a/planetstack/openstack/manager.py
+++ b/planetstack/openstack/manager.py
@@ -253,7 +253,8 @@
     def save_sliver(self, sliver):
         if not sliver.instance_id:
             slice_memberships = SliceMembership.objects.filter(slice=sliver.slice)
-            pubkeys = [sm.user.public_key for sm in slice_memberships if sm.user.public_key != null] 
+            pubkeys = [sm.user.public_key for sm in slice_memberships if sm.user.public_key != null]
+            pubkeys.append(sliver.creator.public_key) 
             instance = self.driver.spawn_instance(name=sliver.name,
                                    key_name = sliver.creator.keyname,
                                    image_id = sliver.image.image_id,
diff --git a/planetstack/openstack/observer.py b/planetstack/openstack/observer.py
index c0291ab..872cf58 100644
--- a/planetstack/openstack/observer.py
+++ b/planetstack/openstack/observer.py
@@ -20,7 +20,7 @@
                 self.sync_tenants()
                 self.sync_users()
                 #self.sync_user_tenant_roles()
-                #self.sync_slivers()
+                self.sync_slivers()
                 time.sleep(7)
             except:
                 traceback.print_exc() 
@@ -58,13 +58,16 @@
         pending_sites = Site.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
         for site in pending_sites:
             self.manager.save_site(site)
+            site.save()
             site.enacted = datetime.now()
             site.save(update_fields=['enacted'])
 
         # get all slices that need to be synced (enacted < updated or enacted is None)
         pending_slices = Slice.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
         for slice in pending_slices:
+            self.manager.init_caller(slice.creator, slice.creator.site.login_base)
             self.manager.save_slice(slice)
+            slice.save()
             slice.enacted = datetime.now()
             slice.save(update_fields=['enacted'])
 
@@ -102,6 +105,7 @@
         pending_users = User.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
         for user in pending_users:
             self.manager.save_user(user)
+            user.save()
             user.enacted = datetime.now()
             user.save(update_fields=['enacted'])
 
@@ -130,10 +134,11 @@
         # get all users that need to be synced (enacted < updated or enacted is None)
         pending_slivers = Sliver.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
         for sliver in pending_slivers:
-            if sliver.creator:  
+            if not sliver.instance_id and sliver.creator:  
                 # update manager context
-                self.manager.init_caller(sliver.creator)
+                self.manager.init_caller(sliver.creator, sliver.slice.name)
                 self.manager.save_sliver(sliver)
+                sliver.save()
                 sliver.enacted = datetime.now()
                 sliver.save(update_fields=['enacted'])
 
