Separate dnd handler into its own helper