Fixes to issues identified by Coverity.

Ah, OK. Just to be clear, I added some of the initializations without indication by Coverity, since I thought having them might make the code clearer. We can remove them, though. Let's talk about this next week.