diff --git a/acceptance/openstack/storage_test.go b/acceptance/openstack/storage_test.go
index 5934764..d194936 100644
--- a/acceptance/openstack/storage_test.go
+++ b/acceptance/openstack/storage_test.go
@@ -59,7 +59,7 @@
 			t.Error(err)
 			return
 		}
-		am := accounts.GetMetadata(gr)
+		am := accounts.ExtractMetadata(gr)
 		for k := range metadata {
 			if am[k] != metadata[strings.Title(k)] {
 				t.Errorf("Expected custom metadata with key: %s", k)
@@ -117,7 +117,7 @@
 			t.Error(err)
 			return
 		}
-		cns, err := containers.GetNames(lr)
+		cns, err := containers.ExtractNames(lr)
 		if err != nil {
 			t.Error(err)
 			return
@@ -134,7 +134,7 @@
 			t.Error(err)
 			return
 		}
-		cis, err := containers.GetInfo(lr)
+		cis, err := containers.ExtractInfo(lr)
 		if err != nil {
 			t.Error(err)
 			return
@@ -172,7 +172,7 @@
 			t.Error(err)
 			return
 		}
-		cm := containers.GetMetadata(gr)
+		cm := containers.ExtractMetadata(gr)
 		for k := range metadata {
 			if cm[k] != metadata[strings.Title(k)] {
 				t.Errorf("Expected custom metadata with key: %s", k)
@@ -251,7 +251,11 @@
 			t.Error(err)
 			return
 		}
-		ons := objects.GetNames(lr)
+		ons, err := objects.ExtractNames(lr)
+		if err != nil {
+			t.Error(err)
+			return
+		}
 		if len(ons) != len(oNames) {
 			t.Errorf("Expected %d names and got %d", len(oNames), len(ons))
 			return
@@ -265,7 +269,7 @@
 			t.Error(err)
 			return
 		}
-		ois, err := objects.GetInfo(lr)
+		ois, err := objects.ExtractInfo(lr)
 		if err != nil {
 			t.Error(err)
 			return
@@ -294,8 +298,10 @@
 			t.Error(err)
 			return
 		}
-		o2Content := objects.GetContent(dr)
-
+		o2Content, err := objects.ExtractContent(dr)
+		if err != nil {
+			t.Error(err)
+		}
 		dr, err = objects.Download(client, objects.DownloadOpts{
 			Container: cName,
 			Name:      oNames[0],
@@ -304,8 +310,11 @@
 			t.Error(err)
 			return
 		}
-		o1Content := objects.GetContent(dr)
-
+		o1Content, err := objects.ExtractContent(dr)
+		if err != nil {
+			t.Error(err)
+			return
+		}
 		if string(o2Content) != string(o1Content) {
 			t.Errorf("Copy failed. Expected\n%s\nand got\n%s", string(o1Content), string(o2Content))
 			return
@@ -341,7 +350,7 @@
 			t.Error(err)
 			return
 		}
-		om := objects.GetMetadata(gr)
+		om := objects.ExtractMetadata(gr)
 		for k := range metadata {
 			if om[k] != metadata[strings.Title(k)] {
 				t.Errorf("Expected custom metadata with key: %s", k)
diff --git a/openstack/storage/v1/accounts/accounts.go b/openstack/storage/v1/accounts/accounts.go
index cb72072..ae8ba19 100644
--- a/openstack/storage/v1/accounts/accounts.go
+++ b/openstack/storage/v1/accounts/accounts.go
@@ -13,11 +13,11 @@
 	Headers map[string]string
 }
 
-// GetMetadata is a function that takes a GetResult (of type *perigee.Response)
+// ExtractMetadata is a function that takes a GetResult (of type *http.Response)
 // and returns the custom metatdata associated with the account.
-func GetMetadata(gr GetResult) map[string]string {
+func ExtractMetadata(gr GetResult) map[string]string {
 	metadata := make(map[string]string)
-	for k, v := range gr.HttpResponse.Header {
+	for k, v := range gr.Header {
 		if strings.HasPrefix(k, "X-Account-Meta-") {
 			key := strings.TrimPrefix(k, "X-Account-Meta-")
 			metadata[key] = v[0]
diff --git a/openstack/storage/v1/accounts/requests.go b/openstack/storage/v1/accounts/requests.go
index 08f1f3c..d5afbcd 100644
--- a/openstack/storage/v1/accounts/requests.go
+++ b/openstack/storage/v1/accounts/requests.go
@@ -3,9 +3,10 @@
 import (
 	"github.com/racker/perigee"
 	storage "github.com/rackspace/gophercloud/openstack/storage/v1"
+	"net/http"
 )
 
-type GetResult *perigee.Response
+type GetResult *http.Response
 
 // Update is a function that creates, updates, or deletes an account's metadata.
 func Update(c *storage.Client, opts UpdateOpts) error {
@@ -30,7 +31,7 @@
 }
 
 // Get is a function that retrieves an account's metadata. To extract just the custom
-// metadata, pass the GetResult response to the GetMetadata function.
+// metadata, pass the GetResult response to the ExtractMetadata function.
 func Get(c *storage.Client, opts GetOpts) (GetResult, error) {
 	h, err := c.GetHeaders()
 	if err != nil {
@@ -46,5 +47,5 @@
 		MoreHeaders: h,
 		OkCodes:     []int{204},
 	})
-	return resp, err
+	return &resp.HttpResponse, err
 }
diff --git a/openstack/storage/v1/containers/containers.go b/openstack/storage/v1/containers/containers.go
index 79c3d64..2a5efe1 100644
--- a/openstack/storage/v1/containers/containers.go
+++ b/openstack/storage/v1/containers/containers.go
@@ -2,6 +2,7 @@
 
 import (
 	"encoding/json"
+	"io/ioutil"
 	"strings"
 )
 
@@ -34,28 +35,39 @@
 	Metadata map[string]string
 }
 
-// GetInfo is a function that takes a ListResult (of type *perigee.Response)
+// ExtractInfo is a function that takes a ListResult (of type *http.Response)
 // and returns the containers' information.
-func GetInfo(lr ListResult) ([]Container, error) {
+func ExtractInfo(lr ListResult) ([]Container, error) {
 	var ci []Container
-	err := json.Unmarshal(lr.JsonResult, &ci)
+	defer lr.Body.Close()
+	body, err := ioutil.ReadAll(lr.Body)
+	if err != nil {
+		return ci, err
+	}
+	err = json.Unmarshal(body, &ci)
 	return ci, err
 }
 
-// GetNames is a function that takes a ListResult (of type *perigee.Response)
+// ExtractNames is a function that takes a ListResult (of type *http.Response)
 // and returns the containers' names.
-func GetNames(lr ListResult) ([]string, error) {
-	jr := string(lr.JsonResult)
-	cns := strings.Split(jr, "\n")
+func ExtractNames(lr ListResult) ([]string, error) {
+	var cns []string
+	defer lr.Body.Close()
+	body, err := ioutil.ReadAll(lr.Body)
+	if err != nil {
+		return cns, err
+	}
+	jr := string(body)
+	cns = strings.Split(jr, "\n")
 	cns = cns[:len(cns)-1]
 	return cns, nil
 }
 
-// GetMetadata is a function that takes a GetResult (of type *perigee.Response)
+// ExtractMetadata is a function that takes a GetResult (of type *http.Response)
 // and returns the custom metadata associated with the container.
-func GetMetadata(gr GetResult) map[string]string {
+func ExtractMetadata(gr GetResult) map[string]string {
 	metadata := make(map[string]string)
-	for k, v := range gr.HttpResponse.Header {
+	for k, v := range gr.Header {
 		if strings.HasPrefix(k, "X-Container-Meta-") {
 			key := strings.TrimPrefix(k, "X-Container-Meta-")
 			metadata[key] = v[0]
diff --git a/openstack/storage/v1/containers/requests.go b/openstack/storage/v1/containers/requests.go
index a1a87a1..df7cc30 100644
--- a/openstack/storage/v1/containers/requests.go
+++ b/openstack/storage/v1/containers/requests.go
@@ -4,14 +4,15 @@
 	"github.com/racker/perigee"
 	storage "github.com/rackspace/gophercloud/openstack/storage/v1"
 	"github.com/rackspace/gophercloud/openstack/utils"
+	"net/http"
 )
 
-type ListResult *perigee.Response
-type GetResult *perigee.Response
+type ListResult *http.Response
+type GetResult *http.Response
 
 // List is a function that retrieves all objects in a container. It also returns the details
 // for the account. To extract just the container information or names, pass the ListResult
-// response to the GetInfo or GetNames function, respectively.
+// response to the ExtractInfo or ExtractNames function, respectively.
 func List(c *storage.Client, opts ListOpts) (ListResult, error) {
 	contentType := ""
 
@@ -28,12 +29,11 @@
 
 	url := c.GetAccountURL() + query
 	resp, err := perigee.Request("GET", url, perigee.Options{
-		Results:     true,
 		MoreHeaders: h,
 		OkCodes:     []int{200, 204},
 		Accept:      contentType,
 	})
-	return resp, err
+	return &resp.HttpResponse, err
 }
 
 // Create is a function that creates a new container.
@@ -107,7 +107,7 @@
 }
 
 // Get is a function that retrieves the metadata of a container. To extract just the custom
-// metadata, pass the GetResult response to the GetMetadata function.
+// metadata, pass the GetResult response to the ExtractMetadata function.
 func Get(c *storage.Client, opts GetOpts) (GetResult, error) {
 	h, err := c.GetHeaders()
 	if err != nil {
@@ -123,5 +123,5 @@
 		MoreHeaders: h,
 		OkCodes:     []int{204},
 	})
-	return resp, err
+	return &resp.HttpResponse, err
 }
diff --git a/openstack/storage/v1/objects/objects.go b/openstack/storage/v1/objects/objects.go
index 33bad29..9575e0f 100644
--- a/openstack/storage/v1/objects/objects.go
+++ b/openstack/storage/v1/objects/objects.go
@@ -3,6 +3,7 @@
 import (
 	"bytes"
 	"encoding/json"
+	"io/ioutil"
 	"strings"
 )
 
@@ -59,34 +60,48 @@
 	Headers   map[string]string
 }
 
-// GetInfo is a function that takes a ListResult (of type *perigee.Response)
+// ExtractInfo is a function that takes a ListResult (of type *http.Response)
 // and returns the objects' information.
-func GetInfo(lr ListResult) ([]Object, error) {
+func ExtractInfo(lr ListResult) ([]Object, error) {
 	var oi []Object
-	err := json.Unmarshal(lr.JsonResult, &oi)
+	defer lr.Body.Close()
+	body, err := ioutil.ReadAll(lr.Body)
+	if err != nil {
+		return oi, err
+	}
+	err = json.Unmarshal(body, &oi)
 	return oi, err
 }
 
-// GetNames is a function that takes a ListResult (of type *perigee.Response)
+// ExtractNames is a function that takes a ListResult (of type *http.Response)
 // and returns the objects' names.
-func GetNames(lr ListResult) []string {
-	jr := string(lr.JsonResult)
-	ons := strings.Split(jr, "\n")
+func ExtractNames(lr ListResult) ([]string, error) {
+	var ons []string
+	defer lr.Body.Close()
+	body, err := ioutil.ReadAll(lr.Body)
+	if err != nil {
+		return ons, err
+	}
+	jr := string(body)
+	ons = strings.Split(jr, "\n")
 	ons = ons[:len(ons)-1]
-	return ons
+	return ons, nil
 }
 
-// GetContent is a function that takes a DownloadResult (of type *perigee.Response)
+// ExtractContent is a function that takes a DownloadResult (of type *http.Response)
 // and returns the object's content.
-func GetContent(dr DownloadResult) []byte {
-	return dr.JsonResult
+func ExtractContent(dr DownloadResult) ([]byte, error) {
+	var body []byte
+	defer dr.Body.Close()
+	body, err := ioutil.ReadAll(dr.Body)
+	return body, err
 }
 
-// GetMetadata is a function that takes a GetResult (of type *perifee.Response)
+// ExtractMetadata is a function that takes a GetResult (of type *http.Response)
 // and returns the custom metadata associated with the object.
-func GetMetadata(gr GetResult) map[string]string {
+func ExtractMetadata(gr GetResult) map[string]string {
 	metadata := make(map[string]string)
-	for k, v := range gr.HttpResponse.Header {
+	for k, v := range gr.Header {
 		if strings.HasPrefix(k, "X-Object-Meta-") {
 			key := strings.TrimPrefix(k, "X-Object-Meta-")
 			metadata[key] = v[0]
diff --git a/openstack/storage/v1/objects/requests.go b/openstack/storage/v1/objects/requests.go
index fbcbe1f..615a59d 100644
--- a/openstack/storage/v1/objects/requests.go
+++ b/openstack/storage/v1/objects/requests.go
@@ -2,19 +2,19 @@
 
 import (
 	"fmt"
-
 	"github.com/racker/perigee"
 	storage "github.com/rackspace/gophercloud/openstack/storage/v1"
 	"github.com/rackspace/gophercloud/openstack/utils"
+	"net/http"
 )
 
-type ListResult *perigee.Response
-type DownloadResult *perigee.Response
-type GetResult *perigee.Response
+type ListResult *http.Response
+type DownloadResult *http.Response
+type GetResult *http.Response
 
 // List is a function that retrieves all objects in a container. It also returns the details
 // for the container. To extract only the object information or names, pass the ListResult
-// response to the GetInfo or GetNames function, respectively.
+// response to the ExtractInfo or ExtractNames function, respectively.
 func List(c *storage.Client, opts ListOpts) (ListResult, error) {
 	contentType := ""
 
@@ -31,16 +31,15 @@
 
 	url := c.GetContainerURL(opts.Container) + query
 	resp, err := perigee.Request("GET", url, perigee.Options{
-		Results:     true,
 		MoreHeaders: h,
 		OkCodes:     []int{200, 204},
 		Accept:      contentType,
 	})
-	return resp, err
+	return &resp.HttpResponse, err
 }
 
 // Download is a function that retrieves the content and metadata for an object.
-// To extract just the content, pass the DownloadResult response to the GetContent
+// To extract just the content, pass the DownloadResult response to the ExtractContent
 // function.
 func Download(c *storage.Client, opts DownloadOpts) (DownloadResult, error) {
 	h, err := c.GetHeaders()
@@ -56,11 +55,10 @@
 
 	url := c.GetObjectURL(opts.Container, opts.Name) + query
 	resp, err := perigee.Request("GET", url, perigee.Options{
-		Results:     true,
 		MoreHeaders: h,
 		OkCodes:     []int{200},
 	})
-	return resp, err
+	return &resp.HttpResponse, err
 }
 
 // Create is a function that creates a new object or replaces an existing object.
@@ -139,7 +137,7 @@
 }
 
 // Get is a function that retrieves the metadata of an object. To extract just the custom
-// metadata, pass the GetResult response to the GetMetadata function.
+// metadata, pass the GetResult response to the ExtractMetadata function.
 func Get(c *storage.Client, opts GetOpts) (GetResult, error) {
 	h, err := c.GetHeaders()
 	if err != nil {
@@ -155,7 +153,7 @@
 		MoreHeaders: h,
 		OkCodes:     []int{204},
 	})
-	return resp, err
+	return &resp.HttpResponse, err
 }
 
 // Update is a function that creates, updates, or deletes an object's metadata.
