Define message formats and save method