Fix Bug 1035336, fix jQueryUI spaghetti and upgrade to latest