Updated based on PR comments.