Revises getRandomSchedule

This alternate version of getRandomSchedule is laid out a bit nicer.
There's no functional difference between these two versions, but it
does without an anonymous inner function which I often think might be a
code smell.