Refactor and clean up some confusion in dragging code.