Fix nullablility in a number of places.
And add a few unrelated clarifying comments.