For readability, it would be nice to break each of these delete segments into private methods.