Updated for new architecture (raw and send_msg)