Refactored and simplified API of some tester functions.