Added purge thread