Modernize Cursor handling