Add notes to clarify code