Clean up randcontest code.