Add attach_comments_to function.