Clean up after merging and randomization