clean up the structure.