Cleaned up "cleanupUnfold".