more work on getting attach/detach/pivot relation pieces working properly