refactors code according to solutions videos for re-sorting queue_items and for destroying a queue item