Custom Object messages

new function for handling custom messages, allows objects to be sent, before we only allowed strings..