Clean up random generation.