Updated Random class to use Swift intervals.