Changed delete to use State = Deleted in some cases

I decided to put this in a separate PR.  I figured out what made my PR such a mess.  Hopefully this is better.