Added comments in code and adjusted some of the wording.