Added a cursor object to handle dragging