Optimized repainting for causes when there's no need to repaint the whole screen.
Refactored repainting. Removed extended cursor option.