Make process_message take an IMessage instead of json