Further work on XEP198

renamed some variables to be in sync with the wording for the
specification.