Removed wait_for_emulator, cleanup