Modifications to enable Sortable view switching

In my application, the user can switch between regularly-sorted elements (up-down list) vs floated elements. When refresh() is called, this.floating is recalculated. I've also added a fix for when you drag the helper element below the last line of elements, which should automatically move it to the end of the list (but didn't when using floated elements).