Changed Message[] to IList<Message>