Changed the IMessageListener event handlers to be synchronous.