Cleanups and fixes found by vet, fmt, lint and errcheck
Go lint cleanups
test cleanups and golint fixes