Made Util.make even cleverer
Separated out dialog.js