Fix issues reported by go vet and go lint