Added comments to variable declarations, if statements, and while loop.
Made changes in order to be pep8 compliant.