Refactored widget configurator and CSS loading to use RequireJS.