move to ext
generalize ui.render, return document fragment from util.empty