diff --git a/openstack/orchestration/v1/stackresources/fixtures.go b/openstack/orchestration/v1/stackresources/fixtures.go
index 2273ba7..952dc54 100644
--- a/openstack/orchestration/v1/stackresources/fixtures.go
+++ b/openstack/orchestration/v1/stackresources/fixtures.go
@@ -255,7 +255,7 @@
 }
 
 // ListTypesExpected represents the expected object from a ListTypes request.
-var ListTypesExpected = resourceTypes{
+var ListTypesExpected = ResourceTypes{
 	"OS::Nova::Server",
 	"OS::Heat::RandomString",
 	"OS::Swift::Container",
@@ -267,7 +267,7 @@
 }
 
 // same as above, but sorted
-var SortedListTypesExpected = resourceTypes{
+var SortedListTypesExpected = ResourceTypes{
 	"OS::Cinder::VolumeAttachment",
 	"OS::Heat::RandomString",
 	"OS::Nova::FloatingIP",
diff --git a/openstack/orchestration/v1/stackresources/results.go b/openstack/orchestration/v1/stackresources/results.go
index 51c3c0c..6ddc766 100644
--- a/openstack/orchestration/v1/stackresources/results.go
+++ b/openstack/orchestration/v1/stackresources/results.go
@@ -206,28 +206,28 @@
 	return len(rts) == 0, nil
 }
 
-// resourceTypes represents the type that holds the result of ExtractResourceTypes.
+// ResourceTypes represents the type that holds the result of ExtractResourceTypes.
 // We define methods on this type to sort it before output
-type resourceTypes []string
+type ResourceTypes []string
 
-func (r resourceTypes) Len() int {
+func (r ResourceTypes) Len() int {
 	return len(r)
 }
 
-func (r resourceTypes) Swap(i, j int) {
+func (r ResourceTypes) Swap(i, j int) {
 	r[i], r[j] = r[j], r[i]
 }
 
-func (r resourceTypes) Less(i, j int) bool {
+func (r ResourceTypes) Less(i, j int) bool {
 	return r[i] < r[j]
 }
 
 // ExtractResourceTypes extracts and returns resource types.
-func ExtractResourceTypes(page pagination.Page) (resourceTypes, error) {
+func ExtractResourceTypes(page pagination.Page) (ResourceTypes, error) {
 	casted := page.(ResourceTypePage).Body
 
 	var response struct {
-		ResourceTypes resourceTypes `mapstructure:"resource_types"`
+		ResourceTypes ResourceTypes `mapstructure:"resource_types"`
 	}
 
 	if err := mapstructure.Decode(casted, &response); err != nil {
diff --git a/openstack/orchestration/v1/stacks/environment.go b/openstack/orchestration/v1/stacks/environment.go
index 4d4779c..abaff20 100644
--- a/openstack/orchestration/v1/stacks/environment.go
+++ b/openstack/orchestration/v1/stacks/environment.go
@@ -1,32 +1,32 @@
 package stacks
 
 import (
-	"errors"
 	"fmt"
 	"strings"
 )
 
-// an interface to represent stack environments
+// Environment is a structure that represents stack environments
 type Environment struct {
 	TE
 }
 
-// allowed sections in a stack environment file
+// EnvironmentSections is a map containing allowed sections in a stack environment file
 var EnvironmentSections = map[string]bool{
 	"parameters":         true,
 	"parameter_defaults": true,
 	"resource_registry":  true,
 }
 
+// Validate validates the contents of the Environment
 func (e *Environment) Validate() error {
 	if e.Parsed == nil {
 		if err := e.Parse(); err != nil {
 			return err
 		}
 	}
-	for key, _ := range e.Parsed {
+	for key := range e.Parsed {
 		if _, ok := EnvironmentSections[key]; !ok {
-			return errors.New(fmt.Sprintf("Environment has wrong section: %s", key))
+			return fmt.Errorf("Environment has wrong section: %s", key)
 		}
 	}
 	return nil
@@ -51,14 +51,14 @@
 	switch rr.(type) {
 	// process further only if the resource registry is a map
 	case map[string]interface{}, map[interface{}]interface{}:
-		rr_map, err := toStringKeys(rr)
+		rrMap, err := toStringKeys(rr)
 		if err != nil {
 			return err
 		}
 		// the resource registry might contain a base URL for the resource. If
 		// such a field is present, use it. Otherwise, use the default base URL.
 		var baseURL string
-		if val, ok := rr_map["base_url"]; ok {
+		if val, ok := rrMap["base_url"]; ok {
 			baseURL = val.(string)
 		} else {
 			baseURL = e.baseURL
@@ -78,24 +78,24 @@
 		// check the `resources` section (if it exists) for more URL's. Note that
 		// the previous call to GetFileContents was (deliberately) not recursive
 		// as we want more control over where to look for URL's
-		if val, ok := rr_map["resources"]; ok {
+		if val, ok := rrMap["resources"]; ok {
 			switch val.(type) {
 			// process further only if the contents are a map
 			case map[string]interface{}, map[interface{}]interface{}:
-				resources_map, err := toStringKeys(val)
+				resourcesMap, err := toStringKeys(val)
 				if err != nil {
 					return err
 				}
-				for _, v := range resources_map {
+				for _, v := range resourcesMap {
 					switch v.(type) {
 					case map[string]interface{}, map[interface{}]interface{}:
-						resource_map, err := toStringKeys(v)
+						resourceMap, err := toStringKeys(v)
 						if err != nil {
 							return err
 						}
 						var resourceBaseURL string
 						// if base_url for the resource type is defined, use it
-						if val, ok := resource_map["base_url"]; ok {
+						if val, ok := resourceMap["base_url"]; ok {
 							resourceBaseURL = val.(string)
 						} else {
 							resourceBaseURL = baseURL
diff --git a/openstack/orchestration/v1/stacks/environment_test.go b/openstack/orchestration/v1/stacks/environment_test.go
index bbef283..3a3c2b9 100644
--- a/openstack/orchestration/v1/stacks/environment_test.go
+++ b/openstack/orchestration/v1/stacks/environment_test.go
@@ -76,7 +76,7 @@
 func TestGetRRFileContents(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-	environment_content := `
+	environmentContent := `
 heat_template_version: 2013-05-23
 
 description:
@@ -100,7 +100,7 @@
       flavor: { get_param: instance_type }
       key_name: { get_param: key_name }`
 
-	db_content := `
+	dbContent := `
 heat_template_version: 2014-10-16
 
 description:
@@ -139,7 +139,7 @@
 		th.TestMethod(t, r, "GET")
 		w.Header().Set("Content-Type", "application/jason")
 		w.WriteHeader(http.StatusOK)
-		fmt.Fprintf(w, environment_content)
+		fmt.Fprintf(w, environmentContent)
 	})
 
 	fakeDBURL := strings.Join([]string{baseurl, "my_db.yaml"}, "/")
@@ -151,7 +151,7 @@
 		th.TestMethod(t, r, "GET")
 		w.Header().Set("Content-Type", "application/jason")
 		w.WriteHeader(http.StatusOK)
-		fmt.Fprintf(w, db_content)
+		fmt.Fprintf(w, dbContent)
 	})
 
 	client := fakeClient{BaseClient: getHTTPClient()}
@@ -163,14 +163,14 @@
 	th.AssertNoErr(t, err)
 	err = env.getRRFileContents(ignoreIfEnvironment)
 	th.AssertNoErr(t, err)
-	expected_env_files_content := "\nheat_template_version: 2013-05-23\n\ndescription:\n  Heat WordPress template to support F18, using only Heat OpenStack-native\n  resource types, and without the requirement for heat-cfntools in the image.\n  WordPress is web software you can use to create a beautiful website or blog.\n  This template installs a single-instance WordPress deployment using a local\n  MySQL database to store the data.\n\nparameters:\n\n  key_name:\n    type: string\n    description : Name of a KeyPair to enable SSH access to the instance\n\nresources:\n  wordpress_instance:\n    type: OS::Nova::Server\n    properties:\n      image: { get_param: image_id }\n      flavor: { get_param: instance_type }\n      key_name: { get_param: key_name }"
-	expected_db_files_content := "\nheat_template_version: 2014-10-16\n\ndescription:\n  Test template for Trove resource capabilities\n\nparameters:\n  db_pass:\n    type: string\n    hidden: true\n    description: Database access password\n    default: secrete\n\nresources:\n\nservice_db:\n  type: OS::Trove::Instance\n  properties:\n    name: trove_test_db\n    datastore_type: mariadb\n    flavor: 1GB Instance\n    size: 10\n    databases:\n    - name: test_data\n    users:\n    - name: kitchen_sink\n      password: { get_param: db_pass }\n      databases: [ test_data ]"
+	expectedEnvFilesContent := "\nheat_template_version: 2013-05-23\n\ndescription:\n  Heat WordPress template to support F18, using only Heat OpenStack-native\n  resource types, and without the requirement for heat-cfntools in the image.\n  WordPress is web software you can use to create a beautiful website or blog.\n  This template installs a single-instance WordPress deployment using a local\n  MySQL database to store the data.\n\nparameters:\n\n  key_name:\n    type: string\n    description : Name of a KeyPair to enable SSH access to the instance\n\nresources:\n  wordpress_instance:\n    type: OS::Nova::Server\n    properties:\n      image: { get_param: image_id }\n      flavor: { get_param: instance_type }\n      key_name: { get_param: key_name }"
+	expectedDBFilesContent := "\nheat_template_version: 2014-10-16\n\ndescription:\n  Test template for Trove resource capabilities\n\nparameters:\n  db_pass:\n    type: string\n    hidden: true\n    description: Database access password\n    default: secrete\n\nresources:\n\nservice_db:\n  type: OS::Trove::Instance\n  properties:\n    name: trove_test_db\n    datastore_type: mariadb\n    flavor: 1GB Instance\n    size: 10\n    databases:\n    - name: test_data\n    users:\n    - name: kitchen_sink\n      password: { get_param: db_pass }\n      databases: [ test_data ]"
 
-	th.AssertEquals(t, expected_env_files_content, env.Files[fakeEnvURL])
-	th.AssertEquals(t, expected_db_files_content, env.Files[fakeDBURL])
+	th.AssertEquals(t, expectedEnvFilesContent, env.Files[fakeEnvURL])
+	th.AssertEquals(t, expectedDBFilesContent, env.Files[fakeDBURL])
 
 	env.fixFileRefs()
-	expected_parsed := map[string]interface{}{
+	expectedParsed := map[string]interface{}{
 		"resource_registry": "2015-04-30",
 		"My::WP::Server":    fakeEnvURL,
 		"resources": map[string]interface{}{
@@ -180,5 +180,5 @@
 		},
 	}
 	env.Parse()
-	th.AssertDeepEquals(t, expected_parsed, env.Parsed)
+	th.AssertDeepEquals(t, expectedParsed, env.Parsed)
 }
diff --git a/openstack/orchestration/v1/stacks/fixtures.go b/openstack/orchestration/v1/stacks/fixtures.go
index 0cb38c2..83f5dec 100644
--- a/openstack/orchestration/v1/stacks/fixtures.go
+++ b/openstack/orchestration/v1/stacks/fixtures.go
@@ -405,6 +405,7 @@
 	})
 }
 
+// ValidJSONTemplate is a valid OpenStack Heat template in JSON format
 const ValidJSONTemplate = `
 {
   "heat_template_version": "2014-10-16",
@@ -429,6 +430,7 @@
 }
 `
 
+// ValidJSONTemplateParsed is the expected parsed version of ValidJSONTemplate
 var ValidJSONTemplateParsed = map[string]interface{}{
 	"heat_template_version": "2014-10-16",
 	"parameters": map[string]interface{}{
@@ -451,6 +453,7 @@
 	},
 }
 
+// ValidYAMLTemplate is a valid OpenStack Heat template in YAML format
 const ValidYAMLTemplate = `
 heat_template_version: 2014-10-16
 parameters:
@@ -468,6 +471,7 @@
       image: Debian 7 (Wheezy) (PVHVM)
 `
 
+// InvalidTemplateNoVersion is an invalid template as it has no `version` section
 const InvalidTemplateNoVersion = `
 parameters:
   flavor:
@@ -484,6 +488,7 @@
       image: Debian 7 (Wheezy) (PVHVM)
 `
 
+// ValidJSONEnvironment is a valid environment for a stack in JSON format
 const ValidJSONEnvironment = `
 {
   "parameters": {
@@ -519,6 +524,7 @@
 }
 `
 
+// ValidJSONEnvironmentParsed is the expected parsed version of ValidJSONEnvironment
 var ValidJSONEnvironmentParsed = map[string]interface{}{
 	"parameters": map[string]interface{}{
 		"user_key": "userkey",
@@ -552,6 +558,7 @@
 	},
 }
 
+// ValidYAMLEnvironment is a valid environment for a stack in YAML format
 const ValidYAMLEnvironment = `
 parameters:
   user_key: userkey
@@ -577,6 +584,7 @@
         hooks: [pre-create, pre-update]
 `
 
+// InvalidEnvironment is an invalid environment as it has an extra section called `resources`
 const InvalidEnvironment = `
 parameters:
   flavor:
diff --git a/openstack/orchestration/v1/stacks/template.go b/openstack/orchestration/v1/stacks/template.go
index 32fe95b..234ce49 100644
--- a/openstack/orchestration/v1/stacks/template.go
+++ b/openstack/orchestration/v1/stacks/template.go
@@ -1,35 +1,38 @@
 package stacks
 
 import (
-	"errors"
 	"fmt"
 	"github.com/rackspace/gophercloud"
 	"reflect"
 	"strings"
 )
 
+// Template is a structure that represents OpenStack Heat templates
 type Template struct {
 	TE
 }
 
+// TemplateFormatVersions is a map containing allowed variations of the template format version
+// Note that this contains the permitted variations of the _keys_ not the values.
 var TemplateFormatVersions = map[string]bool{
 	"HeatTemplateFormatVersion": true,
 	"heat_template_version":     true,
 	"AWSTemplateFormatVersion":  true,
 }
 
+// Validate validates the contents of the Template
 func (t *Template) Validate() error {
 	if t.Parsed == nil {
 		if err := t.Parse(); err != nil {
 			return err
 		}
 	}
-	for key, _ := range t.Parsed {
+	for key := range t.Parsed {
 		if _, ok := TemplateFormatVersions[key]; ok {
 			return nil
 		}
 	}
-	return errors.New(fmt.Sprintf("Template format version not found."))
+	return fmt.Errorf("Template format version not found.")
 }
 
 // GetFileContents recursively parses a template to search for urls. These urls
@@ -49,11 +52,11 @@
 	switch te.(type) {
 	// if te is a map
 	case map[string]interface{}, map[interface{}]interface{}:
-		te_map, err := toStringKeys(te)
+		teMap, err := toStringKeys(te)
 		if err != nil {
 			return err
 		}
-		for k, v := range te_map {
+		for k, v := range teMap {
 			value, ok := v.(string)
 			if !ok {
 				// if the value is not a string, recursively parse that value
@@ -101,9 +104,9 @@
 		return nil
 	// if te is a slice, call the function on each element of the slice.
 	case []interface{}:
-		te_slice := te.([]interface{})
-		for i := range te_slice {
-			if err := t.getFileContents(te_slice[i], ignoreIf, recurse); err != nil {
+		teSlice := te.([]interface{})
+		for i := range teSlice {
+			if err := t.getFileContents(teSlice[i], ignoreIf, recurse); err != nil {
 				return err
 			}
 		}
@@ -111,7 +114,7 @@
 	case string, bool, float64, nil, int:
 		return nil
 	default:
-		return errors.New(fmt.Sprintf("%v: Unrecognized type", reflect.TypeOf(te)))
+		return fmt.Errorf("%v: Unrecognized type", reflect.TypeOf(te))
 
 	}
 	return nil
diff --git a/openstack/orchestration/v1/stacks/template_test.go b/openstack/orchestration/v1/stacks/template_test.go
index a297f77..6884db8 100644
--- a/openstack/orchestration/v1/stacks/template_test.go
+++ b/openstack/orchestration/v1/stacks/template_test.go
@@ -81,7 +81,7 @@
 	fakeURL := strings.Join([]string{baseurl, "my_nova.yaml"}, "/")
 	urlparsed, err := url.Parse(fakeURL)
 	th.AssertNoErr(t, err)
-	my_nova_content := `heat_template_version: 2014-10-16
+	myNovaContent := `heat_template_version: 2014-10-16
 parameters:
   flavor:
     type: string
@@ -101,7 +101,7 @@
 		th.TestMethod(t, r, "GET")
 		w.Header().Set("Content-Type", "application/jason")
 		w.WriteHeader(http.StatusOK)
-		fmt.Fprintf(w, my_nova_content)
+		fmt.Fprintf(w, myNovaContent)
 	})
 
 	client := fakeClient{BaseClient: getHTTPClient()}
@@ -116,7 +116,7 @@
 	th.AssertNoErr(t, err)
 	err = te.getFileContents(te.Parsed, ignoreIfTemplate, true)
 	th.AssertNoErr(t, err)
-	expected_files := map[string]string{
+	expectedFiles := map[string]string{
 		"my_nova.yaml": `heat_template_version: 2014-10-16
 parameters:
   flavor:
@@ -133,9 +133,9 @@
       image: Debian 7 (Wheezy) (PVHVM)
       networks:
       - {uuid: 11111111-1111-1111-1111-111111111111}`}
-	th.AssertEquals(t, expected_files["my_nova.yaml"], te.Files[fakeURL])
+	th.AssertEquals(t, expectedFiles["my_nova.yaml"], te.Files[fakeURL])
 	te.fixFileRefs()
-	expected_parsed := map[string]interface{}{
+	expectedParsed := map[string]interface{}{
 		"heat_template_version": "2015-04-30",
 		"resources": map[string]interface{}{
 			"my_server": map[string]interface{}{
@@ -144,5 +144,5 @@
 		},
 	}
 	te.Parse()
-	th.AssertDeepEquals(t, expected_parsed, te.Parsed)
+	th.AssertDeepEquals(t, expectedParsed, te.Parsed)
 }
diff --git a/openstack/orchestration/v1/stacks/utils.go b/openstack/orchestration/v1/stacks/utils.go
index 420a7fa..7b476a9 100644
--- a/openstack/orchestration/v1/stacks/utils.go
+++ b/openstack/orchestration/v1/stacks/utils.go
@@ -2,7 +2,6 @@
 
 import (
 	"encoding/json"
-	"errors"
 	"fmt"
 	"io/ioutil"
 	"net/http"
@@ -21,7 +20,7 @@
 	Get(string) (*http.Response, error)
 }
 
-// Base structure for both Template and Environment
+// TE is a base structure for both Template and Environment
 type TE struct {
 	// Bin stores the contents of the template or environment.
 	Bin []byte
@@ -59,7 +58,7 @@
 		return nil
 	}
 
-	// get a fqdn from the URL using the baseURL of the template. For local files,
+	// get a fqdn from the URL using the baseURL of the TE. For local files,
 	// the URL's will have the `file` scheme.
 	u, err := gophercloud.NormalizePathURL(t.baseURL, t.URL)
 	if err != nil {
@@ -72,7 +71,7 @@
 		t.client = getHTTPClient()
 	}
 
-	// use the client to fetch the contents of the template
+	// use the client to fetch the contents of the TE
 	resp, err := t.client.Get(t.URL)
 	if err != nil {
 		return err
@@ -86,7 +85,7 @@
 	return nil
 }
 
-// get the basepath of the template.
+// get the basepath of the TE
 func getBasePath() (string, error) {
 	basePath, err := filepath.Abs(".")
 	if err != nil {
@@ -100,7 +99,7 @@
 }
 
 // get a an HTTP client to retrieve URL's. This client allows the use of `file`
-// scheme since we may need to fetch templates from users filesystem
+// scheme since we may need to fetch files from users filesystem
 func getHTTPClient() Client {
 	transport := &http.Transport{}
 	transport.RegisterProtocol("file", http.NewFileTransport(http.Dir("/")))
@@ -114,49 +113,49 @@
 	}
 	if jerr := json.Unmarshal(t.Bin, &t.Parsed); jerr != nil {
 		if yerr := yaml.Unmarshal(t.Bin, &t.Parsed); yerr != nil {
-			return errors.New(fmt.Sprintf("Data in neither json nor yaml format."))
+			return fmt.Errorf("Data in neither json nor yaml format.")
 		}
 	}
 	return t.Validate()
 }
 
-// base Validate method, always returns nil
+// Validate validates the contents of TE
 func (t *TE) Validate() error {
 	return nil
 }
 
 // igfunc is a parameter used by GetFileContents and GetRRFileContents to check
-// for valid template URL's.
+// for valid URL's.
 type igFunc func(string, interface{}) bool
 
 // convert map[interface{}]interface{} to map[string]interface{}
 func toStringKeys(m interface{}) (map[string]interface{}, error) {
 	switch m.(type) {
 	case map[string]interface{}, map[interface{}]interface{}:
-		typed_map := make(map[string]interface{})
+		typedMap := make(map[string]interface{})
 		if _, ok := m.(map[interface{}]interface{}); ok {
 			for k, v := range m.(map[interface{}]interface{}) {
-				typed_map[k.(string)] = v
+				typedMap[k.(string)] = v
 			}
 		} else {
-			typed_map = m.(map[string]interface{})
+			typedMap = m.(map[string]interface{})
 		}
-		return typed_map, nil
+		return typedMap, nil
 	default:
-		return nil, errors.New(fmt.Sprintf("Expected a map of type map[string]interface{} or map[interface{}]interface{}, actual type: %v", reflect.TypeOf(m)))
+		return nil, fmt.Errorf("Expected a map of type map[string]interface{} or map[interface{}]interface{}, actual type: %v", reflect.TypeOf(m))
 
 	}
 }
 
-// fix the template reference to files by replacing relative URL's by absolute
+// fix the reference to files by replacing relative URL's by absolute
 // URL's
 func (t *TE) fixFileRefs() {
-	t_str := string(t.Bin)
+	tStr := string(t.Bin)
 	if t.fileMaps == nil {
 		return
 	}
 	for k, v := range t.fileMaps {
-		t_str = strings.Replace(t_str, k, v, -1)
+		tStr = strings.Replace(tStr, k, v, -1)
 	}
-	t.Bin = []byte(t_str)
+	t.Bin = []byte(tStr)
 }
diff --git a/openstack/orchestration/v1/stacks/utils_test.go b/openstack/orchestration/v1/stacks/utils_test.go
index 6a3c5c0..2536e03 100644
--- a/openstack/orchestration/v1/stacks/utils_test.go
+++ b/openstack/orchestration/v1/stacks/utils_test.go
@@ -22,18 +22,18 @@
 }
 
 func TesttoStringKeys(t *testing.T) {
-	var test_1 interface{} = map[interface{}]interface{}{
+	var test1 interface{} = map[interface{}]interface{}{
 		"Adam":  "Smith",
 		"Isaac": "Newton",
 	}
-	result_1, err := toStringKeys(test_1)
+	result1, err := toStringKeys(test1)
 	th.AssertNoErr(t, err)
 
 	expected := map[string]interface{}{
 		"Adam":  "Smith",
 		"Isaac": "Newton",
 	}
-	th.AssertDeepEquals(t, result_1, expected)
+	th.AssertDeepEquals(t, result1, expected)
 }
 
 func TestGetBasePath(t *testing.T) {
