Adding better purge management