Add dependency to junit-xml for Jenkins compatible output.
Refactoring

Require less passing around of parameters in the top-level logic.
Refactoring

Require less passing of arguments in top-level logic.