Moving some utils to shared_ui.