I would set up a naming convention so you can eliminate this switch and just do `var i = iD.ui.preset[d.type]()`.