more cleanup of emulator structure