Avoid some code duplication.
Update some comments.