more work on distributed memory, fixes