Change methods used by MR_findRandom. Add tests for MR_findRandom.