Cursor mode cleanup.