Added internal code for linking/unlinking curves