diff --git a/openstack/objectstorage/v1/containers/requests.go b/openstack/objectstorage/v1/containers/requests.go
index 8b54c81..d772a43 100644
--- a/openstack/objectstorage/v1/containers/requests.go
+++ b/openstack/objectstorage/v1/containers/requests.go
@@ -9,17 +9,16 @@
 // ListOpts is a structure that holds options for listing containers.
 type ListOpts struct {
 	Full      bool
-	Limit     int    `q:"limit"`
-	Marker    string `q:"marker"`
-	EndMarker string `q:"end_marker"`
-	Format    string `q:"format"`
-	Prefix    string `q:"prefix"`
-	Delimiter []byte `q:"delimiter"`
+	Limit     int     `q:"limit"`
+	Marker    string  `q:"marker"`
+	EndMarker string  `q:"end_marker"`
+	Format    string  `q:"format"`
+	Prefix    string  `q:"prefix"`
+	Delimiter [1]byte `q:"delimiter"`
 }
 
-// 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 ExtractInfo or ExtractNames function, respectively.
+// List is a function that retrieves containers associated with the account as well as account
+// metadata. It returns a pager which can be iterated with the EachPage function.
 func List(c *gophercloud.ServiceClient, opts *ListOpts) pagination.Pager {
 	var headers map[string]string
 
@@ -34,6 +33,8 @@
 		if !opts.Full {
 			headers = map[string]string{"Accept": "text/plain", "Content-Type": "text/plain"}
 		}
+	} else {
+		headers = map[string]string{"Accept": "text/plain", "Content-Type": "text/plain"}
 	}
 
 	createPage := func(r pagination.LastHTTPResponse) pagination.Page {
@@ -61,14 +62,15 @@
 }
 
 // Create is a function that creates a new container.
-func Create(c *gophercloud.ServiceClient, containerName string, opts *CreateOpts) (Container, error) {
-	var container Container
+func Create(c *gophercloud.ServiceClient, containerName string, opts *CreateOpts) CreateResult {
+	var res CreateResult
 	h := c.Provider.AuthenticatedHeaders()
 
 	if opts != nil {
 		headers, err := gophercloud.BuildHeaders(opts)
 		if err != nil {
-			return container, err
+			res.Err = err
+			return res
 		}
 
 		for k, v := range headers {
@@ -80,23 +82,25 @@
 		}
 	}
 
-	_, err := perigee.Request("PUT", containerURL(c, containerName), perigee.Options{
+	resp, err := perigee.Request("PUT", containerURL(c, containerName), perigee.Options{
 		MoreHeaders: h,
 		OkCodes:     []int{201, 204},
 	})
-	if err == nil {
-		container = Container{Name: containerName}
-	}
-	return container, err
+	res.Resp = &resp.HttpResponse
+	res.Err = err
+	return res
 }
 
 // Delete is a function that deletes a container.
-func Delete(c *gophercloud.ServiceClient, containerName string) error {
-	_, err := perigee.Request("DELETE", containerURL(c, containerName), perigee.Options{
+func Delete(c *gophercloud.ServiceClient, containerName string) DeleteResult {
+	var res DeleteResult
+	resp, err := perigee.Request("DELETE", containerURL(c, containerName), perigee.Options{
 		MoreHeaders: c.Provider.AuthenticatedHeaders(),
 		OkCodes:     []int{204},
 	})
-	return err
+	res.Resp = &resp.HttpResponse
+	res.Err = err
+	return res
 }
 
 // UpdateOpts is a structure that holds parameters for updating, creating, or deleting a
@@ -114,13 +118,15 @@
 }
 
 // Update is a function that creates, updates, or deletes a container's metadata.
-func Update(c *gophercloud.ServiceClient, containerName string, opts *UpdateOpts) error {
+func Update(c *gophercloud.ServiceClient, containerName string, opts *UpdateOpts) UpdateResult {
+	var res UpdateResult
 	h := c.Provider.AuthenticatedHeaders()
 
 	if opts != nil {
 		headers, err := gophercloud.BuildHeaders(opts)
 		if err != nil {
-			return err
+			res.Err = err
+			return res
 		}
 
 		for k, v := range headers {
@@ -132,22 +138,24 @@
 		}
 	}
 
-	_, err := perigee.Request("POST", containerURL(c, containerName), perigee.Options{
+	resp, err := perigee.Request("POST", containerURL(c, containerName), perigee.Options{
 		MoreHeaders: h,
 		OkCodes:     []int{204},
 	})
-	return err
+	res.Resp = &resp.HttpResponse
+	res.Err = err
+	return res
 }
 
 // Get is a function that retrieves the metadata of a container. To extract just the custom
 // metadata, pass the GetResult response to the ExtractMetadata function.
 func Get(c *gophercloud.ServiceClient, containerName string) GetResult {
-	var gr GetResult
+	var res GetResult
 	resp, err := perigee.Request("HEAD", containerURL(c, containerName), perigee.Options{
 		MoreHeaders: c.Provider.AuthenticatedHeaders(),
 		OkCodes:     []int{204},
 	})
-	gr.Err = err
-	gr.Resp = &resp.HttpResponse
-	return gr
+	res.Resp = &resp.HttpResponse
+	res.Err = err
+	return res
 }
diff --git a/openstack/objectstorage/v1/containers/requests_test.go b/openstack/objectstorage/v1/containers/requests_test.go
index 8ec1733..1ab09a9 100644
--- a/openstack/objectstorage/v1/containers/requests_test.go
+++ b/openstack/objectstorage/v1/containers/requests_test.go
@@ -145,7 +145,7 @@
 	})
 
 	client := serviceClient()
-	_, err := Create(client, "testContainer", nil)
+	_, err := Create(client, "testContainer", nil).ExtractHeaders()
 	if err != nil {
 		t.Fatalf("Unexpected error creating container: %v", err)
 	}
@@ -163,7 +163,7 @@
 	})
 
 	client := serviceClient()
-	err := Delete(client, "testContainer")
+	_, err := Delete(client, "testContainer").ExtractHeaders()
 	if err != nil {
 		t.Fatalf("Unexpected error deleting container: %v", err)
 	}
@@ -181,7 +181,7 @@
 	})
 
 	client := serviceClient()
-	err := Update(client, "testContainer", nil)
+	_, err := Update(client, "testContainer", nil).ExtractHeaders()
 	if err != nil {
 		t.Fatalf("Unexpected error updating container metadata: %v", err)
 	}
diff --git a/openstack/objectstorage/v1/containers/results.go b/openstack/objectstorage/v1/containers/results.go
index 5df99ed..80425bd 100644
--- a/openstack/objectstorage/v1/containers/results.go
+++ b/openstack/objectstorage/v1/containers/results.go
@@ -2,56 +2,19 @@
 
 import (
 	"fmt"
-	"github.com/mitchellh/mapstructure"
-	"github.com/rackspace/gophercloud"
-	"github.com/rackspace/gophercloud/pagination"
 	"net/http"
 	"strings"
+
+	"github.com/mitchellh/mapstructure"
+	"github.com/rackspace/gophercloud/pagination"
 )
 
 type Container struct {
 	Bytes int    `json:"bytes" mapstructure:"bytes"`
 	Count int    `json:"count" mapstructure:"count"`
-	Name  string `json:"name"  mapstructure:"name"`
+	Name  string `json:"name" mapstructure:"name"`
 }
 
-type commonResult struct {
-	gophercloud.CommonResult
-}
-
-func (r GetResult) Extract() (*Container, error) {
-	if r.Err != nil {
-		return nil, r.Err
-	}
-
-	var res struct {
-		Container *Container
-	}
-
-	err := mapstructure.Decode(r.Resp, &res)
-	if err != nil {
-		return nil, fmt.Errorf("Error decoding Object Storage Container: %v", err)
-	}
-
-	return res.Container, nil
-}
-
-type CreateResult struct {
-	commonResult
-}
-
-// GetResult represents the result of a get operation.
-type GetResult struct {
-	Resp *http.Response
-	Err  error
-}
-
-// UpdateResult represents the result of an update operation.
-type UpdateResult commonResult
-
-// DeleteResult represents the result of a delete operation.
-type DeleteResult commonResult
-
 // ListResult is a *http.Response that is returned from a call to the List function.
 type ContainerPage struct {
 	pagination.MarkerPageBase
@@ -125,6 +88,12 @@
 	}
 }
 
+// GetResult represents the result of a get operation.
+type GetResult struct {
+	Resp *http.Response
+	Err  error
+}
+
 // ExtractMetadata is a function that takes a GetResult (of type *http.Response)
 // and returns the custom metadata associated with the container.
 func (gr GetResult) ExtractMetadata() (map[string]string, error) {
@@ -140,3 +109,29 @@
 	}
 	return metadata, nil
 }
+
+type commonResult struct {
+	Resp *http.Response
+	Err  error
+}
+
+func (cr commonResult) ExtractHeaders() (http.Header, error) {
+	var headers http.Header
+	if cr.Err != nil {
+		return headers, cr.Err
+	}
+
+	return cr.Resp.Header, nil
+}
+
+type CreateResult struct {
+	commonResult
+}
+
+type UpdateResult struct {
+	commonResult
+}
+
+type DeleteResult struct {
+	commonResult
+}
diff --git a/openstack/objectstorage/v1/objects/requests.go b/openstack/objectstorage/v1/objects/requests.go
index 900290c..bc21496 100644
--- a/openstack/objectstorage/v1/objects/requests.go
+++ b/openstack/objectstorage/v1/objects/requests.go
@@ -40,6 +40,8 @@
 		if !opts.Full {
 			headers = map[string]string{"Accept": "text/plain", "Content-Type": "text/plain"}
 		}
+	} else {
+		headers = map[string]string{"Accept": "text/plain", "Content-Type": "text/plain"}
 	}
 
 	createPage := func(r pagination.LastHTTPResponse) pagination.Page {
@@ -69,7 +71,7 @@
 // To extract just the content, pass the DownloadResult response to the ExtractContent
 // function.
 func Download(c *gophercloud.ServiceClient, containerName, objectName string, opts *DownloadOpts) DownloadResult {
-	var dr DownloadResult
+	var res DownloadResult
 
 	url := objectURL(c, containerName, objectName)
 	h := c.Provider.AuthenticatedHeaders()
@@ -77,8 +79,8 @@
 	if opts != nil {
 		headers, err := gophercloud.BuildHeaders(opts)
 		if err != nil {
-			dr.Err = err
-			return dr
+			res.Err = err
+			return res
 		}
 
 		for k, v := range headers {
@@ -87,8 +89,8 @@
 
 		query, err := gophercloud.BuildQueryString(opts)
 		if err != nil {
-			dr.Err = err
-			return dr
+			res.Err = err
+			return res
 		}
 		url += query.String()
 	}
@@ -97,9 +99,9 @@
 		MoreHeaders: h,
 		OkCodes:     []int{200},
 	})
-	dr.Err = err
-	dr.Resp = &resp.HttpResponse
-	return dr
+	res.Err = err
+	res.Resp = &resp.HttpResponse
+	return res
 }
 
 // CreateOpts is a structure that holds parameters for creating an object.
@@ -123,7 +125,8 @@
 }
 
 // Create is a function that creates a new object or replaces an existing object.
-func Create(c *gophercloud.ServiceClient, containerName, objectName string, content io.Reader, opts *CreateOpts) error {
+func Create(c *gophercloud.ServiceClient, containerName, objectName string, content io.Reader, opts *CreateOpts) CreateResult {
+	var res CreateResult
 	var reqBody []byte
 
 	url := objectURL(c, containerName, objectName)
@@ -132,7 +135,8 @@
 	if opts != nil {
 		headers, err := gophercloud.BuildHeaders(opts)
 		if err != nil {
-			return nil
+			res.Err = err
+			return res
 		}
 
 		for k, v := range headers {
@@ -145,8 +149,10 @@
 
 		query, err := gophercloud.BuildQueryString(opts)
 		if err != nil {
-			return err
+			res.Err = err
+			return res
 		}
+
 		url += query.String()
 	}
 
@@ -154,16 +160,19 @@
 		reqBody = make([]byte, 0)
 		_, err := content.Read(reqBody)
 		if err != nil {
-			return err
+			res.Err = err
+			return res
 		}
 	}
 
-	_, err := perigee.Request("PUT", url, perigee.Options{
+	resp, err := perigee.Request("PUT", url, perigee.Options{
 		ReqBody:     reqBody,
 		MoreHeaders: h,
 		OkCodes:     []int{201},
 	})
-	return err
+	res.Resp = &resp.HttpResponse
+	res.Err = err
+	return res
 }
 
 // CopyOpts is a structure that holds parameters for copying one object to another.
@@ -176,15 +185,18 @@
 }
 
 // Copy is a function that copies one object to another.
-func Copy(c *gophercloud.ServiceClient, containerName, objectName string, opts *CopyOpts) error {
+func Copy(c *gophercloud.ServiceClient, containerName, objectName string, opts *CopyOpts) CopyResult {
+	var res CopyResult
 	h := c.Provider.AuthenticatedHeaders()
 
 	if opts == nil {
-		return fmt.Errorf("Required CopyOpts field 'Destination' not set.")
+		res.Err = fmt.Errorf("Required CopyOpts field 'Destination' not set.")
+		return res
 	}
 	headers, err := gophercloud.BuildHeaders(opts)
 	if err != nil {
-		return err
+		res.Err = err
+		return res
 	}
 	for k, v := range headers {
 		h[k] = v
@@ -195,11 +207,12 @@
 	}
 
 	url := objectURL(c, containerName, objectName)
-	_, err = perigee.Request("COPY", url, perigee.Options{
+	resp, err := perigee.Request("COPY", url, perigee.Options{
 		MoreHeaders: h,
 		OkCodes:     []int{201},
 	})
-	return err
+	res.Resp = &resp.HttpResponse
+	return res
 }
 
 // DeleteOpts is a structure that holds parameters for deleting an object.
@@ -208,22 +221,26 @@
 }
 
 // Delete is a function that deletes an object.
-func Delete(c *gophercloud.ServiceClient, containerName, objectName string, opts *DeleteOpts) error {
+func Delete(c *gophercloud.ServiceClient, containerName, objectName string, opts *DeleteOpts) DeleteResult {
+	var res DeleteResult
 	url := objectURL(c, containerName, objectName)
 
 	if opts != nil {
 		query, err := gophercloud.BuildQueryString(opts)
 		if err != nil {
-			return err
+			res.Err = err
+			return res
 		}
 		url += query.String()
 	}
 
-	_, err := perigee.Request("DELETE", url, perigee.Options{
+	resp, err := perigee.Request("DELETE", url, perigee.Options{
 		MoreHeaders: c.Provider.AuthenticatedHeaders(),
 		OkCodes:     []int{204},
 	})
-	return err
+	res.Resp = &resp.HttpResponse
+	res.Err = err
+	return res
 }
 
 // GetOpts is a structure that holds parameters for getting an object's metadata.
@@ -235,14 +252,14 @@
 // Get is a function that retrieves the metadata of an object. To extract just the custom
 // metadata, pass the GetResult response to the ExtractMetadata function.
 func Get(c *gophercloud.ServiceClient, containerName, objectName string, opts *GetOpts) GetResult {
-	var gr GetResult
+	var res GetResult
 	url := objectURL(c, containerName, objectName)
 
 	if opts != nil {
 		query, err := gophercloud.BuildQueryString(opts)
 		if err != nil {
-			gr.Err = err
-			return gr
+			res.Err = err
+			return res
 		}
 		url += query.String()
 	}
@@ -251,9 +268,9 @@
 		MoreHeaders: c.Provider.AuthenticatedHeaders(),
 		OkCodes:     []int{200, 204},
 	})
-	gr.Err = err
-	gr.Resp = &resp.HttpResponse
-	return gr
+	res.Err = err
+	res.Resp = &resp.HttpResponse
+	return res
 }
 
 // UpdateOpts is a structure that holds parameters for updating, creating, or deleting an
@@ -269,13 +286,15 @@
 }
 
 // Update is a function that creates, updates, or deletes an object's metadata.
-func Update(c *gophercloud.ServiceClient, containerName, objectName string, opts *UpdateOpts) error {
+func Update(c *gophercloud.ServiceClient, containerName, objectName string, opts *UpdateOpts) UpdateResult {
+	var res UpdateResult
 	h := c.Provider.AuthenticatedHeaders()
 
 	if opts != nil {
 		headers, err := gophercloud.BuildHeaders(opts)
 		if err != nil {
-			return nil
+			res.Err = err
+			return res
 		}
 
 		for k, v := range headers {
@@ -288,9 +307,11 @@
 	}
 
 	url := objectURL(c, containerName, objectName)
-	_, err := perigee.Request("POST", url, perigee.Options{
+	resp, err := perigee.Request("POST", url, perigee.Options{
 		MoreHeaders: h,
 		OkCodes:     []int{202},
 	})
-	return err
+	res.Resp = &resp.HttpResponse
+	res.Err = err
+	return res
 }
diff --git a/openstack/objectstorage/v1/objects/requests_test.go b/openstack/objectstorage/v1/objects/requests_test.go
index 6747544..15956cd 100644
--- a/openstack/objectstorage/v1/objects/requests_test.go
+++ b/openstack/objectstorage/v1/objects/requests_test.go
@@ -180,7 +180,7 @@
 
 	client := serviceClient()
 	content := bytes.NewBufferString("Did gyre and gimble in the wabe")
-	err := Create(client, "testContainer", "testObject", content, nil)
+	_, err := Create(client, "testContainer", "testObject", content, nil).ExtractHeaders()
 	if err != nil {
 		t.Fatalf("Unexpected error creating object: %v", err)
 	}
@@ -199,7 +199,7 @@
 	})
 
 	client := serviceClient()
-	err := Copy(client, "testContainer", "testObject", &CopyOpts{Destination: "/newTestContainer/newTestObject"})
+	_, err := Copy(client, "testContainer", "testObject", &CopyOpts{Destination: "/newTestContainer/newTestObject"}).ExtractHeaders()
 	if err != nil {
 		t.Fatalf("Unexpected error copying object: %v", err)
 	}
@@ -217,7 +217,7 @@
 	})
 
 	client := serviceClient()
-	err := Delete(client, "testContainer", "testObject", nil)
+	_, err := Delete(client, "testContainer", "testObject", nil).ExtractHeaders()
 	if err != nil {
 		t.Fatalf("Unexpected error deleting object: %v", err)
 	}
@@ -236,7 +236,7 @@
 	})
 
 	client := serviceClient()
-	err := Update(client, "testContainer", "testObject", &UpdateOpts{Metadata: metadata})
+	_, err := Update(client, "testContainer", "testObject", &UpdateOpts{Metadata: metadata}).ExtractHeaders()
 	if err != nil {
 		t.Fatalf("Unexpected error updating object metadata: %v", err)
 	}
diff --git a/openstack/objectstorage/v1/objects/results.go b/openstack/objectstorage/v1/objects/results.go
index cab0dfb..aaeb040 100644
--- a/openstack/objectstorage/v1/objects/results.go
+++ b/openstack/objectstorage/v1/objects/results.go
@@ -45,18 +45,6 @@
 	return names[len(names)-1], nil
 }
 
-// DownloadResult is a *http.Response that is returned from a call to the Download function.
-type DownloadResult struct {
-	Resp *http.Response
-	Err  error
-}
-
-// GetResult is a *http.Response that is returned from a call to the Get function.
-type GetResult struct {
-	Resp *http.Response
-	Err  error
-}
-
 // ExtractInfo is a function that takes a page of objects and returns their full information.
 func ExtractInfo(page pagination.Page) ([]Object, error) {
 	untyped := page.(ObjectPage).Body.([]interface{})
@@ -106,6 +94,11 @@
 	}
 }
 
+// DownloadResult is a *http.Response that is returned from a call to the Download function.
+type DownloadResult struct {
+	commonResult
+}
+
 // ExtractContent is a function that takes a DownloadResult (of type *http.Response)
 // and returns the object's content.
 func (dr DownloadResult) ExtractContent() ([]byte, error) {
@@ -121,6 +114,11 @@
 	return body, nil
 }
 
+// GetResult is a *http.Response that is returned from a call to the Get function.
+type GetResult struct {
+	commonResult
+}
+
 // ExtractMetadata is a function that takes a GetResult (of type *http.Response)
 // and returns the custom metadata associated with the object.
 func (gr GetResult) ExtractMetadata() (map[string]string, error) {
@@ -136,3 +134,33 @@
 	}
 	return metadata, nil
 }
+
+type commonResult struct {
+	Resp *http.Response
+	Err  error
+}
+
+func (cr commonResult) ExtractHeaders() (http.Header, error) {
+	var headers http.Header
+	if cr.Err != nil {
+		return headers, cr.Err
+	}
+
+	return cr.Resp.Header, nil
+}
+
+type CreateResult struct {
+	commonResult
+}
+
+type UpdateResult struct {
+	commonResult
+}
+
+type DeleteResult struct {
+	commonResult
+}
+
+type CopyResult struct {
+	commonResult
+}
