Added sendUIMessage methods to globals to reduce boilerplate code.