premerge cleanup