Started to implement the MessageLoop class