numerous fixes to delete and edit