Automatic drag/drop fix

Fixes a bug where the matching column on upload would be dragged way beneath where it was supposed to go 

Also, code cleanup