Refactor AutoPurge