Added type property and id to message object