Add support for package-json-change in tests config.
Minor refactoring.