Added dummyproofing and unittests to SampleReduce