KeyManager threading solved (allegedly). Hopefully the duplicate objects
won't be a problem anymore.