Move the script to split the script queues to its own method.