diff --git a/plstackapi/core/admin.py b/plstackapi/core/admin.py
index 4bb9a98..58f5f58 100644
--- a/plstackapi/core/admin.py
+++ b/plstackapi/core/admin.py
@@ -63,37 +63,26 @@
     save_on_top = False
 
 class OSModelAdmin(PlanetStackBaseAdmin):
-    """Attach client connection to openstack on delete() and save()""" 
+    """Attach client connection to openstack on delete() and save()"""
 
     def save_model(self, request, obj, form, change):
-        client = OpenStackClient(tenant=request.user.site.login_base, **request.session.get('auth', {}))
-        obj.driver = OpenStackDriver(client=client)
-        obj.caller = request.user
+        auth = request.session.get('auth', {})
+        auth['tenant'] = request.user.site.login_base
+        obj.os_manager = OpenStackManager(auth=auth, caller=request.user)
         obj.save()
 
     def delete_model(self, request, obj):
-        client = OpenStackClient(tenant=request.user.site.login_base, **request.session.get('auth', {}))
-        obj.driver = OpenStackDriver(client=client)
-        obj.caller = request.user
-        obj.delete()
+        auth = request.session.get('auth', {})
+        auth['tenant'] = request.user.site.login_base
+        obj.os_manager = OpenStackManager(auth=auth, caller=request.user)
+        obj.delete() 
 
-class RoleAdmin(PlanetStackBaseAdmin):
+class RoleAdmin(OSModelAdmin):
     fieldsets = [
         ('Role', {'fields': ['role_type']})
     ]
     list_display = ('role_type',)
 
-    def save_model(self, request, obj, form, change):
-        auth = request.session.get('auth', {})
-        auth['tenant'] = request.user.site.login_base
-        obj.os_manager = OpenStackManager(auth=auth, caller=request.user)
-        obj.save()
-
-    def delete_model(self, request, obj):
-        auth = request.session.get('auth', {})
-        auth['tenant'] = request.user.site.login_base
-        obj.os_manager = OpenStackManager(auth=auth, caller=request.user)
-        obj.delete()
 
 class DeploymentNetworkAdminForm(forms.ModelForm):
     sites = forms.ModelMultipleChoiceField(
diff --git a/plstackapi/core/models/key.py b/plstackapi/core/models/key.py
index 3e4f56f..afbebff 100644
--- a/plstackapi/core/models/key.py
+++ b/plstackapi/core/models/key.py
@@ -16,15 +16,10 @@
     def __unicode__(self):  return u'%s' % (self.name)
 
     def save(self, *args, **kwds):
-        if not self.key_id:
-            key_fields = {'name': self.name,
-                          'key': self.key}
-            nova_key = self.driver.create_keypair(**key_fields)
-            self.key_id = nova_key.id
+        self.os_manager.save_key(self)
         super(Key, self).save(*args, **kwds)
 
     def delete(self, *args, **kwds):
-        if self.key_id:
-            self.driver.delete_keypair(self.key_id)
+        self.os_manager.delete_key(self)
         super(Key, self).delete(*args, **kwds) 
     
diff --git a/plstackapi/core/models/pluser.py b/plstackapi/core/models/pluser.py
index f914662..474f044 100644
--- a/plstackapi/core/models/pluser.py
+++ b/plstackapi/core/models/pluser.py
@@ -3,7 +3,7 @@
 from django.db import models
 from plstackapi.core.models import PlCoreBase
 from plstackapi.core.models import Site
-from plstackapi.openstack.driver import OpenStackDriver
+from plstackapi.openstack.manager import OpenStackManager
 from django.contrib.auth.models import User, AbstractBaseUser, UserManager, BaseUserManager
 
 # Create your models here.
@@ -101,22 +101,16 @@
 
 
     def save(self, *args, **kwds):
-        if not self.user_id:
-            if not self.driver:
-                setattr(self, 'driver', OpenStackDriver())
-            name = self.email[:self.email.find('@')]
-            user_fields = {'name': name,
-                           'email': self.email,
-                           'password': self.password,
-                           'enabled': True}
-            keystone_user = self.driver.create_user(**user_fields)
-            self.user_id = keystone_user.id
+        if not hasattr(self, 'os_manager'):
+            setattr(self, 'os_manager', OpenStackManager())
+
+        self.os_manager.save_user(self)
         self.set_password(self.password)    
         super(PLUser, self).save(*args, **kwds)   
 
     def delete(self, *args, **kwds):
-        if self.user_id:
-            if not getattr(self, 'driver'):
-                setattr(self, 'driver', OpenStackDriver())
-            self.driver.delete_user(self.user_id)
+        if not hasattr(self, 'os_manager'):
+            setattr(self, 'os_manager', OpenStackManager())
+
+        self.os_manager.delete_user(self)
         super(PLUser, self).delete(*args, **kwds)    
