refactoring/clean up; introduce TestResult abstraction instead of arrays