Updated Messaging API to support multiple messages