Merge "Some minor simplifications in code and tests."
am: 1e953c3795

* commit '1e953c3795f700a573fabfda81493ce22f143922':
  Some minor simplifications in code and tests.