Refactor message format