Changed the structure of the field "messages" from userinfo, so that it
corresponds to the one specified in issue #224. (Closes #224)