diff --git a/acceptance/openstack/objectstorage/v1/accounts_test.go b/acceptance/openstack/objectstorage/v1/accounts_test.go
index 0cbee04..f7c01a7 100644
--- a/acceptance/openstack/objectstorage/v1/accounts_test.go
+++ b/acceptance/openstack/objectstorage/v1/accounts_test.go
@@ -16,8 +16,8 @@
 	client := newClient(t)
 
 	// Update an account's metadata.
-	res = accounts.Update(client, accounts.UpdateOpts{Metadata: metadata})
-	th.AssertNoErr(t, res.Err)
+	updateres := accounts.Update(client, accounts.UpdateOpts{Metadata: metadata})
+	th.AssertNoErr(t, updateres.Err)
 
 	// Defer the deletion of the metadata set above.
 	defer func() {
@@ -25,15 +25,16 @@
 		for k := range metadata {
 			tempMap[k] = ""
 		}
-		res = accounts.Update(client, accounts.UpdateOpts{Metadata: tempMap})
-		th.AssertNoErr(t, res.Err)
+		updateres = accounts.Update(client, accounts.UpdateOpts{Metadata: tempMap})
+		th.AssertNoErr(t, updateres.Err)
 	}()
 
 	// Retrieve account metadata.
-	res := accounts.Get(client, accounts.GetOpts{})
-	th.AssertNoErr(res.Err)
+	getres := accounts.Get(client, nil)
+	th.AssertNoErr(t, getres.Err)
 	// Extract the custom metadata from the 'Get' response.
-	am := accounts.ExtractMetadata(gr)
+	am, err := getres.ExtractMetadata()
+	th.AssertNoErr(t, err)
 	for k := range metadata {
 		if am[k] != metadata[strings.Title(k)] {
 			t.Errorf("Expected custom metadata with key: %s", k)
diff --git a/acceptance/openstack/objectstorage/v1/common.go b/acceptance/openstack/objectstorage/v1/common.go
index a91f9c7..1eac681 100644
--- a/acceptance/openstack/objectstorage/v1/common.go
+++ b/acceptance/openstack/objectstorage/v1/common.go
@@ -20,7 +20,9 @@
 	client, err := openstack.AuthenticatedClient(ao)
 	th.AssertNoErr(t, err)
 
-	return openstack.NewObjectStorageV1(client, gophercloud.EndpointOpts{
+	c, err := openstack.NewObjectStorageV1(client, gophercloud.EndpointOpts{
 		Region: os.Getenv("OS_REGION_NAME"),
 	})
+	th.AssertNoErr(t, err)
+	return c
 }
diff --git a/acceptance/openstack/objectstorage/v1/containers_test.go b/acceptance/openstack/objectstorage/v1/containers_test.go
index 8856941..d6832f1 100644
--- a/acceptance/openstack/objectstorage/v1/containers_test.go
+++ b/acceptance/openstack/objectstorage/v1/containers_test.go
@@ -28,21 +28,21 @@
 	// Create numContainers containers.
 	for i := 0; i < len(cNames); i++ {
 		res := containers.Create(client, cNames[i], nil)
-		th.AssertNoErr(res.Err)
+		th.AssertNoErr(t, res.Err)
 	}
 	// Delete the numContainers containers after function completion.
 	defer func() {
 		for i := 0; i < len(cNames); i++ {
-			res = containers.Delete(client, cNames[i])
-			th.AssertNoErr(res.Err)
+			res := containers.Delete(client, cNames[i])
+			th.AssertNoErr(t, res.Err)
 		}
 	}()
 
 	// List the numContainer names that were just created. To just list those,
 	// the 'prefix' parameter is used.
-	err = containers.List(client, &containers.ListOpts{Full: true, Prefix: "gophercloud-test-container-"}).EachPage(func(page pagination.Page) (bool, error) {
+	err := containers.List(client, &containers.ListOpts{Full: true, Prefix: "gophercloud-test-container-"}).EachPage(func(page pagination.Page) (bool, error) {
 		containerList, err := containers.ExtractInfo(page)
-		th.AssertNoErr(err)
+		th.AssertNoErr(t, err)
 
 		for _, n := range containerList {
 			t.Logf("Container: Name [%s] Count [%d] Bytes [%d]",
@@ -51,36 +51,36 @@
 
 		return true, nil
 	})
-	th.AssertNoErr(err)
+	th.AssertNoErr(t, err)
 
 	// List the info for the numContainer containers that were created.
 	err = containers.List(client, &containers.ListOpts{Full: false, Prefix: "gophercloud-test-container-"}).EachPage(func(page pagination.Page) (bool, error) {
 		containerList, err := containers.ExtractNames(page)
-		th.AssertNoErr(err)
+		th.AssertNoErr(t, err)
 		for _, n := range containerList {
 			t.Logf("Container: Name [%s]", n)
 		}
 
 		return true, nil
 	})
-	th.AssertNoErr(err)
+	th.AssertNoErr(t, err)
 
 	// Update one of the numContainer container metadata.
-	res = containers.Update(client, cNames[0], &containers.UpdateOpts{Metadata: metadata})
-	th.AssertNoErr(res.Err)
+	updateres := containers.Update(client, cNames[0], &containers.UpdateOpts{Metadata: metadata})
+	th.AssertNoErr(t, updateres.Err)
 	// After the tests are done, delete the metadata that was set.
 	defer func() {
 		tempMap := make(map[string]string)
 		for k := range metadata {
 			tempMap[k] = ""
 		}
-		res = containers.Update(client, cNames[0], &containers.UpdateOpts{Metadata: tempMap})
-		th.AssertNoErr(res.Err)
+		res := containers.Update(client, cNames[0], &containers.UpdateOpts{Metadata: tempMap})
+		th.AssertNoErr(t, res.Err)
 	}()
 
 	// Retrieve a container's metadata.
 	cm, err := containers.Get(client, cNames[0]).ExtractMetadata()
-	th.AssertNoErr(err)
+	th.AssertNoErr(t, err)
 	for k := range metadata {
 		if cm[k] != metadata[strings.Title(k)] {
 			t.Errorf("Expected custom metadata with key: %s", k)
diff --git a/acceptance/openstack/objectstorage/v1/objects_test.go b/acceptance/openstack/objectstorage/v1/objects_test.go
index 4c47367..987f733 100644
--- a/acceptance/openstack/objectstorage/v1/objects_test.go
+++ b/acceptance/openstack/objectstorage/v1/objects_test.go
@@ -20,7 +20,7 @@
 func TestObjects(t *testing.T) {
 	// Create a provider client for executing the HTTP request.
 	// See common.go for more information.
-	client := newClient()
+	client := newClient(t)
 
 	// Make a slice of length numObjects to hold the random object names.
 	oNames := make([]string, numObjects)
@@ -30,79 +30,71 @@
 
 	// Create a container to hold the test objects.
 	cName := tools.RandomString("test-container-", 8)
-	res = containers.Create(client, cName, nil)
-	th.AssertNoErr(res.Err)
+	createres := containers.Create(client, cName, nil)
+	th.AssertNoErr(t, createres.Err)
 
 	// Defer deletion of the container until after testing.
 	defer func() {
-		res = containers.Delete(client, cName)
-		th.AssertNoErr(res.Err)
+		res := containers.Delete(client, cName)
+		th.AssertNoErr(t, res.Err)
 	}()
 
 	// Create a slice of buffers to hold the test object content.
 	oContents := make([]*bytes.Buffer, numObjects)
 	for i := 0; i < numObjects; i++ {
 		oContents[i] = bytes.NewBuffer([]byte(tools.RandomString("", 10)))
-		res = objects.Create(client, cName, oNames[i], oContents[i], nil)
-		th.AssertNoErr(res.Err)
+		res := objects.Create(client, cName, oNames[i], oContents[i], nil)
+		th.AssertNoErr(t, res.Err)
 	}
 	// Delete the objects after testing.
 	defer func() {
 		for i := 0; i < numObjects; i++ {
-			res = objects.Delete(client, cName, oNames[i], nil)
+			res := objects.Delete(client, cName, oNames[i], nil)
+			th.AssertNoErr(t, res.Err)
 		}
 	}()
 
 	ons := make([]string, 0, len(oNames))
-	err = objects.List(client, cName, &objects.ListOpts{Full: false, Prefix: "test-object-"}).EachPage(func(page pagination.Page) (bool, error) {
+	err := objects.List(client, cName, &objects.ListOpts{Full: false, Prefix: "test-object-"}).EachPage(func(page pagination.Page) (bool, error) {
 		names, err := objects.ExtractNames(page)
-		th.AssertNoErr(err)
+		th.AssertNoErr(t, err)
 		ons = append(ons, names...)
 
 		return true, nil
 	})
-	th.AssertNoErr(err)
-	if len(ons) != len(oNames) {
-		t.Errorf("Expected %d names and got %d", len(oNames), len(ons))
-		return
-	}
+	th.AssertNoErr(t, err)
+	th.AssertEquals(t, len(ons), len(oNames))
 
 	ois := make([]objects.Object, 0, len(oNames))
 	err = objects.List(client, cName, &objects.ListOpts{Full: true, Prefix: "test-object-"}).EachPage(func(page pagination.Page) (bool, error) {
 		info, err := objects.ExtractInfo(page)
-		th.AssertNoErr(err)
+		th.AssertNoErr(t, err)
 
 		ois = append(ois, info...)
 
 		return true, nil
 	})
-	th.AssertNoErr(err)
-	if len(ois) != len(oNames) {
-		t.Errorf("Expected %d containers and got %d", len(oNames), len(ois))
-		return
-	}
+	th.AssertNoErr(t, err)
+	th.AssertEquals(t, len(ois), len(oNames))
 
 	// Copy the contents of one object to another.
-	res = objects.Copy(client, cName, oNames[0], &objects.CopyOpts{Destination: cName + "/" + oNames[1]})
-	th.AssertNoErr(res.Err)
+	copyres := objects.Copy(client, cName, oNames[0], &objects.CopyOpts{Destination: cName + "/" + oNames[1]})
+	th.AssertNoErr(t, copyres.Err)
 
 	// Download one of the objects that was created above.
 	o1Content, err := objects.Download(client, cName, oNames[0], nil).ExtractContent()
-	th.AssertNoErr(err)
+	th.AssertNoErr(t, err)
 
 	// Download the another object that was create above.
 	o2Content, err := objects.Download(client, cName, oNames[1], nil).ExtractContent()
-	th.AssertNoErr(err)
+	th.AssertNoErr(t, err)
 
 	// Compare the two object's contents to test that the copy worked.
-	if string(o2Content) != string(o1Content) {
-		t.Errorf("Copy failed. Expected\n%s\nand got\n%s", string(o1Content), string(o2Content))
-		return
-	}
+	th.AssertEquals(t, string(o2Content), string(o1Content))
 
 	// Update an object's metadata.
-	res = objects.Update(client, cName, oNames[0], &objects.UpdateOpts{Metadata: metadata})
-	th.AssertNoErr(res.Err)
+	updateres := objects.Update(client, cName, oNames[0], &objects.UpdateOpts{Metadata: metadata})
+	th.AssertNoErr(t, updateres.Err)
 
 	// Delete the object's metadata after testing.
 	defer func() {
@@ -110,13 +102,13 @@
 		for k := range metadata {
 			tempMap[k] = ""
 		}
-		res = objects.Update(client, cName, oNames[0], &objects.UpdateOpts{Metadata: tempMap})
-		th.AssertNoErr(res.Err)
+		res := objects.Update(client, cName, oNames[0], &objects.UpdateOpts{Metadata: tempMap})
+		th.AssertNoErr(t, res.Err)
 	}()
 
 	// Retrieve an object's metadata.
 	om, err := objects.Get(client, cName, oNames[0], nil).ExtractMetadata()
-	th.AssertNoErr(err)
+	th.AssertNoErr(t, err)
 	for k := range metadata {
 		if om[k] != metadata[strings.Title(k)] {
 			t.Errorf("Expected custom metadata with key: %s", k)
diff --git a/openstack/objectstorage/v1/accounts/results.go b/openstack/objectstorage/v1/accounts/results.go
index e42577a..ba379eb 100644
--- a/openstack/objectstorage/v1/accounts/results.go
+++ b/openstack/objectstorage/v1/accounts/results.go
@@ -1,7 +1,6 @@
 package accounts
 
 import (
-	"net/http"
 	"strings"
 
 	"github.com/rackspace/gophercloud"
@@ -33,9 +32,3 @@
 type UpdateResult struct {
 	gophercloud.Result
 }
-
-// Extract returns the unmodified HTTP headers and any error conditions encountered during the
-// metadata update.
-func (ur UpdateResult) Extract() (http.Header, error) {
-	return ur.Header, ur.Err
-}
diff --git a/openstack/objectstorage/v1/containers/results.go b/openstack/objectstorage/v1/containers/results.go
index 780d4ae..c00a4bc 100644
--- a/openstack/objectstorage/v1/containers/results.go
+++ b/openstack/objectstorage/v1/containers/results.go
@@ -2,7 +2,6 @@
 
 import (
 	"fmt"
-	"net/http"
 	"strings"
 
 	"github.com/rackspace/gophercloud"
@@ -97,9 +96,13 @@
 	}
 }
 
+type commonResult struct {
+	gophercloud.Result
+}
+
 // GetResult represents the result of a get operation.
 type GetResult struct {
-	gophercloud.Result
+	commonResult
 }
 
 // ExtractMetadata is a function that takes a GetResult (of type *http.Response)
@@ -118,32 +121,23 @@
 	return metadata, nil
 }
 
-type headerResult struct {
-	gophercloud.Result
-}
-
-// Extract pulls the unmodified headers from a Create, Update, or Delete result.
-func (result headerResult) Extract() (http.Header, error) {
-	return result.Header, result.Err
-}
-
 // CreateResult represents the result of a create operation. To extract the
 // the headers from the HTTP response, you can invoke the 'ExtractHeaders'
 // method on the result struct.
 type CreateResult struct {
-	headerResult
+	commonResult
 }
 
 // UpdateResult represents the result of an update operation. To extract the
 // the headers from the HTTP response, you can invoke the 'ExtractHeaders'
 // method on the result struct.
 type UpdateResult struct {
-	headerResult
+	commonResult
 }
 
 // DeleteResult represents the result of a delete operation. To extract the
 // the headers from the HTTP response, you can invoke the 'ExtractHeaders'
 // method on the result struct.
 type DeleteResult struct {
-	headerResult
+	commonResult
 }
diff --git a/openstack/objectstorage/v1/objects/results.go b/openstack/objectstorage/v1/objects/results.go
index e662b69..f85f1ac 100644
--- a/openstack/objectstorage/v1/objects/results.go
+++ b/openstack/objectstorage/v1/objects/results.go
@@ -2,7 +2,6 @@
 
 import (
 	"fmt"
-	"net/http"
 	"strings"
 
 	"github.com/rackspace/gophercloud"
@@ -96,9 +95,13 @@
 	}
 }
 
+type commonResult struct {
+	gophercloud.Result
+}
+
 // DownloadResult is a *http.Response that is returned from a call to the Download function.
 type DownloadResult struct {
-	gophercloud.Result
+	commonResult
 }
 
 // ExtractContent is a function that takes a DownloadResult (of type *http.Response)
@@ -112,7 +115,7 @@
 
 // GetResult is a *http.Response that is returned from a call to the Get function.
 type GetResult struct {
-	gophercloud.Result
+	commonResult
 }
 
 // ExtractMetadata is a function that takes a GetResult (of type *http.Response)
@@ -131,32 +134,22 @@
 	return metadata, nil
 }
 
-type headerResult struct {
-	gophercloud.Result
-}
-
-// Extract returns the unmodified HTTP response headers from a Create, Update, or Delete call, as
-// well as any errors that occurred during the call.
-func (result headerResult) Extract() (http.Header, error) {
-	return result.Header, result.Err
-}
-
 // CreateResult represents the result of a create operation.
 type CreateResult struct {
-	headerResult
+	commonResult
 }
 
 // UpdateResult represents the result of an update operation.
 type UpdateResult struct {
-	headerResult
+	commonResult
 }
 
 // DeleteResult represents the result of a delete operation.
 type DeleteResult struct {
-	headerResult
+	commonResult
 }
 
 // CopyResult represents the result of a copy operation.
 type CopyResult struct {
-	headerResult
+	commonResult
 }
