Refactored QueueService