gofmt and fix some golint warnings