Fix off-by-one errors with _.random
Refactor getShuffledInput into a new getInputList function

getInputList does mostly the same thing, expect without shuffling the list. This
way, it is up to the caller whether or not to randomly sort the list.