Updated to be compliant with idiomatic Go and golint.