cleaning up data structures