Sampling fixes, script tweaks