Move get_ui_platform to a more appropriate place
Fix imports