Some changes based on code reviews.