Refactored the Queue Service