Update ui_api_refactor.py

A few minor changes