REF: make ProfileNodes an Rc-graph. Make DeviceNodes point to their ProfileNodes using Rc.