Refactor dragging & linking