UNTESTED: Save entities off the main thread.