Refactor: move excludes for message text into separate function