Refactor to simplify the message-handling