Merge "Revert "Some minor simplifications in code and tests.""
am: c54ec90cc3

* commit 'c54ec90cc3c7570be2a5a64717cd10c817e246c7':
  Revert "Some minor simplifications in code and tests."