preimage cleanup