port over simulator launch code and unit tests