Implemented main steps of spinning the event loop.
- restarting of the queue is now to be implemented