Updating the data structures.