Simple code for message-id generation.

  This updates #166.