Clean up request-tests slightly

- Change some code structure and formatting and make a few tests more
  repeatable (i.e. passing now, not just the first time).
More formatting
Fix SendDomainPassword implementation