Remove all usages of jQUery's offset and use $uiTreeHelper instead
Also fix and "undefined" exception