Resampler fixed and tested, samplers fixed