this commit contains all of the previous changes up to the one for the second review.