Refactoring the code to be more clean / structured. The QueueService works now as well