Improves relationship wrapper code.