mt_queue refactor