diff --git a/acceptance/02-list-servers.go b/acceptance/02-list-servers.go
index 758c706..df9e28c 100644
--- a/acceptance/02-list-servers.go
+++ b/acceptance/02-list-servers.go
@@ -9,32 +9,14 @@
 var quiet = flag.Bool("quiet", false, "Quiet mode, for acceptance testing.  $? still indicates errors though.")
 
 func main() {
-	provider, username, password := getCredentials()
 	flag.Parse()
 
-	acc, err := gophercloud.Authenticate(
-		provider,
-		gophercloud.AuthOptions{
-			Username: username,
-			Password: password,
-		},
-	)
-	if err != nil {
-		panic(err)
-	}
-
-	api, err := gophercloud.ServersApi(acc, gophercloud.ApiCriteria{
-		Name:      "cloudServersOpenStack",
-		Region:    "DFW",
-		VersionId: "2",
-		UrlChoice: gophercloud.PublicURL,
+	withIdentity(func(acc gophercloud.AccessProvider) {
+		withServerApi(acc, func(api gophercloud.CloudServersProvider) {
+			tryFullDetails(api)
+			tryLinksOnly(api)
+		})
 	})
-	if err != nil {
-		panic(err)
-	}
-
-  tryFullDetails(api)
-  tryLinksOnly(api)
 }
 
 func tryLinksOnly(api gophercloud.CloudServersProvider) {
diff --git a/acceptance/03-get-server-details.go b/acceptance/03-get-server-details.go
index bae220f..3fda268 100644
--- a/acceptance/03-get-server-details.go
+++ b/acceptance/03-get-server-details.go
@@ -11,85 +11,67 @@
 var quiet = flag.Bool("quiet", false, "Run quietly, for acceptance testing.  $? non-zero if issue.")
 
 func main() {
-	provider, username, password := getCredentials()
 	flag.Parse()
 
-	auth, err := gophercloud.Authenticate(
-		provider,
-		gophercloud.AuthOptions{
-			Username: username,
-			Password: password,
-		},
-	)
-	if err != nil {
-		panic(err)
-	}
+	withIdentity(func(auth gophercloud.AccessProvider) {
+		withServerApi(auth, func(servers gophercloud.CloudServersProvider) {
+			serverId := ""
+			if *id == "" {
+				ss, err := servers.ListServers()
+				if err != nil {
+					panic(err)
+				}
+				// We could just cheat and dump the server details from ss[0].
+				// But, that tests ListServers(), and not ServerById().  So, we
+				// elect not to cheat.
+				serverId = ss[0].Id
+			} else {
+				serverId = *id
+			}
 
-	servers, err := gophercloud.ServersApi(auth, gophercloud.ApiCriteria{
-		Name:      "cloudServersOpenStack",
-		Region:    *rgn,
-		VersionId: "2",
-		UrlChoice: gophercloud.PublicURL,
+			s, err := servers.ServerById(serverId)
+			if err != nil {
+				panic(err)
+			}
+
+			configs := []string {
+				"Access IPv4: %s\n",
+				"Access IPv6: %s\n",
+				"    Created: %s\n",
+				"     Flavor: %s\n",
+				"    Host ID: %s\n",
+				"         ID: %s\n",
+				"      Image: %s\n",
+				"       Name: %s\n",
+				"   Progress: %s\n",
+				"     Status: %s\n",
+				"  Tenant ID: %s\n",
+				"    Updated: %s\n",
+				"    User ID: %s\n",
+			}
+
+			values := []string {
+				s.AccessIPv4,
+				s.AccessIPv6,
+				s.Created,
+				s.Flavor.Id,
+				s.HostId,
+				s.Id,
+				s.Image.Id,
+				s.Name,
+				fmt.Sprintf("%d", s.Progress),
+				s.Status,
+				s.TenantId,
+				s.Updated,
+				s.UserId,
+			}
+
+			if !*quiet {
+				fmt.Println("Server info:")
+				for i, _ := range configs {
+					fmt.Printf(configs[i], values[i])
+				}
+			}
+		})
 	})
-	if err != nil {
-		panic(err)
-	}
-
-	serverId := ""
-	if *id == "" {
-		ss, err := servers.ListServers()
-		if err != nil {
-			panic(err)
-		}
-		// We could just cheat and dump the server details from ss[0].
-		// But, that tests ListServers(), and not ServerById().  So, we
-		// elect not to cheat.
-		serverId = ss[0].Id
-	} else {
-		serverId = *id
-	}
-
-	s, err := servers.ServerById(serverId)
-	if err != nil {
-		panic(err)
-	}
-
-	configs := []string {
-		"Access IPv4: %s\n",
-		"Access IPv6: %s\n",
-		"    Created: %s\n",
-		"     Flavor: %s\n",
-		"    Host ID: %s\n",
-		"         ID: %s\n",
-		"      Image: %s\n",
-		"       Name: %s\n",
-		"   Progress: %s\n",
-		"     Status: %s\n",
-		"  Tenant ID: %s\n",
-		"    Updated: %s\n",
-		"    User ID: %s\n",
-	}
-
-	values := []string {
-		s.AccessIPv4,
-		s.AccessIPv6,
-		s.Created,
-		s.Flavor.Id,
-		s.HostId,
-		s.Id,
-		s.Image.Id,
-		s.Name,
-		fmt.Sprintf("%d", s.Progress),
-		s.Status,
-		s.TenantId,
-		s.Updated,
-		s.UserId,
-	}
-
-	if !*quiet {
-		fmt.Println("Server info:")
-		for i, _ := range configs {
-			fmt.Printf(configs[i], values[i])
-		}
-	}
 }
