Added receipt and clean up code for queue.