Why is that split into two functions (``remove_from_queue`` and ``remove_index_from_queue``)? The separation is not quite clear to me.