Improvements to `ui.js`

You can use `_.noop`.