Refactor Map and its cursor.