minor code cleanup

added some comments