General code cleanup. Properly managed destruction of jQueryUI widgets.