Updated and fixed drag events to work effectively. This was mostly a refactor of that function.