Some refactorings towards functional test runner