HW4 - adding comments, clean-up, fixing typos.