Slight refactor to the message adapter