Refactor and simplify Message implementation