Final code for programming assignment 2 txt tweak

Made minor edit to explanatory comments.