clean up data structures