Small refactor on dragAndDrop.js