Version 3 of Programming Assignment 2 with more comments