moved purge function from PerformAction to BeforeInitialize hook (so it runs earlier)