Make the App Delegate close the documents before returning its answer so the games are finished before the database is saved and before all controllers are removed.
Make -[OEGameDocument close] terminate the emulation.
General code cleanup.