Some Go style suggestions for client.go and client_test.go