diff --git a/planetstack/core/admin.py b/planetstack/core/admin.py
index 8debfb2..114382f 100644
--- a/planetstack/core/admin.py
+++ b/planetstack/core/admin.py
@@ -402,9 +402,9 @@
 class SliverAdmin(PlanetStackBaseAdmin):
     form = SliverForm
     fieldsets = [
-        ('Sliver', {'fields': ['ip', 'instance_name', 'slice', 'numberCores', 'image', 'key', 'node', 'deploymentNetwork']})
+        ('Sliver', {'fields': ['ip', 'instance_name', 'slice', 'numberCores', 'image', 'node', 'deploymentNetwork']})
     ]
-    list_display = ['ip', 'instance_name', 'slice', 'numberCores', 'image', 'key', 'node', 'deploymentNetwork']
+    list_display = ['ip', 'instance_name', 'slice', 'numberCores', 'image', 'node', 'deploymentNetwork']
     inlines = [TagInline]
 
     def formfield_for_foreignkey(self, db_field, request, **kwargs):
diff --git a/planetstack/core/api_root.py b/planetstack/core/api_root.py
index 61e76da..87e8924 100644
--- a/planetstack/core/api_root.py
+++ b/planetstack/core/api_root.py
@@ -5,14 +5,12 @@
 @api_view(['GET'])
 def api_root(request, format=None):
     return Response({
-        'roles': reverse('role-list', request=request, format=format),
-        'users': reverse('user-list', request=request, format=format),
-        'keys': reverse('key-list', request=request, format=format),
-        #'nodes': reverse('node-list', request=request, format=format),
+        'deployments': reverse('deployment-list', request=request, format=format),
         'sites': reverse('site-list', request=request, format=format),
-        'deploymentNetworks': reverse('deploymentnetwork-list', request=request, format=format),
+        'users': reverse('user-list', request=request, format=format),
         'slices': reverse('slice-list', request=request, format=format),
-        'subnets': reverse('subnet-list', request=request, format=format),
+        'roles': reverse('role-list', request=request, format=format),
+        'nodes': reverse('node-list', request=request, format=format),
         'slivers': reverse('sliver-list', request=request, format=format),
         'images': reverse('image-list', request=request, format=format),
     })
diff --git a/planetstack/core/models/role.py b/planetstack/core/models/role.py
index f6c2f2c..fd29848 100644
--- a/planetstack/core/models/role.py
+++ b/planetstack/core/models/role.py
@@ -5,8 +5,8 @@
 
 class Role(PlCoreBase):
 
-    #ROLE_CHOICES = (('admin', 'Admin'), ('pi', 'Principle Investigator'), ('user','User'))
-    role = models.CharField(null=True, blank=True,max_length=256, unique=True)
+    ROLE_CHOICES = (('admin', 'Admin'), ('pi', 'Principle Investigator'), ('tech', 'Technician'), ('user','User'))
+    role = models.CharField(null=True, blank=True,max_length=256, unique=True, choices=ROLE_CHOICES)
     role_type = models.CharField(max_length=80, unique=True)
 
     def __unicode__(self):  return u'%s' % (self.role_type)
diff --git a/planetstack/core/serializers.py b/planetstack/core/serializers.py
index 00d7160..94f5c3c 100644
--- a/planetstack/core/serializers.py
+++ b/planetstack/core/serializers.py
@@ -9,7 +9,6 @@
     class Meta:
         model = Role
         fields = ('id', 
-                  'role_id',
                   'role',
                   'role_type')
 
@@ -19,11 +18,10 @@
     id = serializers.Field()
     site = serializers.HyperlinkedRelatedField(view_name='site-detail')
     slice_memberships = serializers.HyperlinkedRelatedField(view_name='slice-membership-detail')
-    site_privileges = serializers.HyperlinkedRelatedField(view_name='site-privilege-detail')
+    site_privileges = serializers.HyperlinkedRelatedField(view_name='siteprivilege-detail')
     class Meta:
         model = User
         fields = ('id',
-                  'user_id', 
                   'kuser_id', 
                   'firstname', 
                   'lastname',
@@ -66,7 +64,7 @@
     user = serializers.HyperlinkedRelatedField(view_name='user-detail')
     role = serializers.HyperlinkedRelatedField(view_name='role-detail')
     class Meta:
-        model = SitePrivilege
+        model = SliceMembership
         fields = ('id',
                   'user',
                   'slice',
@@ -115,7 +113,7 @@
 
     # HyperlinkedModelSerializer doesn't include the id by default
     id = serializers.Field()
-    sites = serializers.HyperlinkedRelatedField(view_name='deploymentnetwork-detail')
+    sites = serializers.HyperlinkedRelatedField(view_name='site-detail')
     class Meta:
         model = Deployment
         fields = ('id',
@@ -127,9 +125,8 @@
     # HyperlinkedModelSerializer doesn't include the id by default
     id = serializers.Field()
     image = serializers.HyperlinkedRelatedField(view_name='image-detail')
-    key = serializers.HyperlinkedRelatedField(view_name='key-detail')
     slice = serializers.HyperlinkedRelatedField(view_name='slice-detail')
-    deployment_network = serializers.HyperlinkedRelatedField(view_name='deployment_network-detail')
+    deployment = serializers.HyperlinkedRelatedField(view_name='deployment-detail')
     node = serializers.HyperlinkedRelatedField(view_name='node-detail')
     
     
@@ -143,9 +140,8 @@
                   'instance_name',
                   'ip',
                   'image',
-                  'key',
                   'slice',
-                  'deploymentNetwork',
+                  'deployment',
                   'node')
 
 class NodeSerializer(serializers.HyperlinkedModelSerializer):
diff --git a/planetstack/core/views/deployment_networks.py b/planetstack/core/views/deployment_networks.py
index ef569ac..285a53a 100644
--- a/planetstack/core/views/deployment_networks.py
+++ b/planetstack/core/views/deployment_networks.py
@@ -1,59 +1,12 @@
-from django.http import Http404
-from rest_framework.views import APIView
-from rest_framework.response import Response
-from rest_framework import status
-
-from core.api.deployment_networks import add_deployment_network, delete_deployment_network, get_deployment_networks
 from core.serializers import DeploymentSerializer
-from util.request import parse_request
+from rest_framework import generics
+from core.models import Deployment
 
+class DeploymentList(generics.ListCreateAPIView):
+    queryset = Deployment.objects.all()
+    serializer_class = DeploymentSerializer
 
-class DeploymentListCreate(APIView):
-    """ 
-    List all deployment networks or create a new role.
-    """
+class DeploymentDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = Deployment.objects.all()
+    serializer_class = DeploymentSerializer
 
-    def post(self, request, format = None):
-        data = parse_request(request.DATA)  
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)        
-        elif 'deploymentNetwork' in data:
-        
-            deployment = add_deployment_network(data['auth'], data['deploymentNetwork'].get('name'))
-            serializer = DeploymentSerializer(deployment)
-            return Response(serializer.data, status=status.HTTP_201_CREATED)
-        else:
-            deployment_networks = get_deployment_networks(data['auth'])
-            serializer = DeploymentSerializer(deployment_networks, many=True)
-            return Response(serializer.data)
-        
-            
-class DeploymentRetrieveUpdateDestroy(APIView):
-    """
-    Retrieve, update or delete a deployment network 
-    """
-
-    def post(self, request, pk, format=None):
-        """Retrieve a deployment network"""
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        deployment_networks = get_deployment_networks(data['auth'], pk)
-        if not deployment_networks:
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        serializer = DeploymentSerializer(deployment_networks[0])
-        return Response(serializer.data)                  
-
-    def put(self, request, pk, format=None):
-        """deployment network update not implemnted""" 
-        return Response(status=status.HTTP_404_NOT_FOUND) 
-
-    def delete(self, request, pk, format=None):
-        data = parse_request(request.DATA) 
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        delete_deployment_network(data['auth'], pk)
-        return Response(status=status.HTTP_204_NO_CONTENT) 
-            
-            
-        
diff --git a/planetstack/core/views/images.py b/planetstack/core/views/images.py
index 7e0ab59..5ea5d76 100644
--- a/planetstack/core/views/images.py
+++ b/planetstack/core/views/images.py
@@ -1,55 +1,12 @@
-from django.http import Http404
-from rest_framework.views import APIView
-from rest_framework.response import Response
-from rest_framework import status
-
-from core.api.images import add_image, delete_image, get_images
 from core.serializers import ImageSerializer
-from util.request import parse_request
+from rest_framework import generics
+from core.models import Image
 
+class ImageList(generics.ListCreateAPIView):
+    queryset = Image.objects.all()
+    serializer_class = ImageSerializer
 
-class ImageListCreate(APIView):
-    """ 
-    List all images or create a new image.
-    """
+class ImageDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = Image.objects.all()
+    serializer_class = ImageSerializer
 
-    def post(self, request, format = None):
-        data = parse_request(request.DATA)  
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)        
-        elif 'image' in data:
-            """Not Implemented"""
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        else:
-            images = get_images(data['auth'])
-            serializer = ImageSerializer(images, many=True)
-            return Response(serializer.data)
-        
-            
-class ImageRetrieveUpdateDestroy(APIView):
-    """
-    Retrieve, update or delete an image  
-    """
-
-    def post(self, request, pk, format=None):
-        """Retrieve an image """
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        images = get_images(data['auth'], pk)
-        if not images:
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        serializer = ImageSerializer(images[0])
-        return Response(serializer.data)                  
-
-    def put(self, request, pk, format=None):
-        """update image not implemnted""" 
-        return Response(status=status.HTTP_404_NOT_FOUND) 
-
-    def delete(self, request, pk, format=None):
-        """delete image not implemnted""" 
-        return Response(status=status.HTTP_404_NOT_FOUND) 
-
-            
-            
-        
diff --git a/planetstack/core/views/nodes.py b/planetstack/core/views/nodes.py
index 0f1977e..8706114 100644
--- a/planetstack/core/views/nodes.py
+++ b/planetstack/core/views/nodes.py
@@ -1,55 +1,13 @@
-from django.http import Http404
-from rest_framework.views import APIView
-from rest_framework.response import Response
-from rest_framework import status
-
-from core.api.nodes import add_node, delete_node, get_nodes, update_node
 from core.serializers import NodeSerializer
-from util.request import parse_request
+from rest_framework import generics
+from core.models import Node
+
+class NodeList(generics.ListCreateAPIView):
+    queryset = Node.objects.all()
+    serializer_class = NodeSerializer
+
+class NodeDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = Node.objects.all()
+    serializer_class = NodeSerializer
 
 
-class NodeListCreate(APIView):
-    """ 
-    List all nodes or create a new node.
-    """
-
-    def post(self, request, format = None):
-        data = parse_request(request.DATA)  
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)        
-        elif 'node' in data:
-            """Not Implemented"""
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        else:
-            nodes = get_nodes(data['auth'])
-            serializer = NodeSerializer(nodes, many=True)
-            return Response(serializer.data)
-        
-            
-class NodeRetrieveUpdateDestroy(APIView):
-    """
-    Retrieve, update or delete an node  
-    """
-
-    def post(self, request, pk, format=None):
-        """Retrieve an node """
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        nodes = get_nodes(data['auth'], pk)
-        if not nodes:
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        serializer = NodeSerializer(nodes[0])
-        return Response(serializer.data)                  
-
-    def put(self, request, pk, format=None):
-        """update node not implemnted""" 
-        return Response(status=status.HTTP_404_NOT_FOUND) 
-
-    def delete(self, request, pk, format=None):
-        """delete node not implemnted""" 
-        return Response(status=status.HTTP_404_NOT_FOUND) 
-
-            
-            
-        
diff --git a/planetstack/core/views/roles.py b/planetstack/core/views/roles.py
index 37bb149..13c9917 100644
--- a/planetstack/core/views/roles.py
+++ b/planetstack/core/views/roles.py
@@ -1,58 +1,13 @@
-from django.http import Http404
-from rest_framework.views import APIView
-from rest_framework.response import Response
-from rest_framework import status
-
-from core.api.roles import add_role, delete_role, get_roles
 from core.serializers import RoleSerializer
-from util.request import parse_request
+from rest_framework import generics
+from core.models import Role
+
+class RoleList(generics.ListCreateAPIView):
+    queryset = Role.objects.all()
+    serializer_class = RoleSerializer
+
+class RoleDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = Role.objects.all()
+    serializer_class = RoleSerializer
 
 
-class RoleListCreate(APIView):
-    """ 
-    List all roles or create a new role.
-    """
-
-    def post(self, request, format = None):
-        data = parse_request(request.DATA)  
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)        
-        elif 'role' in data:
-            role = add_role(data['auth'], data['role']['role_type'])
-            serializer = RoleSerializer(data=role)
-            return Response(serializer.data, status=status.HTTP_201_CREATED)
-        else:
-            roles = get_roles(data['auth'])
-            serializer = RoleSerializer(roles, many=True)
-            return Response(serializer.data)
-        
-            
-class RoleRetrieveUpdateDestroy(APIView):
-    """
-    Retrieve, update or delete a role 
-    """
-
-    def post(self, request, pk, format=None):
-        """Retrieve a role"""
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        roles = get_roles(data['auth'], pk)
-        if not roles:
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        serializer = RoleSerializer(roles[0])
-        return Response(serializer.data)                  
-
-    def put(self, request, pk, format=None):
-        """role update not implemnted""" 
-        return Response(status=status.HTTP_404_NOT_FOUND) 
-
-    def delete(self, request, pk, format=None):
-        data = parse_request(request.DATA) 
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        delete_role(data['auth'], pk)
-        return Response(status=status.HTTP_204_NO_CONTENT) 
-            
-            
-        
diff --git a/planetstack/core/views/site_privileges.py b/planetstack/core/views/site_privileges.py
index 37fc371..90053e5 100644
--- a/planetstack/core/views/site_privileges.py
+++ b/planetstack/core/views/site_privileges.py
@@ -1,66 +1,13 @@
-from django.http import Http404
-from rest_framework.views import APIView
-from rest_framework.response import Response
-from rest_framework import status
-
-from core.api.site_privileges import add_site_privilege, delete_site_privilege, get_site_privileges, update_site_privilege
 from core.serializers import SitePrivilegeSerializer
-from util.request import parse_request
+from rest_framework import generics
+from core.models import SitePrivilege
+
+class SitePrivilegeList(generics.ListCreateAPIView):
+    queryset = SitePrivilege.objects.all()
+    serializer_class = SitePrivilegeSerializer
+
+class SitePrivilegeDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = SitePrivilege.objects.all()
+    serializer_class = SitePrivilegeSerializer
 
 
-class SitePrivilegeListCreate(APIView):
-    """ 
-    List all site_privileges or create a new site_privilege.
-    """
-
-    def post(self, request, format = None):
-        data = parse_request(request.DATA)  
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)        
-        elif 'site_privilege' in data:
-            site_privilege = add_site_privilege(data['auth'], data['site_privilege'])
-            serializer = SitePrivilegeSerializer(site_privilege)
-            return Response(serializer.data, status=status.HTTP_201_CREATED)
-        else:
-            site_privileges = get_site_privileges(data['auth'])
-            serializer = SitePrivilegeSerializer(site_privileges, many=True)
-            return Response(serializer.data)
-        
-            
-class SitePrivilegeRetrieveUpdateDestroy(APIView):
-    """
-    Retrieve, update or delete a site_privilege 
-    """
-
-    def post(self, request, pk, format=None):
-        """Retrieve a site_privilege"""
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        site_privileges = get_site_privileges(data['auth'], pk)
-        if not site_privileges:
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        serializer = SitePrivilegeSerializer(site_privileges[0])
-        return Response(serializer.data)                  
-
-    def put(self, request, pk, format=None):
-        """update a site_privilege""" 
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        elif 'site_privilege' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-
-        site_privilege = update_site_privilege(pk, data['site_privilege'])
-        serializer = SitePrivilegeSerializer(site_privilege)
-        return Response(serializer.data) 
-
-    def delete(self, request, pk, format=None):
-        data = parse_request(request.DATA) 
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        delete_site_privilege(data['auth'], pk)
-        return Response(status=status.HTTP_204_NO_CONTENT) 
-            
-            
-        
diff --git a/planetstack/core/views/sites.py b/planetstack/core/views/sites.py
index 6449b67..b4af8ac 100644
--- a/planetstack/core/views/sites.py
+++ b/planetstack/core/views/sites.py
@@ -1,66 +1,70 @@
-from django.http import Http404
-from rest_framework.views import APIView
-from rest_framework.response import Response
-from rest_framework import status
-
-from core.api.sites import add_site, delete_site, get_sites
 from core.serializers import SiteSerializer
-from util.request import parse_request
+from rest_framework import generics
+from core.models import Site
+
+class SiteList(generics.ListCreateAPIView):
+    queryset = Site.objects.all()
+    serializer_class = SiteSerializer
+
+class SiteDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = Site.objects.all()
+    serializer_class = SiteSerializer
 
 
-class SiteListCreate(APIView):
-    """ 
-    List all sites or create a new site.
-    """
 
-    def post(self, request, format = None):
-        data = parse_request(request.DATA)  
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)        
-        elif 'site' in data:
-            site = add_site(data['auth'], data['site'])
-            serializer = SiteSerializer(site)
-            return Response(serializer.data, status=status.HTTP_201_CREATED)
-        else:
-            sites = get_sites(data['auth'])
-            serializer = SiteSerializer(sites, many=True)
-            return Response(serializer.data)
+#class SiteListCreate(APIView):
+######    """ 
+##    List all sites or create a new site.
+#    """
+#
+#    def post(self, request, format = None):
+#        data = parse_request(request.DATA)  
+#        if 'auth' not in data:
+#            return Response(status=status.HTTP_400_BAD_REQUEST)        
+#        elif 'site' in data:
+#            site = add_site(data['auth'], data['site'])
+#            serializer = SiteSerializer(site)
+#            return Response(serializer.data, status=status.HTTP_201_CREATED)
+#        else:
+#            sites = get_sites(data['auth'])
+#            serializer = SiteSerializer(sites, many=True)
+#            return Response(serializer.data)
         
             
-class SiteRetrieveUpdateDestroy(APIView):
-    """
-    Retrieve, update or delete a site 
-    """
-
-    def post(self, request, pk, format=None):
-        """Retrieve a site"""
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        sites = get_sites(data['auth'], {'id': pk})
-        if not sites:
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        serializer = SiteSerializer(sites[0])
-        return Response(serializer.data)                  
-
-    def put(self, request, pk, format=None):
-        """update a site""" 
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        elif 'site' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-
-        site = update_site(pk, data['site'])
-        serializer = SiteSerializer(site)
-        return Response(serializer.data) 
-
-    def delete(self, request, pk, format=None):
-        data = parse_request(request.DATA) 
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        delete_site(data['auth'], {'id': pk})
-        return Response(status=status.HTTP_204_NO_CONTENT) 
-            
-            
-        
+#class SiteRetrieveUpdateDestroy(APIView):
+#    """
+#    Retrieve, update or delete a site 
+#    """
+#
+#    def post(self, request, pk, format=None):
+#        """Retrieve a site"""
+#        data = parse_request(request.DATA)
+#        if 'auth' not in data:
+#            return Response(status=status.HTTP_400_BAD_REQUEST)
+#        sites = get_sites(data['auth'], {'id': pk})
+#        if not sites:
+#            return Response(status=status.HTTP_404_NOT_FOUND)
+#        serializer = SiteSerializer(sites[0])
+#        return Response(serializer.data)                  
+#
+#    def put(self, request, pk, format=None):
+#        """update a site""" 
+#        data = parse_request(request.DATA)
+#        if 'auth' not in data:
+#            return Response(status=status.HTTP_400_BAD_REQUEST)
+#        elif 'site' not in data:
+#            return Response(status=status.HTTP_400_BAD_REQUEST)
+#
+#        site = update_site(pk, data['site'])
+#        serializer = SiteSerializer(site)
+#        return Response(serializer.data) 
+#
+#    def delete(self, request, pk, format=None):
+#        data = parse_request(request.DATA) 
+#        if 'auth' not in data:
+#            return Response(status=status.HTTP_400_BAD_REQUEST)
+#        delete_site(data['auth'], {'id': pk})
+#        return Response(status=status.HTTP_204_NO_CONTENT) 
+#            
+#            
+##        
diff --git a/planetstack/core/views/slice_memberships.py b/planetstack/core/views/slice_memberships.py
index 4bb581c..13f0707 100644
--- a/planetstack/core/views/slice_memberships.py
+++ b/planetstack/core/views/slice_memberships.py
@@ -1,66 +1,13 @@
-from django.http import Http404
-from rest_framework.views import APIView
-from rest_framework.response import Response
-from rest_framework import status
-
-from core.api.slice_memberships import add_slice_membership, delete_slice_membership, get_slice_memberships, update_slice_membership
 from core.serializers import SliceMembershipSerializer
-from util.request import parse_request
+from rest_framework import generics
+from core.models import SliceMembership
+
+class SliceMembershipList(generics.ListCreateAPIView):
+    queryset = SliceMembership.objects.all()
+    serializer_class = SliceMembershipSerializer
+
+class SliceMembershipDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = SliceMembership.objects.all()
+    serializer_class = SliceMembershipSerializer
 
 
-class SliceMembershipListCreate(APIView):
-    """ 
-    List all slice_memberships or create a new slice_membership.
-    """
-
-    def post(self, request, format = None):
-        data = parse_request(request.DATA)  
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)        
-        elif 'slice_membership' in data:
-            slice_membership = add_slice_membership(data['auth'], data['slice_membership'])
-            serializer = SliceMembershipSerializer(slice_membership)
-            return Response(serializer.data, status=status.HTTP_201_CREATED)
-        else:
-            slice_memberships = get_slice_memberships(data['auth'])
-            serializer = SliceMembershipSerializer(slice_memberships, many=True)
-            return Response(serializer.data)
-        
-            
-class SliceMembershipRetrieveUpdateDestroy(APIView):
-    """
-    Retrieve, update or delete a slice_membership 
-    """
-
-    def post(self, request, pk, format=None):
-        """Retrieve a slice_membership"""
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        slice_memberships = get_slice_memberships(data['auth'], pk)
-        if not slice_memberships:
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        serializer = SliceMembershipSerializer(slice_memberships[0])
-        return Response(serializer.data)                  
-
-    def put(self, request, pk, format=None):
-        """update a slice_membership""" 
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        elif 'slice_membership' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-
-        slice_membership = update_slice_membership(pk, data['slice_membership'])
-        serializer = SliceMembershipSerializer(slice_membership)
-        return Response(serializer.data) 
-
-    def delete(self, request, pk, format=None):
-        data = parse_request(request.DATA) 
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        delete_slice_membership(data['auth'], pk)
-        return Response(status=status.HTTP_204_NO_CONTENT) 
-            
-            
-        
diff --git a/planetstack/core/views/slices.py b/planetstack/core/views/slices.py
index 5954d0c..e3ab139 100644
--- a/planetstack/core/views/slices.py
+++ b/planetstack/core/views/slices.py
@@ -1,66 +1,13 @@
-from django.http import Http404
-from rest_framework.views import APIView
-from rest_framework.response import Response
-from rest_framework import status
-
-from core.api.slices import add_slice, delete_slice, get_slices, update_slice
 from core.serializers import SliceSerializer
-from util.request import parse_request
+from rest_framework import generics
+from core.models import Slice
+
+class SliceList(generics.ListCreateAPIView):
+    queryset = Slice.objects.all()
+    serializer_class = SliceSerializer
+
+class SliceDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = Slice.objects.all()
+    serializer_class = SliceSerializer
 
 
-class SliceListCreate(APIView):
-    """ 
-    List all slices or create a new slice.
-    """
-
-    def post(self, request, format = None):
-        data = parse_request(request.DATA)  
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)        
-        elif 'slice' in data:
-            slice = add_slice(data['auth'], data['slice'])
-            serializer = SliceSerializer(slice)
-            return Response(serializer.data, status=status.HTTP_201_CREATED)
-        else:
-            slices = get_slices(data['auth'])
-            serializer = SliceSerializer(slices, many=True)
-            return Response(serializer.data)
-        
-            
-class SliceRetrieveUpdateDestroy(APIView):
-    """
-    Retrieve, update or delete a slice 
-    """
-
-    def post(self, request, pk, format=None):
-        """Retrieve a slice"""
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        slices = get_slices(data['auth'],  pk)
-        if not slices:
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        serializer = SliceSerializer(slices[0])
-        return Response(serializer.data)                  
-
-    def put(self, request, pk, format=None):
-        """update a slice""" 
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        elif 'slice' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-
-        slice = update_slice(pk, data['slice'])
-        serializer = SliceSerializer(slice)
-        return Response(serializer.data) 
-
-    def delete(self, request, pk, format=None):
-        data = parse_request(request.DATA) 
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        delete_slice(data['auth'],  pk)
-        return Response(status=status.HTTP_204_NO_CONTENT) 
-            
-            
-        
diff --git a/planetstack/core/views/slivers.py b/planetstack/core/views/slivers.py
index 3741cce..bb310da 100644
--- a/planetstack/core/views/slivers.py
+++ b/planetstack/core/views/slivers.py
@@ -1,66 +1,13 @@
-from django.http import Http404
-from rest_framework.views import APIView
-from rest_framework.response import Response
-from rest_framework import status
-
-from core.api.slivers import add_sliver, delete_sliver, get_slivers, update_sliver
 from core.serializers import SliverSerializer
-from util.request import parse_request
+from rest_framework import generics
+from core.models import Sliver
+
+class SliverList(generics.ListCreateAPIView):
+    queryset = Sliver.objects.all()
+    serializer_class = SliverSerializer
+
+class SliverDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = Sliver.objects.all()
+    serializer_class = SliverSerializer
 
 
-class SliverListCreate(APIView):
-    """ 
-    List all slivers or create a new sliver.
-    """
-
-    def post(self, request, format = None):
-        data = parse_request(request.DATA)  
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)        
-        elif 'sliver' in data:
-            sliver = add_sliver(data['auth'], data['sliver'])
-            serializer = SliverSerializer(sliver)
-            return Response(serializer.data, status=status.HTTP_201_CREATED)
-        else:
-            slivers = get_slivers(data['auth'])
-            serializer = SliverSerializer(slivers, many=True)
-            return Response(serializer.data)
-        
-            
-class SliverRetrieveUpdateDestroy(APIView):
-    """
-    Retrieve, update or delete a sliver 
-    """
-
-    def post(self, request, pk, format=None):
-        """Retrieve a sliver"""
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        slivers = get_slivers(data['auth'], pk)
-        if not slivers:
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        serializer = SliverSerializer(slivers[0])
-        return Response(serializer.data)                  
-
-    def put(self, request, pk, format=None):
-        """update a sliver""" 
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        elif 'sliver' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-
-        sliver = update_sliver(pk, data['sliver'])
-        serializer = SliverSerializer(sliver)
-        return Response(serializer.data) 
-
-    def delete(self, request, pk, format=None):
-        data = parse_request(request.DATA) 
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        delete_sliver(data['auth'], pk)
-        return Response(status=status.HTTP_204_NO_CONTENT) 
-            
-            
-        
diff --git a/planetstack/core/views/users.py b/planetstack/core/views/users.py
index 8b27928..06ac0f3 100644
--- a/planetstack/core/views/users.py
+++ b/planetstack/core/views/users.py
@@ -1,66 +1,11 @@
-from django.http import Http404
-from rest_framework.views import APIView
-from rest_framework.response import Response
-from rest_framework import status
-
-from core.api.users import add_user, delete_user, get_users, update_user
 from core.serializers import UserSerializer
-from util.request import parse_request
+from rest_framework import generics
+from core.models import User
 
+class UserList(generics.ListCreateAPIView):
+    queryset = User.objects.all()
+    serializer_class = UserSerializer
 
-class UserListCreate(APIView):
-    """ 
-    List all users or create a new user.
-    """
-
-    def post(self, request, format = None):
-        data = parse_request(request.DATA)  
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)        
-        elif 'user' in data:
-            user = add_user(data['auth'], data['user'])
-            serializer = UserSerializer(user)
-            return Response(serializer.data, status=status.HTTP_201_CREATED)
-        else:
-            users = get_users(data['auth'])
-            serializer = UserSerializer(users, many=True)
-            return Response(serializer.data)
-        
-            
-class UserRetrieveUpdateDestroy(APIView):
-    """
-    Retrieve, update or delete a user 
-    """
-
-    def post(self, request, pk, format=None):
-        """Retrieve a user"""
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        users = get_users(data['auth'], {'id': pk})
-        if not users:
-            return Response(status=status.HTTP_404_NOT_FOUND)
-        serializer = UserSerializer(users[0])
-        return Response(serializer.data)                  
-
-    def put(self, request, pk, format=None):
-        """update a user""" 
-        data = parse_request(request.DATA)
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        elif 'user' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-
-        user = update_user(pk, data['user'])
-        serializer = UserSerializer(user)
-        return Response(serializer.data) 
-
-    def delete(self, request, pk, format=None):
-        data = parse_request(request.DATA) 
-        if 'auth' not in data:
-            return Response(status=status.HTTP_400_BAD_REQUEST)
-        delete_user(data['auth'], {'id': pk})
-        return Response(status=status.HTTP_204_NO_CONTENT) 
-            
-            
-        
+class UserDetail(generics.RetrieveUpdateDestroyAPIView):
+    queryset = User.objects.all()
+    serializer_class = UserSerializer
