Remove unused refs to queue.
Turn copy command into API function.