tested with keymanager and made more compatible

some stuff was a bit strange, too...
need to get these stuff with exceptions and futures straight.