Refactored code in TestLauncher and LauncherThreadsManager classes