Fixes, added new settings to control purging