code improvements for message meta data