add docstrings for messaging module