Set different cursor for differnt operation. Refactor mode functions