Test code against golint

https://github.com/golang/lint

And fix the code so that golint reports no problems.