Refactoring launch for tests, adding tests