Adding comments for clarification. A few other changes based on PR feedback.