Message related refactoring.