Move the function of parsing the message content to an indepent file