Refactor run_test..