Working in the new queue layout.
Cleanup and refactor.