added to_h to messages
added message sanitizer
whitespace