Optimize screen ESC codes