some minor changes
Set a max to delete when clearing space.