Golint

This builds on the gofmt branch and fixes most of the issues that [golint](https://github.com/golang/lint) brings up. Feel free to cherry-pick if you don't agree with all the changes.