Added an option for the message class to contain an object