Formatting vetting

These are some formatting and code changes from `go fmt -w -s` and correcting the results of `go tool vet`.