Added comments, made the printout iteration number easier to read.