Refactor messages