tidy up some correctness issues reported by go vet
Merge pull request #1 from andybons/andybons_govet

tidy up some correctness issues reported by go vet