Refactoring: Moving #to_xml into Message class