Queuing refactor