split out messages into separate file and tests