Adjusted random number min and max. Refactored variable names in foreach loops.