Code commenting and formatting

Code commenting and formatting