Changed views to use generic views from rest_framework