Pull a couple of common bits of code out into utils.go