Reverted drag and drop changes

It now works again, might need to find a new way of extracting it to a
.js file