TestEngine class added; refactoring;