fixups, cleanup, trying to understand deadlock in new code