Cleanup to drag and drop implementation.

Also includes RequireJS changes.

Fixes bugs:
STUD-755, STUD-152, STUD-700, STUD-699