Add a sanity check; update some comments.