Fixing itemdeltaitem delete bug. Some cleanup.