running `go test ./... -race` shows a number of warnings. we should address these where possible, and run automated tests with race checking enabled.