Add partial purge function. Not yet hooked up.