Style fixes

I've done some style cleanup. Some of it is based on the output of standard tools (`gofmt -s` and `golint`) and the rest is (hopefully non-controversial) style/typo fixes that suited my sensibilities.