Refactor randomization code to be less monstrous. Remove Evaluator class and make (some of) its methods module-level methods.