Various fixes to add/remove modules.
Sorting widgets is now possible. Still need to load jquery/UI properly, but at least it works.