Add more tests for the event queue with mocked out server responses. Minor refactoring required to make testing easier.