Replace setDisplayMode() and setEditMode() with edit()