Added QueueEmpty event + refactorings