Final tweaks based on Albert's code review.