diff --git a/acceptance/openstack/storage/v1/containers_test.go b/acceptance/openstack/storage/v1/containers_test.go
index cf5e3cd..29f6312 100644
--- a/acceptance/openstack/storage/v1/containers_test.go
+++ b/acceptance/openstack/storage/v1/containers_test.go
@@ -10,20 +10,24 @@
 	"github.com/rackspace/gophercloud/openstack/storage/v1/containers"
 )
 
+// numContainers is the number of containers to create for testing.
 var numContainers = 2
 
 func TestContainers(t *testing.T) {
+	// Create a new client to execute the HTTP requests. See common.go for newClient body.
 	client, err := newClient()
 	if err != nil {
 		t.Error(err)
 		return
 	}
 
+	// Create a slice of random container names.
 	cNames := make([]string, numContainers)
 	for i := 0; i < numContainers; i++ {
 		cNames[i] = tools.RandomString("gophercloud-test-container-", 8)
 	}
 
+	// Create numContainers containers.
 	for i := 0; i < len(cNames); i++ {
 		_, err := containers.Create(client, containers.CreateOpts{
 			Name: cNames[i],
@@ -33,6 +37,7 @@
 			return
 		}
 	}
+	// Delete the numContainers containers after function completion.
 	defer func() {
 		for i := 0; i < len(cNames); i++ {
 			err = containers.Delete(client, containers.DeleteOpts{
@@ -45,6 +50,8 @@
 		}
 	}()
 
+	// List the numContainer names that were just created. To just list those,
+	// the 'prefix' parameter is used.
 	lr, err := containers.List(client, containers.ListOpts{
 		Full: false,
 		Params: map[string]string{
@@ -55,6 +62,7 @@
 		t.Error(err)
 		return
 	}
+	// Extract the names from the 'List' response.
 	cns, err := containers.ExtractNames(lr)
 	if err != nil {
 		t.Error(err)
@@ -65,13 +73,18 @@
 		return
 	}
 
+	// List the info for the numContainer containers that were created.
 	lr, err = containers.List(client, containers.ListOpts{
 		Full: true,
+		Params: map[string]string{
+			"prefix": "gophercloud-test-container-",
+		},
 	})
 	if err != nil {
 		t.Error(err)
 		return
 	}
+	// Extract the info from the 'List' response.
 	cis, err := containers.ExtractInfo(lr)
 	if err != nil {
 		t.Error(err)
@@ -81,6 +94,8 @@
 		t.Errorf("Expected %d containers and got %d", len(cNames), len(cis))
 		return
 	}
+
+	// Update one of the numContainer container metadata.
 	err = containers.Update(client, containers.UpdateOpts{
 		Name:     cNames[0],
 		Metadata: metadata,
@@ -89,6 +104,7 @@
 		t.Error(err)
 		return
 	}
+	// After the tests are done, delete the metadata that was set.
 	defer func() {
 		tempMap := make(map[string]string)
 		for k := range metadata {
@@ -104,11 +120,15 @@
 		}
 	}()
 
-	gr, err := containers.Get(client, containers.GetOpts{})
+	// Retrieve a container's metadata.
+	gr, err := containers.Get(client, containers.GetOpts{
+		Name: cNames[0],
+	})
 	if err != nil {
 		t.Error(err)
 		return
 	}
+	// Extract the metadata from the 'Get' response.
 	cm := containers.ExtractMetadata(gr)
 	for k := range metadata {
 		if cm[k] != metadata[strings.Title(k)] {
