various changes to the deletion routines