Update Preserve function and minor cleanups.