First stab at refactoring queueing