Trying to clean-up the code, have better comments, and move common code to an outside script ("do housekeeping and read data.R")