Removed need to pass parameter to purgeUnneeded.