Optimize prompt by removing function calls
Fix repaint issue with custom clear