Added comments to each line, describing what each line does.