Added constructor and messageReceived to the monitor