Update code according to comments.