CLEANUP before switching most patterns to terminals