Fix up a bunch of the drag logic, no longer bubble DOM events, support dynamically setting code values.