Changes from @shunter code review.