Code refactoring/cleanup for UnitTestEngine , made more private helper functions