Improve the function UI and add rename support