There is a all-in-one function ( fluid.prefs.create ) that handles the building and returns you an instantiated instance of the prefsEditor. 
It takes in a container for the prefsEditor, and then options. The options are broken down to {build: "builder options", prefsEditor: "options to the instance of the prefsEditor stack"// what you are passing in as baseOpts above}

you can see some examples in our demos e.g. https://github.com/fluid-project/infusion/blob/master/src/tests/manual-tests/js/prefsEditorSeparatedPanelSchema.js and https://github.com/GPII/prefsEditors/blob/master/demos/pmt/demo.js