Add getMessage/putMessage helper functions