Testing script refactor part 2.