Added comments

Comments to explain code have been added.