gofmt and add a couple of tests