Corrects a few problems pointed out in the Code Review.

@smorin. Your concerns have been addressed in this PR.